Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Release: Toggle Search Results between Posts + Threads Details »»
Release: Toggle Search Results between Posts + Threads
Version: , by Dockaych Dockaych is offline
Developer Last Online: Jan 2017 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 10-11-2003 Last Update: Never Installs: 0
 
No support by the author.

Author: Dock

Description:This is a really, really, simple template modification. It basically adds the ability to choose whether to see the search results as posts or threads. I wanted to add this because I found it annoying using the 'simple search', but then realising I wanted to see posts instead of threads.

I realise that it's possible to click on the 'Searched for' text to go back to the search page, but this is nicer IMO I don't know whether this is useful for anyone.

EDIT: 1.1 - I changed the code so that it recognises whether it is on threads or posts, and offers to toggle to the other view.
EDIT: 1.2 - I fixed the code so that it doesn't show on the getnew page.

In the 'SEARCH-FORUMS' template, search for:
Code:
Search took <b>$searchtime</b> seconds.
and replace with:
Code:
Search took <b>$searchtime</b> seconds.  

<if condition="$action == 'getnew'">
<else />
    <if condition="$search[showposts]">
    <b><a href="search.php?$session[sessionurl]$searchquery&showposts=0&do=process">See results as  
threads</a></b>
    <else />
    <b><a href="search.php?$session[sessionurl]$searchquery&showposts=1&do=process">See results as posts</a></b>
    </if>
</if>
Example: See attached image

Download Now

File Type: (21.4 KB, 10 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 10-11-2003, 11:28 PM
Dockaych Dockaych is offline
 
Join Date: Nov 2001
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Notes:

This hack will also show up on the "search within this thread" results, but clicking either of the links will make no change to the current page. I should probably try to find a conditional to make it disappear for that page too.
Reply With Quote
  #3  
Old 10-19-2003, 07:27 AM
Dockaych Dockaych is offline
 
Join Date: Nov 2001
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I was wondering if anyone could help me to finish this hack. I still have problems with this code appearing within the 'search this thread' results. I've tried <if condition="$search[searchthread]"><else /> and <if condition="$search[searchthreadid]"><else /> and a wealth of others, but I can't see to find any way to turn off this hack on the 'search this thread' page. Can anyone help?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:10 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.04220 seconds
  • Memory Usage 2,229KB
  • Queries Executed 17 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (2)postbit
  • (1)postbit_attachment
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete