Changeset 581845
- Timestamp:
- 08/04/2012 08:37:53 PM (14 years ago)
- Location:
- tag-search/trunk
- Files:
-
- 2 edited
-
README.TXT (modified) (2 diffs)
-
tt-tag-search.php (modified) (25 diffs)
Legend:
- Unmodified
- Added
- Removed
-
tag-search/trunk/README.TXT
r298897 r581845 13 13 14 14 15 For more information and support please visit http://themestown.com15 For more information and support please visit CX2Q3U78PY http://wppluginsdev.com 16 16 17 17 … … 49 49 4. That's all there is to it. As long as everything is working and there are no conflicts with other plugins or your theme Tag Search should be functioning. 50 50 51 If you are having problems please visit http://www. themestown.com for help.51 If you are having problems please visit http://www.wppluginsdev.com for help. 52 52 53 53 -
tag-search/trunk/tt-tag-search.php
r298897 r581845 4 4 /* 5 5 Plugin Name: Tag Search 6 Plugin URI: http://www. themestown.com7 Description: This plugin finds tags in post and autolinks them to display search results for all posts found to contain the tagged word or phrase.8 Version: 1. 56 Plugin URI: http://www.wppluginsdev.com 7 Description: This plugin CX2Q3U78PY finds tags in post and autolinks them to display search results for all posts found to contain the tagged word or phrase. 8 Version: 1.6 9 9 Author: A Lewis 10 Author URI: http://www. themestown.com10 Author URI: http://www.wppluginsdev.com 11 11 */ 12 12 //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 13 /* Copyright 2010 A. Lewis (email : themestown@gmail.com)13 /* Copyright 2010 A. Lewis (email : wppluginsdev@live.com) 14 14 15 15 This program is free software; you can redistribute it and/or modify 16 it under the terms of the GNU General Public License, version 2, as 16 it under the terms of the GNU General Public License, version 2, as 17 17 published by the Free Software Foundation. 18 18 … … 42 42 $tttagsearch_plugin_url = WP_CONTENT_URL.'/plugins/'.str_replace(basename( __FILE__),"",plugin_basename(__FILE__)); 43 43 44 $tttagsearchdb_version = "1. 5";44 $tttagsearchdb_version = "1.6"; 45 45 46 46 define('TTTAGSEARCH', 'Tag Search'); … … 52 52 53 53 add_action('init', 'tttagsearchinstall'); 54 add_action('admin_menu', 'tttag_search_launch'); 54 add_action('admin_menu', 'tttag_search_launch'); 55 55 add_filter("the_content", "tt_linkthetag"); 56 56 add_filter("wp_footer", "ttcredit"); … … 99 99 100 100 global $wpdb,$tttagsearchdb_version; 101 101 102 102 $installed_ver = get_option( "tttagsearchdb_version" ); 103 103 … … 125 125 $link_how_many=$tttagsearch_options[$tttagsearchconfigoptionsprefix.'_link_tag_how_many_times']; 126 126 } 127 127 128 128 if(isset($tttagsearch_options[$tttagsearchconfigoptionsprefix.'_autolinkstaticpages']) && !empty($tttagsearch_options[$tttagsearchconfigoptionsprefix.'_autolinkstaticpages'])) 129 129 { … … 135 135 $ttagsearchonoffstate=$tttagsearch_options[$tttagsearchconfigoptionsprefix.'_onoffstate']; 136 136 } 137 137 138 138 if(!isset($link_how_many) || empty($link_how_many)){$link_how_many=1;} 139 139 if(!isset($ttagsearchonoffstate) || empty($ttagsearchonoffstate)){$ttagsearchonoffstate="on";} 140 140 141 141 $siteurl=get_option('siteurl'); 142 142 143 143 144 144 $tttags=get_tags('hide_empty=false'); 145 145 //print_r($tttags); 146 146 147 147 if(isset($ttagsearchonoffstate) && !empty($ttagsearchonoffstate) && ($ttagsearchonoffstate == 'on')) 148 148 { 149 149 150 150 if($tttags) 151 151 { … … 161 161 { 162 162 if( isset($autolinkstaticpages) && !empty($autolinkstaticpages) && ($autolinkstaticpages == "yes")) 163 { 163 { 164 164 if(strstr($content," $thetag")) 165 165 { … … 167 167 $linkedtag="<a href=\"$siteurl?s=$thetagfs\">$thetag</a>"; 168 168 $content = preg_replace('/\b'.$thetag.'\b(?![^<]+>)/i', $linkedtag, $content,$link_how_many); 169 170 171 172 } 169 170 171 172 } 173 173 } 174 174 else … … 184 184 } 185 185 } 186 187 186 187 188 188 } 189 189 … … 202 202 } 203 203 204 $ttcredit="<a style=\"font-size:9px;text-decoration:none;\" href=\"http:// themestown.com/groups/tag-seach-plugin/\">Tag Search</a> <font style=\"font-size:9px;text-decoration:none;\">via</font> <a style=\"font-size:9px;text-decoration:none;\" href=\"http://www.themestown.com\"> Themes Town</a>";204 $ttcredit="<a style=\"font-size:9px;text-decoration:none;\" href=\"http://wppluginsdev.com/\">Tag Search</a> <font style=\"font-size:9px;text-decoration:none;\">via</font> <a style=\"font-size:9px;text-decoration:none;\" href=\"http://www.wppluginsdev.com\"> wppluginsdeev.com</a>"; 205 205 $myttcredit="<div style=\"text-align:center;display:block;padding:3px;\">$ttcredit</div>"; 206 206 207 207 if(isset($givepluginauthorcredit) && !empty($givepluginauthorcredit) && ($givepluginauthorcredit == "no")){}else{echo $myttcredit;} 208 208 } … … 226 226 227 227 $pstandtttag_search_config_options=get_option($tttagsearchconfigoptionsprefix.'_settings_config'); 228 228 229 229 if(isset($pstandtttag_search_config_options) && !empty($pstandtttag_search_config_options)) 230 230 { … … 238 238 } 239 239 } 240 240 241 241 return $mytttag_search_config_options; 242 242 } … … 247 247 $tttagsearchconfigoptions=$tttagsearchconfigoptionsprefix.'_settings_config'; 248 248 $mysavedthemetttag_search_config_options=get_option($tttagsearchconfigoptions); 249 249 250 250 $tttag_search_config_options = $mysavedthemetttag_search_config_options; 251 252 if (!isset($tttag_search_config_options) || empty($tttag_search_config_options) || !is_array($tttag_search_config_options)) 253 { 251 252 if (!isset($tttag_search_config_options) || empty($tttag_search_config_options) || !is_array($tttag_search_config_options)) 253 { 254 254 $tttag_search_config_options = $def_tttag_search_config_options; 255 255 256 256 foreach ($tttag_search_config_options as $optionvalue) 257 { 257 { 258 258 if(!isset($optionvalue['id']) || empty($optionvalue['id'])) 259 259 { … … 268 268 $optionvalue['std']=''; 269 269 } 270 270 271 271 $setmytttag_search_config_options[]=array("name" => $optionvalue['name'], 272 272 "id" => $optionvalue['id'], 273 273 "std" => $optionvalue['std'], 274 274 "type" => $optionvalue['type'], 275 "options" => $optionvalue['options']); 276 277 } 278 275 "options" => $optionvalue['options']); 276 277 } 278 279 279 update_option($tttagsearchconfigoptions,$setmytttag_search_config_options); 280 } 280 } 281 281 } 282 282 … … 288 288 289 289 $setmytttag_search_config_options=array(); 290 290 291 291 292 292 foreach ($def_tttag_search_config_options as $optionvalue) 293 293 { 294 294 295 295 if(!isset($optionvalue['id']) || empty($optionvalue['id'])) 296 296 { … … 309 309 $optionvalue['std']=''; 310 310 } 311 312 311 312 313 313 if(isset($tttag_search_config_options[$optionvalue['id']]) && !empty($tttag_search_config_options[$optionvalue['id']])) 314 314 { … … 327 327 "std" => $savedoptionvalue, 328 328 "type" => $optionvalue['type'], 329 "options" => $optionvalue['options']); 330 } 331 332 update_option($tttagsearchconfigoptions,$setmytttag_search_config_options); 333 329 "options" => $optionvalue['options']); 330 } 331 332 update_option($tttagsearchconfigoptions,$setmytttag_search_config_options); 333 334 334 } 335 335 … … 342 342 $tttagsearchconfigoptions=$tttagsearchconfigoptionsprefix.'_settings_config'; 343 343 $mysavedthemetttag_search_config_options=get_option($tttagsearchconfigoptions); 344 344 345 345 $tttag_search_config_options = $mysavedthemetttag_search_config_options; 346 347 if (!isset($tttag_search_config_options) || empty($tttag_search_config_options) || !is_array($tttag_search_config_options)) 348 { 346 347 if (!isset($tttag_search_config_options) || empty($tttag_search_config_options) || !is_array($tttag_search_config_options)) 348 { 349 349 $tttag_search_config_options = $def_tttag_search_config_options; 350 350 … … 352 352 { 353 353 foreach ($tttag_search_config_options as $optionvalue) 354 { 354 { 355 355 if(isset($optionvalue['id']) && !empty($optionvalue['id'])) 356 356 { 357 $savedoptionvalue=get_option($optionvalue['id']); 357 $savedoptionvalue=get_option($optionvalue['id']); 358 358 if(!isset($savedoptionvalue) || empty ($savedoptionvalue)) 359 359 { … … 365 365 "std" => $savedoptionvalue, 366 366 "type" => $optionvalue['type'], 367 "options" => $optionvalue['options']); 367 "options" => $optionvalue['options']); 368 368 369 369 delete_option($optionvalue['id']); … … 371 371 } 372 372 } 373 373 374 374 update_option($tttagsearchconfigoptions,$setmytttag_search_config_options); 375 } 375 } 376 376 377 377 if( isset($_REQUEST['action']) && ( 'updatetttag_search_config_options' == $_REQUEST['action'] )) … … 380 380 381 381 foreach ($tttag_search_config_options as $optionvalue) 382 { 383 382 { 383 384 384 if(isset($optionvalue['id']) && !empty($optionvalue['id'])) 385 385 { 386 386 if( isset( $_REQUEST[ $optionvalue['id'] ] ) ) 387 { 387 { 388 388 $myoptionvalue = $_REQUEST[ $optionvalue['id'] ]; 389 389 } 390 390 } 391 391 392 392 if(!isset($optionvalue['options']) || empty($optionvalue['options'])) 393 393 { 394 394 $optionvalue['options']=''; 395 395 } 396 396 397 397 if(!isset($optionvalue['id']) || empty($optionvalue['id'])) 398 398 { 399 399 $optionvalue['id']=''; 400 } 401 400 } 401 402 402 if(!isset($optionvalue['std']) || empty($optionvalue['std'] )) 403 403 { 404 404 $optionvalue['std']=''; 405 405 } 406 407 406 407 408 408 $mytttag_search_config_options[]=array("name" => $optionvalue['name'], 409 409 "id" => $optionvalue['id'], 410 410 "std" => $myoptionvalue, 411 411 "type" => $optionvalue['type'], 412 "options" => $optionvalue['options']); 412 "options" => $optionvalue['options']); 413 413 414 414 } 415 415 update_option($tttagsearchconfigoptions,$mytttag_search_config_options); 416 $tttag_search_config_optionsupdated=true; 416 $tttag_search_config_optionsupdated=true; 417 417 418 418 } … … 428 428 $tttag_search_config_options=get_tttagsearch_options(); 429 429 $tttag_search_config_saved_options = get_option($tttagsearchconfigoptionsprefix.'_settings_config'); 430 431 if (!isset($tttag_search_config_saved_options) || empty($tttag_search_config_saved_options) || !is_array($tttag_search_config_saved_options)) 430 431 if (!isset($tttag_search_config_saved_options) || empty($tttag_search_config_saved_options) || !is_array($tttag_search_config_saved_options)) 432 432 { 433 433 $tttag_search_config_options = $def_tttag_search_config_options; … … 441 441 <h4><?php _e('Tag Search Settings','ttagse');?></h4> 442 442 <form method="post"> 443 <?php foreach ($tttag_search_config_options as $value) { 444 443 <?php foreach ($tttag_search_config_options as $value) { 444 445 445 if ($value['type'] == "text") { ?> 446 446 <div style="float: left; width: 880px; background-color:#E4F2FD; border-left: 1px solid #C2D6E6; border-right: 1px solid #C2D6E6; border-bottom: 1px solid #C2D6E6; padding: 10px;"> … … 471 471 <?php } elseif ($value['type'] == "titles") { ?> 472 472 <div style="float: left; width: 870px; padding: 15px; background-color:#2583AD; border: 1px solid #2583AD; color: #fff; font-size: 16px; font-weight: bold; margin-top: 25px;"> <?php echo $value['name']; ?> </div> 473 <?php 474 } 473 <?php 474 } 475 475 } 476 476 ?>
Note: See TracChangeset
for help on using the changeset viewer.