vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   Refine this search and pasteable search URL pseudo-features (https://vborg.vbsupport.ru/showthread.php?t=132461)

malmazan 11-24-2006 10:00 PM

Refine this search and pasteable search URL pseudo-features
 
This is not really a new feature but just surfaces one that was readily available, though in such a way that it was hard to notice.

The feature does two things:
  1. Provides a Refine This Search type feature
  2. Provides a URL to a search that includes all options and can be shared with other users

In the search_results template look for :
Code:

                <a href="search.php?$session[sessionurl]$searchquery"><strong>$vbphrase[search]:</strong></a>
Replace by:
Code:

                <if condition="$displayWords"><!--Edit search Hack--><strong>&nbsp;$vbphrase[search]&nbsp;(<a href="search.php?$session[sessionurl]$searchquery" style="text-decoration: underline;">$vbphrase[edit]</a>):</strong><else /><a href="search.php?$session[sessionurl]$searchquery"><strong>$vbphrase[search]:</strong></a></if>
The link uses tcat css definition and is therefore not underlined and hence does not look like a link, which is one of the reasons why the feature is so hard to find, so i have forced the underline with style="text-decoration: underline;". Alternatively, you will surface lots of links disguised as plain text by editing the tcat css so that tcat links are underlined, which is what i do and recommend.

No new phrases are needed as i am only re-using phrases. And works for all languages.

The conditional is used to avoid the feature being shown on search results that are not quite such things, such as 'New Posts'.

Before and after screen dumps enclosed (keywords look like links in both cases because they are underlined. Not very intuitive really (they are not links), but the fix for this needs editing search.php where the <b> codes reside) :

yoyoyoyo 12-06-2006 02:56 AM

the above code can be found in the search_results template

malmazan 12-06-2006 05:57 AM

Quote:

Originally Posted by yoyoyoyo (Post 1132954)
the above code can be found in the search_results template

Indeed, i forgot that very important piece of info. I have edited the initial post. Thanks.


All times are GMT. The time now is 10:25 AM.

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.01010 seconds
  • Memory Usage 1,719KB
  • 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)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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