![]() |
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. 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. :)) |
Rather good idea, I will use this :)
|
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. |
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 |
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.
|
: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... |
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.
|
What about threads that have been bumped by the original poster? Why not consider them virgins as well? :)
Change this line in the hack: Code:
$replysql =" AND thread.replycount=0"; Code:
$replysql =" AND ((thread.replycount=0) OR (thread.replycount=1 AND thread.lastposter=thread.postusername))"; As you can see, this addition will also give you threads with 1 reply, which is a bump by the user. |
Quote:
|
Nice Work!
|
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. :)
|
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 |
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? |
Hi,
this is a great hack, I really was on the search for something like this... Thanks a bunch, -Tom |
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 |
You're welcome :)
Kuddos to eline for this hack, I suggest to move this thread to the Full Releases. cu, -Tom |
Is there a way that I can exclude certain forums from this hack, such as forums that do not allow replies?
|
thanks!! works great :)
good work elin https://vborg.vbsupport.ru/external/2011/01/19.gif |
Quote:
PHP Code:
PHP Code:
Simple comparison operator ;) |
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
|
Working fine on 2.3.3.
Thanks elin. |
Quote:
Thanks a bunch, -Tom |
All times are GMT. The time now is 04:49 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|