Plugin Directory

Changeset 192084


Ignore:
Timestamp:
01/10/2010 02:13:33 AM (16 years ago)
Author:
Twitoaster
Message:

Updating to v1.3.0

Location:
twitoaster/trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • twitoaster/trunk/readme.txt

    r175436 r192084  
    44Tags: comments, post, tweet, twitter
    55Requires at least: 2.2
    6 Tested up to: 2.8.5
    7 Stable tag: 1.2.5
     6Tested up to: 2.9.1
     7Stable tag: 1.3.0
    88
    9 Automatically retrieve Twitter Replies to your Blog's Posts. These Twitter Replies are handled like Posts Comments. Also bring Twitter Statistics.
     9Automatically retrieve Twitter Replies and Retweets to your Blog's Posts. These Twitter mentions are handled like Posts Comments. Also bring Twitter Statistics.
    1010
    1111== 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.
     12Automatically retrieve Twitter Replies and Retweets to your Blog's Posts. These Twitter mentions are handled like Posts Comments, using WP built-in comment system.
    1313
    1414Here is how Twitter Replies / Twitter Updates work:
     
    16161. You Post an article on your blog
    17172. You update your Twitter status (or let the plugin do it for you)
    18 3. You automatically get all related Twitter Replies as comments to your Post
     183. You automatically get all related Twitter Replies and/or Retweets as comments to your Post
    1919
    2020The plugin also brings two widgets:
    2121
    22 1. Analytics charts showing how many Twitter Replies you are receiving
     221. Analytics charts showing how many Twitter Replies and Retweets you are receiving
    23232. Listings of your 20 most recent Twitter Conversations
    2424
     
    3131== Frequently Asked Questions ==
    3232= 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 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").
     33The 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").
    3434
    3535= What is Twitoaster? =
     
    4545
    4646== 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)
    4750
    4851= 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 }
     1img.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  
    6767                    // Twitter Replies
    6868                    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                                    }
    7880                                }
    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                                    }
    8890                                }
    8991                            }
  • twitoaster/trunk/twitoaster-widget-chart.php

    r175436 r192084  
    2525            if ($currentoptions['size'] == 88) { $chart_size['height'] = 26; } else { $chart_size['height'] = $currentoptions['size']; }
    2626
    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>';
    2828        }
    2929
     
    128128
    129129        $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']);
    131131        $currentoptions['type'] = empty( $options['type'] ) ? 'days' : $options['type'];
    132132        $currentoptions['size'] = empty( $options['size'] ) ? '200' : $options['size'];
  • twitoaster/trunk/twitoaster-widget-conversation.php

    r175436 r192084  
    4343                    foreach ($twitoaster_api_result['data'] AS $conversation) {
    4444                        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>';
    4646                        }
    4747                    }
     
    125125                </p>
    126126                <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>
    128128                </p>
    129129
  • twitoaster/trunk/twitoaster.php

    r175436 r192084  
    44Plugin Name: Twitoaster - Twitter Conversations
    55Plugin 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.5
     6Description: Automatically retrieve Twitter Replies and Retweets to your Blog's Posts. These Twitter mentions are handled like Posts Comments. Also bring Twitter Statistics.
     7Version: 1.3.0
    88Author: Twitoaster
    99Author URI: http://twitoaster.com/
     
    4040        $currentoptions = array();
    4141
    42         $currentoptions['install_version'] = '1.2.5';
     42        $currentoptions['install_version'] = '1.3.0';
    4343        if (empty($options['install_time'])) { $currentoptions['install_time'] = current_time('timestamp', true); }
    4444        else { $currentoptions['install_time'] = $options['install_time']; }
     
    7777        $currentoptions['post_replies']['moderation'] = (!(isset($options['post_replies']['moderation']))) ? 'no' : $options['post_replies']['moderation'];
    7878        $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'];
    7980
    8081        $currentoptions['api_timing'] = array('instant' => 300, 'short' => 900, 'normal' => 3600, 'long' => 28800, 'huge' => 259200); /* 5m - 15m - 1h - 8h - 72h */
     
    8586    function twitoaster_wp_head() {
    8687        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'], '-->');
    8889        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";
    8990    }
     
    260261                if ($_POST['twitoaster-post-replies-show-threads'] == 'yes') { $newtwitoaster_options['post_replies']['show_threads'] = 'yes'; }
    261262                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'; }
    262268            }
    263269
     
    325331
    326332                <div id="icon-post" class="icon32"><br /></div>
    327                 <h2>Twitoaster Posts Replies</h2>
     333                <h2>Twitoaster Posts Replies &amp; Retweets</h2>
    328334                <h3>Twitter Comments Settings</h3>
    329335                <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 as 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.
    332338                </p>
    333339                <form name="twitoaster-form-post-replies" method="post" action="#">
     
    383389                            <td>
    384390                                <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"'; }?> />&nbsp;Display Replies and Retweets (RT).
     394                                        <span class="description">&nbsp;<?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"'; }?> />&nbsp;Do not display Retweets.
     399                                        <span class="description">&nbsp;<?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">&nbsp;</th>
     406                            <td>
     407                                <fieldset>
    385408                                    <legend class="hidden">Display</legend>
    386409                                    <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"'; }?> />&nbsp;Your related Tweets 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"'; }?> />&nbsp;Display your Tweets and their replies.
    388411                                        <span class="description">&nbsp;<?php if (!($currentoptions['post_replies']['twitter_comments'] == 'yes')) { ?>Enable Twitter Comments to use this option.<?php } ?></span>
    389412                                    </label>
    390413                                    <br />
    391414                                    <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"'; }?> />&nbsp;Only replies to your related Tweets.
     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"'; }?> />&nbsp;Do not display your own Tweets.
    393416                                        <span class="description">&nbsp;<?php if (!($currentoptions['post_replies']['twitter_comments'] == 'yes')) { ?>Enable Twitter Comments to use this option.<?php } ?></span>
    394417                                    </label>
     
    405428                <h3>Twitter Comments Reset</h3>
    406429                <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.
    408431                    <br />If Twitter Comments is enabled, they will come back pogressively on posts where comments are enabled. Otherwise, they obviously won't come back.
    409432                </p>
     
    429452                <h3>Twitoaster Charts</h3>
    430453                <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.
    432455                    <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>.
    433456                    <br />You can also edit the CSS file located in the plugin directory, to fine tune the widget appearance to your design.
     
    435458                <h3>Twitoaster Conversations</h3>
    436459                <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).
    438461                    <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>.
    439462                </p>
Note: See TracChangeset for help on using the changeset viewer.