WordPress.org

Plugin Directory

Changeset 867922


Ignore:
Timestamp:
03/02/14 09:49:18 (4 years ago)
Author:
SeeYouCloud
Message:

Commit core files for 1.1

Location:
pocket-readability-instapaper-buttons/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pocket-readability-instapaper-buttons/trunk/pocket-readability-instapaper-buttons.php

    r864373 r867922  
    22 
    33/* 
    4 Plugin Name: Read Later for Wordpress 
     4Plugin Name: Pocket, Readability, Instapaper Buttons for Wordpress 
    55Plugin URI: http://seeyoucloud.com 
    6 Description: Offer the ability to tens of millions users who read blog posts with apps like Pocket, Instapaper or Readability, to quickly save your great in-depth articles on one click. 
    7 Version: 1.0 
     6Description: Add automatically read later buttons on your blog and offer the ability to tens of millions users who read blog posts with apps like Pocket, Instapaper or Readability, to quickly save your great in-depth articles on one click. 
     7Version: 1.1 
    88Author: Pierre-André Dewitte 
    99Author URI: http://seeyoucloud.com 
     
    7272     
    7373    if (get_option('readability_visibility') == 'yes'){ 
    74         $readability_button = "<div class='rdbWrapper' data-show-read-now='1' data-show-read-later='1' data-show-send-to-kindle='1' data-show-print='0' data-show-email='0' data-orientation='0' data-version='1'></div>"; 
     74        $readability_button = "<div style='max-width:200px' class='rdbWrapper' data-show-read-now='0' data-show-read-later='1' data-show-send-to-kindle='0' data-show-print='0' data-show-email='1' data-orientation='0' data-version='1'></div>"; 
    7575        $readability_script = "<script type='text/javascript'>(function() {var s = document.getElementsByTagName('script')[0],rdb = document.createElement('script'); rdb.type = 'text/javascript'; rdb.async = true; rdb.src = document.location.protocol + '//www.readability.com/embed.js'; s.parentNode.insertBefore(rdb, s); })();</script>"; 
    7676    } 
     
    8686></iframe>"; 
    8787    } 
    88      
     88    else{ 
     89        $instapaper_frame=""; 
     90    } 
     91     
     92    if(get_option('kindle_visibility') == 'yes'){ 
     93        $kindle_button = "<div class='kindleWidget' style='margin-right:20px;display:inline-block;padding:3px;cursor:pointer;font-size:11px;font-family:Arial;white-space:nowrap;line-height:1;border-radius:3px;border:#ccc thin solid;color:black;background:transparent url('https://d1xnn692s7u6t6.cloudfront.net/button-gradient.png') repeat-x;background-size:contain;'><img style='vertical-align:middle;margin:0;padding:0;border:none;' src='https://d1xnn692s7u6t6.cloudfront.net/white-15.png' /><span style='vertical-align:middle;margin-left:3px;'>Kindle</span></div>"; 
     94        $kindle_script = "<script type='text/javascript' src='https://d1xnn692s7u6t6.cloudfront.net/widget.js'></script> 
     95<script type='text/javascript'>(function k(){window.$SendToKindle&&window.$SendToKindle.Widget?$SendToKindle.Widget.init({}):setTimeout(k,500);})();</script>"; 
     96    } 
     97    else{ 
     98        $kindle_button=""; 
     99        $kindle_script=""; 
     100    } 
     101 
    89102    $startbox = "<ul style='list-style:none;display:flex;display:-ms-flex;display:-webkit-flex;'><li>"; 
    90103    $middlebox = "</li><li>"; 
    91104    $endbox = "</li></ul>"; 
    92105    if(get_option('position') == 'before'){ 
    93         $content = $startbox.$pocket_button . $pocket_script . $middlebox .$readability_button . $readability_script . $middlebox. $instapaper_frame . $endbox.$content; 
     106        $content = $startbox.$pocket_button . $pocket_script . $middlebox. $kindle_button. $kindle_script. $middlebox .$readability_button . $readability_script . $middlebox. $instapaper_frame . $endbox.$content; 
    94107    }else if(get_option('position') == 'after'){ 
    95         $content = $content . $startbox.$pocket_button . $pocket_script .$middlebox.$readability_button . $readability_script .$middlebox .$instapaper_frame . $endbox ; 
     108        $content = $content . $startbox.$pocket_button . $pocket_script .$middlebox. $kindle_button. $kindle_script .$middlebox.$readability_button . $readability_script .$middlebox .$instapaper_frame . $endbox ; 
    96109    }else if(get_option('position') == 'both_position'){ 
    97         $content = $startbox.$pocket_button.$middlebox.$readability_button.$middlebox.$instapaper_frame.$endbox.$content.$startbox.$pocket_button.$middlebox.$readability_button.$middlebox.$instapaper_frame.$pocket_script.$readability_script.$endbox; 
     110        $content = $startbox.$pocket_button.$middlebox.$kindle_button.$middlebox.$readability_button.$middlebox.$instapaper_frame.$endbox.$content.$startbox.$pocket_button.$middlebox.$kindle_button.$middlebox.$readability_button.$middlebox.$instapaper_frame.$pocket_script.$kindle_script.$readability_script.$endbox; 
    98111    } 
    99112    return $content; 
     
    127140    register_setting('padpw-settings-group','readability_visibility'); 
    128141    register_setting('padpw-settings-group','instapaper_visibility'); 
     142    register_setting('padpw-settings-group','kindle_visibility'); 
    129143} 
    130144 
     
    135149?> 
    136150<div class="wrap"> 
    137 <h2>Read Later For Wordpress plugin</h2> 
     151<h2>Pocket, Readability, Instapaper buttons plugin</h2> 
    138152<p style="font-style:italic;">Made by Pierre-André Dewitte - a Pocket's top 5% user</p> 
    139153<form method="post" action="options.php"> 
    140     <h3>General settings</h3> 
     154    <h3><?php _e('General settings',PADPW_PLUGNAME) ?></h3> 
    141155    <table class="form-table"> 
    142156    <tr valign="top"> 
    143             <th scope="row">Buttons position</th> 
     157            <th scope="row"><?php _e('Buttons position',PADPW_PLUGNAME) ?></th> 
    144158            <td> 
    145                 <input type="radio" name="position" value="before" <?php checked('before', get_option('position','before')); ?> /> Before post content</br> 
    146                 <input type="radio" name="position" value="after" <?php checked('after', get_option('position','before')); ?> /> After post content</br> 
    147                 <input type="radio" name="position" value="both_position" <?php checked('both_position', get_option('position','before')); ?> /> Before <b><u>and</u></b> after post content 
     159                <input type="radio" name="position" value="before" <?php checked('before', get_option('position','before')); ?> /> <?php _e('Before post content',PADPW_PLUGNAME) ?></br> 
     160                <input type="radio" name="position" value="after" <?php checked('after', get_option('position','before')); ?> /> <?php _e('After post content',PADPW_PLUGNAME) ?></br> 
     161                <input type="radio" name="position" value="both_position" <?php checked('both_position', get_option('position','before')); ?> /> <?php _e('Before and after post content',PADPW_PLUGNAME) ?> 
    148162            </td> 
    149163        </tr> 
    150164         
    151165        <tr valign="top"> 
    152             <th scope="row">Buttons visibility</th> 
     166            <th scope="row"><?php _e('Buttons visibility',PADPW_PLUGNAME) ?></th> 
    153167            <td> 
    154                 <input type="radio" name="visibility" value="posts" <?php checked('posts', get_option('visibility','posts')); ?> /> On posts only</br> 
    155                 <input type="radio" name="visibility" value="pages" <?php checked('pages', get_option('visibility','posts')); ?> /> On pages only</br> 
    156                 <input type="radio" name="visibility" value="both_visibility" <?php checked('both_visibility', get_option('visibility','posts')); ?> /> On both posts <b><u>and</u></b> pages 
     168                <input type="radio" name="visibility" value="posts" <?php checked('posts', get_option('visibility','posts')); ?> /> <?php _e('On posts only',PADPW_PLUGNAME) ?></br> 
     169                <input type="radio" name="visibility" value="pages" <?php checked('pages', get_option('visibility','posts')); ?> /> <?php _e('On pages only',PADPW_PLUGNAME) ?></br> 
     170                <input type="radio" name="visibility" value="both_visibility" <?php checked('both_visibility', get_option('visibility','posts')); ?> /> <?php _e('On both post and pages',PADPW_PLUGNAME) ?> 
    157171            </td> 
    158172        </tr> 
    159173    </table> 
    160174    <div class="reader-group"> 
    161         <img class="icon-logo" src="<?php echo(plugins_url(PADPW_PLUGNAME.'/img/logo_pocket.png', dirname( __FILE__ ) )) ; ?>"/><h3>Pocket Button Settings</h3> 
     175        <img class="icon-logo" src="<?php echo(plugins_url(PADPW_PLUGNAME.'/img/logo_pocket.png', dirname( __FILE__ ) )) ; ?>"/><h3><?php _e('Pocket Button Settings',PADPW_PLUGNAME) ?></h3> 
    162176        <?php settings_fields( 'padpw-settings-group' ); ?> 
    163177        <?php do_settings_sections( 'padpw-settings-group' ); ?> 
    164178        <table class="form-table"> 
    165179            <tr valign="top"> 
    166                 <th scope="row">Button size</th> 
     180                <th scope="row"><?php _e('Button size',PADPW_PLUGNAME) ?></th> 
    167181                <td> 
    168182                    <input type="radio" name="pocket_size" value="small" <?php checked('small', get_option('pocket_size','medium')); ?> /> <?php _e('Small','pocket-readability-instapaper-buttons');?></br> 
     
    173187 
    174188            <tr valign="top"> 
    175                 <th scope="row">Button visibility</th> 
    176                 <td> 
    177                     <input type="radio" name="pocket_visibility" value="yes" <?php checked('yes', get_option('pocket_visibility','yes')); ?> /> Visible</br> 
    178                     <input type="radio" name="pocket_visibility" value="no" <?php checked('no', get_option('pocket_visibility','yes')); ?> /> Invisible</br> 
    179                 </td> 
    180             </tr> 
    181         </table> 
    182     </div> 
    183     <div class="reader-group"> 
    184         <img class="icon-logo" src="<?php echo(plugins_url(PADPW_PLUGNAME.'/img/logo_readability.png', dirname( __FILE__ ) )) ; ?>"/><h3>Readability Button Settings</h3> 
    185         <table class="form-table"> 
    186  
    187             <tr valign="top"> 
    188                 <th scope="row">Button visibility</th> 
    189                 <td> 
    190                     <input type="radio" name="readability_visibility" value="yes" <?php checked('yes', get_option('readability_visibility','yes')); ?> /> Visible</br> 
    191                     <input type="radio" name="readability_visibility" value="no" <?php checked('no', get_option('readability_visibility','yes')); ?> /> Invisible</br> 
    192                 </td> 
    193             </tr> 
    194         </table> 
    195     </div> 
    196     <div class="reader-group"> 
    197         <img class="icon-logo" src="<?php echo(plugins_url(PADPW_PLUGNAME.'/img/logo_instapaper.png', dirname( __FILE__ ) )) ; ?>"/><h3>Instapaper Button Settings</h3> 
    198         <table class="form-table"> 
    199             <tr valign="top"> 
    200                 <th scope="row">Button visibility</th> 
    201                 <td> 
    202                     <input type="radio" name="instapaper_visibility" value="yes" <?php checked('yes', get_option('instapaper_visibility','yes')); ?> /> Visible</br> 
    203                     <input type="radio" name="instapaper_visibility" value="no" <?php checked('no', get_option('instapaper_visibility','yes')); ?> /> Invisible</br> 
     189                <th scope="row"><?php _e('Button visibility',PADPW_PLUGNAME) ?></th> 
     190                <td> 
     191                    <input type="radio" name="pocket_visibility" value="yes" <?php checked('yes', get_option('pocket_visibility','yes')); ?> /> <?php _e('Visible',PADPW_PLUGNAME) ?></br> 
     192                    <input type="radio" name="pocket_visibility" value="no" <?php checked('no', get_option('pocket_visibility','yes')); ?> /> <?php _e('Invisible',PADPW_PLUGNAME) ?></br> 
     193                </td> 
     194            </tr> 
     195        </table> 
     196    </div> 
     197    <div class="reader-group"> 
     198        <img class="icon-logo" src="<?php echo(plugins_url(PADPW_PLUGNAME.'/img/logo_readability.png', dirname( __FILE__ ) )) ; ?>"/><h3><?php _e('Readability Button Settings',PADPW_PLUGNAME) ?></h3> 
     199        <table class="form-table"> 
     200 
     201            <tr valign="top"> 
     202                <th scope="row"><?php _e('Button visibility',PADPW_PLUGNAME) ?></th> 
     203                <td> 
     204                    <input type="radio" name="readability_visibility" value="yes" <?php checked('yes', get_option('readability_visibility','yes')); ?> /> <?php _e('Visible',PADPW_PLUGNAME) ?></br> 
     205                    <input type="radio" name="readability_visibility" value="no" <?php checked('no', get_option('readability_visibility','yes')); ?> /> <?php _e('Invisible',PADPW_PLUGNAME) ?></br> 
     206                </td> 
     207            </tr> 
     208        </table> 
     209    </div> 
     210    <div class="reader-group"> 
     211        <img class="icon-logo" src="<?php echo(plugins_url(PADPW_PLUGNAME.'/img/logo_instapaper.png', dirname( __FILE__ ) )) ; ?>"/><h3><?php _e('Instapaper Button Settings',PADPW_PLUGNAME) ?></h3> 
     212        <table class="form-table"> 
     213            <tr valign="top"> 
     214                <th scope="row"><?php _e('Button visibility',PADPW_PLUGNAME) ?></th> 
     215                <td> 
     216                    <input type="radio" name="instapaper_visibility" value="yes" <?php checked('yes', get_option('instapaper_visibility','yes')); ?> /> <?php _e('Visible',PADPW_PLUGNAME) ?></br> 
     217                    <input type="radio" name="instapaper_visibility" value="no" <?php checked('no', get_option('instapaper_visibility','yes')); ?> /> <?php _e('Invisible',PADPW_PLUGNAME) ?></br> 
     218                </td> 
     219            </tr> 
     220        </table> 
     221    </div> 
     222    <div class="reader-group"> 
     223        <img class="icon-logo" src="<?php echo(plugins_url(PADPW_PLUGNAME.'/img/logo_kindle.png', dirname( __FILE__ ) )) ; ?>"/><h3><?php _e('Kindle Button Settings',PADPW_PLUGNAME) ?></h3> 
     224        <table class="form-table"> 
     225            <tr valign="top"> 
     226                <th scope="row"><?php _e('Button visibility',PADPW_PLUGNAME) ?></th> 
     227                <td> 
     228                    <input type="radio" name="kindle_visibility" value="yes" <?php checked('yes', get_option('kindle_visibility','yes')); ?> /> <?php _e('Visible',PADPW_PLUGNAME) ?></br> 
     229                    <input type="radio" name="kindle_visibility" value="no" <?php checked('no', get_option('kindle_visibility','yes')); ?> /> <?php _e('Invisible',PADPW_PLUGNAME) ?></br> 
    204230                </td> 
    205231            </tr> 
  • pocket-readability-instapaper-buttons/trunk/readme.txt

    r864373 r867922  
    55Requires at least: 3.3 
    66Tested up to: 3.8.1 
    7 Stable tag: 1.0 
     7Stable tag: 1.1 
    88License: GPLv2 or later 
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html 
     
    1313== Description == 
    1414 
    15 Make your users save time to read later your thrilling content by adding the official buttons from the most used apps around the world : Pocket, Instapaper and Readability. 
     15Make your users save time to read later your thrilling content by adding the official buttons from the most used apps around the world : Pocket, Instapaper, Readability and since v1.1 Kindle ! 
    1616Choose which one you want to display, which size, when and where to display them (posts, articles, both, at the start/end/both of content). 
     17 
     18Look at the changelog tab to see new features ! 
     19 
     20More features in progress... 
    1721 
    1822== Installation == 
     
    4953== Frequently Asked Questions == 
    5054 
    51 = No questions yet = 
     55= Does this plugin provide a shortcode to put manually everywhere we want ? = 
    5256 
    53 No answers yet 
     57Hopefully not ! If you posted hundreds of stuff on your blog, you won't have to edit every post ! The plugin automatically add buttons everywhere you want. Look at the plugin *Settings* panel in Wordpress Administration to set it. 
    5458 
    5559 
     
    5862 
    59631. The plugin running on a blog post. 
     64 
    60652. Settings panel in Wordpress Administration. 
    6166 
    6267 
    6368== Changelog == 
     69 
     70= 1.1 = 
     71* Add Kindle button ! 
     72* Modifications on Readability buttons 
     73* Update Settings panel 
     74* Preparation of internationalization. 
    6475 
    6576= 1.0 = 
     
    7182== Upgrade Notice == 
    7283 
    73 No upgrade notice yet. 
     84= 1.1 = 
     85Upgrade your plugin to add the Kindle button ! 
    7486 
    7587 
Note: See TracChangeset for help on using the changeset viewer.