Changeset 677685
- Timestamp:
- 03/07/2013 09:19:24 PM (12 years ago)
- 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 6 6 Requires at least: 2.3 7 7 Tested up to: 3.0.5 8 Stable tag: 1. 48 Stable tag: 1.5 9 9 10 10 License: GNU General Public License (GPL), v3 (or newer) … … 65 65 * Removed credit links and added GPL license. 66 66 67 = 1.5 = 68 * Add custom image upload, add facebook like button. 69 67 70 == Upgrade Notice == 68 71 * 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 4 4 Plugin URI: http://www.hackingethics.com/blog/wordpress-plugins/igit-follow-me-after-post-button-new/ 5 5 Description: Enable follow me on twitter button on every post. 6 Version: 1. 46 Version: 1.5 7 7 Author: Ankur Gandhi 8 8 Author URI: http://www.hackingethics.com/ … … 53 53 $twit_img_name = $twt_img_data[$twit_img_val]['baseUrl']; 54 54 $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__)); 56 63 $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 57 67 $content.= $twitter_usr_url; 58 68 } … … 68 78 update_option('twtr_usr_nam',$_POST['twtr_usr_nam']); 69 79 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 71 89 $message_succ = '<div id="message" class="updated fade"><p>Option Saved!</p></div>'; 72 90 } … … 86 104 $twtr_usr_nam = ''; 87 105 } 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 } 88 116 echo $message_succ.'<div class="wrap"><div id="icon-options-general" class="icon32"><br/></div> 89 117 <form id="options_form_igit_follow_me" method="post" action=""> 90 118 <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&send=false&layout=standard&width=450&show_faces=false&font&colorscheme=light&action=like&height=35&appId=422733157774758" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe></div> 91 120 <table class="form-table"> 92 121 <tbody> … … 101 130 <tr valign="top"> 102 131 <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> <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>'; 104 137 foreach ($igit_plug_opts['igit_twt_images'] as $name) 105 138 { … … 119 152 } 120 153 /****************** End of Function Save data and show admin page **********************/ 154 function igit_tw_admin_scripts() { 155 wp_enqueue_script('media-upload'); 156 wp_enqueue_script('thickbox'); 157 wp_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')); 158 wp_enqueue_script('my-upload-igit-tw'); 159 } 160 161 function igit_tw_admin_styles() { 162 wp_enqueue_style('thickbox'); 163 } 164 165 if (isset($_GET['page']) && $_GET['page'] == 'follow_me_aft_post') { 166 add_action('admin_print_scripts', 'igit_tw_admin_scripts'); 167 add_action('admin_print_styles', 'igit_tw_admin_styles'); 168 } 121 169 ?> -
igit-follow-me-after-post-button-new/trunk/Readme.txt
r608464 r677685 6 6 Requires at least: 2.3 7 7 Tested up to: 3.0.5 8 Stable tag: 1. 48 Stable tag: 1.5 9 9 10 10 License: GNU General Public License (GPL), v3 (or newer) … … 65 65 * Removed credit links and added GPL license. 66 66 67 = 1.5 = 68 * Add custom image upload, add facebook like button. 69 67 70 == Upgrade Notice == 68 71 * 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 4 4 Plugin URI: http://www.hackingethics.com/blog/wordpress-plugins/igit-follow-me-after-post-button-new/ 5 5 Description: Enable follow me on twitter button on every post. 6 Version: 1. 46 Version: 1.5 7 7 Author: Ankur Gandhi 8 8 Author URI: http://www.hackingethics.com/ … … 53 53 $twit_img_name = $twt_img_data[$twit_img_val]['baseUrl']; 54 54 $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__)); 56 63 $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 57 67 $content.= $twitter_usr_url; 58 68 } … … 68 78 update_option('twtr_usr_nam',$_POST['twtr_usr_nam']); 69 79 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 71 89 $message_succ = '<div id="message" class="updated fade"><p>Option Saved!</p></div>'; 72 90 } … … 86 104 $twtr_usr_nam = ''; 87 105 } 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 } 88 116 echo $message_succ.'<div class="wrap"><div id="icon-options-general" class="icon32"><br/></div> 89 117 <form id="options_form_igit_follow_me" method="post" action=""> 90 118 <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&send=false&layout=standard&width=450&show_faces=false&font&colorscheme=light&action=like&height=35&appId=422733157774758" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:450px; height:35px;" allowTransparency="true"></iframe></div> 91 120 <table class="form-table"> 92 121 <tbody> … … 101 130 <tr valign="top"> 102 131 <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> <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>'; 104 137 foreach ($igit_plug_opts['igit_twt_images'] as $name) 105 138 { … … 119 152 } 120 153 /****************** End of Function Save data and show admin page **********************/ 154 function igit_tw_admin_scripts() { 155 wp_enqueue_script('media-upload'); 156 wp_enqueue_script('thickbox'); 157 wp_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')); 158 wp_enqueue_script('my-upload-igit-tw'); 159 } 160 161 function igit_tw_admin_styles() { 162 wp_enqueue_style('thickbox'); 163 } 164 165 if (isset($_GET['page']) && $_GET['page'] == 'follow_me_aft_post') { 166 add_action('admin_print_scripts', 'igit_tw_admin_scripts'); 167 add_action('admin_print_styles', 'igit_tw_admin_styles'); 168 } 121 169 ?>
Note: See TracChangeset
for help on using the changeset viewer.