PDA

View Full Version : vB3 Unanswered Threads Hack v1.3


Boofo
03-26-2004, 10:00 PM
vB3 Unanswered Threads Hack
Version 1.3
(By Boofo and Kirby)

What does this hack do?
This hack will provide you with a link that will pull up all unanswered threads on your forums and also unanswered threads on a forum by forum basis. Unanswered threads are threads that have no replies to them. This is great for forums that do any kind of tech support so you can find the posts that have not been answered and respond to them.

Version information:
Version 1.0 --Initial Release
Version 1.1 --Updated to allow Admins, Super Moderators and Moderators to see the link.
Version 1.2 --Added code for Forum Tools Menu links and Navbar Quick Links.
Version 1.3 --Fixed nasty bug with the semi-colon showing up by itself for unanswered threads. Now "Unanswered Threads --" (sans quotes) will show up in place of the semi-colon if the search is for unanswered threads.

Installation overview:
Files to edit: (1)
--search.php
Templates to edit: (6)
--search_results
--forumdisplay
--forumhome
--forumhome_forumbit_level1_post
--forumhome_forumbit_level2_post
--navbar

Geographic2
03-27-2004, 04:53 AM
Sweet. will install after sleeping.

Oblivion Knight
03-27-2004, 08:31 AM
Ah, good idea Boofo! :)
I may consider installing this at a later date, my forums aren't even open yet.

Thanks for sharing.

gmarik
03-27-2004, 10:03 AM
rather original one

Boofo
03-27-2004, 10:05 AM
What original one?

msimplay
03-27-2004, 01:32 PM
excellent work boofo :)

Osterling
03-27-2004, 01:35 PM
Now is the option for regular memebers too? Like can memebers other then the Admin, use this to see what post have not been repleid to?

Boofo
03-27-2004, 01:56 PM
Right now it is set up for Admins, Super Mods and Mods to see the link. But you can add whatever usergroups you want to see it very easily. ;)

SpeedStreet
03-27-2004, 04:41 PM
Right now it is set up for Admins, Super Mods and Mods to see the link. But you can add whatever usergroups you want to see it very easily. ;)
Boofo,

Another great hack. Iowa, right? Remind me to call my uncle and tell him to give you one "get out of a speeding ticket free" card ;)

- John

Oblivion Knight
03-27-2004, 05:49 PM
This is the smallest of things, but when clicking the link and the results are displayed on the search category strip, this is shown:


Search: ; Forum: Test Forum 3Is there any way to remove the ; that is added?

I noticed vB.org doesn't have any such problem when showing installed hacks, so I figured it could be sorted for this? :nervous:

Boofo
03-27-2004, 06:33 PM
Boofo,

Another great hack. Iowa, right? Remind me to call my uncle and tell him to give you one "get out of a speeding ticket free" card ;)

- John

Thank you. Hopefully I will never need it but it might be nice to have just in case. ;)

What's his name? I might actually know him. ;)

Boofo
03-27-2004, 06:34 PM
This is the smallest of things, but when clicking the link and the results are displayed on the search category strip, this is shown:


Is there any way to remove the ; that is added?

I noticed vB.org doesn't have any such problem when showing installed hacks, so I figured it could be sorted for this? :nervous:

I'm not sure where to fix that at. I can't see how this hack would cause that but it might in some way. Any ideas? ;)

SpeedStreet
03-27-2004, 06:43 PM
Thank you. Hopefully I will never need it but it might be nice to have just in case. ;)

What's his name? I might actually know him. ;)
Hint:

My last name is Vilsack ;)

Boofo
03-27-2004, 06:51 PM
LOL That's your uncle? Yeah, I could definately use some things from him! ;)

You ever get to visit him? You'll have to stop on by. ;)

SpeedStreet
03-27-2004, 09:13 PM
LOL That's your uncle? Yeah, I could definately use some things from him! ;)

You ever get to visit him? You'll have to stop on by. ;)
Technically great uncle :)

I was actually in des moines and mason city for several weekends before the January Caucus. My name does well for fundraising :D

Boofo
03-27-2004, 09:40 PM
Well, the next time you're up this way, you'll have to stop on by and say 'Hi'. ;)

Oblivion Knight
03-27-2004, 09:45 PM
I'm not sure where to fix that at. I can't see how this hack would cause that but it might in some way. Any ideas? ;)Looking at the code of search.php, this looks like it's more work than it's actually worth to identify unanswered threads as a search option to replace the redundant ; (I can't quite figure out why this shows anyway) with "Unanswered Threads".

Unless Xenon or anyone else can shed any light on this, we're stuck with ;

Boofo
03-27-2004, 09:53 PM
I'll work on it and see what I can come up with and, hopefully, in the meantime, someone might be able to help us figure out what to do about the ;. ;)

PET
03-27-2004, 10:06 PM
Can you please post a small screenshot to see how it...show up the links ?

Oblivion Knight
03-27-2004, 11:15 PM
Here's how I have it set up..
Bare in mind though, i've done it for each forum individually. As the instructions mention, you add the code to the template where you want to, I just thought the Forum Tools was a good place for it.

SaN-DeeP
03-27-2004, 11:28 PM
nice hack. i will love to install it :)

thnx :)

Boofo
03-27-2004, 11:35 PM
Please, don't forget the install button, Sandy. When you install it, that is. ;)

Fi_InCogNiTo
03-28-2004, 01:55 AM
Very nice hack.
*Clicks Install

Boofo
03-28-2004, 04:39 AM
Here's how I have it set up..
Bare in mind though, i've done it for each forum individually. As the instructions mention, you add the code to the template where you want to, I just thought the Forum Tools was a good place for it.

If you'll send me the code in a pm for adding it to the forum tools, I'll add it to the hack (for yet another option) and give you full credit for the addition. ;)

Oblivion Knight
03-28-2004, 08:02 AM
If you'll send me the code in a pm for adding it to the forum tools, I'll add it to the hack (for yet another option) and give you full credit for the addition. ;)You've got mail.. :)
I've also given you the code to set up the board-wide link in the navbar via Quick Links.

Mone'
03-29-2004, 02:44 AM
Great hack Boofo Installed and working perfectly :)

I changed the location of the search button to show in forumhome in the dhtml search box , see screen shot.

Just posting the code here in case other users would like to use it.

Edit the following template: Navigation / Breadcrumb Templates > navbar

look for:

<tr>
<td class="vbmenu_option">
<a href="search.php?$session[sessionurl]">$vbphrase[advanced_search]</a>
</td>
</tr>


Below that code add:


<tr>
<td class="vbmenu_option">
<if condition="in_array($bbuserinfo['usergroupid'], array(5, 6, 7))">
<div class="smallfont">
<a href="search.php?do=process&replyless=1&replylimit=0&dontcache=1">Unanswered Threads</a>
</div>
</if></td>
</tr>

Done :)

Boofo
03-29-2004, 02:55 AM
Nice touch. I'll add this to the install file and credit you for it. ;)

msimplay
03-29-2004, 05:44 PM
Here's how I have it set up..
Bare in mind though, i've done it for each forum individually. As the instructions mention, you add the code to the template where you want to, I just thought the Forum Tools was a good place for it.
what template is that in ?
i want to do the same

Oblivion Knight
03-29-2004, 07:46 PM
what template is that in ?
i want to do the sameBoofo's supposed to be adding it to the instructions, but here it is anyway.. ;)

In forumdisplay, find:

<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]f=$foruminfo[parentid]">$vbphrase[view_parent_forum]</a></td></tr>
Add below:

<if condition="in_array($bbuserinfo['usergroupid'], array(5, 6, 7))"><tr><td class="vbmenu_option"><a href="search.php?do=process&replyless=1&replylimit=0&dontcache=1&forumchoice[]=$forumid">View Unanswered Threads</a></td></tr></if>

msimplay
03-29-2004, 08:21 PM
Boofo's supposed to be adding it to the instructions, but here it is anyway.. ;)

thank you that worked great :D

gldtn
04-02-2004, 06:47 AM
Right now it is set up for Admins, Super Mods and Mods to see the link. But you can add whatever usergroups you want to see it very easily. ;)
I'm very dumb when it comes to hacking, could you show me an example on how to add other usergroups to the list?

Thanks in advance

Boofo
04-02-2004, 06:55 AM
Find this:

<if condition="in_array($bbuserinfo['usergroupid'], array(5, 6, 7))">

and add what usergroups you want to the 5,6,7 part of it. ;)

msimplay
04-02-2004, 08:16 AM
Find this:

<if condition="in_array($bbuserinfo['usergroupid'], array(5, 6, 7))">

and add what usergroups you want to the 5,6,7 part of it. ;)
for my forums i removed the if condition because i want people to answer the 0 replies :D and it bumps old threads that should have got a look

Slave
04-03-2004, 05:02 AM
Nice hack .. :) .. installed

welo
04-24-2004, 01:42 AM
Just installed and works great. You know what would be nice though? If we could find some way to add this to the "Forum Tools" dropdown for individual forums rather than having to edit a link in somewhere. That'd sure be a nice, convenient place to have it.


You know something though? The more I look at it the less I'm finding a viable place to add a link to the forumhome_forumbit_levelx templates. Where is everyone else putting it? I added it to FORUMDISPLAY and everything seems to work fine.

welo
04-24-2004, 02:51 AM
Here's something minor I just noticed: The search results for VB3 have a title bar that reads:

Search: Key Word(s): [blah] ; Forum: [this forum] and child forums

...where = whatever search words you used. In the case of this hack however, no keywords are used and you see:

[B]Search: ; Forum: [this forum]

...instead. Took me a couple of tries to figure out where that stray semicolon was coming from. Is there any way to insert something before the semicolon when links for this hack are clicked, like "Unanswered Posts" or something? The way it currently renders makes it look like a bug. Obviously nothing major but it is kind of annoying.

Boofo
04-24-2004, 02:57 AM
Here's something minor I just noticed: The search results for VB3 have a title bar that reads:



...where [blah] = whatever search words you used. In the case of this hack however, no keywords are used and you see:



...instead. Took me a couple of tries to figure out where that stray semicolon was coming from. Is there any way to insert something before the semicolon when links for this hack are clicked, like "Unanswered Posts" or something? The way it currently renders makes it look like a bug. Obviously nothing major but it is kind of annoying.

I'm not sure why that semi-colon is there, but I have not found a way to get rid of it as yet. That has been there since the beginning of this hack. If you come up with a way to get rid of it, I'm all ears. ;)

The install file tells you where to add the link in these 2 templates:

forumhome_forumbit_level1_post
forumhome_forumbit_level2_post

welo
04-24-2004, 03:28 AM
I'm not sure why that semi-colon is there, but I have not found a way to get rid of it as yet. That has been there since the beginning of this hack. If you come up with a way to get rid of it, I'm all ears. ;)
The semicolon is supposed to be there. The thing about this hack is it feeds no keywords to place before it, so the semicolon just hangs there by itself once the query is run. I'm looking into it.

The install file tells you where to add the link in these 2 templates:

forumhome_forumbit_level1_post
forumhome_forumbit_level2_post
Sorry bud; nope, it doesn't. What it says is:

For each forum individually, add the following code to the templates below wherever you want it to show. (A good place is right after the forum title, if you are using an image).
My point is, I dont think right after the forum title is appropriate, I'm not using an image, and I don't see anywhere else in these templates to add it as a link. All they do is overview the content and stats for each forum without providing any real additional navigation. FORUMDISPLAY gives a better set of options, and is one template to edit rather than two. I even looked on your board to see where you put it and curiously can't find it anywhere.

Boofo
04-24-2004, 03:55 AM
Ok, I fixed the semi-colon cosmetic problem. Try the following code and let me know if this works for you.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In the search_results template

Find:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

; $vbphrase[forum]: $displayForums <if condition="$childforums">$vbphrase[and_child_forums]</if>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REPLACE it with
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

<if condition="$dontcache=1">
Unanswered Threads --
<else />
;
</if>
$vbphrase[forum]: $displayForums <if condition="$childforums">$vbphrase[and_child_forums]</if>

Boofo
04-24-2004, 04:08 AM
The semicolon is supposed to be there. The thing about this hack is it feeds no keywords to place before it, so the semicolon just hangs there by itself once the query is run. I'm looking into it.


Sorry bud; nope, it doesn't. What it says is:


My point is, I dont think right after the forum title is appropriate, I'm not using an image, and I don't see anywhere else in these templates to add it as a link. All they do is overview the content and stats for each forum without providing any real additional navigation. FORUMDISPLAY gives a better set of options, and is one template to edit rather than two. I even looked on your board to see where you put it and curiously can't find it anywhere.

You won't find it on my board unless you are an Admin or Moderator. I don't have it available to registered users. I use the question_mark image right after the forum title. I had it as a link under the forum description (where Moderated By is now on my site) but I like the image better. I also have a link for Unanswered Threads fior the whole site next to View Forum Leaders and Mark Forum Read links, but again, only for staff.

Boofo
04-24-2004, 04:12 AM
From the install file in this thread:

For each forum individually, add the following code to the templates below wherever you want it to show. (A good place is right after the forum title, if you are using an image).

forumhome_forumbit_level1_post
forumhome_forumbit_level2_post


With an image:

<if condition="in_array($bbuserinfo['usergroupid'], array(5, 6, 7))">
<a href="search.php?do=process&replyless=1&replylimit=0&dontcache=1&forumchoice[]=$forumid"><img src="http://www.yoursite.com/forums/images/misc/unanswered_threads.gif" border="0" alt="View Unanswered Threads"></a>
</if>


As a link:

<if condition="in_array($bbuserinfo['usergroupid'], array(5, 6, 7))">
<div class="smallfont">
<a href="search.php?do=process&replyless=1&replylimit=0&dontcache=1&forumchoice[]=$forumid">View Unanswered Threads</a>
</div>
</if>

And here is your Forum Tools link, since you really can't live without it. ;)

Forum Tools Menu (for each forum individually)

In the forumdisplay template, find:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

<tr><td class="vbmenu_option"><a href="forumdisplay.php?$session[sessionurl]f=$foruminfo[parentid]">$vbphrase[view_parent_forum]</a></td></tr>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
BELOW that ADD
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

<if condition="in_array($bbuserinfo['usergroupid'], array(5, 6, 7))"><tr><td class="vbmenu_option"><a href="search.php?do=process&replyless=1&replylimit=0&dontcache=1&forumchoice[]=$forumid">View Unanswered Threads</a></td></tr></if>

welo
04-24-2004, 06:27 AM
Wow man. I was in the middle of tracking all this down and you beat me to it :). Everything works like a charm. The only thing I did differently was remove all the

<if condition="in_array($bbuserinfo['usergroupid'], array(5, 6, 7))">

...stuff because I wanted this available to everyone (one of the first things I do when surfing other boards is look for zero-reply topics in hopes of finding a way to jump in; I'm probably not the only one).

Anyway, thanks a lot. Nice little hack indeed. :cool:

Boofo
04-24-2004, 07:15 AM
Did the semi-colon fix do what you wanted?

welo
04-24-2004, 07:29 AM
Did the semi-colon fix do what you wanted?
lol, yep, it worked. Sorry to sound nitpicky on that. Like I said, it was trivial yet annoying. I'm just not quite familiar enough with the different templates yet to have tracked that down efficiently.

Thanks again.

Boofo
04-24-2004, 07:37 AM
lol, yep, it worked. Sorry to sound nitpicky on that. Like I said, it was trivial yet annoying. I'm just not quite familiar enough with the different templates yet to have tracked that down efficiently.

Thanks again.

All I did was do a template search for Key Word(s) and found it in one of the search templates and went from there. ;)

Oblivion Knight
04-27-2004, 08:44 AM
Thanks for the semi-colon fix Boofo.. :)

Boofo
04-27-2004, 03:38 PM
You're very welcome, sir. ;)

SHalliday
05-20-2004, 05:34 PM
Guys, a hand here, i need some help to filter out some forums from the query, i want to open the search to all users but dont want them to see some admin/moderator specific posts.

Help appreciated
www.AllfordMustangs.com

Boofo
05-20-2004, 09:43 PM
Guys, a hand here, i need some help to filter out some forums from the query, i want to open the search to all users but dont want them to see some admin/moderator specific posts.

Help appreciated
www.AllfordMustangs.com (http://www.AllfordMustangs.com)
The install file tells you how to have just certain forums selected.

You might want to click the install button in case there are ever any updates to this hack.

tamarian
05-25-2004, 04:04 PM
Boofo, I just clicked install, but I've only used template changes, and did not change the search.php file. Are there any advantages to editing search.php?

Boofo
05-25-2004, 11:28 PM
Boofo, I just clicked install, but I've only used template changes, and did not change the search.php file. Are there any advantages to editing search.php?
Without the code added to the search.php, the template edits won't work right. ;)

tamarian
05-25-2004, 11:46 PM
Without the code added to the search.php, the template edits won't work right. ;)

In what way?

I've done the quick links template edit and the forum tools template edit, and they return unanswered posts.

Boofo
05-25-2004, 11:49 PM
In what way?

I've done the quick links template edit and the forum tools template edit, and they return unanswered posts.
The code for the serrch.php is the basis of the hack. You won't get ALL unanswered posts doing it with only template edits.

kontrabass
05-29-2004, 01:08 PM
Is there a way to modify the search so that only threads from the last x hours or x days are considered? My database is so huge searching the whole shebang takes several seconds.

Thanks!

tamarian
05-29-2004, 03:55 PM
Is there a way to modify the search so that only threads from the last x hours or x days are considered? My database is so huge searching the whole shebang takes several seconds.

I add this to the end of the link "&searchdate=7" to restrict it to one week.

SaN-DeeP
06-01-2004, 09:00 AM
i want to use this mod :)
is there a way to ignore some forums ?? using this

like i am running a technology board. and there is a fun/entertainment forum too
i do not want unanswered threads from that forums appear.

is it possible :)
if yes, i will go ahead.

thnx.
Sandy...

Boofo
06-01-2004, 03:29 PM
i want to use this mod :)
is there a way to ignore some forums ?? using this

like i am running a technology board. and there is a fun/entertainment forum too
i do not want unanswered threads from that forums appear.

is it possible :)
if yes, i will go ahead.

thnx.
Sandy...
Check the install file. It will allow you to also set it up as you requested.

Don't forget to click install when you are done. ;)

SaN-DeeP
06-02-2004, 05:38 AM
Check the install file. It will allow you to also set it up as you requested.

Don't forget to click install when you are done. ;)
just wondering this is my long code ;)
nice hack JUST CLICKED install :)

<tr><td class="vbmenu_option"><a href="search.php?do=process&replyless=1&replylimit=0&dontcache=1&forumchoice[]=14&forumchoice[]=11&forumchoice[]=10&forumchoice[]=46&forumchoice[]=13&forumchoice[]=33&forumchoice[]=43&forumchoice[]=34&forumchoice[]=32&forumchoice[]=31&forumchoice[]=38&forumchoice[]=40&forumchoice[]=42&forumchoice[]=39&forumchoice[]=41&forumchoice[]=16&forumchoice[]=17">Unanswered Threads</a></td></tr>

and also how do i hide those results which appear on top of search ??

like i want to hide this.
Search: Unanswered Threads -- Forum: Introduce Yourself or Ebooks or Games or Internet or Networking and Security or WWW or Processors & Motherboards or Graphics / Video Cards or Overclocking & PC Modding or Components or Portable Devices or Applications in General or Operating Systems or Coding/Programming & Design or Tips, Tweaks and Hacks or GUI-Modding, Desktop Themes, Icons etc or Tutorials or Reviews

rstan
06-27-2004, 06:11 AM
Im getting this:

Sorry - no matches. Please try some different terms.

The following words are either very common, too long, or too short and were not included in your search : WHERE


Any ideas where I messed up?

rstan
07-24-2004, 03:32 AM
In almost a month nobody can help me out here?

SmartGnome
07-24-2004, 01:25 PM
Thanks Boofo....... install is clicked :laugh:

Intex
11-26-2004, 04:28 PM
Nice work Boofo.

* Intex clicks INSTALL.

cinq
12-10-2004, 09:00 AM
A simple yet very useful hack, thanks for this one Boofo :)

SFishy
12-30-2004, 12:28 AM
A simple yet very useful hack, thanks for this one Boofo :)
Excellent - Thanks Boofo!

Startinfresh
01-23-2005, 04:08 PM
OK I must have done something wrong because I am getting red lines under my unanswered posts. Anyone care to help a woman out LOL

carolmyt
01-23-2005, 06:04 PM
Is this hack ready for vb 3.0.6? Cause this would be an awesome addition to my board.

Oblivion Knight
03-08-2005, 10:46 PM
Using this in 3.0.7, the Unanswered Threads text appears in searches when it shouldn't..

For example, when searching for a word in a single forum (Search this Forum) the search text displays:
Search: Key Word(s): test Unanswered Threads -- Forum: General Chat and child forums

Eagle Creek
03-15-2005, 09:30 PM
Technically great uncle :)

I was actually in des moines and mason city for several weekends before the January Caucus. My name does well for fundraising :D
Is it full 3.0.7 compatible?

Mechanical Mind
03-15-2005, 10:11 PM
Wow! A hack to view unanswered threads... Did anybody show this to the mods at vB.com? LOL :nervous: (...the preceding was a corny joke...)

djroketboy
03-18-2005, 11:13 AM
is there a way to exclude forums from a search? my mods mostly use the link on the forumhome display, but it also grabs our "news" forums which isn't needed...

any idea's without having to list all 100+ forums in the search string?

AFTERTHOUGHT: even better would be to exclude just 2 users from the search (the two admins)

Byron
04-08-2005, 04:12 AM
How to exclude Closed Topics?

Can this hack exclude forums? I found this hack that allow us to exclude forums.
https://vborg.vbsupport.ru/showthread.php?t=69326

gonecountry
04-14-2005, 12:34 PM
New to installing hacks first one actually. Is this compatible with VB 3.0.7 As I have looked for

// check our results and decide what to do
switch ($highScore)
{

in search.php and do not see it anywhere.

Bubble #5
04-22-2005, 08:50 PM
Would be great if someone could kindly update this to work with 3.0.7 :ermm:

ice9
04-23-2005, 11:37 PM
<a href="http://www.vbulletin.com/forum/showthread.php?t=125875&page=2&pp=15" target="_blank">http://www.vbulletin.com/forum/showt...5&page=2&pp=15</a>

Eagle Creek
04-24-2005, 07:23 AM
Your link provides nice information but this hack really does something else:

This hack will provide you with a link that will pull up all unanswered threads on your forums and also unanswered threads on a forum by forum basis.

But maybe it's a temporary solution.


I can't understand. SO MANY CODERS, and nobody can (of will) make such a hack?

Bubble #5
04-24-2005, 07:31 AM
Your link provides nice information but this hack really does something else:



But maybe it's a temporary solution.


I can't understand. SO MANY CODERS, and nobody can (of will) make such a hack?
The link ice9 provided works great! Nothing 'temporary' about it. You simply make a button and add the search url to it and then it will tell you which posts have been unanswered. The only thing it can't do, that I'm aware of, is to exclude certain forums. Other then that it's the same as the hack :) I for one really appreciate ices link :)

ice9
04-24-2005, 07:23 PM
Re-read the link I've posted. Any search that can be performed via the search function can be hard-coded with a link. Feel free to check out the site in my profile to see how it's done -- excluding forums is certainly possible. Actually, it's done by specifically including certain forums, with the forumchoice variable.

Eagle Creek
04-24-2005, 08:05 PM
1. I only want to do it for one forum.
2. It makes a seperate page with the results, leaving the originale forum alone. I want to push the trheads up.
3. How could I ever made a button in one single forum?

ice9
04-24-2005, 08:14 PM
You can use the forumchoice option to limit your searches to certain forum(s). Not sure what you mean by #2 and #3.

WoodiE
10-06-2005, 11:05 AM
Will this be ported for 3.5?

-Michael

italks
10-28-2005, 07:51 PM
i am waiting for 3.5 version too.

Eagle Creek
11-27-2005, 04:03 PM
Any news?

Boofo
11-27-2005, 04:58 PM
You can use the forumchoice option to limit your searches to certain forum(s). Not sure what you mean by #2 and #3.

Number 3 could be done by wrapping the link in forum permission tags. ;)

As far as porting this, I saw no reason to do it as you can now do it via links in 3.5 (I think). I will look into it and see if it would be worth porting to 3.5 ;)

-=Sniper=-
12-19-2005, 10:05 PM
Boofo; I just had a go at doing this for vb 3.5 and it worked

add a new plugin in the hook: search_process_start

use this code, very little change in the code. if ($exclude)
{
$zzzz_notforumchoice = "";
$zzzz_excludelist = explode(',', $exclude);
foreach ($zzzz_excludelist AS $zzzz_key => $zzzz_excludeid)
{
$zzzz_notforumchoice .= intval($zzzz_excludeid).",";
}
$zzzz_notforumchoice = substr($zzzz_notforumchoice,0,-1);
if ($showposts)
{
$post_query_logic[] = "thread.forumid NOT IN ($zzzz_notforumchoice)";
}
else
{
$thread_query_logic[] = "thread.forumid NOT IN ($zzzz_notforumchoice)";
}
}

then use exclude e.g. search.php?do=process&replyless=1&replylimit=0&days=7&dontcache=1&searchdate=7&exclude=22,70,71,72

where the numbers are the forums you want to exclude.

FLMom
04-25-2006, 08:54 PM
Just downloaded and am having trouble with finding the right template codes to edit :( I wish this was easier lol


off to try again! wish me luck!

Boofo
04-25-2006, 09:16 PM
So, basically, the code you are using here is for excluding forums only, right? If you don't want to exclude any forums, then we don't need any plug-ins at all. Or am I missing something (like I usually do)? ;)

Boofo; I just had a go at doing this for vb 3.5 and it worked

add a new plugin in the hook: search_process_start

use this code, very little change in the code. if ($exclude)
{
$zzzz_notforumchoice = "";
$zzzz_excludelist = explode(',', $exclude);
foreach ($zzzz_excludelist AS $zzzz_key => $zzzz_excludeid)
{
$zzzz_notforumchoice .= intval($zzzz_excludeid).",";
}
$zzzz_notforumchoice = substr($zzzz_notforumchoice,0,-1);
if ($showposts)
{
$post_query_logic[] = "thread.forumid NOT IN ($zzzz_notforumchoice)";
}
else
{
$thread_query_logic[] = "thread.forumid NOT IN ($zzzz_notforumchoice)";
}
}

then use exclude e.g. search.php?do=process&replyless=1&replylimit=0&days=7&dontcache=1&searchdate=7&exclude=22,70,71,72

where the numbers are the forums you want to exclude.

FLMom
04-26-2006, 03:30 AM
I wanted to add this in the quick links and it is showing up but when I click on it I get this error:

Fatal error: Call to a member function on a non-object in /home/ctyler06/public_html/forums/search.php on line 487

What does this mean? How can I fix this? It worked for all of 10 seconds then the error popped up :( Help!

Boofo
04-26-2006, 03:35 AM
I wanted to add this in the quick links and it is showing up but when I click on it I get this error:

Fatal error: Call to a member function on a non-object in /home/ctyler06/public_html/forums/search.php on line 487

What does this mean? How can I fix this? It worked for all of 10 seconds then the error popped up :( Help!

What version on vb are you running?

FLMom
04-26-2006, 04:02 AM
the latest...3.5.4 :D

FLMom
04-26-2006, 04:26 AM
Seems like some of my members can use it for a few seconds, then the error comes on too..

Boofo
04-26-2006, 04:42 AM
Seems like some of my members can use it for a few seconds, then the error comes on too..

The orginal code was done for vB3.0. It won't work on vB3.5. Or are you using the code Sniper posted above?

FLMom
04-26-2006, 04:46 AM
No I am not....it figures, I get brave enough to tackle something and it isn't for my version LOL

Oh well, off to remove it...:p


Do you know when they will have one for the newest version? I could really use this. :)

Boofo
04-26-2006, 04:49 AM
No I am not....it figures, I get brave enough to tackle something and it isn't for my version LOL

Oh well, off to remove it...:p


Do you know when they will have one for the newest version? I could really use this. :)

You should be able to do it with just a link now (for vB 3.5) like I have in the template edits.

FLMom
04-26-2006, 04:54 AM
Ok, thanks! I will try tomorrow :D

Boofo
04-26-2006, 04:58 AM
Ok, thanks! I will try tomorrow :D

Let me know how it goes. ;)

FLMom
04-27-2006, 02:11 AM
okay I tried to add a link like you said and it worked again for a few seconds, then I got the same error message :( I think I might have to give up on this :(


Although I was pretty impressed that I made it as far as I did and actually got it up on the site in a space all its own LOL

Boofo
04-27-2006, 02:18 AM
okay I tried to add a link like you said and it worked again for a few seconds, then I got the same error message :( I think I might have to give up on this :(


Although I was pretty impressed that I made it as far as I did and actually got it up on the site in a space all its own LOL

I did the link on my site and it worked fine. What error are you getting?

By the way, here is the link I used:

search.php?do=process&replyless=1&replylimit=0&dontcache=1

FLMom
04-27-2006, 02:50 AM
This is the error I am getting...I know I am doing something wrong, just can't figure it out..

Fatal error: Call to a member function on a non-object in /home/ctyler06/public_html/forums/search.php on line 487

I have put it in 3 different places, and each time it has worked, but then it just doesn't and the above message just shows up... I will get it figured out if it is the last thing I do LOL

hypnoticpimp
06-07-2006, 04:28 PM
Does this work for 3.5.4?

Bubble #5
07-23-2006, 09:21 PM
Does this work for 3.5.4?
Did you read post 91?

Boofo, how do we exclude certain forums if we use this code in a link? Would we need some type of conditional?
search.php?do=process&replyless=1&replylimit=0&dontcache=1