Plugin Directory

Changeset 677685


Ignore:
Timestamp:
03/07/2013 09:19:24 PM (12 years ago)
Author:
phpaddicted
Message:

tagging version 1.5

Location:
igit-follow-me-after-post-button-new
Files:
4 added
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • igit-follow-me-after-post-button-new/tags/1.5/Readme.txt

    r608464 r677685  
    66Requires at least: 2.3
    77Tested up to: 3.0.5
    8 Stable tag: 1.4
     8Stable tag: 1.5
    99
    1010License: GNU General Public License (GPL), v3 (or newer)
     
    6565* Removed credit links and added GPL license.
    6666
     67= 1.5 =
     68* Add custom image upload, add facebook like button.
     69
    6770== Upgrade Notice ==
    6871* Users will be informed every time the plugin upgrades.<br />
  • igit-follow-me-after-post-button-new/tags/1.5/follow-me-aft-every-pst.php

    r608444 r677685  
    44Plugin URI: http://www.hackingethics.com/blog/wordpress-plugins/igit-follow-me-after-post-button-new/
    55Description: Enable follow me on twitter button on every post.
    6 Version: 1.4
     6Version: 1.5
    77Author: Ankur Gandhi
    88Author URI: http://www.hackingethics.com/
     
    5353        $twit_img_name = $twt_img_data[$twit_img_val]['baseUrl'];
    5454        $twt_uname = get_option('twtr_usr_nam');
    55         $plgin_dir = WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__));
     55       
     56        if(strpos($twit_img_val,'http://') !== false)
     57        {
     58           
     59            $twitter_usr_url = '<div align="center"><a href="http://twitter.com/'.$twt_uname.'" target="_blank"><img src="'.$twit_img_val.'" /></a></div>';
     60        }
     61        else{
     62            $plgin_dir = WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__));
    5663            $twitter_usr_url = '<div align="center"><a href="http://twitter.com/'.$twt_uname.'" target="_blank"><img src="'.$plgin_dir.$twit_img_name.'" /></a></div>';
     64        }
     65       
     66       
    5767                $content.= $twitter_usr_url;
    5868        }
     
    6878    update_option('twtr_usr_nam',$_POST['twtr_usr_nam']);
    6979    update_option('igit_twtr_img',$_POST['igit_twtr_img']);
    70     update_option('igit_sel_img',$_POST['twt_image'][0]);
     80    if($_POST['igit_tw_upload_image'])
     81    {
     82        update_option('igit_sel_img',$_POST['igit_tw_upload_image']);
     83    }
     84    else
     85    {
     86        update_option('igit_sel_img',$_POST['twt_image'][0]);
     87    }
     88   
    7189    $message_succ = '<div id="message" class="updated fade"><p>Option Saved!</p></div>';
    7290 }
     
    86104        $twtr_usr_nam = '';
    87105    }
     106    $tw_img_val = get_option('igit_sel_img');
     107    if(strpos($tw_img_val,'http://') !== false)
     108    {
     109       
     110        $tw_usr_url = $tw_img_val;
     111    }
     112    else
     113    {
     114        $tw_usr_url = "";
     115    }
    88116  echo $message_succ.'<div class="wrap"><div id="icon-options-general" class="icon32"><br/></div>
    89117    <form id="options_form_igit_follow_me" method="post" action="">
    90118        <h2>IGIT Follow Me button after every post</h2>
     119        <div style="padding-left: 10px;height: 22px;padding-top: 7px;"><iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2FHackingEthics&amp;send=false&amp;layout=standard&amp;width=450&amp;show_faces=false&amp;font&amp;colorscheme=light&amp;action=like&amp;height=35&amp;appId=422733157774758" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe></div>
    91120        <table class="form-table">
    92121            <tbody>
     
    101130                <tr valign="top">
    102131                <th scope="row"><label for="blogname">Images</label></th>
    103                     <td>';
     132                    <td><div><div style="float: left; padding-top: 1px; padding-right: 37px;">Upload Image(Enter an URL or upload an image for Twitter.) : (<a href="javascript:;" id="igit_tw_remove_image">Remove Image</a>)</div><br style="clear:both;"><div>&nbsp; &nbsp;  <label for="upload_image">
     133<div style="float:left;padding-top: 18px;"><input id="igit_tw_upload_image" type="text" size="36" name="igit_tw_upload_image" value="'.$tw_usr_url.'" />
     134<input id="igit_tw_upload_image_button" type="button" value="Upload Image" /></div><div style="margin-left: 22px;float: left;display: inline-block;margin-top: 0px;padding-top: 0px;" id="igit_tw_preview_fb"><img src="'.$tw_usr_url.'" /></div>
     135<br />
     136</label></div></div><br style="clear:both;"><hr>';
    104137        foreach ($igit_plug_opts['igit_twt_images'] as $name)
    105138        {
     
    119152}
    120153/****************** End of Function Save data and show admin page **********************/
     154function igit_tw_admin_scripts() {
     155wp_enqueue_script('media-upload');
     156wp_enqueue_script('thickbox');
     157wp_register_script('my-upload-igit-tw', WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)).'js/my-script.js', array('jquery','media-upload','thickbox'));
     158wp_enqueue_script('my-upload-igit-tw');
     159}
     160
     161function igit_tw_admin_styles() {
     162wp_enqueue_style('thickbox');
     163}
     164
     165if (isset($_GET['page']) && $_GET['page'] == 'follow_me_aft_post') {
     166add_action('admin_print_scripts', 'igit_tw_admin_scripts');
     167add_action('admin_print_styles', 'igit_tw_admin_styles');
     168}
    121169?>
  • igit-follow-me-after-post-button-new/trunk/Readme.txt

    r608464 r677685  
    66Requires at least: 2.3
    77Tested up to: 3.0.5
    8 Stable tag: 1.4
     8Stable tag: 1.5
    99
    1010License: GNU General Public License (GPL), v3 (or newer)
     
    6565* Removed credit links and added GPL license.
    6666
     67= 1.5 =
     68* Add custom image upload, add facebook like button.
     69
    6770== Upgrade Notice ==
    6871* Users will be informed every time the plugin upgrades.<br />
  • igit-follow-me-after-post-button-new/trunk/follow-me-aft-every-pst.php

    r608444 r677685  
    44Plugin URI: http://www.hackingethics.com/blog/wordpress-plugins/igit-follow-me-after-post-button-new/
    55Description: Enable follow me on twitter button on every post.
    6 Version: 1.4
     6Version: 1.5
    77Author: Ankur Gandhi
    88Author URI: http://www.hackingethics.com/
     
    5353        $twit_img_name = $twt_img_data[$twit_img_val]['baseUrl'];
    5454        $twt_uname = get_option('twtr_usr_nam');
    55         $plgin_dir = WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__));
     55       
     56        if(strpos($twit_img_val,'http://') !== false)
     57        {
     58           
     59            $twitter_usr_url = '<div align="center"><a href="http://twitter.com/'.$twt_uname.'" target="_blank"><img src="'.$twit_img_val.'" /></a></div>';
     60        }
     61        else{
     62            $plgin_dir = WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__));
    5663            $twitter_usr_url = '<div align="center"><a href="http://twitter.com/'.$twt_uname.'" target="_blank"><img src="'.$plgin_dir.$twit_img_name.'" /></a></div>';
     64        }
     65       
     66       
    5767                $content.= $twitter_usr_url;
    5868        }
     
    6878    update_option('twtr_usr_nam',$_POST['twtr_usr_nam']);
    6979    update_option('igit_twtr_img',$_POST['igit_twtr_img']);
    70     update_option('igit_sel_img',$_POST['twt_image'][0]);
     80    if($_POST['igit_tw_upload_image'])
     81    {
     82        update_option('igit_sel_img',$_POST['igit_tw_upload_image']);
     83    }
     84    else
     85    {
     86        update_option('igit_sel_img',$_POST['twt_image'][0]);
     87    }
     88   
    7189    $message_succ = '<div id="message" class="updated fade"><p>Option Saved!</p></div>';
    7290 }
     
    86104        $twtr_usr_nam = '';
    87105    }
     106    $tw_img_val = get_option('igit_sel_img');
     107    if(strpos($tw_img_val,'http://') !== false)
     108    {
     109       
     110        $tw_usr_url = $tw_img_val;
     111    }
     112    else
     113    {
     114        $tw_usr_url = "";
     115    }
    88116  echo $message_succ.'<div class="wrap"><div id="icon-options-general" class="icon32"><br/></div>
    89117    <form id="options_form_igit_follow_me" method="post" action="">
    90118        <h2>IGIT Follow Me button after every post</h2>
     119        <div style="padding-left: 10px;height: 22px;padding-top: 7px;"><iframe src="//www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.facebook.com%2FHackingEthics&amp;send=false&amp;layout=standard&amp;width=450&amp;show_faces=false&amp;font&amp;colorscheme=light&amp;action=like&amp;height=35&amp;appId=422733157774758" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe></div>
    91120        <table class="form-table">
    92121            <tbody>
     
    101130                <tr valign="top">
    102131                <th scope="row"><label for="blogname">Images</label></th>
    103                     <td>';
     132                    <td><div><div style="float: left; padding-top: 1px; padding-right: 37px;">Upload Image(Enter an URL or upload an image for Twitter.) : (<a href="javascript:;" id="igit_tw_remove_image">Remove Image</a>)</div><br style="clear:both;"><div>&nbsp; &nbsp;  <label for="upload_image">
     133<div style="float:left;padding-top: 18px;"><input id="igit_tw_upload_image" type="text" size="36" name="igit_tw_upload_image" value="'.$tw_usr_url.'" />
     134<input id="igit_tw_upload_image_button" type="button" value="Upload Image" /></div><div style="margin-left: 22px;float: left;display: inline-block;margin-top: 0px;padding-top: 0px;" id="igit_tw_preview_fb"><img src="'.$tw_usr_url.'" /></div>
     135<br />
     136</label></div></div><br style="clear:both;"><hr>';
    104137        foreach ($igit_plug_opts['igit_twt_images'] as $name)
    105138        {
     
    119152}
    120153/****************** End of Function Save data and show admin page **********************/
     154function igit_tw_admin_scripts() {
     155wp_enqueue_script('media-upload');
     156wp_enqueue_script('thickbox');
     157wp_register_script('my-upload-igit-tw', WP_PLUGIN_URL.'/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)).'js/my-script.js', array('jquery','media-upload','thickbox'));
     158wp_enqueue_script('my-upload-igit-tw');
     159}
     160
     161function igit_tw_admin_styles() {
     162wp_enqueue_style('thickbox');
     163}
     164
     165if (isset($_GET['page']) && $_GET['page'] == 'follow_me_aft_post') {
     166add_action('admin_print_scripts', 'igit_tw_admin_scripts');
     167add_action('admin_print_styles', 'igit_tw_admin_styles');
     168}
    121169?>
Note: See TracChangeset for help on using the changeset viewer.