Rotating Tweets (Twitter widget and shortcode) - Version 0.501

Version Description

Download this release

Release Info

Developer mpntod
Plugin Icon wp plugin Rotating Tweets (Twitter widget and shortcode)
Version 0.501
Comparing to
See all releases

Code changes from version 0.500 to 0.501

Files changed (3) hide show
  1. css/style.css +8 -1
  2. js/rotating_tweet.js +7 -0
  3. rotatingtweets.php +11 -1
css/style.css CHANGED
@@ -16,4 +16,11 @@ p.rtw_meta {
16
  #content .rotatingtweet {
17
  padding-top: 1%;
18
  padding-bottom: 1%;
19
- }
 
 
 
 
 
 
 
16
  #content .rotatingtweet {
17
  padding-top: 1%;
18
  padding-bottom: 1%;
19
+ }
20
+ div.rtw_nav {
21
+ text-align: center;
22
+ font-size: 2em;
23
+ }
24
+ div.rtw_nav a.activeSlide {
25
+ color: red;
26
+ }
js/rotating_tweet.js CHANGED
@@ -21,6 +21,13 @@ jQuery(document).ready(function() {
21
  pause: 1,
22
  height: rotate_height,
23
  timeout: rotate_timeout,
 
 
 
 
 
 
 
24
  fx: rotate_fx
25
  });
26
  });
21
  pause: 1,
22
  height: rotate_height,
23
  timeout: rotate_timeout,
24
+ prev: jQuery(rotate_id).find('.rtw_prev'),
25
+ next: jQuery(rotate_id).find('.rtw_next'),
26
+ pager: rotate_id + '_nav',
27
+ pagerAnchorBuilder: function(idx, slide) {
28
+ // return sel string for existing anchor
29
+ return rotate_id + '_nav a:eq(' + (idx) + ')';
30
+ },
31
  fx: rotate_fx
32
  });
33
  });
rotatingtweets.php CHANGED
@@ -2,7 +2,7 @@
2
  /*
3
  Plugin Name: Rotating Tweets widget & shortcode
4
  Description: Replaces a shortcode such as [rotatingtweets userid='your_twitter_name'], or a widget, with a rotating tweets display
5
- Version: 0.500
6
  Author: Martin Tod
7
  Author URI: http://www.martintod.org.uk
8
  License: GPL2
@@ -472,6 +472,11 @@ function rotating_tweets_display($json,$args,$print=TRUE) {
472
  if(!empty($meta)) $meta .= ' · ';
473
  $meta .= '<a href="http://twitter.com/intent/tweet?in_reply_to='.$twitter_object->id_str.'">reply</a> &middot; <a href="http://twitter.com/intent/retweet?tweet_id='.$twitter_object->id_str.'">retweet</a> &middot; <a href="http://twitter.com/intent/favorite?tweet_id='.$twitter_object->id_str.'">favorite</a>';
474
  endif;
 
 
 
 
 
475
  if(!empty($meta)):
476
  $result .= "\n\t\t<p class='rtw_meta'>".ucfirst($meta)."</p>";
477
  endif;
@@ -485,6 +490,11 @@ function rotating_tweets_display($json,$args,$print=TRUE) {
485
  endforeach;
486
  endif;
487
  $result .= "\n</div>";
 
 
 
 
 
488
  if($args['show_follow'] && !empty($user->screen_name)):
489
  unset($shortenvariables);
490
  if($args['no_show_count']) $shortenvariables = ' data-show-count="false"';
2
  /*
3
  Plugin Name: Rotating Tweets widget & shortcode
4
  Description: Replaces a shortcode such as [rotatingtweets userid='your_twitter_name'], or a widget, with a rotating tweets display
5
+ Version: 0.501
6
  Author: Martin Tod
7
  Author URI: http://www.martintod.org.uk
8
  License: GPL2
472
  if(!empty($meta)) $meta .= ' &middot; ';
473
  $meta .= '<a href="http://twitter.com/intent/tweet?in_reply_to='.$twitter_object->id_str.'">reply</a> &middot; <a href="http://twitter.com/intent/retweet?tweet_id='.$twitter_object->id_str.'">retweet</a> &middot; <a href="http://twitter.com/intent/favorite?tweet_id='.$twitter_object->id_str.'">favorite</a>';
474
  endif;
475
+ /* Experiment with Prev / Next buttons */
476
+ if(!$args['show_meta_prev_next']):
477
+ if(!empty($meta)) $meta .= ' &middot; ';
478
+ $meta .= '<a href="#" class="rtw_prev">prev</a> &middot; <a href="#" class="rtw_next">next</a>';
479
+ endif;
480
  if(!empty($meta)):
481
  $result .= "\n\t\t<p class='rtw_meta'>".ucfirst($meta)."</p>";
482
  endif;
490
  endforeach;
491
  endif;
492
  $result .= "\n</div>";
493
+ $result .= "<div id='".$id."_nav' class='rtw_nav'>";
494
+ for ($i = 1; $i <= $tweet_count; $i++) {
495
+ $result .= '<a href="#">&bull;</a> ';
496
+ }
497
+ $result .= "</div>";
498
  if($args['show_follow'] && !empty($user->screen_name)):
499
  unset($shortenvariables);
500
  if($args['no_show_count']) $shortenvariables = ' data-show-count="false"';