Changeset 34056
- Timestamp:
- 03/07/08 03:24:47 (4 months ago)
- Files:
-
- wp-tags-to-technorati/trunk/readme.txt (modified) (1 diff)
- wp-tags-to-technorati/trunk/wp-tags-to-technorati.php (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wp-tags-to-technorati/trunk/readme.txt
r27113 r34056 30 30 wordpress loop. 31 31 32 NOTE: In previous versions of the plug-in the tags2tech_get_tags_links() 33 call needed to be echo'ed. This is no longer required, although the old 34 functionality will still work. 35 32 36 == Frequently Asked Questions == 33 37 wp-tags-to-technorati/trunk/wp-tags-to-technorati.php
r27114 r34056 4 4 Plugin URI: http://www.geekyramblings.org/plugins/wp-tags-to-technorati/ 5 5 Description: Simple plugin to convert Wordpress 2.3's tags to Technorati ('http://technorati.com') links. 6 Version: 0. 76 Version: 0.8 7 7 Author: David Gibbs 8 8 Author URI: http://www.geekyramblings.org … … 11 11 /* 12 12 13 Copyright 2007 by David Gibbs <david@midrange.com>13 Copyright 2007,2008 by David Gibbs <david@midrange.com> 14 14 15 15 This program is free software: you can redistribute it and/or modify … … 41 41 a new window. Also added version identifier to 42 42 comment. 43 43 02/27/08 0.8 Reformatted setup panel. 44 tags2tech_get_tags_links() no longer needs to be 45 echo'ed. When invoked directly, it will output 46 the links directly. It will still work with the 47 echo method though. 48 44 49 */ 45 50 46 $tags2tech_version = "0.7";51 $tags2tech_version = 0.8; 47 52 48 53 $tag_url = "http://technorati.com/tag"; … … 73 78 $tags = get_the_tags(); 74 79 75 $tag_text = get_option('tags2tech_label')." :";80 $tag_text = get_option('tags2tech_label')." "; 76 81 77 82 $count=0; … … 91 96 $tag_links = ""; 92 97 } 93 return $tag_start.$tag_links.$tag_end; 98 99 echo $tag_start.$tag_links.$tag_end; 100 return ""; 94 101 } 95 102 … … 115 122 <?php wp_nonce_field('update-options'); ?> 116 123 124 <table class="form-table"> 125 <tr> 126 <th scope="row" valign="top">Technorati Tags label:</th> 127 <td> 128 <input id="tags2tech_label" type="text" name="tags2tech_label" value="<?php echo get_option('tags2tech_label'); ?>" /> 129 <label for="inputid">Text that will display in front of the tags</label> 130 </td> 131 </tr> 132 <tr> 133 <th scope="row" valign="top">Open Technorati links in a new window?</th> 134 <td> 135 <input id=tags2tech_new_window" type="checkbox" name="tags2tech_new_window" <?php echo get_option('tags2tech_new_window')?'checked=checked':''; ?> /> 136 <label for="tags2tech_new_window">Check this box to open links to Technorati in a new window.</label> 137 </td> 138 </tr> 139 <tr> 140 <th scope="row" valign="top">Include tags in post footer?</th> 141 <td> 142 <input id="tags2tech_footer" type="checkbox" name="tags2tech_footer" <?php echo get_option('tags2tech_footer')?'checked=checked':''; ?> /> 143 <label for="tags2tech_footer">If you want to include the links in any other location on the page than the footer, disable this checkbox and add a call to <code>tags2tech_get_tags_links()</code> somewhere in the main wordpress 'loop'.</label> 144 </td> 145 </tr> 146 </table> 147 148 117 149 <p class="submit"> 118 <input type="submit" name="Submit" value="<?php _e('Update Options �') ?>" /> 119 </p> 120 121 Technorati Tags label: <input type="text" name="tags2tech_label" value="<?php echo get_option('tags2tech_label'); ?>" /> <p/> 122 Open Technorati Link in new window? <input type="checkbox" name="tags2tech_new_window" <?php echo get_option('tags2tech_new_window')?'checked=checked':''; ?> /> <p/> 123 Include tags in post footer? <input type="checkbox" name="tags2tech_footer" <?php echo get_option('tags2tech_footer')?'checked=checked':''; ?> /> <p/> 124 125 <p class="submit"> 126 <input type="submit" name="Submit" value="<?php _e('Update Options �') ?>" /> 150 <input type="submit" name="Submit" value="Save Changes" /> 127 151 </p> 128 152 <input type="hidden" name="action" value="update" /> … … 138 162 } 139 163 164 function tags2tech_checkupgrade() { 165 global $tags2tech_version; 166 167 $last_version = get_option('tags2tech_version'); 168 $current_version = $tags2tech_version; 169 echo "<!-- last_version = $last_version, current_version = $current_version -->\n"; 170 if ($current_version > $last_version) { 171 echo "<!-- upgrading to $tags2tech_version -->\n"; 172 $label = get_option('tags2tech_label'); 173 echo "<!-- oldlabel = $label -->\n"; 174 if (substr($label,-1) <> ":") { 175 $newlabel = $label.":"; 176 update_option('tags2tech_label',$newlabel); 177 echo "<!-- newlabel = $newlabel -->\n"; 178 } 179 update_option('tags2tech_version',$tags2tech_version); 180 } 181 182 } 183 140 184 function tags2tech_activate() 141 185 { 142 186 // Let's add some options 143 187 // add_option('tags2tech_label', 'Technorati Tags'); 144 145 188 } 146 189 … … 153 196 } 154 197 155 add_option('tags2tech_label', 'Technorati Tags'); 198 add_option('tags2tech_version', 0.01); 199 add_option('tags2tech_label', 'Technorati Tags:'); 156 200 add_option('tags2tech_footer', true); 157 201 add_option('tags2tech_new_window', false); … … 159 203 add_action('admin_menu', 'tags2tech_menu'); 160 204 205 // register_activation_hook( __FILE__, 'tags2tech_activate' ); 206 161 207 add_action('activate_wp-tags-to-technorati/wp-tags-to-technorati.php', 162 208 'tags2tech_activate'); … … 164 210 'tags2tech_deactivate'); 165 211 212 // add_action('wp_head','tags2tech_checkupgrade'); 213 add_action('plugins_loaded','tags2tech_checkupgrade'); 214 166 215 ?>
