vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   For "Save Search Preferences", store all attributes EXCEPT 'search type'. (https://vborg.vbsupport.ru/showthread.php?t=99658)

timetunnel 10-29-2005 10:00 PM

For "Save Search Preferences", store all attributes EXCEPT 'search type'.
 
Hello.

This revision is for those admins who don't want Boolean used for EVERY search whether needed or not, unnecessarily raising system resources. If someone needs Boolean for a once-in-a-while search, let them explicitly select it on a case-by-case basis.

This may be a desired feature for relatively-busy forums, I would think.

(ref this thread from vbulletin.com regarding the background for this revision: http://www.vbulletin.com/forum/showthread.php?t=159204)

~~~~~~~~~~~~~~~~

In the 'search_forums' template, almost at the bottom, is the code for 'Save Search Preferences'. Locate this area. Then, add the code that's between the revision comment lines below JUST PRIOR TO the 'submit' code line. The <font..></font> tags contain a note to the user so they don't have to ask the admin why that parameter is not saving. The comment lines are optional.

Add this code:
Code:

<!-- begin revision -->
<input type="hidden" name="searchtype" value="0" />
<br />
<font size="-2">NOTE:&nbsp;&nbsp;'Search Type' is not saved.</font>
<!-- end revision -->

just above this line:
Code:

<input type="submit" class="button" name="doprefs" value="$vbphrase[go]" />
With this code located just prior to the 'submit' code, it REDEFINES (or in this case, RESETS) the value of the 'searchtype' parameter on-the-fly while on its way to be passed to the 'search.php' script. This tells 'search.php' what YOU want this value to be set to.


ENJOY!

Snake 10-30-2005 10:50 AM

Thanks, all installed! ;)


All times are GMT. The time now is 03:48 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01026 seconds
  • Memory Usage 1,712KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete