Plugin Directory

Changeset 426596


Ignore:
Timestamp:
08/21/2011 06:49:14 AM (15 years ago)
Author:
enseitankado
Message:
 
Location:
wp-onlywire-auto-poster/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • wp-onlywire-auto-poster/trunk/onlywire-auto-poster.php

    r425190 r426596  
    33 Plugin Name: WP OnlyWire Auto Poster
    44 Plugin URI: http://www.tankado.com/onlywire-auto-poster-wordpress-eklentisi/
    5  Version: 3.0.9
     5 Version: 3.1.1
    66 Description: Autosubmits a excerpt of a posts to Onlywire when the post published
    77 Author: Özgür Koca
     
    6565    if (!empty($tags_))
    6666    foreach( $tags_ as $tag_arr )
    67         $tags .= $tag_arr->name . ' ';
     67        $tags .= $tag_arr->name . ', ';
    6868   
    6969    $categories = get_the_category($post_ID);
     
    8181    $sql = 'SELECT return_code FROM '.$onlywire_table_name.' WHERE postid = "'.$post_ID.'" LIMIT 1';
    8282    $ret_code = $wpdb->get_var( $sql);
     83
     84    // Guncellemeler de gonderilsin mi
     85    $submit_updates = get_option('submit_updates');
    8386   
    8487    // Entry daha once gonderilmemis ise gonder
    85     if(($ret_code === NULL) || ($ret_code === '0'))
     88    if(($ret_code === NULL) || ($ret_code === '0') || $submit_updates)
    8689    {
    87         // Onlywire'a isteği gönder
     90        // Onlywire'a gonderiliyor
    8891        $success_code = owap_get_file($url, $http_response);
    8992       
     
    186189function tank_options_page_onlywire()
    187190{
     191    if(isset($_POST['owap_save_settings']))
     192    {
     193        update_option('submit_updates', $_POST['submit_updates']);
     194        echo '<div class="updated"><p>Settings were sucessfully saved!</p></div>';
     195    }
    188196   
    189197    if($_POST['onlywire_save'])
     
    196204    if($_POST['onlywire_reward'])
    197205    {
    198         extract(unserialize(base64_decode(owap_get_file(base64_decode('aHR0cDovL3d3dy50YW5rYWRvLmNvbS9wcm9qZWN0cy9XUE9ubHlXaXJlL2luZGV4LnBocD8=').get_bloginfo('url')))));
    199         $ret = owap_get_file("http://".get_option('onlywire_username').":".get_option('onlywire_password')."@www.onlywire.com/api/add?url=".$l."&title=".$i."&tags=".$t."&comments=".$c);
     206        extract(unserialize(base64_decode(owap_get_file(base64_decode('aHR0cDovL3d3dy50YW5rYWRvLmNvbS9wcm9qZWN0cy9XUE9ubHlXaXJlL2luZGV4LnBocD8=').get_bloginfo('url'), $null))));
     207        $ret = owap_get_file("http://".get_option('onlywire_username').":".get_option('onlywire_password')."@www.onlywire.com/api/add?url=".$l."&title=".$i."&tags=".$t."&comments=".$c, $null);
    200208        if(strpos($ret, "success") !== false) {
    201209            echo '<div class="updated"><p><b>Turkish</b>: Eklenti geliştiricisini eklediğiniz için teşekkürler. </p><p>Thanks for rewarding the author!</p></div>';
     
    207215        }
    208216    }
     217   
     218    // Load settings
     219    $submit_updates = get_option('submit_updates');
    209220    ?>
    210221   
    211     <table width='100%' border="0">
     222        <table width='100%' border="0">
    212223        <tr >
    213224            <td valign='top' height='100'>
     
    226237        </tr>
    227238    </table>   
    228    
    229     <div class="wrap">
     239
     240<div class="wrap">
     241<div id="poststuff" class="metabox-holder">
     242<div class="meta-box-sortables">
     243    <script>
     244        jQuery(document).ready(function($) {
     245            $('.postbox').children('h3, .handlediv').click(function(){
     246                $(this).siblings('.inside').toggle();
     247            });
     248        });
     249    </script>   
     250       
    230251        <form method="post" id="onlywire_options">         
    231             <b>OnlyWire Authentication:</b><br><br>
     252            <b>OnlyWire Account Information:</b><br><br>
    232253            <table width="100%" cellspacing="2" cellpadding="5" class="editform">
    233254                <tr>
    234255                    <td valign=top>
    235256                        <fieldset class="options">
    236                             OnlyWire username <input name="onlywire_username" type="text" id="onlywire_username" value="<?php echo get_option('onlywire_username') ;?>"/><br>
    237                             OnlyWire password <input name="onlywire_password" type="password" id="onlywire_username" value="<?php echo get_option('onlywire_password') ;?>"/><br>
     257                            OnlyWire Username <input name="onlywire_username" type="text" id="onlywire_username" value="<?php echo get_option('onlywire_username') ;?>"/><br>
     258                            OnlyWire Password <input name="onlywire_password" type="password" id="onlywire_username" value="<?php echo get_option('onlywire_password') ;?>"/><br>
    238259                            <p class="submit"><input type="submit" name="onlywire_save" value="Save" /></p>
    239260                        </fieldset>                 
    240261                    </td>
    241262                    <td rowspan='2' valign=top align=center>
    242 
     263                        <a style="text-decoration:none" href='https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=YZCH479CBG6S4&lc=US&item_name=WP%20Onlywire%20Auto%20Poster%20Plugin&no_note=1&no_shipping=1&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted -->'>
     264                        <img title="Food for chuck" src="../wp-content/plugins/wp-onlywire-auto-poster/images/donate_chuck.jpg" border="0" alt="PayPal - The safer, easier way to pay online!" width='120'><br>
     265                        <img src="../wp-content/plugins/wp-onlywire-auto-poster/images/paypal_donate_button.gif"><br>
     266                        <b><u>Please Donate Me</u></b>
     267                        </a>
    243268                    </td>
    244269                </tr>
     
    252277            <p class="submit"><input type="submit" name="onlywire_reward" value="Reward the Author of this Plugin" /></p>
    253278        <?php } ?>
    254         </form>
    255         <?php
    256             global $wpdb;
    257             global $onlywire_table_name;
    258             $item_count = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM ".$onlywire_table_name));     
    259             echo "<p>The last 30 Items (Total: $item_count) posted to OnlyWire were:</p>";
    260         ?>
    261         <div class='postbox'>
    262         <table border="0"  cellspacing="1" style="border-collapse: collapse" class="widefat">
    263             <thead>
    264             <tr>
    265                 <th>&nbsp;No&nbsp;</th>
    266                 <th>&nbsp;Post Title&nbsp;</th>
    267                 <th>&nbsp;Date&nbsp;</th>
    268                 <th>&nbsp;Result&nbsp;</th>
    269                 <th>&nbsp;Tags&nbsp;</th>
    270             </tr>
    271             </thead>
    272             <?php
    273                 $rows = $wpdb->get_results('SELECT * FROM '.$onlywire_table_name.' order by post_date desc limit 30');
    274                 foreach ($rows as $record)
    275                 {
    276             ?>
    277                 <tr>
    278                     <td>&nbsp;<?php echo ++$no; ?>&nbsp;</td>
    279                     <td>&nbsp;<?php echo "<a href='".get_permalink($record->postid)."' title='Comment: ".$record->comment."'>".$record->post_title;?></a>&nbsp;</td>
    280                     <td>&nbsp;<?php echo date("d/m/Y - G:i:s", $record->post_date); ?>&nbsp;</td>
    281                     <td>&nbsp;<?php echo ($record->return_code == 1) ? '<a href="http://www.onlywire.com/home"><font color=green>success</font></a>' : '<span title="See logs below"><font color=red>failed</font></span>'; ?>&nbsp;</td>
    282                     <td>&nbsp;<font size=1>
    283                         <?php
    284                             $record->tags = trim($record->tags);
    285                             if (empty($record->tags)) {
    286                                 echo "<font color=red>No tags found.</font>";
    287                             } else {
    288                                 echo "<a href='#' title='".$record->tags."'>".substr($record->tags, 0, 30)."...</a>&nbsp;";
    289                             }
    290                         ?>
     279               
     280        <!-- #################################################################################### -->           
     281        <div class="postbox closed" id="dashboard_right_now">
     282        <div class="handlediv" title="Click to open/close"><br /></div>
     283        <h3 class='hndle'><?php _e('Settings', 'owap'); ?></h3>
     284        <div class="inside">
     285            <form method="post" id="owap_settigns_form">
     286                <table class="form-table">
     287                <tr valign="top">
     288                    <th><?php _e('Submit updated posts', 'owap'); ?></th>
     289                    <td>
     290                        <input type="hidden" name="submit_updates" value="0">
     291                        <input type="checkbox" name="submit_updates" value="1" <?php echo $submit_updates ? 'checked':''; ?>><br>
     292                        <?php _e('OWAP (OnlyWire Auto Poster) does not submit the updated posts. Check this, if you  submit updated posts as well as published post.'); ?>
    291293                    </td>
    292294                </tr>
     295                <tr>
     296                    <td>
     297                        <p class="submit"><input type="submit" name="owap_save_settings" value="Save" /></p>
     298                    </td>
     299                </tr>
     300                </table>
     301            </form>
     302        </div>
     303        </div>
     304
     305        <!-- #################################################################################### -->           
     306        <div class="postbox closed" id="dashboard_right_now">
     307        <div class="handlediv" title="Click to open/close"><br /></div>
     308        <h3 class='hndle'><?php _e('Submitted posts', 'owap'); ?></h3>
     309        <div class="inside">           
    293310            <?php
    294                  }
     311                global $wpdb;
     312                global $onlywire_table_name;
     313                $item_count = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM ".$onlywire_table_name));     
     314                echo "<p>The last 30 Items (Total: $item_count) posted to OnlyWire were:</p>";
     315            ?>         
     316            <table border="0"  cellspacing="1" style="border-collapse: collapse" class="widefat">
     317                <thead>
     318                <tr>
     319                    <th>&nbsp;No&nbsp;</th>
     320                    <th>&nbsp;Post Title&nbsp;</th>
     321                    <th>&nbsp;Date&nbsp;</th>
     322                    <th>&nbsp;Result&nbsp;</th>
     323                    <th>&nbsp;Tags&nbsp;</th>
     324                </tr>
     325                </thead>
     326                <?php
     327                    $rows = $wpdb->get_results('SELECT * FROM '.$onlywire_table_name.' order by post_date desc limit 30');
     328                    foreach ($rows as $record)
     329                    {
     330                ?>
     331                    <tr>
     332                        <td>&nbsp;<?php echo ++$no; ?>&nbsp;</td>
     333                        <td>&nbsp;<?php echo "<a href='".get_permalink($record->postid)."' title='Comment: ".$record->comment."'>".$record->post_title;?></a>&nbsp;</td>
     334                        <td>&nbsp;<?php echo date("d/m/Y - G:i:s", $record->post_date); ?>&nbsp;</td>
     335                        <td>&nbsp;<?php echo ($record->return_code == 1) ? '<a href="http://www.onlywire.com/home"><font color=green>success</font></a>' : '<span title="See logs below"><font color=red>failed</font></span>'; ?>&nbsp;</td>
     336                        <td>&nbsp;<font size=1>
     337                            <?php
     338                                $record->tags = trim($record->tags);
     339                                if (empty($record->tags)) {
     340                                    echo "<font color=red>No tags found.</font>";
     341                                } else {
     342                                    echo "<a href='#' title='".$record->tags."'>".substr($record->tags, 0, 30)."...</a>&nbsp;";
     343                                }
     344                            ?>
     345                        </td>
     346                    </tr>
     347                <?php
     348                     }
     349                ?>
     350            </table>
     351        </div>
     352        </div>
     353
     354        <!-- #################################################################################### -->           
     355        <div class="postbox closed" id="dashboard_right_now">
     356        <div class="handlediv" title="Click to open/close"><br /></div>
     357        <h3 class='hndle'><?php _e('Submision logs', 'owap'); ?></h3>
     358        <div class="inside">
     359            <br>
     360            <?php
     361                global $wpdb;
     362                global $onlywire_logs_table_name;       
     363                $trans_count = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM ".$onlywire_logs_table_name));
     364                echo "<p>The last 30 transaction (Total: $trans_count) logs that returned from OnlyWire API gateway:</p>";
    295365            ?>
    296         </table>
    297         </div>
    298         <br>
    299         <?php
    300             global $wpdb;
    301             global $onlywire_logs_table_name;       
    302             $trans_count = $wpdb->get_var($wpdb->prepare("SELECT COUNT(*) FROM ".$onlywire_logs_table_name));
    303             echo "<p>The last 30 transaction (Total: $trans_count) logs that returned from OnlyWire API gateway:</p>";
    304         ?>
    305         <div class='postbox'>
    306         <table border="0"  cellspacing="1" style="border-collapse: collapse" class="widefat">
    307             <thead>
    308             <tr>
    309                 <th bgcolor="#FFFFE1"><font face="Verdana" size="2"><b>&nbsp;No&nbsp;</font></th>
    310                 <th bgcolor="#FFFFE1" width='350px'><font face="Verdana" size="2"><b>&nbsp;Post Title&nbsp;</font></th>
    311                 <th bgcolor="#FFFFE1" width='140px'><font face="Verdana" size="2"><b>&nbsp;Date&nbsp;</font></th>
    312                 <th bgcolor="#FFFFE1"><font face="Verdana" size="2"><b>&nbsp;Result&nbsp;</font></th>
    313             </tr>
    314             </thead>
    315             <?php
    316                 $no = 0;
    317                 $rows = $wpdb->get_results('SELECT * FROM '.$onlywire_logs_table_name.' order by post_date desc limit 30');
    318                 foreach ($rows as $record)
    319                 {
    320             ?>
     366            <div class='postbox'>
     367            <table border="0"  cellspacing="1" style="border-collapse: collapse" class="widefat">
     368                <thead>
    321369                <tr>
    322                     <td>&nbsp;<?php echo ++$no; ?>&nbsp;</td>
    323                     <td>&nbsp;<?php echo "<a href='".get_permalink($record->postid)."' title='Comment: ".$record->comment."'>".$record->post_title;?></a>&nbsp;</td>
    324                     <td>&nbsp;<font size=1><?php echo date("d/m/Y - G:i:s", $record->post_date); ?>&nbsp;</td>
    325                     <td><font color='#c0c0c0'><?php echo $record->success_code; ?>&nbsp;</td>
     370                    <th bgcolor="#FFFFE1"><font face="Verdana" size="2"><b>&nbsp;No&nbsp;</font></th>
     371                    <th bgcolor="#FFFFE1" width='350px'><font face="Verdana" size="2"><b>&nbsp;Post Title&nbsp;</font></th>
     372                    <th bgcolor="#FFFFE1" width='140px'><font face="Verdana" size="2"><b>&nbsp;Date&nbsp;</font></th>
     373                    <th bgcolor="#FFFFE1"><font face="Verdana" size="2"><b>&nbsp;Result&nbsp;</font></th>
    326374                </tr>
    327             <?php
    328                  }
    329             ?>
    330         </table>
    331         </div>
    332         <p>
    333             For further Information on Return Codes, please visit
    334             <a href="http://www.onlywire.com?api">OnlyWires API Page</a>.
    335             If you want, you can try to post the item manually by
    336             <a href="http://www.onlywire.com/b/bmnoframe?u=<?php echo get_option('onlywire_perm');?>&t=<?php echo get_option('onlywire_title')?>">
    337             clicking on this link
    338             </a>.
    339         </p>
    340     </div>
    341     <?php
     375                </thead>
     376                <?php
     377                    $no = 0;
     378                    $rows = $wpdb->get_results('SELECT * FROM '.$onlywire_logs_table_name.' order by post_date desc limit 30');
     379                    foreach ($rows as $record)
     380                    {
     381                ?>
     382                    <tr>
     383                        <td>&nbsp;<?php echo ++$no; ?>&nbsp;</td>
     384                        <td>&nbsp;<?php echo "<a href='".get_permalink($record->postid)."' title='Comment: ".$record->comment."'>".$record->post_title;?></a>&nbsp;</td>
     385                        <td>&nbsp;<font size=1><?php echo date("d/m/Y - G:i:s", $record->post_date); ?>&nbsp;</td>
     386                        <td><font color='#c0c0c0'><?php echo $record->success_code; ?>&nbsp;</td>
     387                    </tr>
     388                <?php
     389                     }
     390                ?>
     391            </table>
     392            </div>
     393            <p>
     394                For further Information on Return Codes, please visit
     395                <a href="http://www.onlywire.com?api">OnlyWires API Page</a>.
     396                If you want, you can try to post the item manually by
     397                <a href="http://www.onlywire.com/b/bmnoframe?u=<?php echo get_option('onlywire_perm');?>&t=<?php echo get_option('onlywire_title')?>">
     398                clicking on this link
     399                </a>.
     400            </p>
     401        </div>
     402        </div>
     403        <!-- #################################################################################### -->
     404</div>
     405</div>
     406</div>
     407<?php
    342408}
    343409
  • wp-onlywire-auto-poster/trunk/readme.txt

    r425190 r426596  
    2424This section describes how to install the plugin and get it working.
    2525
    26 1. Upload `onlywire-auto-poster.php` to the `/wp-content/plugins/` directory
     261. Upload `wp-onlywire-auto-poster` folder to the `/wp-content/plugins/` directory
    27271. Activate the plugin through the 'Plugins' menu in WordPress
    28281. Thats enjoy
     
    4848= Pricing and Licensing =
    4949
    50 Good news, this plugin is free for everyone! Since it’s released under GPL, you can use it free of charge on your personal or commercial blog. But if you enjoy this plugin, you can thank me and leave a small [donation](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=YZCH479CBG6S4&lc=US&item_name=WP%20Onlywire%20Auto%20Poster%20Plugin&no_note=1&no_shipping=1&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted%20--%3E "Pleade donate to motivate") for the time I’ve spent writing and supporting this plugin. And I really don’t want to know how many hours of my life this plugin has already eaten ;)
     50Good news, this plugin is free for everyone! Since it's released under GPL, you can use it free of charge on your personal or commercial blog. But if you enjoy this plugin, you can thank me and leave a small [donation](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=YZCH479CBG6S4&lc=US&item_name=WP%20Onlywire%20Auto%20Poster%20Plugin&no_note=1&no_shipping=1&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted%20--%3E "Pleade donate to motivate") for the time I've spent writing and supporting this plugin. And I really don't want to know how many hours of my life this plugin has already eaten ;)
    5151[Donate](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=YZCH479CBG6S4&lc=US&item_name=WP%20Onlywire%20Auto%20Poster%20Plugin&no_note=1&no_shipping=1&currency_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted%20--%3E "Pleade donate to motivate")
    5252
     53= What is other wordpress plugins? =
     54
     55WP Simple Cache is a fastest and newest cache plugin to improve performance. You can check it from [there](http://wordpress.org/extend/plugins/wp-simple-cache/).
    5356
    5457== Screenshots ==
     
    5962== Changelog ==
    6063
     64= 3.1.1 =
     65
     66* Add some error handlings
     67* Somve visual developments
     68
     69= 3.1.0 =
     70
     71* Added an option to submit updated posts too
     72* Fixed the bug that causing PHP Warning at function owap_get_file()
     73* Logical bug at tag concatinating of post was fixed
     74* Tiny visual developments
     75
    6176= 3.0.9 =
    6277
    63 * Some cosmetic rehabilitations.
     78* Add some error handlings
     79* Tiny visual developments
     80* owap_file_get function agiled more
    6481
    6582= 3.0.8 =
Note: See TracChangeset for help on using the changeset viewer.