vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Use exclude in search process related query string (https://vborg.vbsupport.ru/showthread.php?t=69326)

calorie 09-10-2004 10:00 PM

Use exclude in search process related query string
 
So you can set Usergroup permissions to prevent access to certain forums, and when you setup a forum, you can set 'Index New Posts in Search Engine' to the 'No' option. Furthermore, another way to exclude forums from search results is to append exclude in the query string like so:

Code:

<a href="search.php?$session[sessionurl]do=getnew&exclude=1,2,3" accesskey="2">New Posts</a>
<a href="search.php?$session[sessionurl]do=getdaily&days=X&exclude=1,2,3" accesskey="2">X Day(s) Ago</a>

where exclude=1,2,3 means to exclude forums having forumid 1, 2, or 3 from search results and days=X means get only items from the last 24 * X hours. However if you should want to search for say unanswered threads (those threads having zero responses) like so:

Code:

<a href="search.php?$session[sessionurl]do=process&replyless=1&replylimit=0&exclude=1,2,3" accesskey="2">Unanswered Threads</a>
then the exclude variable in the query string is ignored. That is where this mini hack comes into play. It lets you use exclude in the process related query string (where no forum choice is set) to prevent threads having say zero responses from showing up in the search results for members permitted to access the forums.

While I searched around for an exisitng hack that allowed the use of both process and exclude in the same query string, I did not find such a hack although one may exist. So anyway there are two edits in one file necessary for this mini hack.

Support is only offered on an if/as time is available basis. If you use this mini hack, then click install.

kall 09-11-2004 08:37 PM

Thanks for sharing, however this is a Template mod, it belongs over at vbulletintemplates.com.

If it doesn't involve php changes (or phpinclude changes), then it's not a mini mod.

calorie 09-11-2004 08:39 PM

Quote:

Originally Posted by kall
Thanks for sharing, however this is a Template mod, it belongs over at vbulletintemplates.com.

If it doesn't involve php changes (or phpinclude changes), then it's not a mini mod.

Did you look at the hack before posting? :rolleyes:

kall 09-11-2004 08:46 PM

Quote:

Originally Posted by calorie
Did you look at the hack before posting? :rolleyes:

Yes.

What php files are edited?

Which phpinclude template mods are made?

None.

calorie 09-11-2004 08:54 PM

Uh, no! There are two PHP edits to the search.php file. A fresh install of vB does not recognize exclude as part of the do=process search query string, only do=getnew and do=getdaily can be combined with exclude. Check the attached file again b/c you obviously didn't see the PHP in the file.

ChrisSy 09-11-2004 09:38 PM

thanks calorie, this is very useful :)

DeanoG 09-26-2004 11:27 AM

Thank you very much .. this is what I have been looking for ..

The Realist 10-26-2004 10:57 PM

Used the following code for unanswered threads

<tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=process&replyless=1&replylimit=0&exclude=91,92, 99,103,119" accesskey="2">Unanswered Threads</a></td></tr>

Use the exclude code and the sections I have added still show up.

How can I exclude these sections from showing up in the unanswered threads.

Laters

calorie 10-28-2004 03:23 AM

@ The Realist: What changes did you make to the search.php file for this mod?

The Realist 10-28-2004 09:44 AM

As per instructions for the mod.


All times are GMT. The time now is 10:03 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.01103 seconds
  • Memory Usage 1,737KB
  • 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
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete