PDA

View Full Version : Virgin topics "hackette"


elin
16 Jan 2002, 00:37
01-16-02: Updated description and hack. There's no need to fix it if you've already installed it, but I realized that I had placed a couple of mySQL queries in the wrong order which might or mightn't have influence over search performance.

I've been searching through the forum but I haven't found any released version of this hack so far so I thought I'd give it a shot.

What this hack does is that it searches for posts that haven't been answered yet, something which may be very useful for those who run help forums. I've reused quite a lot of code from other vB search features, so you can maintain flood control and prevent forums being displayed to users who have no right to view them. Another pro is the fact that you get the results displayed with the same templates as the other, custom, searches.

Just download the attached file and follow the instructions and you'll have it running in notime.

If you feel like it you can change the $days variable. I have it set to thirty days by default because it felt good. Decrease it if you have busy forums and increase it if only the cat pops in for a visit every now and then.

Fully functional (so far so good) version can be found here (http://messageboard.htmlhelpcentral.com). I'll try to provide as much support as my schedule allows, but please don't count on it since I forget easily.

Good luck! (Oh, and if you've installed please give me a thumbs down/thumbs up so that I can know if it works or not. Someday I'd like to release it in the "real" hack forum, you know. :))

Bane
16 Jan 2002, 02:40
Rather good idea, I will use this :)

AntiOnline
16 Jan 2002, 04:54
Greetings:

Is there a way to edit this so that it only searches certain forums, instead of them all? Or, so that it excludes certain forums from the search?

Specifically, for those of us that have the usenet news hack installed, it would be nice to be able to exclude those forums from the unanswered page.

elin
16 Jan 2002, 12:49
OK, updated topic.

Bane:

keep me posted, I'd like to know if it works. :)

AntiOnline:

right now the hack uses regular vB search features which means that the forums searched are the ones that are available to the user and its usergroup. I have no idea how the usenet hack works and how I could take that into account, and knowing myself and my view on time I'll probably not have the opportunity to investigate it either. I guess you could set the $forumsql variable to contain only the forums you specify, but I'm not quite sure what it'd look like (delimiter-wise) to be honest. I'll investigate. :p

itstd
16 Jan 2002, 14:46
Big thumbs up! Been working on this myself but couldn't quite figure out how to keep everyone from seeing private forums. Works like a champ.

Arathorn
17 Jan 2002, 13:10
:up: Works well on my board. It'll really help me hunt out those help threads. :)

Feature suggestion: allow user to specify $day.

p.s. Interesting name for a hack...

Arathorn
17 Jan 2002, 19:24
Does anyone know how I can display the $day variable on the search page? I've included the link there, and I'd like to tell users how many days back they're searching. I could hard code it, but if I change the variable I'll probably forget to go back and alter the hard code.

Chen
18 Jan 2002, 15:14
What about threads that have been bumped by the original poster? Why not consider them virgins as well? :)

Change this line in the hack:
$replysql =" AND thread.replycount=0";
to:
$replysql =" AND ((thread.replycount=0) OR (thread.replycount=1 AND thread.lastposter=thread.postusername))";
not tested, but should work.

As you can see, this addition will also give you threads with 1 reply, which is a bump by the user.

Arathorn
20 Jan 2002, 10:18
Originally posted by Arathorn
Does anyone know how I can display the $day variable on the search page?

Anyone? I've included the variable in the searchintro template, but nothing shows.

Joshua Clinard
08 Mar 2002, 05:23
Nice Work!

Tim Wheatley
09 Mar 2002, 20:04
You can disable searching of a forum for all usergroups in the forum permissions area of the admin cp - incase anyone needs to because of usenet. :)

shadow_old
27 Mar 2002, 11:36
any way to exclude usenet forums for just this search?

something like:

where forumid !=

how would i go about putting it in this query?

edit: that was stupid make this your query to exclude a forum:


$replysql =" AND ((thread.replycount=0) OR (thread.replycount=1 AND thread.lastposter=thread.postusername)) AND forumid !=#";

where # is the number of your usenetforum

akaler
16 Apr 2002, 13:11
Thanks for this hack!!! This should be made a full release. It's awesome!!

Say... This seems like a good hack to add in mysql indexes in to speed it up.

I'm no expert, though.

Anyone know how to go about it?

It seems like one should be added for replycount under thread.

And, for chen's addition, indexes should be added for lastposter and postuser name, both also under thread.

The -only- thing I know about indexes, though, is going to into 'thread' in my vb database with phpmyadmin, then clicking 'index' for each replycount, lastposter, and posterusername. Would that be correct? Or would I do something else?

Thomas P
04 Jun 2002, 10:51
Hi,
this is a great hack, I really was on the search for something like this...
Thanks a bunch,
-Tom

JulianD
04 Jun 2002, 12:46
Well, Thanks Thomas, I saw your post on vB.com... I was looking for this one a few weeks ago. But I'm lazy so I didn't search the forums...

thanks to elin too for this little hack :p

Thomas P
04 Jun 2002, 17:52
You're welcome :)

Kuddos to eline for this hack, I suggest to move this thread to the Full Releases.

cu,
-Tom

Joshua Clinard
08 Aug 2002, 19:45
Is there a way that I can exclude certain forums from this hack, such as forums that do not allow replies?

Schorsch
09 Aug 2002, 06:28
thanks!! works great :)
good work elin https://www.vbulletin.org/forum/external/2011/01/19.gif

Kriek
31 May 2003, 00:29
08-08-02 at 02:45 PM Joshua Clinard said this in Post #17 (http://www.vbulletin.org/forum/showthread.php?postid=282480#post282480)
Is there a way that I can exclude certain forums from this hack

Open search.php and find
$wheresql="1=1".$forumsql.$replysql.$datesql;
$wheresql.=" AND thread.open<>10";
Then add the following below it
$wheresql.=" AND forumid!=91";
Where forumid equals 91 threads will be excluded.

Simple comparison operator ;)

KeithMcL
15 Nov 2003, 00:20
What about excluding multiple forums? Also, how easy would it be to have this as index.php?action=unaswered instead of search.php?action=unaswered

Reverend
16 Nov 2003, 18:27
Working fine on 2.3.3.

Thanks elin.

Thomas P
29 Feb 2004, 20:00
Working fine on 2.3.3.

Thanks elin.
Great stuff, anyone has this on a large forum and can tell me something about the load this hackette generates?

Thanks a bunch,
-Tom