Browse Source

initial commit

mxmehl 3 years ago
commit
429c836ff1

+ 713
- 0
better-twitter-widget.php View File

@@ -0,0 +1,713 @@
1
+<?php
2
+
3
+/*
4
+  Plugin Name: Better Twitter Widget
5
+  Plugin URI: http://mehl.mx
6
+  Description: RSS Widget optimised for Twitter RSS feeds. Enhancement of GrandSlambert's Better RSS Widget 
7
+  Author: Max Mehl
8
+  Version: 1.0
9
+  Author URI: http://mehl.mx
10
+
11
+ * *************************************************************************
12
+
13
+  Copyright (C) 2016 Max Mehl
14
+
15
+  This program is free software: you can redistribute it and/or modify
16
+  it under the terms of the GNU General Public License as published by
17
+  the Free Software Foundation, either version 3 of the License, or
18
+  (at your option) any later version.
19
+
20
+  This program is distributed in the hope that it will be useful,
21
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
22
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
23
+  GNU General Public License for more details.
24
+
25
+  You should have received a copy of the GNU General Public License
26
+  along with this program.  If not, see <http://www.gnu.org/licenses/>.
27
+
28
+ * *************************************************************************
29
+
30
+ */
31
+
32
+/* Class Declaration */
33
+
34
+class better_twitter_widget extends WP_Widget {
35
+
36
+    var $version = '2.7.1';
37
+
38
+    /* Plugin settings */
39
+    var $optionsName = 'better-twitter-widget-options';
40
+    var $menuName = 'better-twitter-widget-settings';
41
+    var $pluginName = 'Better Twitter Widget';
42
+    var $options = array();
43
+    var $make_link = false;
44
+
45
+    /**
46
+     * Plugin Constructor Method
47
+     */
48
+    function better_twitter_widget() {
49
+        add_action('init', array($this, 'init'));
50
+
51
+        /* Set the plugin name to use the selected language. */
52
+        $this->pluginName = __('Better Twitter Widget', 'better-twitter-widget');
53
+
54
+        $widget_ops = array('description' => __('Enhancement of Better RSS Widget, focussed on plain Twitter feeds', 'better-twitter-widget'));
55
+        $control_ops = array('width' => 500, 'height' => 350);
56
+        parent::WP_Widget(false, $this->pluginName, $widget_ops, $control_ops);
57
+
58
+        /* Plugin paths */
59
+        $this->pluginPath = WP_PLUGIN_DIR . '/' . basename(dirname(__FILE__));
60
+        $this->pluginURL = WP_PLUGIN_URL . '/' . basename(dirname(__FILE__));
61
+
62
+        /* Load the plugin settings */
63
+        $this->load_settings();
64
+
65
+        /* WordPress Actions */
66
+        add_action('admin_menu', array(&$this, 'admin_menu'));
67
+        add_action('admin_init', array(&$this, 'admin_init'));
68
+        add_action('update_option_' . $this->optionsName, array(&$this, 'update_option'), 10);
69
+
70
+        /* WordPress FIlters */
71
+        add_filter('plugin_action_links', array(&$this, 'plugin_action_links'), 10, 2);
72
+
73
+        /* Add shortcode_handlers */
74
+        add_shortcode('better-rss', array($this, 'shortcode_handler'));
75
+    }
76
+
77
+    /**
78
+     * Load the plugin settings.
79
+     */
80
+    function load_settings() {
81
+        $options = get_option($this->optionsName);
82
+
83
+        $defaults = array(
84
+            'link_target' => '_blank',
85
+            'allow_intro' => (is_array($options)) ? isset($options['allow_intro']) : true,
86
+            'show_summary' => false,
87
+            'show_author' => false,
88
+            'show_date' => false,
89
+            'show_time' => false,
90
+            'nofollow' => false,
91
+            'enable_cache' => (is_array($options)) ? isset($options['enable_cache']) : true,
92
+            'cache_duration' => 3600,
93
+            'items' => 10,
94
+            'title_length' => (is_array($options) && !empty($options['title_length'])) ? isset($options['title_length']) : 0,
95
+            'excerpt' => 360,
96
+            'suffix' => ' [&hellip;]'
97
+        );
98
+
99
+        $this->options = (object) wp_parse_args($options, $defaults);
100
+    }
101
+
102
+    /**
103
+     * Load the language file during WordPress init.
104
+     */
105
+    function init() {
106
+        /* Load Langague Files */
107
+        $langDir = dirname(plugin_basename(__FILE__)) . '/lang';
108
+        load_plugin_textdomain('better-twitter-widget', false, $langDir, $langDir);
109
+    }
110
+
111
+    /**
112
+     * Add the admin page for the settings panel.
113
+     *
114
+     * @global string $wp_version
115
+     */
116
+    function admin_menu() {
117
+        $page = add_options_page($this->pluginName . __(' Settings', 'better-twitter-widget'), $this->pluginName, 'manage_options', $this->menuName, array(&$this, 'options_panel'));
118
+
119
+        add_action('admin_print_styles-' . $page, array(&$this, 'admin_print_styles'));
120
+        add_action('admin_print_scripts-' . $page, array(&$this, 'admin_print_scripts'));
121
+    }
122
+
123
+    /**
124
+     * Register the options for Wordpress MU Support
125
+     */
126
+    function admin_init() {
127
+        register_setting($this->optionsName, $this->optionsName);
128
+        wp_register_style('better-twitter-widget-admin-css', $this->pluginURL . '/includes/better-twitter-widget-admin.css');
129
+        wp_register_script('better-twitter-widget-js', $this->pluginURL . '/js/better-twitter-widget.js');
130
+    }
131
+
132
+    /**
133
+     * Print the administration styles.
134
+     */
135
+    function admin_print_styles() {
136
+        wp_enqueue_style('better-twitter-widget-admin-css');
137
+    }
138
+
139
+    /**
140
+     * Print the scripts needed for the admin.
141
+     */
142
+    function admin_print_scripts() {
143
+        wp_enqueue_script('better-twitter-widget-js');
144
+    }
145
+
146
+    /**
147
+     * Add a configuration link to the plugins list.
148
+     *
149
+     * @staticvar object $this_plugin
150
+     * @param array $links
151
+     * @param array $file
152
+     * @return array
153
+     */
154
+    function plugin_action_links($links, $file) {
155
+        static $this_plugin;
156
+
157
+        if (!$this_plugin) {
158
+            $this_plugin = plugin_basename(__FILE__);
159
+        }
160
+
161
+        if ($file == $this_plugin) {
162
+            $settings_link = '<a href="' . admin_url('options-general.php?page=' . $this->menuName) . '">' . __('Settings', 'better-twitter-widget') . '</a>';
163
+            array_unshift($links, $settings_link);
164
+        }
165
+
166
+        return $links;
167
+    }
168
+
169
+    /**
170
+     * Check on update option to see if we need to reset the options.
171
+     * @param <array> $input
172
+     * @return <boolean>
173
+     */
174
+    function update_option($input) {
175
+        if ($_REQUEST['confirm-reset-options']) {
176
+            delete_option($this->optionsName);
177
+            wp_redirect(admin_url('options-general.php?page=' . $this->menuName . '&tab=' . $_POST['active_tab'] . '&reset=true'));
178
+            exit();
179
+        } else {
180
+            wp_redirect(admin_url('options-general.php?page=' . $this->menuName . '&tab=' . $_POST['active_tab'] . '&updated=true'));
181
+            exit();
182
+        }
183
+    }
184
+
185
+    /**
186
+     * Settings management panel.
187
+     */
188
+    function options_panel() {
189
+        include($this->pluginPath . '/includes/settings.php');
190
+    }
191
+
192
+    /**
193
+     * Method to create the widget.
194
+     *
195
+     * @param array $args
196
+     * @param array $instance
197
+     * @return false
198
+     */
199
+    function widget($args, $instance) {
200
+        $instance = $this->defaults($instance);
201
+
202
+        if (isset($instance['error']) && $instance['error'])
203
+            return;
204
+
205
+        extract($args, EXTR_SKIP);
206
+
207
+        $url = $instance['rss_url'];
208
+        while (stristr($url, 'http') != $url)
209
+            $url = substr($url, 1);
210
+
211
+        if (empty($url)) {
212
+            return;
213
+        }
214
+
215
+        $rss = fetch_feed($url);
216
+        $desc = '';
217
+        $link = '';
218
+
219
+        if (!is_wp_error($rss)) {
220
+            $desc = esc_attr(strip_tags(@html_entity_decode($rss->get_description(), ENT_QUOTES, get_option('blog_charset'))));
221
+            
222
+            if (empty($instance['title'])) {
223
+                $instance['title'] = esc_html(strip_tags($rss->get_title()));
224
+            }
225
+            $link = esc_url(strip_tags($rss->get_permalink()));
226
+            while (stristr($link, 'http') != $link) {
227
+                $link = substr($link, 1);
228
+            }
229
+        }
230
+
231
+        if (empty($instance['title'])) {
232
+            $instance['title'] = empty($desc) ? __('Unknown Feed', 'better-twitter-widget') : $desc;
233
+        }
234
+
235
+        $instance['title'] = apply_filters('widget_title', $instance['title']);
236
+        $url = esc_url(strip_tags($url));
237
+        $icon = includes_url('images/rss.png');
238
+
239
+        if ($instance['title_url']) {
240
+            $url = $link = $instance['title_url'];
241
+        }
242
+
243
+        $target = '';
244
+
245
+        if ($instance['link_target'] != 'none') {
246
+            $target = 'target="' . $instance['link_target'] . '"';
247
+        }
248
+
249
+        if ($instance['title']) {
250
+            if (!$instance['no_link_title']) {
251
+                $instance['title'] = '<a class="rsswidget" href="' . $link . '" title="' . $desc . '" ' . $target . '>' . $instance['title'] . '</a>';
252
+            }
253
+
254
+            if ($instance['show_icon']) {
255
+                $instance['title'] = "<a class='rsswidget' href='" . $instance[$instance['link_icon']] . "' title='" . esc_attr(__('Syndicate this content', 'better-twitter-widget')) . "' . $target . '><img style='background:orange;color:white;border:none;' width='14' height='14' src='$icon' alt='RSS' /></a> " . $instance['title'];
256
+            }
257
+        }
258
+
259
+        print $before_widget;
260
+        if ($instance['title']) {
261
+            print $before_title . $instance['title'] . $after_title;
262
+        }
263
+
264
+        if (true == $this->options->allow_intro && !empty($instance['intro_text'])) {
265
+            print '<div class="better-rss-intro-text">' . $instance['intro_text'] . '</div>';
266
+        }
267
+
268
+        $this->rss_output($rss, $instance);
269
+        print $after_widget;
270
+    }
271
+
272
+    /**
273
+     * Method to output the RSS for the widget and shortcode_handler
274
+     *
275
+     * @param string $rss
276
+     * @param array $args
277
+     * @return blank
278
+     */
279
+    function rss_output($rss, $args = array()) {
280
+        if (is_string($rss)) {
281
+            $rss = fetch_feed($rss);
282
+        } elseif (is_array($rss) && isset($rss['url'])) {
283
+            $args = $rss;
284
+            $rss = fetch_feed($rss['url']);
285
+        } elseif (!is_object($rss)) {
286
+            return;
287
+        }
288
+
289
+        if (is_wp_error($rss)) {
290
+            if (is_admin() || current_user_can('manage_options')) {
291
+                print '<p>' . sprintf(__('<strong>RSS Error</strong>: %s', 'better-twitter-widget'), $rss->get_error_message()) . '</p>';
292
+            }
293
+
294
+            return;
295
+        }
296
+
297
+        $args = wp_parse_args($args, $this->defaults_args());
298
+        extract($args, EXTR_SKIP);
299
+
300
+        $items = (int) $items;
301
+        if ($items < 1 || 20 < $items) {
302
+            $items = 10;
303
+        }
304
+        $show_summary = (int) $show_summary;
305
+        $show_author = (int) $show_author;
306
+        $show_date = (int) $show_date;
307
+
308
+        // Set the cache duration
309
+        $rss->enable_cache($enable_cache);
310
+        $rss->set_cache_duration($cache_duration);
311
+        $rss->init();
312
+
313
+        if (!$rss->get_item_quantity()) {
314
+            print '<ul><li>' . __('An error has occurred; the feed is probably down. Try again later.', 'better-twitter-widget') . '</li></ul>';
315
+            return;
316
+        }
317
+
318
+        if (strtolower($link_target) != 'none') {
319
+            $target = 'target="' . $link_target . '"';
320
+        } else {
321
+            $target = '';
322
+        }
323
+
324
+        print '<' . $args['html_parent'] . '>';
325
+        
326
+        foreach ($rss->get_items(0, $items) as $item) {
327
+            $link = $item->get_link();
328
+            while (stristr($link, 'http') != $link) {
329
+                $link = substr($link, 1);
330
+            }
331
+            $link = esc_url(strip_tags($link));
332
+            $title = esc_attr(strip_tags($item->get_title()));
333
+            
334
+            if (empty($title)) {
335
+                $title = __('Untitled', 'better-twitter-widget');
336
+            }
337
+
338
+            $desc = str_replace(array("\n", "\r"), ' ', esc_attr(strip_tags(@html_entity_decode($item->get_description(), ENT_QUOTES, get_option('blog_charset')))));
339
+            
340
+            
341
+            // BUG -- CUSTOM comment out
342
+            /*if (!$hide_title) {
343
+                $desc = wp_html_excerpt($desc, $excerpt) . $this->options->suffix;
344
+                $desc = esc_html($desc);
345
+            }*/
346
+            $desc = esc_html($desc);
347
+
348
+            if ($show_summary) {
349
+                $summary = "<div class='rssSummary'>$desc</div>";
350
+            } else {
351
+                $summary = '';
352
+            }
353
+            
354
+            $date = '';
355
+            if ($show_date) {
356
+                $date = $item->get_date();
357
+
358
+                if ($date) {
359
+                    if ($date_stamp = strtotime($date))
360
+                        $date = ' <span class="rss-date">' . date_i18n(get_option('date_format'), $date_stamp) . '</span>';
361
+                    else
362
+                        $date = '';
363
+                }
364
+            }
365
+
366
+            $time = '';
367
+            if ($show_time) {
368
+                $time = $item->get_date();
369
+
370
+                if ($time) {
371
+                    if ($date_stamp = strtotime($time)) {
372
+                        $time = ' <span class="rss-date">' . date_i18n(get_option('time_format'), $date_stamp) . '</span>';
373
+                    } else {
374
+                        $time = '';
375
+                    }
376
+                }
377
+            }
378
+
379
+            $author = '';
380
+            if ($show_author) {
381
+                $author = $item->get_author();
382
+                if (is_object($author)) {
383
+                    $author = $author->get_name();
384
+                    $author = ' <cite>' . esc_html(strip_tags($author)) . '</cite>';
385
+                }
386
+            }
387
+
388
+            if ($hide_title && $item->get_description()) {
389
+                $title = $item->get_description();
390
+            }
391
+
392
+            if (true == $args['limit_title_length'] && $args['title_length'] > 0) {
393
+                $title = substr($title, 0, $args['title_length']);
394
+            }
395
+            
396
+            if ($args['html_parent'] === 'dl') {
397
+                $html_open = '<dt>';
398
+                $html_after_title = '</dt>';
399
+                $html_before_details = '<dd>';
400
+                $html_close = '</dd>';
401
+            } else {
402
+                $html_open = '<' . $args['html_item'] . '>';
403
+                $html_after_title = '';
404
+                $html_before_details = '';
405
+                $html_close = '</' . $args['html_item'] . '>';
406
+            }
407
+
408
+            if ($link == '' or $hide_link) {
409
+                print $html_open . $title . $html_after_title;
410
+                print $html_before_details . $date . $summary . $author . $html_close;
411
+            } else {
412
+                /* ORIG
413
+                print $html_open . '<a ';
414
+                
415
+                if ($nofollow) {
416
+                    print ' rel="nofollow" ';
417
+                }
418
+                                
419
+                print 'class="rsswidget" href="' . $link . '" title="' . $desc . '"' .  $target . '>' . $title . '</a>' . $html_after_title;
420
+                //print $html_before_details . $date . $time . $summary . $author . $html_close;
421
+                print $html_close;
422
+                ======================= */
423
+                
424
+                $search = array();
425
+                $search[0] = '/([\s>\-\.])#([[:alnum:]öäü]+)/i';  // text #hash text; >#hash text
426
+                $search[1] = '/([\s>\-\.])@([[:alnum:]_]+)/';  // @user
427
+                $search[2] = '/([\s>\-\.])(https?:[\/[:alnum:]\.\?\&#\=\%\+\-]+)/';  // http...
428
+
429
+                $replace = array();
430
+                $replace[0] = '$1<a target="_blank" href="http://twitter.com/search?q=%23$2">#$2</a>';
431
+                $replace[1] = '$1<a target="_blank" href="http://twitter.com/$2">@$2</a>';
432
+                $replace[2] = '$1<a target="_blank" href="$2">$2</a>';
433
+
434
+                $extsummary = preg_replace($search, $replace, $summary);
435
+                
436
+                // get tweet ID
437
+                $tid = preg_match('/(\d)+$/', $link, $match);
438
+                $tid = $match[0];
439
+                
440
+                // li + text
441
+                print $html_open . $extsummary ;
442
+                
443
+                print '<span style="opacity: 0.7;font-size: 0.9em;">' . $date . '</span>';
444
+
445
+                
446
+                // Action bar
447
+                print '<span style="float:right;padding-right:20px;">';
448
+                                
449
+                // reply icon
450
+                print '<a rel="nofollow" title="Reply to this tweet" target="_blank" href="https://twitter.com/intent/tweet?in_reply_to=' . $tid . '" style="border:none;padding:0 5px;"><img src="' . plugins_url( 'img/reply.png', __FILE__ ) . '" style="height:15px;width:15px;opacity:0.5;"/></a>';
451
+                // retweet icon
452
+                print '<a rel="nofollow" title="Retweet this tweet" target="_blank" href="https://twitter.com/intent/retweet?tweet_id=' . $tid . '" style="border:none;padding:0 5px;"><img src="' . plugins_url( 'img/retweet.png', __FILE__ ) . '" style="height:15px;width:15px;opacity:0.5;"/></a>';
453
+                // like icon
454
+                print '<a rel="nofollow" title="Like this tweet" target="_blank" href="https://twitter.com/intent/favorite?tweet_id=' . $tid . '" style="border:none;padding:0 5px;"><img src="' . plugins_url( 'img/like.png', __FILE__ ) . '" style="height:15px;width:15px;opacity:0.5;"/></a>';
455
+                // view on twitter icon
456
+                print '<a rel="nofollow" title="View this tweet on Twitter" target="_blank" href="' . $link . '" style="border:none;padding:0 5px;"><img src="' . plugins_url( 'img/view.png', __FILE__ ) . '" style="height:15px;width:15px;opacity:0.5;"/></a>';
457
+                                
458
+                print '</span>'; // close action bar
459
+                                
460
+                // close li
461
+                print $html_close;
462
+            }
463
+        }
464
+        print '</' . $args['html_parent'] . '>';
465
+    }
466
+
467
+    /**
468
+     * Widget Update method
469
+     * @param array $new_instance
470
+     * @param array $old_instance
471
+     * @return array
472
+     */
473
+    function update($new_instance, $old_instance) {
474
+        return $new_instance;
475
+    }
476
+
477
+    /**
478
+     * Load the instance defaults.
479
+     *
480
+     * @param array $instance
481
+     * @return array
482
+     */
483
+    function defaults($instance) {
484
+
485
+        /* Fix any old instances to use new naming convention. */
486
+        if (isset($instance['url'])) {
487
+            $instance['rss-url'] = $instance['url'];
488
+            $instance['title_url'] = $instance['titleurl'];
489
+            $instance['show_icon'] = $instance['showicon'];
490
+            $instance['show_summary'] = $instance['showsummary'];
491
+            $instance['show_author'] = $instance['showauthor'];
492
+            $instance['show_date'] = $instance['showdate'];
493
+            $instance['show_time'] = $instance['showtime'];
494
+            $instance['link_target'] = $instance['linktarget'];
495
+            $instance['title_legnth'] = (isset($instance['title_length']) ? $instance['title_length'] : $this->options->title_length);
496
+        }
497
+
498
+        /* This is the new naming convention for the form fields */
499
+        $new_defaults = array(
500
+            'rss_url' => '',
501
+            'title' => '',
502
+            'title_url' => '',
503
+            'no_link_title' => false,
504
+            'show_icon' => false,
505
+            'link_icon' => 'rss_url',
506
+            'show_summary' => $this->options->show_summary,
507
+            'show_author' => $this->options->show_author,
508
+            'show_date' => $this->options->show_date,
509
+            'show_time' => $this->options->show_time,
510
+            'link_target' => $this->options->link_target,
511
+            'nofollow' => $this->options->nofollow,
512
+            'enable_cache' => $this->options->enable_cache,
513
+            'cache_duration' => $this->options->cache_duration,
514
+            'is_home' => $this->options->is_home_default,
515
+            'is_front' => $this->options->is_front_default,
516
+            'is_archive' => $this->options->is_archive_default,
517
+            'is_search' => $this->options->is_search_default,
518
+            'is_category' => $this->options->is_category_default,
519
+            'is_tag' => $this->options->is_tag_default,
520
+            'is_single' => $this->options->is_single_default,
521
+            'is_date' => $this->options->is_date_default,
522
+            'title_length' => $this->options->title_length,
523
+            'excerpt' => $this->options->excerpt,
524
+            'items' => $this->options->items
525
+        );
526
+
527
+        return wp_parse_args($instance, $new_defaults);
528
+    }
529
+
530
+    /**
531
+     * Widget form.
532
+     *
533
+     * @param array $instance
534
+     */
535
+    function form($instance) {
536
+        if (count($instance) < 1) {
537
+            $instance = $this->defaults($instance);
538
+        }
539
+        include( $this->pluginPath . '/includes/widget-form.php');
540
+    }
541
+
542
+    /**
543
+     * Method for the [better-rss] short code.
544
+     *
545
+     * @param array $atts
546
+     * @return string
547
+     */
548
+    function shortcode_handler($atts) {
549
+        global $post;
550
+
551
+        $atts = (object) wp_parse_args($atts, $this->defaults_args());
552
+
553
+        if (!$atts->feed) {
554
+            return false;
555
+        }
556
+
557
+        if ($atts->use_title) {
558
+            $add_url[] = str_replace(' ', '+', $post->post_title);
559
+        }
560
+
561
+        if ($atts->use_tags) {
562
+            foreach (get_the_tags() as $tag) {
563
+                $add_url[] = str_replace(' ', '+', $tag->name);
564
+            }
565
+        }
566
+
567
+        if (isset($add_url) and is_array($add_url)) {
568
+            $atts->feed = $atts->feed . implode('+', $add_url);
569
+        }
570
+
571
+        ob_start();
572
+        $this->rss_output($atts->feed, $atts);
573
+        $output.= ob_get_contents();
574
+        ob_end_clean();
575
+
576
+        return $output;
577
+    }
578
+    
579
+    function defaults_args() {
580
+        return array(
581
+            // Query Attributes
582
+            'feed' => NULL,
583
+            'use_title' => false,
584
+            'use_tags' => false,
585
+            'use_category' => false,
586
+            'items' => 10,
587
+            'hide_title' => false,
588
+            'hide_link' => false,
589
+            'show_author' => $this->options->show_author,
590
+            'show_date' => $this->options->show_author,
591
+            'show_time' => $this->options->show_time,
592
+            'show_summary' => $this->options->show_summary,
593
+            'link_target' => $this->options->link_target,
594
+            'nofollow' => $this->options->nofollow,
595
+            'cache_duration' => $this->options->cache_duration,
596
+            'excerpt' => $this->options->excerpt,
597
+            'html_parent' => 'ul',
598
+            'html_item' => 'li'
599
+        );
600
+    }
601
+
602
+    /**
603
+     * Get an object with all of the post types.
604
+     *
605
+     * @return object
606
+     */
607
+    function get_post_types($args = array()) {
608
+        if (function_exists('get_post_types')) {
609
+            $post_types = get_post_types(array('public' => true));
610
+            unset($post_types['attachment']);
611
+        } else {
612
+            $post_types = array('post', 'page');
613
+        }
614
+
615
+        $defaults = array(
616
+            'output' => 'object',
617
+            'name' => 'post_type',
618
+            'id' => 'post_type'
619
+        );
620
+
621
+        $args = (object) wp_parse_args($args, $defaults);
622
+
623
+        switch ($args->output) {
624
+            case 'dropdown':
625
+                $results = '<select name="' . $args->name . '" id="' . $args->id . '">';
626
+                foreach ($post_types as $post_type) {
627
+                    $results.= '<option value="' . $post_type . '">' . $post_type . "</option>\n";
628
+                }
629
+                $results.= '</select>';
630
+                break;
631
+            default:
632
+                $results = (object) $post_types;
633
+        }
634
+
635
+        return $results;
636
+    }
637
+
638
+    /**
639
+     * Display the list of contributors.
640
+     * @return boolean
641
+     */
642
+    function contributor_list() {
643
+        if (function_exists('simplexml_load_file')) {
644
+            $this->showFields = array('NAME', 'LOCATION', 'COUNTRY');
645
+            print '<ul>';
646
+
647
+            $items = simplexml_load_file('http://cdn.grandslambert.com/xml/better-rss-widget.xml');
648
+
649
+            foreach ($items as $item) {
650
+                print '<li>';
651
+                if (empty($item->url)) {
652
+                    print $item->name;
653
+                } else {
654
+                    print '<a href="' . $item->url . '" target="_blank">' . $item->name . '</a>';
655
+                }
656
+
657
+                if (!empty($item->location)) {
658
+                    print ' from ' . $item->location;
659
+                }
660
+
661
+                if (!empty($item->country)) {
662
+                    print ', ' . $item->country;
663
+                }
664
+
665
+                print ' contributed ' . $item->item . ' on ' . date('F jS, Y', strtotime($item->date)) . '</li>';
666
+            }
667
+            print '</ul>';
668
+        } else {
669
+            _e('PHP 5 Required to see a list of contributors.', 'pretty-sidebar-categories');
670
+        }
671
+    }
672
+
673
+    /**
674
+     * Displayes any data sent in textareas.
675
+     *
676
+     * @param <type> $input
677
+     */
678
+    function debug($input) {
679
+        $contents = func_get_args();
680
+
681
+        foreach ($contents as $content) {
682
+            print '<textarea style="width:49%; height:250px; float: left;">';
683
+            print_r($content);
684
+            print '</textarea>';
685
+        }
686
+
687
+        echo '<div style="clear: both"></div>';
688
+    }
689
+
690
+}
691
+
692
+/**
693
+ * Add the widget code to the initialization action
694
+ */
695
+add_action('widgets_init', create_function('', 'return register_widget("better_twitter_widget");'));
696
+register_activation_hook(__FILE__, 'better_twitter_activate');
697
+
698
+function better_twitter_activate() {
699
+    /* Compile old options into new options Array */
700
+    $new_options = '';
701
+    $options = array('link_target', 'items', 'show_summary', 'show_author', 'show_date', 'show_time', 'enable_cache', 'cache_duration', 'is_home_default', 'is_front_default', 'is_archive_default', 'is_search_default', 'is_category_default', 'is_tag_default', 'is_single_default', 'is_date_default');
702
+
703
+    foreach ($options as $option) {
704
+        if ($old_option = get_option('better_twitter_' . $option)) {
705
+            $new_options[$option] = $old_option;
706
+            delete_option('better_twitter_' . $option);
707
+        }
708
+    }
709
+
710
+    if (is_array($new_options) and ! add_option('better-twitter-widget-options', $new_options)) {
711
+        update_option('better-twitter-widget-options', $new_options);
712
+    }
713
+}

BIN
img/like.png View File


BIN
img/reply.png View File


BIN
img/retweet.png View File


BIN
img/view.png View File


+ 94
- 0
includes/better-twitter-widget-admin.css View File

@@ -0,0 +1,94 @@
1
+@charset "UTF-8";
2
+/**
3
+ * better-rss-widget-admin.css - Stylesheet for the settings page.
4
+ *
5
+ * @package Better Twitter Widget
6
+ * @subpackage templates
7
+ * @author Max Mehl
8
+ * @copyright 2016
9
+ * @access public
10
+ * @since 2.1
11
+*/
12
+
13
+label.primary {
14
+     text-align: right;
15
+     width: 200px;
16
+     display: block;
17
+     float: left;
18
+     font-weight: bold;
19
+     color: #666;
20
+}
21
+
22
+label.better-rss-widget-post-type {
23
+     width: 125px;
24
+     float: left;
25
+     font-size: 12px;
26
+}
27
+label.better-rss-widget-hide-word {
28
+     width: 100px;
29
+     float: left;
30
+}
31
+
32
+ul#better_rss_widget_tabs {
33
+     border-bottom:1px solid #A2B6CB;
34
+     font-family:Verdana,Arial;
35
+     font-size:12px;
36
+     font-weight:bold;
37
+     list-style-type:none;
38
+     margin-bottom:12px;
39
+     padding-bottom:28px;
40
+     z-index:1;
41
+}
42
+
43
+#better_rss_widget_tabs li {
44
+     background-color: #EBEBEB;
45
+     border: 1px solid #A2B6CB;
46
+     float: left;
47
+     height: 25px;
48
+     margin: 2px 0px 0px 5px;
49
+}
50
+
51
+#better_rss_widget_tabs li a {
52
+     color: #666;
53
+     display: block;
54
+     float: right;
55
+     padding: 5px;
56
+     text-decoration: none;
57
+}
58
+
59
+
60
+
61
+#better_rss_widget_tabs li.save-tab {
62
+     background-color: #666666;
63
+     font-weight: bold;
64
+}
65
+
66
+#better_rss_widget_tabs li.save-tab a {
67
+     color: #FFFFFF;
68
+}
69
+
70
+#better_rss_widget_tabs li.better-rss-widget-selected {
71
+     background-color: #A2B6CB;
72
+}
73
+
74
+#better_rss_widget_tabs li.better-rss-widget-selected a{
75
+     color: #fff;
76
+}
77
+
78
+.better-rss-widget-settings-table {
79
+     min-height: 350px;
80
+}
81
+
82
+#better_rss_widget_footer {
83
+     clear: both;
84
+     margin-top: 15px;
85
+}
86
+
87
+#better_rss_widget_footer div.postbox {
88
+     min-height: 150px;
89
+}
90
+
91
+.form-table tr {
92
+     border-bottom: solid 1px #ddd;
93
+     padding: 5px;
94
+}

+ 120
- 0
includes/settings.php View File

@@ -0,0 +1,120 @@
1
+<?php
2
+if (preg_match('#' . basename(__FILE__) . '#', $_SERVER['PHP_SELF'])) {
3
+    die('You are not allowed to call this page directly.');
4
+}
5
+/**
6
+ * settings.php - View for the Settings page.
7
+ *
8
+ * @package Better Twitter Widget
9
+ * @subpackage includes
10
+ * @author Max Mehl
11
+ * @copyright 2016
12
+ * @access public
13
+ * @since 2.1
14
+ */
15
+?>
16
+<div class = "wrap">
17
+    <h2><?php echo $this->pluginName; ?></h2>
18
+    <div style="width:49%; float:left">
19
+        <div class="postbox">
20
+            <form method="post" action="options.php">
21
+                <?php wp_nonce_field('update-options'); ?>
22
+                <input type="hidden" name="action" value="update" />
23
+                <input type="hidden" name="page_options" value="<?php echo $this->optionsName; ?>" />
24
+
25
+                <table class="form-table">
26
+                    <thead></thead>
27
+                    <tfoot>
28
+                        <tr>
29
+                            <td colspan="2">
30
+                                <input type="submit" class="button-primary" value="<?php _e('Save Changes') ?>" />
31
+                            </td>
32
+                        </tr>
33
+                    </tfoot>
34
+                    <tbody>
35
+                        <tr align="top">
36
+                            <th scope="row"><label class="primary" for="<?php echo $this->optionsName; ?>_allow_intro"><?php _e('Use Intro Text?', 'better-twitter-widget'); ?></label></th>
37
+                            <td>
38
+                                <input type="checkbox" name="<?php echo $this->optionsName; ?>[allow_intro]" id="<?php echo $this->optionsName; ?>_allow_intro" value="1" <?php checked($this->options->allow_intro, 1); ?>>
39
+                            </td>
40
+                        </tr>
41
+                        <tr align="top">
42
+                            <th scope="row"><label class="primary" for="<?php echo $this->optionsName; ?>_link_target"><?php _e('Default Link Target', 'better-twitter-widget'); ?> : </label></th>
43
+                            <td>
44
+                                <select name="<?php echo $this->optionsName; ?>[link_target]" id="<?php echo $this->optionsName; ?>_link_target">
45
+                                    <option>None</option>
46
+                                    <option value="_blank" <?php selected($this->options->link_target, '_blank'); ?>><?php _e('New Window', 'better-twitter-widget'); ?></option>
47
+                                    <option value="_top" <?php selected($this->options->link_target, '_top'); ?>><?php _e('Top Window', 'better-twitter-widget'); ?></option>
48
+                                </select>
49
+                            </td>
50
+                        </tr>
51
+                        <tr align="top">
52
+                            <th scope="row"><label class="primary"><?php _e('Display items', 'better-twitter-widget'); ?> : </label></th>
53
+                            <td>
54
+                                <p>
55
+                                    <label>
56
+                                        <input name="<?php echo $this->optionsName; ?>[show_summary]" type="checkbox" id="better_twitter_widget_show_summary" value="1" <?php checked($this->options->show_summary, 1); ?> />
57
+                                        <?php _e('Item Summary', 'better-twitter-widget'); ?>
58
+                                    </label>
59
+                                </p>
60
+                                <p>
61
+                                    <label>
62
+                                        <input name="<?php echo $this->optionsName; ?>[show_author]" type="checkbox" id="better_twitter_widget_show_summary" value="1" <?php checked($this->options->show_author, 1); ?> />
63
+                                        <?php _e('Item Author', 'better-twitter-widget'); ?>
64
+                                    </label>
65
+                                </p>
66
+                                <p>
67
+                                    <label>
68
+                                        <input name="<?php echo $this->optionsName; ?>[show_date]" type="checkbox" id="<?php echo $this->optionsName; ?>[show_date]" value="1" <?php checked($this->options->show_date, 1); ?> />
69
+                                        <?php _e('Item Date', 'better-twitter-widget'); ?>
70
+                                    </label>
71
+                                </p>
72
+                                <p>
73
+                                    <label>
74
+                                        <input name="<?php echo $this->optionsName; ?>[show_time]" type="checkbox" id="<?php echo $this->optionsName; ?>_show_time" value="1" <?php checked($this->options->show_time, 1); ?> />
75
+                                        <?php _e('Item Time', 'better-twitter-widget'); ?>
76
+                                    </label>
77
+                                </p>
78
+                            </td>
79
+                        </tr>
80
+                        <tr align="top">
81
+                            <th scope="row"><label class="primary" for="<?php echo $this->optionsName; ?>_nofollow"><?php _e('Add nofollow to links', 'better-twitter-widget'); ?> : </label></th>
82
+                            <td><input name="<?php echo $this->optionsName; ?>[nofollow]" type="checkbox" id="<?php echo $this->optionsName; ?>_nofollow" value="1" <?php checked($this->options->nofollow, 1); ?> /> </td>
83
+                        </tr>
84
+                        <tr align="top">
85
+                            <th scope="row"><label class="primary" for="<?php echo $this->optionsName; ?>_items"><?php _e('Default Items to Display', 'better-twitter-widget'); ?></label> : </th>
86
+                            <td>
87
+                                <input type="number" name="<?php echo $this->optionsName; ?>[items]" id="<?php echo $this->optionsName; ?>_items" value="<?php echo $this->options->items; ?>" min="1" max="25" />
88
+                            </td>
89
+                        </tr>
90
+                        <tr align="top">
91
+                            <th scope="row"><label class="primary" for="<?php echo $this->optionsName; ?>_title_length"><?php _e('Max Length of Title', 'better-twitter-widget'); ?> : </label></th>
92
+                            <td colspan="2">
93
+                                <input  name="<?php echo $this->optionsName; ?>[title_length]" type="number" id="<?php echo $this->optionsName; ?>_title_length" value="<?php echo $this->options->title_length; ?>" min="0" max="100" />
94
+                                <?php _e('( Enter "0" for no limit. )', 'better-twitter-widget'); ?>
95
+                            </td>
96
+                        </tr>
97
+                        <tr align="top">
98
+                            <th scope="row"><label class="primary" for="<?php echo $this->optionsName; ?>_excerpt"><?php _e('Length of Excerpt', 'better-twitter-widget'); ?> : </label></th>
99
+                            <td colspan="2"><input  name="<?php echo $this->optionsName; ?>[excerpt]" type="number" id="<?php echo $this->optionsName; ?>_excerpt" value="<?php echo $this->options->excerpt; ?>" min="25" /></td>
100
+                        </tr>
101
+                        <tr align="top">
102
+                            <th scope="row"><label class="primary" for="<?php echo $this->optionsName; ?>_suffix"><?php _e('Add after the excerpt', 'better-twitter-widget'); ?> : </label></th>
103
+                            <td colspan="2"><input name="<?php echo $this->optionsName; ?>[suffix]" type="text" id="<?php echo $this->optionsName; ?>_suffix" value="<?php echo $this->options->suffix; ?>" /></td>
104
+                        </tr>
105
+                        <tr align="top">
106
+                            <th scope="row"><label class="primary" for="<?php echo $this->optionsName; ?>_enable_cache"><?php _e('RSS Cache', 'better-twitter-widget'); ?> : </label></th>
107
+                            <td>
108
+                                <label><input name="<?php echo $this->optionsName; ?>[enable_cache]" type="radio" id="better_twitter_widget_enable_cache" value="1" <?php checked($this->options->enable_cache, 1); ?> /> <?php _e('Enabled', 'better-twitter-widget'); ?></label>
109
+                                <label><input name="<?php echo $this->optionsName; ?>[enable_cache]" type="radio" id="better_twitter_widget_disable_cache" value="0" <?php checked($this->options->enable_cache, 0); ?> /> <?php _e('Disabled', 'better-twitter-widget'); ?></label>
110
+                            </td>
111
+                        </tr>
112
+                        <tr align="top">
113
+                            <th scope="row"><label class="primary" for="<?php echo $this->optionsName; ?>_cache_duration"><?php _e('Cache Duration (seconds)<br /><small>ex. 3600 seconds = 60 minutes</small>', 'better-twitter-widget'); ?> : </label></th>
114
+                            <td><input  name="<?php echo $this->optionsName; ?>[cache_duration]" type="number" id="<?php echo $this->optionsName; ?>_cache_duration" value="<?php echo $this->options->cache_duration; ?>" min="3600" /> <?php _e('seconds', 'better-twitter-widget'); ?>. </td>
115
+                        </tr>
116
+                    </tbody>
117
+                </table>
118
+            </form>
119
+        </div>
120
+    </div>

+ 129
- 0
includes/widget-form.php View File

@@ -0,0 +1,129 @@
1
+<?php
2
+if ( preg_match( '#' . basename( __FILE__ ) . '#', $_SERVER['PHP_SELF'] ) ) {
3
+	die( 'You are not allowed to call this page directly.' );
4
+}
5
+/**
6
+ * widget-form.php - View for the Settings page.
7
+ *
8
+ * @package Better Twitter Widget
9
+ * @subpackage includes
10
+ * @author Max Mehl
11
+ * @copyright 2016
12
+ * @access public
13
+ * @since 0.1
14
+ */
15
+?>
16
+<p>
17
+     <label for="<?php print $this->get_field_id( 'title' ); ?>">
18
+		<?php _e( 'Give the Feed a Title (optional):', 'better-rss-widget' ); ?>
19
+     </label>
20
+     <input id="<?php print $this->get_field_id( 'title' ); ?>" name="<?php print $this->get_field_name( 'title' ); ?>" type="text" value="<?php print $instance['title']; ?>" />
21
+     <label>
22
+          <input type="checkbox" id="<?php print $this->get_field_id( 'no_link_title' ); ?>" name="<?php print $this->get_field_name( 'no_link_title' ); ?>" value="1" <?php checked( $instance['no_link_title'], true ); ?> />
23
+		<?php _e( 'Do not link', 'better-rss-widget' ); ?>
24
+     </label>
25
+</p>
26
+<p>
27
+     <label for="<?php print $this->get_field_id( 'title_url' ); ?>">
28
+		<?php _e( 'Title URL (blank for RSS feed):', 'better-rss-widget' ); ?>
29
+     </label>
30
+     <input style="width:300px;" id="<?php print $this->get_field_id( 'title_url' ); ?>" name="<?php print $this->get_field_name( 'title_url' ); ?>" type="text" value="<?php print $instance['title_url']; ?>" />
31
+</p>
32
+<?php if ( true == $this->options->allow_intro ) : ?>
33
+	<p>
34
+		<label for="<?php print $this->get_field_id( 'intro_text' ); ?>">
35
+			<?php _e( 'Text to display above the links:', 'better-rss-widget' ); ?>
36
+		</label>
37
+	</p>
38
+	<p>
39
+		<textarea style="width:485px;height: 75px;" name="<?php print $this->get_field_name( 'intro_text' ); ?>" id="<?php print $this->get_field_id( 'intro_text' ); ?>"><?php echo $instance['intro_text']; ?></textarea>
40
+	</p>
41
+<?php endif; ?>
42
+<p>
43
+     <label for="<?php print $this->get_field_id( 'items' ); ?>"><?php _e( 'Show', 'better-rss-widget' ); ?></label>
44
+     <select name="<?php print $this->get_field_name( 'items' ); ?>" id="<?php print $this->get_field_id( 'items' ); ?>">
45
+		<?php
46
+		for ( $i = 1; $i <= 20; ++$i )
47
+			print "<option value='$i' " . selected( $instance['items'], $i, true ) . ">$i</option>";
48
+		?>
49
+     </select>
50
+     <label for="<?php print $this->get_field_id( 'rss_url' ); ?>">
51
+		<?php _e( 'items from', 'better-rss-widget' ); ?>
52
+     </label>
53
+     <input style="width:330px;" id="<?php print $this->get_field_id( 'rss_url' ); ?>" name="<?php print $this->get_field_name( 'rss_url' ); ?>" type="text" value="<?php print $instance['rss_url']; ?>" />
54
+</p>
55
+<p>
56
+     <input name="<?php print $this->get_field_name( 'show_icon' ); ?>" type="checkbox" id="<?php print $this->get_field_id( 'show_icon' ); ?>" value="1" <?php checked( $instance['show_icon'], 1 ); ?> />
57
+     <label for="<?php print $this->get_field_id( 'show_icon' ); ?>">
58
+		<?php _e( 'Show feed icon before title', 'better-rss-widget' ); ?>
59
+     </label>
60
+     <label><?php _e( 'and link icon to', 'better-rss-widget' ); ?></label>
61
+     <label><input type="radio" name="<?php print $this->get_field_name( 'link_icon' ); ?>" value="rss_url" <?php checked( $instance['link_icon'], 'rss_url' ); ?> /> <?php _e( 'RSS Url', 'better-rss-widget' ); ?></label>
62
+     <label><input type="radio" name="<?php print $this->get_field_name( 'link_icon' ); ?>" value="title_url" <?php checked( $instance['link_icon'], 'title_url' ); ?> /> <?php _e( 'Title Url', 'better-rss-widget' ); ?></label>
63
+</p>
64
+<p>
65
+     <input name="<?php print $this->get_field_name( 'limit_title_length' ); ?>" type="checkbox" id="<?php print $this->get_field_id( 'limit_title_length' ); ?>" value="1" <?php checked( $instance['limit_title_length'], 1 ); ?> />
66
+     <label for="<?php print $this->get_field_id( 'limit_title_length' ); ?>">
67
+		<?php _e( 'Limit length of title to', 'better-rss-widget' ); ?>
68
+     </label>
69
+     <input id="<?php print $this->get_field_id( 'title_length' ); ?>" name="<?php print $this->get_field_name( 'title_length' ); ?>" type="text" value="<?php print $instance['title_length']; ?>" />
70
+
71
+     <label for="<?php print $this->get_field_id( 'title_length' ); ?>">
72
+		<?php _e( 'characters.', 'better-rss-widget' ); ?>
73
+     </label>
74
+</p>
75
+<p>
76
+     <input name="<?php print $this->get_field_name( 'show_summary' ); ?>" type="checkbox" id="<?php print $this->get_field_id( 'show_summary' ); ?>" value="1" <?php checked( $instance['show_summary'], 1 ); ?> />
77
+     <label for="<?php print $this->get_field_id( 'show_summary' ); ?>">
78
+		<?php _e( 'Display item summary limited to', 'better-rss-widget' ); ?>
79
+     </label>
80
+     <input id="<?php print $this->get_field_id( 'excerpt' ); ?>" name="<?php print $this->get_field_name( 'excerpt' ); ?>" type="text" value="<?php print $instance['excerpt']; ?>" />
81
+
82
+     <label for="<?php print $this->get_field_id( 'excerpt' ); ?>">
83
+		<?php _e( 'characters.', 'better-rss-widget' ); ?>
84
+     </label>
85
+</p>
86
+<h3><?php _e( 'Additional Fields', 'better-rss-widget' ); ?></h3>
87
+<p>
88
+     <input type="checkbox" value="1" name="<?php print $this->get_field_name( 'show_author' ); ?>" id="<?php print $this->get_field_id( 'show_author' ); ?>" <?php checked( $instance['show_author'], 1 ); ?> />
89
+     <label for="<?php print $this->get_field_id( 'show_author' ); ?>">
90
+		<?php _e( 'Author', 'better-rss-widget' ); ?>
91
+     </label>
92
+     <input type="checkbox" value="1" name="<?php print $this->get_field_name( 'show_date' ); ?>" id="<?php print $this->get_field_id( 'show_date' ); ?>" <?php checked( $instance['show_date'], 1 ); ?> />
93
+     <label for="<?php print $this->get_field_id( 'show_date' ); ?>">
94
+		<?php _e( 'Date', 'better-rss-widget' ); ?>
95
+     </label>
96
+     <input type="checkbox" value="1" name="<?php print $this->get_field_name( 'show_time' ); ?>" id="<?php print $this->get_field_id( 'show_time' ); ?>" <?php checked( $instance['show_time'], 1 ); ?> />
97
+     <label for="<?php print $this->get_field_id( 'show_time' ); ?>">
98
+		<?php _e( 'Time', 'better-rss-widget' ); ?>
99
+     </label>
100
+     <input type="checkbox" value="1" name="<?php print $this->get_field_name( 'nofollow' ); ?>" id="<?php print $this->get_field_id( 'nofollow' ); ?>" <?php checked( $instance['nofollow'], 1 ); ?> />
101
+     <label for="<?php print $this->get_field_id( 'nofollow' ); ?>">
102
+		<?php _e( 'Add nofollow to links', 'better-rss-widget' ); ?>
103
+     </label>
104
+</p>
105
+<p>
106
+     <label for="<?php print $this->get_field_id( 'link_target' ); ?>">
107
+		<?php _e( 'Link Target:', 'better-rss-widget' ); ?>
108
+     </label>
109
+     <select name="<?php print $this->get_field_name( 'link_target' ); ?>" id="<?php print $this->get_field_id( 'link_target' ); ?>">
110
+          <option value="none" <?php selected( $instance['link_target'], 'none' ); ?>><?php _e( 'None', 'better-rss-widget' ); ?></option>
111
+          <option value="_blank" <?php selected( $instance['link_target'], '_blank' ); ?>><?php _e( 'New Window', 'better-rss-widget' ); ?></option>
112
+          <option value="_top" <?php selected( $instance['link_target'], '_top' ); ?>><?php _e( 'Top Window', 'better-rss-widget' ); ?></option>
113
+     </select>
114
+</p>
115
+
116
+<h3><?php _e( 'Cache Settings', 'better-rss-widget' ); ?></h3>
117
+<p>
118
+     <input type="checkbox" value="1" name="<?php print $this->get_field_name( 'enable_cache' ); ?>" id="<?php print $this->get_field_id( 'enable_cache' ); ?>" <?php checked( $instance['enable_cache'], 1 ); ?> />
119
+     <label for="<?php print $this->get_field_id( 'enable_cache' ); ?>">
120
+		<?php _e( 'Enable Cache?', 'better-rss-widget' ); ?>
121
+     </label>
122
+</p>
123
+<p>
124
+     <label for="<?php print $this->get_field_id( 'cache_duration' ); ?>">
125
+		<?php _e( 'Cache Duration (seconds)<br /><small>ex. 3600 seconds = 60 minutes</small>', 'better-rss-widget' ); ?>
126
+     </label>
127
+     <input  id="<?php print $this->get_field_id( 'cache_duration' ); ?>" name="<?php print $this->get_field_name( 'cache_duration' ); ?>" type="text" value="<?php print $instance['cache_duration']; ?>" />
128
+	<?php _e( 'seconds', 'better-rss-widget' ); ?>.
129
+</p>

+ 45
- 0
js/better-twitter-widget.js View File

@@ -0,0 +1,45 @@
1
+/**
2
+ * better-rss-widget.js - Javascript for the Settings page.
3
+ *
4
+ * @package Better Twitter Widget
5
+ * @subpackage includes
6
+ * @author Max Mehl
7
+ * @copyright 2016
8
+ * @access public
9
+ * @since 2.1
10
+ */
11
+
12
+/* Function to search for shortcode in post types. */
13
+function better_rss_widget_search() {
14
+     var type = document.getElementById('better_rss_search_type').value;
15
+     var url = document.getElementById('better_rss_url').value;
16
+     window.location = url + type;
17
+}
18
+
19
+/* Function to submit the form from the save settings tab */
20
+function better_rss_widget_save_settings () {
21
+     document.getElementById('better_rss_widget_settings').submit();
22
+}
23
+/* Function to change tabs on the settings pages */
24
+function better_rss_widget_show_tab(tab) {
25
+     /* Close Active Tab */
26
+     activeTab = document.getElementById('active_tab').value;
27
+     document.getElementById('better_rss_widget_box_' + activeTab).style.display = 'none';
28
+     document.getElementById('better_rss_widget_' + activeTab).removeAttribute('class','better-rss-widget-selected');
29
+
30
+     /* Open new Tab */
31
+     document.getElementById('better_rss_widget_box_' + tab).style.display = 'block';
32
+     document.getElementById('better_rss_widget_' + tab).setAttribute('class','better-rss-widget-selected');
33
+     document.getElementById('active_tab').value = tab;
34
+}
35
+
36
+/* Function to verify selection to reset options */
37
+function better_rss_widget_reset(element) {
38
+     if (element.checked) {
39
+          if (prompt('Are you sure you want to reset all of your options? To confirm, type the word "reset" into the box.') == 'reset' ) {
40
+               document.getElementById('better_rss_widget_settings').submit();
41
+          } else {
42
+               element.checked = false;
43
+          }
44
+     }
45
+}

+ 427
- 0
lang/better-twitter-widget.pot View File

@@ -0,0 +1,427 @@
1
+# Copyright (C) 2012 Better RSS Widget - Twitter Version
2
+# This file is distributed under the same license as the Better RSS Widget - Twitter Version package.
3
+msgid ""
4
+msgstr ""
5
+"Project-Id-Version: Better RSS Widget - Twitter Version 2.6\n"
6
+"Report-Msgid-Bugs-To: http://wordpress.org/tag/better-rss-widget\n"
7
+"POT-Creation-Date: 2012-12-28 21:07:23+00:00\n"
8
+"MIME-Version: 1.0\n"
9
+"Content-Type: text/plain; charset=UTF-8\n"
10
+"Content-Transfer-Encoding: 8bit\n"
11
+"PO-Revision-Date: 2012-MO-DA HO:MI+ZONE\n"
12
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13
+"Language-Team: LANGUAGE <LL@li.org>\n"
14
+
15
+#. #-#-#-#-#  better-rss-widget.pot (Better RSS Widget - Twitter Version 2.6)  #-#-#-#-#
16
+#. Plugin Name of the plugin/theme
17
+#: better-rss-widget.php:51
18
+msgid "Better RSS Widget - Twitter Version"
19
+msgstr ""
20
+
21
+#: better-rss-widget.php:53
22
+msgid "Replaces the built in RSS Widget adding more options. By Max Mehl."
23
+msgstr ""
24
+
25
+#: better-rss-widget.php:127
26
+msgid " Settings"
27
+msgstr ""
28
+
29
+#: better-rss-widget.php:172
30
+msgid "Settings"
31
+msgstr ""
32
+
33
+#: better-rss-widget.php:255
34
+msgid "Unknown Feed"
35
+msgstr ""
36
+
37
+#: better-rss-widget.php:278
38
+msgid "Syndicate this content"
39
+msgstr ""
40
+
41
+#: better-rss-widget.php:314
42
+msgid "<strong>RSS Error</strong>: %s"
43
+msgstr ""
44
+
45
+#: better-rss-widget.php:351
46
+msgid "An error has occurred; the feed is probably down. Try again later."
47
+msgstr ""
48
+
49
+#: better-rss-widget.php:370
50
+msgid "Untitled"
51
+msgstr ""
52
+
53
+#: includes/footer.php:19
54
+msgid "Credits"
55
+msgstr ""
56
+
57
+#: includes/footer.php:23
58
+msgid ""
59
+"Thank you for trying the %1$s plugin - I hope you find it useful. For the "
60
+"latest updates on this plugin, vist the %2$s. If you have problems with this "
61
+"plugin, please use our %3$s or check out the %4$s."
62
+msgstr ""
63
+
64
+#: includes/footer.php:25
65
+msgid "official site"
66
+msgstr ""
67
+
68
+#: includes/footer.php:26
69
+msgid "Support Forum"
70
+msgstr ""
71
+
72
+#: includes/footer.php:27 includes/sidebar-frame.php:33
73
+msgid "Documentation Page"
74
+msgstr ""
75
+
76
+#: includes/footer.php:33
77
+msgid "This plugin is &copy; %1$s by %2$s and is released under the %3$s"
78
+msgstr ""
79
+
80
+#: includes/footer.php:36
81
+msgid "GNU General Public License"
82
+msgstr ""
83
+
84
+#: includes/footer.php:43
85
+msgid "Donate"
86
+msgstr ""
87
+
88
+#: includes/footer.php:46
89
+msgid ""
90
+"If you find this plugin useful, please consider supporting this and our "
91
+"other great %1$s."
92
+msgstr ""
93
+
94
+#: includes/footer.php:46
95
+msgid "plugins"
96
+msgstr ""
97
+
98
+#: includes/footer.php:47
99
+msgid "Donate a few bucks!"
100
+msgstr ""
101
+
102
+#: includes/settings/administration.php:19 includes/settings.php:29
103
+msgid "Administration"
104
+msgstr ""
105
+
106
+#: includes/settings/administration.php:25
107
+msgid "Reset to default"
108
+msgstr ""
109
+
110
+#: includes/settings/administration.php:29
111
+msgid "Shortcode Search"
112
+msgstr ""
113
+
114
+#: includes/settings/administration.php:31
115
+msgid "Search for instances of the shortcode in"
116
+msgstr ""
117
+
118
+#: includes/settings/administration.php:33
119
+msgid "Search"
120
+msgstr ""
121
+
122
+#: includes/settings/administration.php:39
123
+msgid "Back-up Options"
124
+msgstr ""
125
+
126
+#: includes/settings/administration.php:43
127
+msgid "Restore Options"
128
+msgstr ""
129
+
130
+#: includes/settings/cache.php:20
131
+msgid "Feed Cache Settings"
132
+msgstr ""
133
+
134
+#: includes/settings/cache.php:25
135
+msgid "RSS Cache"
136
+msgstr ""
137
+
138
+#: includes/settings/cache.php:27
139
+msgid "Enabled"
140
+msgstr ""
141
+
142
+#: includes/settings/cache.php:28
143
+msgid "Disabled"
144
+msgstr ""
145
+
146
+#: includes/settings/cache.php:32 includes/widget-form.php:143
147
+msgid ""
148
+"Cache Duration (seconds)<br /><small>ex. 3600 seconds = 60 minutes</small>"
149
+msgstr ""
150
+
151
+#: includes/settings/cache.php:33 includes/widget-form.php:146
152
+msgid "seconds"
153
+msgstr ""
154
+
155
+#: includes/settings/display.php:19
156
+msgid "Default Display Settings"
157
+msgstr ""
158
+
159
+#: includes/settings/display.php:30
160
+msgid "Use Intro Text?"
161
+msgstr ""
162
+
163
+#: includes/settings/display.php:36
164
+msgid "Default Link Target"
165
+msgstr ""
166
+
167
+#: includes/settings/display.php:40 includes/widget-form.php:111
168
+msgid "New Window"
169
+msgstr ""
170
+
171
+#: includes/settings/display.php:41 includes/widget-form.php:112
172
+msgid "Top Window"
173
+msgstr ""
174
+
175
+#: includes/settings/display.php:46
176
+msgid "Display items"
177
+msgstr ""
178
+
179
+#: includes/settings/display.php:50
180
+msgid "Item Summary"
181
+msgstr ""
182
+
183
+#: includes/settings/display.php:55
184
+msgid "Item Author"
185
+msgstr ""
186
+
187
+#: includes/settings/display.php:64
188
+msgid "Item Date"
189
+msgstr ""
190
+
191
+#: includes/settings/display.php:70
192
+msgid "Item Time"
193
+msgstr ""
194
+
195
+#: includes/settings/display.php:75 includes/widget-form.php:102
196
+msgid "Add nofollow to links"
197
+msgstr ""
198
+
199
+#: includes/settings/display.php:79
200
+msgid "Default Items to Display"
201
+msgstr ""
202
+
203
+#: includes/settings/display.php:89
204
+msgid "Max Length of Title"
205
+msgstr ""
206
+
207
+#: includes/settings/display.php:92
208
+msgid "( Enter \"0\" for no limit. )"
209
+msgstr ""
210
+
211
+#: includes/settings/display.php:96
212
+msgid "Length of Excerpt"
213
+msgstr ""
214
+
215
+#: includes/settings/display.php:100
216
+msgid "Add after the excerpt"
217
+msgstr ""
218
+
219
+#: includes/settings/page.php:19
220
+msgid "Default Page Settings"
221
+msgstr ""
222
+
223
+#: includes/settings/page.php:25
224
+msgid "Decide which boxes will be checked automatically on the widgets form."
225
+msgstr ""
226
+
227
+#: includes/settings/page.php:28 includes/widget-form.php:120
228
+msgid "Home Page"
229
+msgstr ""
230
+
231
+#: includes/settings/page.php:29 includes/widget-form.php:121
232
+msgid "Front Page"
233
+msgstr ""
234
+
235
+#: includes/settings/page.php:30 includes/widget-form.php:126
236
+msgid "Archive Page"
237
+msgstr ""
238
+
239
+#: includes/settings/page.php:31 includes/widget-form.php:127
240
+msgid "Category Page"
241
+msgstr ""
242
+
243
+#: includes/settings/page.php:34 includes/widget-form.php:128
244
+msgid "Tag Page"
245
+msgstr ""
246
+
247
+#: includes/settings/page.php:35 includes/widget-form.php:122
248
+msgid "Search Page"
249
+msgstr ""
250
+
251
+#: includes/settings/page.php:36
252
+msgid "Post Page"
253
+msgstr ""
254
+
255
+#: includes/settings/page.php:37 includes/widget-form.php:129
256
+msgid "Date Page"
257
+msgstr ""
258
+
259
+#: includes/settings.php:26
260
+msgid "Display Settings"
261
+msgstr ""
262
+
263
+#: includes/settings.php:27
264
+msgid "Page Settings"
265
+msgstr ""
266
+
267
+#: includes/settings.php:28 includes/widget-form.php:134
268
+msgid "Cache Settings"
269
+msgstr ""
270
+
271
+#: includes/settings.php:38
272
+msgid "Plugin Settings"
273
+msgstr ""
274
+
275
+#: includes/settings.php:41
276
+msgid "Better RSS Widget - Twitter Version settings have been reset to defaults."
277
+msgstr ""
278
+
279
+#: includes/settings.php:54
280
+msgid "Save Settings"
281
+msgstr ""
282
+
283
+#: includes/sidebar-frame.php:19
284
+msgid "Plugin Information"
285
+msgstr ""
286
+
287
+#: includes/sidebar-frame.php:22
288
+msgid ""
289
+"This page sets the defaults for the plugin. Each of these settings can be "
290
+"overridden when you add an index to your page."
291
+msgstr ""
292
+
293
+#: includes/sidebar-frame.php:23
294
+msgid "You are using"
295
+msgstr ""
296
+
297
+#: includes/sidebar-frame.php:28
298
+msgid "Usage"
299
+msgstr ""
300
+
301
+#: includes/sidebar-frame.php:32
302
+msgid ""
303
+"See the %1$s for this plugin for more details on what each of these settings "
304
+"does."
305
+msgstr ""
306
+
307
+#: includes/sidebar-frame.php:39
308
+msgid "Recent Contributors"
309
+msgstr ""
310
+
311
+#: includes/sidebar-frame.php:42
312
+msgid ""
313
+"GrandSlambert would like to thank these wonderful contributors to this "
314
+"plugin!"
315
+msgstr ""
316
+
317
+#: includes/widget-form.php:18
318
+msgid "Give the Feed a Title (optional):"
319
+msgstr ""
320
+
321
+#: includes/widget-form.php:23
322
+msgid "Do not link"
323
+msgstr ""
324
+
325
+#: includes/widget-form.php:28
326
+msgid "Title URL (blank for RSS feed):"
327
+msgstr ""
328
+
329
+#: includes/widget-form.php:35
330
+msgid "Text to display above the links:"
331
+msgstr ""
332
+
333
+#: includes/widget-form.php:43
334
+msgid "Show"
335
+msgstr ""
336
+
337
+#: includes/widget-form.php:51
338
+msgid "items from"
339
+msgstr ""
340
+
341
+#: includes/widget-form.php:58
342
+msgid "Show feed icon before title"
343
+msgstr ""
344
+
345
+#: includes/widget-form.php:60
346
+msgid "and link icon to"
347
+msgstr ""
348
+
349
+#: includes/widget-form.php:61
350
+msgid "RSS Url"
351
+msgstr ""
352
+
353
+#: includes/widget-form.php:62
354
+msgid "Title Url"
355
+msgstr ""
356
+
357
+#: includes/widget-form.php:67
358
+msgid "Limit length of title to"
359
+msgstr ""
360
+
361
+#: includes/widget-form.php:72 includes/widget-form.php:83
362
+msgid "characters."
363
+msgstr ""
364
+
365
+#: includes/widget-form.php:78
366
+msgid "Display item summary limited to"
367
+msgstr ""
368
+
369
+#: includes/widget-form.php:86
370
+msgid "Additional Fields"
371
+msgstr ""
372
+
373
+#: includes/widget-form.php:90
374
+msgid "Author"
375
+msgstr ""
376
+
377
+#: includes/widget-form.php:94
378
+msgid "Date"
379
+msgstr ""
380
+
381
+#: includes/widget-form.php:98
382
+msgid "Time"
383
+msgstr ""
384
+
385
+#: includes/widget-form.php:107
386
+msgid "Link Target:"
387
+msgstr ""
388
+
389
+#: includes/widget-form.php:110
390
+msgid "None"
391
+msgstr ""
392
+
393
+#: includes/widget-form.php:115
394
+msgid "Display this widget on"
395
+msgstr ""
396
+
397
+#: includes/widget-form.php:116
398
+msgid ""
399
+"To display on Category or Tag pages you must also include the \"Archive\" "
400
+"page."
401
+msgstr ""
402
+
403
+#: includes/widget-form.php:123
404
+msgid "Single Post"
405
+msgstr ""
406
+
407
+#: includes/widget-form.php:138
408
+msgid "Enable Cache?"
409
+msgstr ""
410
+
411
+#. Plugin URI of the plugin/theme
412
+msgid "http://grandslambert.tk/plugins/better-rss-widget.html"
413
+msgstr ""
414
+
415
+#. Description of the plugin/theme
416
+msgid ""
417
+"Replacement for the built in RSS widget that adds an optional link target, "
418
+"shortcode_handler, and page conditionals."
419
+msgstr ""
420
+
421
+#. Author of the plugin/theme
422
+msgid "grandslambert"
423
+msgstr ""
424
+
425
+#. Author URI of the plugin/theme
426
+msgid "http://grandslambert.tk/"
427
+msgstr ""

+ 263
- 0
readme.txt View File

@@ -0,0 +1,263 @@
1
+=== Better RSS Widget - Twitter Version ===
2
+Contributors: Max Mehl
3
+Tags: rss, link, list, target, feed, syndicate, shortcode, posts, page, twitter
4
+Requires at least: 2.5
5
+Tested up to: 4.5.3
6
+Stable tag: trunk
7
+License: GPLv2 or later
8
+License URI: http://www.gnu.org/licenses/gpl-2.0.html
9
+
10
+Enhanced version of GrandSlamberts Better RSS Widget that specifically supports generated RSS feeds from Twitter (generated by a service like "Rss Bridge")
11
+
12
+== Description ==
13
+
14
+Enhanced version of GrandSlamberts Better RSS Widget that specifically supports generated RSS feeds from Twitter (generated by a service like "Rss Bridge")
15
+
16
+= Usage Notice =
17
+
18
+This plugin does not, and cannot replace the existing RSS Widget. Once you install, activate, and configure this plugin you must go to your Widgets page and either replace existing RSS widgets with the new widget, or add new Better RSS Widgets.
19
+
20
+= Features =
21
+
22
+* Add title or post tags to the feed URL in the shortcode.
23
+* Excerpt length can be set in both the widget and the shortcode.
24
+* Limit the number of characters to display for the title of the post.
25
+* Add text or html before the list of posts on widgets.
26
+* Shortcode to allow embedding RSS feeds into posts and pages.
27
+* Choose whether to cache the RSS feed and set the cache duration per feed, defaults to 3600 seconds (1 hour).
28
+* Option to display the post time.
29
+* Allows multiple widgets each with different settings.
30
+* Adds the link target to both the RSS Title and all articles.
31
+* Default settings screen allows you to decide what defaults will appear when adding a new widget.
32
+
33
+= Languages =
34
+
35
+This plugin includes the following translations. Translations listed with no translator were created by the plugin developer using Google Translate. If you can improve these, you can get your name listed here!
36
+
37
+* English
38
+* Spanish
39
+* Italian
40
+* German
41
+* French
42
+
43
+== Installation ==
44
+
45
+1. Upload `better-rss-widget` folder to the `/wp-content/plugins/` directory
46
+2. Activate the plugin through the 'Plugins' menu in WordPress
47
+3. Configure the defaults on the options menu screen.
48
+4. Add new "Better RSS Widgets" or replace existing "RSS" widgets to use the new settings.
49
+
50
+== Changelog ==
51
+
52
+= 2.7.1 - January 11th, 2015 =
53
+
54
+* Emergency release to fix missing widgets.
55
+
56
+= 2.7.0 - January 10th, 2016 =
57
+
58
+* Tested and made enhancements to work with the latest version of WordPress (4.4.1)
59
+* Added option to change the HTML tags used for the list.
60
+* Fixed link to support to use the WordPress support area.
61
+* Removed the "Display this widget on" feature. Please use JetPack's Widget Visibility feature for this.
62
+
63
+= 2.6.1 - December 28th, 2012 =
64
+
65
+* Quick fix to properly display the list of contributors.
66
+
67
+= 2.6 - December 28th, 2012 =
68
+
69
+* Updated links in preparation for new features.
70
+* Fixed errors in language file so all text can be translated.
71
+* Added the ability to include a short description before the list.
72
+
73
+= 2.5 - March 1st, 2011 =
74
+
75
+* Changed the language on the widget form to make the page selection more clear.
76
+* Defaulted all display settings to checked for easier installs.
77
+* Fixed a bug that did not keep all settings set when saving widget settings.
78
+
79
+= 2.4 - February 27th, 2011 =
80
+
81
+* Changed the plugin options to use an object for cleaner code.
82
+* Turned on the RSS Cache by default. Can be turned off in settings.
83
+* Added default options in settings to the shortcode display - now follows your settings.
84
+* Fixed an error where the link target setting was not used in the shortcode.
85
+* Shortcode now uses the cache if it is enable in the plugin settings.
86
+* Added an option on the administration tab to search for instances of shortcode in all post types.
87
+* Added language translations for Spanish, French, German, and Italian.
88
+
89
+= 2.3 - February 24th, 2011 =
90
+
91
+* Changed some code to work with the newly released WordPress 3.1 version.
92
+* Removed some error code during the plugin activation sequence.
93
+* Fixed a couple errors in the langauge settings.
94
+* Fixed the reset and save settings tabs so they do not conflict with other plugins.
95
+
96
+= 2.2 - February 15th, 2011 =
97
+
98
+* Fixed an issue where the link target setting was not working.
99
+* Fixed an issue on the widget form that prevented some settings from being unset.
100
+* Fixed an issue where the feed title was not used with the form title was left blank.
101
+
102
+= 2.1 - February 11th, 2011 =
103
+
104
+* Cleaned up code to remove extra stuff and reduce load.
105
+* Updated the settings screen to use my standard tabs.
106
+* Fixed a bug that would not allow you to set the target of links to none.
107
+* Fixed a bug that would force default settings over widget settings.
108
+* Added an option to link the RSS Icon to either the RSS URL or the URL entered for the title of the widget.
109
+* Added an option to not link the title of the widget.
110
+* Adjusted the widget form to reduce the height.
111
+
112
+= 2.0 - July 22nd, 2010 =
113
+
114
+* Fixed a bug that caused IE8 to display all text after a feed as a link.
115
+* Fixed broken links on the settings page.
116
+* Fixed a few text entries to allow full language translation.
117
+
118
+= 1.9 - June 3rd, 2010 =
119
+
120
+* Added the ability to set the number of words for item descriptions.
121
+* Added option to set the link URL for the feed title.
122
+* Added option in sidebar widget to hide the feed icon.
123
+
124
+= 1.8.1 - May 11th, 2010 =
125
+
126
+* Fixing a bug created by adding the features in 1.8.
127
+
128
+= 1.8 - May 11th, 2010 =
129
+
130
+* Added option for shortcode to use title or tags in the feed URL.
131
+
132
+= 1.7 - May 11th, 2010 =
133
+
134
+* Fixed some code issues that were causing problems in 2.9.2.
135
+* Added fields to make it easier to translate the plugin.
136
+
137
+= 1.6 - December 18th, 2009 =
138
+
139
+* Fixed a bug where the widget defaults were overridding the instance settings.
140
+
141
+= 1.5 - December 18th, 2009 =
142
+
143
+* Added two new global options, excerpt length and exerpt prefix.
144
+* I really SHOULD look at all the suggestions when doing upgrades. :)
145
+
146
+= 1.4 - December 17th, 2009 =
147
+
148
+* Added option to add a nofollow tag to all links.
149
+* Converted the options to save in one record instead of multiple records.
150
+* Code cleanup and optimization.
151
+
152
+= 1.3 - December 17th, 2009 =
153
+
154
+* Removed a line of debug code that displayed with the shortcode.
155
+
156
+= 1.2 - December 17th, 2009 =
157
+
158
+* Removed code that caused the plugin to cause fatal errors on PHP4 servers.
159
+
160
+= 1.1 - December 17th, 2009 =
161
+
162
+* Fixed a bug so the plugin works in Wordpress MU.
163
+* Added an option to the shortcode to display only the content, or the title if the content is blank.
164
+
165
+= 1.0 - December 11th, 2009 =
166
+
167
+* Added conditionals to the widget to limit display to certain page types.
168
+
169
+= 0.9 - November 21st, 2009 =
170
+
171
+* Added a shortcode to allow embedding RSS feeds into posts and pages.
172
+
173
+= 0.8.5 - October 27th, 2009 =
174
+
175
+* Removed some debugging code left during the 0.8 upgrade.
176
+
177
+= 0.8 - October 26th, 2009 =
178
+
179
+* Added option to disable the feed cache (enabled by default).
180
+* Change the default cache duration from 12 hours, set by Wordpress, to 1 hour.
181
+* Added option to set the cache duration globally and per widget.
182
+* Added option to display the time for items.
183
+* Fixed a bug where the default settings were not being used in the widget form.
184
+
185
+= 0.7 - October 24th, 2009 =
186
+
187
+* Fixed an error that prevent the widget form appearing on servers running PHP4.
188
+* Cleaned up the code and fixed a security issue.
189
+* Added a screenshot of the new screen.
190
+
191
+= 0.6 - October 16th, 2009 =
192
+
193
+* Fixed a bug that caused a problem on older versions of RSS feeds.
194
+
195
+= 0.5 - October 14th, 2009 =
196
+
197
+* First release
198
+
199
+== Upgrade Notice ==
200
+
201
+= 2.7.1 =
202
+Emergency maintenance release to fix missing widgets. No changes needed.
203
+
204
+= 2.7.0 =
205
+If you are using the option to display a widget on specific pages, you must update your widgets as this feature has been removed.
206
+
207
+= 2.6.1 =
208
+Maintenance release.
209
+
210
+= 2.6 =
211
+Fixes a language issue and adds the ability to include text before links.
212
+
213
+= 2.5 =
214
+Fixes issues with the form and checkbox defaults.
215
+
216
+= 2.4 =
217
+Fixes the shortcode to use target and cache.
218
+
219
+= 2.3 =
220
+Fixes issues in the settings page so reset and save work properly.
221
+
222
+= 2.1 =
223
+Code cleanup - nothing new so not required.
224
+
225
+= 2.0 =
226
+Fixes bugs that cause issues in Internet Explorer 8.
227
+
228
+= 1.9 =
229
+Great new features to customize your feed.
230
+
231
+= 1.6 =
232
+Upgrade IMMEDIATELY - version 1.5 is broken.
233
+
234
+= 1.4 =
235
+Not required, just adds new features.
236
+
237
+= 1.3 =
238
+Required update to remove bug testing output on your site.
239
+
240
+= 1.2 =
241
+Required update if running Wordpress on a PHP4 server.
242
+
243
+= 1.1 =
244
+This version fixes a bug that prevents saving plugin settings on Wordpress MU.
245
+
246
+== Frequently Asked Questions ==
247
+
248
+= Why this plugin when there is already an RSS Widget? =
249
+
250
+At the time this plugin was created (Wordpress version 2.8.4), the built in widget did not have an option to force RSS links to open in a new window. The only way to do this was to hack into the core code of Wordpress, which is not recommended. It is hoped that eventually Wordpress will simply add this option to their widget, but until then, this becomes a quick and easy solution.
251
+
252
+= Where can I get support? =
253
+
254
+http://wordpress.org/support/plugin/better-rss-widget
255
+
256
+== Screenshots ==
257
+
258
+1. Sample output for the sidebar.
259
+2. The form for setting up the widget.
260
+3. Cache Settings page.
261
+4. Page Settings where you can select the default pages to show the widget on.
262
+5. Plugin settings page.
263
+6. Sample output from the shortcode with date and summary.

Loading…
Cancel
Save