Changeset 192084
- Timestamp:
- 01/10/2010 02:13:33 AM (16 years ago)
- Location:
- twitoaster/trunk
- Files:
-
- 6 edited
-
readme.txt (modified) (4 diffs)
-
style.css (modified) (1 diff)
-
twitoaster-post-replies.php (modified) (1 diff)
-
twitoaster-widget-chart.php (modified) (2 diffs)
-
twitoaster-widget-conversation.php (modified) (2 diffs)
-
twitoaster.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
twitoaster/trunk/readme.txt
r175436 r192084 4 4 Tags: comments, post, tweet, twitter 5 5 Requires at least: 2.2 6 Tested up to: 2. 8.57 Stable tag: 1. 2.56 Tested up to: 2.9.1 7 Stable tag: 1.3.0 8 8 9 Automatically retrieve Twitter Replies to your Blog's Posts. These Twitter Replies are handled like Posts Comments. Also bring Twitter Statistics.9 Automatically retrieve Twitter Replies and Retweets to your Blog's Posts. These Twitter mentions are handled like Posts Comments. Also bring Twitter Statistics. 10 10 11 11 == Description == 12 Automatically retrieve Twitter Replies to your Blog's Posts. These Twitter Replies are handled like Posts Comments, using WP built-in comment system.12 Automatically retrieve Twitter Replies and Retweets to your Blog's Posts. These Twitter mentions are handled like Posts Comments, using WP built-in comment system. 13 13 14 14 Here is how Twitter Replies / Twitter Updates work: … … 16 16 1. You Post an article on your blog 17 17 2. You update your Twitter status (or let the plugin do it for you) 18 3. You automatically get all related Twitter Replies a s comments to your Post18 3. You automatically get all related Twitter Replies and/or Retweets as comments to your Post 19 19 20 20 The plugin also brings two widgets: 21 21 22 1. Analytics charts showing how many Twitter Replies you are receiving22 1. Analytics charts showing how many Twitter Replies and Retweets you are receiving 23 23 2. Listings of your 20 most recent Twitter Conversations 24 24 … … 31 31 == Frequently Asked Questions == 32 32 = How does it work? = 33 The plugin uses the [Twitoaster API](http://twitoaster.com/api/ "Twitoaster API - Twitter conversations and statistics") to search for posts URLs in your Twitter updates (url shorteners are supported). Each Twitter update found sees its replies a dded as comments to the matching post. The widgets (Twitter charts and Twitter conversations) also use the [Twitoaster API](http://twitoaster.com/api/ "Twitoaster API - Twitter conversations and statistics").33 The plugin uses the [Twitoaster API](http://twitoaster.com/api/ "Twitoaster API - Twitter conversations and statistics") to search for posts URLs in your Twitter updates (url shorteners are supported). Each Twitter update found sees its replies and/or retweets added as comments to the matching post. The widgets (Twitter charts and Twitter conversations) also use the [Twitoaster API](http://twitoaster.com/api/ "Twitoaster API - Twitter conversations and statistics"). 34 34 35 35 = What is Twitoaster? = … … 45 45 46 46 == Changelog == 47 48 = 1.3.0 = 49 * New: ReTweet support (with an option to display Twitter Replies, Twitter Retweets, or both Twitter Replies and Retweets) 47 50 48 51 = 1.2.5 = -
twitoaster/trunk/style.css
r161087 r192084 1 /* Widget Chart - Image */ 2 img.twitoaster_widget_chart, a img.twitoaster_widget_chart { 3 margin: 0; 4 padding: 0; 5 border: 0; 6 } 7 8 /* Widget Conversation - Replies */ 9 ul.twitoaster_widget_conversation li span.twitoaster_replies { 10 background: url(./replies.png) center left no-repeat; 11 padding: 4px 0 4px 18px; 12 font-weight: normal; 13 line-height: 1.6em; 14 font-weight: bold; 15 } 16 17 /* Twitter Comments - From Twitoaster */ 18 span.twitoaster { 19 background: url(./twitter.png) center left no-repeat; 20 padding: 4px 0 4px 16px; 21 font-weight: normal; 22 line-height: 1.6em; 23 font-style: italic; 24 } 25 span.twitoaster strong { 26 font-weight: normal; 27 font-style: italic; 28 } 1 img.twitoaster_widget_chart,a img.twitoaster_widget_chart{margin:0;padding:0;border:0;}ul.twitoaster_widget_conversation li span.twitoaster_replies{background:url(./replies.png) center left no-repeat;padding:4px 0 4px 18px;font-weight:normal;line-height:1.6em;font-weight:bold;}span.twitoaster{background:url(./twitter.png) center left no-repeat;padding:4px 0 4px 16px;font-weight:normal;line-height:1.6em;font-style:italic;}span.twitoaster strong{font-weight:normal;font-style:italic;} -
twitoaster/trunk/twitoaster-post-replies.php
r175436 r192084 67 67 // Twitter Replies 68 68 if (isset($conversation->replies)) { 69 foreach($conversation->replies AS $reply) 70 { 71 // Twitter Comment Insert? 72 if (!(array_key_exists($reply->id, $twitoaster_meta['content']))) { 73 if (array_key_exists($reply->in_reply_to_status_id, $twitoaster_meta['content'])) { $comment_parent = $twitoaster_meta['content'][$reply->in_reply_to_status_id]['comment_id']; } 74 else { $comment_parent = $comment_parent_default; } 75 if ($twitoaster_meta_comment = twitoaster_post_replies_comment_insert($post, $comment_parent, $reply, false)) { 76 $twitoaster_meta['content'][$reply->id] = $twitoaster_meta_comment; 77 twitoaster_post_replies_update_meta('_twitoaster_post_replies', $post->ID, $twitoaster_meta); 69 foreach($conversation->replies AS $reply) { 70 if (($reply->type == 'reply') OR (($reply->type == 'retweet') AND ($twitoaster_options['post_replies']['show_retweets'] == 'yes'))) 71 { 72 // Twitter Comment Insert? 73 if (!(array_key_exists($reply->id, $twitoaster_meta['content']))) { 74 if (array_key_exists($reply->in_reply_to_status_id, $twitoaster_meta['content'])) { $comment_parent = $twitoaster_meta['content'][$reply->in_reply_to_status_id]['comment_id']; } 75 else { $comment_parent = $comment_parent_default; } 76 if ($twitoaster_meta_comment = twitoaster_post_replies_comment_insert($post, $comment_parent, $reply, false)) { 77 $twitoaster_meta['content'][$reply->id] = $twitoaster_meta_comment; 78 twitoaster_post_replies_update_meta('_twitoaster_post_replies', $post->ID, $twitoaster_meta); 79 } 78 80 } 79 } 80 81 // Twitter Comment Update?82 else {83 if (array_key_exists($reply->in_reply_to_status_id, $twitoaster_meta['content'])) { $comment_parent = $twitoaster_meta['content'][$reply->in_reply_to_status_id]['comment_id']; }84 else { $comment_parent = $comment_parent_default; }85 if ($twitoaster_meta_comment = twitoaster_post_replies_comment_update($post, $comment_parent, $reply, $twitoaster_meta['content'][$reply->id])) {86 $twitoaster_meta['content'][$reply->id] = $twitoaster_meta_comment;87 twitoaster_post_replies_update_meta('_twitoaster_post_replies', $post->ID, $twitoaster_meta);81 82 // Twitter Comment Update? 83 else { 84 if (array_key_exists($reply->in_reply_to_status_id, $twitoaster_meta['content'])) { $comment_parent = $twitoaster_meta['content'][$reply->in_reply_to_status_id]['comment_id']; } 85 else { $comment_parent = $comment_parent_default; } 86 if ($twitoaster_meta_comment = twitoaster_post_replies_comment_update($post, $comment_parent, $reply, $twitoaster_meta['content'][$reply->id])) { 87 $twitoaster_meta['content'][$reply->id] = $twitoaster_meta_comment; 88 twitoaster_post_replies_update_meta('_twitoaster_post_replies', $post->ID, $twitoaster_meta); 89 } 88 90 } 89 91 } -
twitoaster/trunk/twitoaster-widget-chart.php
r175436 r192084 25 25 if ($currentoptions['size'] == 88) { $chart_size['height'] = 26; } else { $chart_size['height'] = $currentoptions['size']; } 26 26 27 $chart_content = '<p><a href="' . $twitoaster_options['profile'] . '" title="@' . $twitoaster_options['screen_name'] . ' conversations"><img src="' . $chart_url . '" width="' . $chart_size['width'] . '" height="' . $chart_size['height'] . '" alt="' . $twitoaster_options['screen_name'] . ' replies" class="twitoaster_widget_chart" /></a></p>';27 $chart_content = '<p><a href="' . $twitoaster_options['profile'] . '" title="@' . $twitoaster_options['screen_name'] . ' conversations"><img src="' . $chart_url . '" width="' . $chart_size['width'] . '" height="' . $chart_size['height'] . '" alt="' . $twitoaster_options['screen_name'] . ' mentions" class="twitoaster_widget_chart" /></a></p>'; 28 28 } 29 29 … … 128 128 129 129 $currentoptions = array(); 130 $currentoptions['title'] = empty( $options['title'] ) ? '@' . $twitoaster_options['screen_name'] . ' replies' : apply_filters('widget_title', $options['title']);130 $currentoptions['title'] = empty( $options['title'] ) ? '@' . $twitoaster_options['screen_name'] . ' mentions' : apply_filters('widget_title', $options['title']); 131 131 $currentoptions['type'] = empty( $options['type'] ) ? 'days' : $options['type']; 132 132 $currentoptions['size'] = empty( $options['size'] ) ? '200' : $options['size']; -
twitoaster/trunk/twitoaster-widget-conversation.php
r175436 r192084 43 43 foreach ($twitoaster_api_result['data'] AS $conversation) { 44 44 if ((count($content_tmp) < $currentoptions['items']) AND (($currentoptions['hide_no_replies'] == 'no') OR (($currentoptions['hide_no_replies'] == 'yes') AND ($conversation->thread->stats->total_replies > 0)))) { 45 $content_tmp[] = '<span class="twitoaster_replies">' . $conversation->thread->stats->total_ replies . '</span>' . ' ' . '<a href="' . $conversation->thread->url . '" title="' . $conversation->thread->stats->total_replies . ' ' . (($conversation->thread->stats->total_replies > 1) ? 'replies' : 'reply') . ' from ' . $conversation->thread->stats->user_replies . ' ' . (($conversation->thread->stats->user_replies > 1) ? 'users' : 'user') . ' to this ' . $twitoaster_options['screen_name'] . ' conversation' . '">' . $conversation->thread->title . '</a>';45 $content_tmp[] = '<span class="twitoaster_replies">' . $conversation->thread->stats->total_mentions . '</span>' . ' ' . '<a href="' . $conversation->thread->url . '" title="' . $conversation->thread->stats->total_replies . ' ' . (($conversation->thread->stats->total_replies > 1) ? 'replies' : 'reply') . ' and ' . $conversation->thread->stats->total_retweets . ' ' . (($conversation->thread->stats->total_retweets > 1) ? 'retweets' : 'retweet') . ' from ' . $conversation->thread->stats->distinct_users . ' ' . (($conversation->thread->stats->distinct_users > 1) ? 'users' : 'user') . ' to this ' . $twitoaster_options['screen_name'] . ' conversation' . '">' . $conversation->thread->title . '</a>'; 46 46 } 47 47 } … … 125 125 </p> 126 126 <p> 127 <label><input name="twitoaster-conversation-hide-no-replies" id="twitoaster-conversation-hide-no-replies" value="yes" type="checkbox"<?php checked($currentoptions['hide_no_replies'], 'yes'); ?> /> Hide conversations without replies</label>127 <label><input name="twitoaster-conversation-hide-no-replies" id="twitoaster-conversation-hide-no-replies" value="yes" type="checkbox"<?php checked($currentoptions['hide_no_replies'], 'yes'); ?> /> Hide conversations without mentions (replies or retweets)</label> 128 128 </p> 129 129 -
twitoaster/trunk/twitoaster.php
r175436 r192084 4 4 Plugin Name: Twitoaster - Twitter Conversations 5 5 Plugin URI: http://twitoaster.com/wordpress-plugin/ 6 Description: Automatically retrieve Twitter Replies to your Blog's Posts. These Twitter Replies are handled like Posts Comments. Also bring Twitter Statistics.7 Version: 1. 2.56 Description: Automatically retrieve Twitter Replies and Retweets to your Blog's Posts. These Twitter mentions are handled like Posts Comments. Also bring Twitter Statistics. 7 Version: 1.3.0 8 8 Author: Twitoaster 9 9 Author URI: http://twitoaster.com/ … … 40 40 $currentoptions = array(); 41 41 42 $currentoptions['install_version'] = '1. 2.5';42 $currentoptions['install_version'] = '1.3.0'; 43 43 if (empty($options['install_time'])) { $currentoptions['install_time'] = current_time('timestamp', true); } 44 44 else { $currentoptions['install_time'] = $options['install_time']; } … … 77 77 $currentoptions['post_replies']['moderation'] = (!(isset($options['post_replies']['moderation']))) ? 'no' : $options['post_replies']['moderation']; 78 78 $currentoptions['post_replies']['show_threads'] = (!(isset($options['post_replies']['show_threads']))) ? 'yes' : $options['post_replies']['show_threads']; 79 $currentoptions['post_replies']['show_retweets'] = (!(isset($options['post_replies']['show_retweets']))) ? 'yes' : $options['post_replies']['show_retweets']; 79 80 80 81 $currentoptions['api_timing'] = array('instant' => 300, 'short' => 900, 'normal' => 3600, 'long' => 28800, 'huge' => 259200); /* 5m - 15m - 1h - 8h - 72h */ … … 85 86 function twitoaster_wp_head() { 86 87 global $twitoaster_options; 87 printf("%s Twitoaster ( %s ) [V:%s|C:%s|ST:%s| AT:%s|M:%s] %s \n", '<!--', $twitoaster_options['profile'], $twitoaster_options['install_version'], $twitoaster_options['post_replies']['twitter_comments'], $twitoaster_options['post_replies']['show_threads'], $twitoaster_options['post_replies']['auto_threads'], $twitoaster_options['post_replies']['moderation'], '-->');88 printf("%s Twitoaster ( %s ) [V:%s|C:%s|ST:%s|SR:%s|AT:%s|M:%s] %s \n", '<!--', $twitoaster_options['profile'], $twitoaster_options['install_version'], $twitoaster_options['post_replies']['twitter_comments'], $twitoaster_options['post_replies']['show_threads'], $twitoaster_options['post_replies']['show_retweets'], $twitoaster_options['post_replies']['auto_threads'], $twitoaster_options['post_replies']['moderation'], '-->'); 88 89 echo '<link rel="stylesheet" href="' . get_bloginfo('wpurl') . '/wp-content' . '/plugins/' . plugin_basename(dirname(__FILE__)) . '/' . 'style.css?ver=' . $twitoaster_options['install_version'] . '" type="text/css" media="screen" />'."\n"; 89 90 } … … 260 261 if ($_POST['twitoaster-post-replies-show-threads'] == 'yes') { $newtwitoaster_options['post_replies']['show_threads'] = 'yes'; } 261 262 else { $newtwitoaster_options['post_replies']['show_threads'] = 'no'; } 263 } 264 265 if (isset($_POST['twitoaster-post-replies-show-retweets'])) { 266 if ($_POST['twitoaster-post-replies-show-retweets'] == 'yes') { $newtwitoaster_options['post_replies']['show_retweets'] = 'yes'; } 267 else { $newtwitoaster_options['post_replies']['show_retweets'] = 'no'; } 262 268 } 263 269 … … 325 331 326 332 <div id="icon-post" class="icon32"><br /></div> 327 <h2>Twitoaster Posts Replies </h2>333 <h2>Twitoaster Posts Replies & Retweets</h2> 328 334 <h3>Twitter Comments Settings</h3> 329 335 <p> 330 Automatically retrieve Twitter replies to your Blog's posts. These "Twitter comments" are displayed like comments, on the posts pages they are related to.331 <br /><strong>Example:</strong> You Post an article on your blog; You Tweet it (or let the plugin do it for you); You automatically get all related Twitter replies a s comments on your Blog post.336 Automatically retrieve Twitter replies and/or retweets to your Blog's posts. These "Twitter comments" are displayed like comments, on the posts pages they are related to. 337 <br /><strong>Example:</strong> You Post an article on your blog; You Tweet it (or let the plugin do it for you); You automatically get all related Twitter replies and/or retweets as comments on your Blog post. 332 338 </p> 333 339 <form name="twitoaster-form-post-replies" method="post" action="#"> … … 383 389 <td> 384 390 <fieldset> 391 <legend class="hidden">Retweets</legend> 392 <label title="yes"> 393 <input name="twitoaster-post-replies-show-retweets" value="yes" type="radio"<?php checked($currentoptions['post_replies']['show_retweets'], 'yes'); ?><?php if (!($currentoptions['post_replies']['twitter_comments'] == 'yes')) { echo ' disabled="disabled"'; }?> /> Display Replies and Retweets (RT). 394 <span class="description"> <?php if (!($currentoptions['post_replies']['twitter_comments'] == 'yes')) { ?>Enable Twitter Comments to use this option.<?php } ?></span> 395 </label> 396 <br /> 397 <label title="no"> 398 <input name="twitoaster-post-replies-show-retweets" value="no" type="radio"<?php checked($currentoptions['post_replies']['show_retweets'], 'no'); ?><?php if (!($currentoptions['post_replies']['twitter_comments'] == 'yes')) { echo ' disabled="disabled"'; }?> /> Do not display Retweets. 399 <span class="description"> <?php if (!($currentoptions['post_replies']['twitter_comments'] == 'yes')) { ?>Enable Twitter Comments to use this option.<?php } ?></span> 400 </label> 401 </fieldset> 402 </td> 403 </tr> 404 <tr valign="top"> 405 <th scope="row"> </th> 406 <td> 407 <fieldset> 385 408 <legend class="hidden">Display</legend> 386 409 <label title="yes"> 387 <input name="twitoaster-post-replies-show-threads" value="yes" type="radio"<?php checked($currentoptions['post_replies']['show_threads'], 'yes'); ?><?php if (!($currentoptions['post_replies']['twitter_comments'] == 'yes')) { echo ' disabled="disabled"'; }?> /> Your relatedTweets and their replies.410 <input name="twitoaster-post-replies-show-threads" value="yes" type="radio"<?php checked($currentoptions['post_replies']['show_threads'], 'yes'); ?><?php if (!($currentoptions['post_replies']['twitter_comments'] == 'yes')) { echo ' disabled="disabled"'; }?> /> Display your Tweets and their replies. 388 411 <span class="description"> <?php if (!($currentoptions['post_replies']['twitter_comments'] == 'yes')) { ?>Enable Twitter Comments to use this option.<?php } ?></span> 389 412 </label> 390 413 <br /> 391 414 <label title="no"> 392 <input name="twitoaster-post-replies-show-threads" value="no" type="radio"<?php checked($currentoptions['post_replies']['show_threads'], 'no'); ?><?php if (!($currentoptions['post_replies']['twitter_comments'] == 'yes')) { echo ' disabled="disabled"'; }?> /> Only replies to your relatedTweets.415 <input name="twitoaster-post-replies-show-threads" value="no" type="radio"<?php checked($currentoptions['post_replies']['show_threads'], 'no'); ?><?php if (!($currentoptions['post_replies']['twitter_comments'] == 'yes')) { echo ' disabled="disabled"'; }?> /> Do not display your own Tweets. 393 416 <span class="description"> <?php if (!($currentoptions['post_replies']['twitter_comments'] == 'yes')) { ?>Enable Twitter Comments to use this option.<?php } ?></span> 394 417 </label> … … 405 428 <h3>Twitter Comments Reset</h3> 406 429 <p> 407 <strong>Warning</strong>: this will delete all your Twitter comments! You might want to do it if you changed your Twitter account, or your Twitter Comments Display option .430 <strong>Warning</strong>: this will delete all your Twitter comments! You might want to do it if you changed your Twitter account, or your Twitter Comments Display options. 408 431 <br />If Twitter Comments is enabled, they will come back pogressively on posts where comments are enabled. Otherwise, they obviously won't come back. 409 432 </p> … … 429 452 <h3>Twitoaster Charts</h3> 430 453 <p> 431 Analytics charts showing how many replies you are generating, and what day of the week (or time of day) produces the most replies.454 Analytics charts showing how many replies / retweets you are generating, and what day of the week (or time of day) produces the most replies and retweets. 432 455 <br />You can configure the color, the size, the type and the title of the chart from the <strong><a href="<?php echo get_bloginfo('wpurl'); ?>/wp-admin/widgets.php">WordPress Widgets configuration page</a></strong>. 433 456 <br />You can also edit the CSS file located in the plugin directory, to fine tune the widget appearance to your design. … … 435 458 <h3>Twitoaster Conversations</h3> 436 459 <p> 437 Listing of your 20 most recent Twitter conversations (groups your Twitter replies with the Tweets that inspired them).460 Listing of your 20 most recent Twitter conversations (groups your Twitter replies and retweets with the Tweets that inspired them). 438 461 <br />You can configure the number of conversations displayed from the <strong><a href="<?php echo get_bloginfo('wpurl'); ?>/wp-admin/widgets.php">WordPress Widgets configuration page</a></strong>. 439 462 </p>
Note: See TracChangeset
for help on using the changeset viewer.