Version: 1.00, by Boofo
Developer Last Online: Jun 2012
Version: 3.0.0
Rating:
Released: 02-10-2004
Last Update: Never
Installs: 113
No support by the author.
vB3 15 Most Recent Searches Made By Our Members Version 1.1
(By Boofo and EvilLS1)
What does this hack do? This hack will display the last 15 searches made by your members on your main site search page at the top. The search words are then linked to those search results. It uses your censor options to make sure nothing bad shows up. The searchee will also be visible, but only to Admins. The search box will only show up when searches have been made. The Admin, Supermod and Mod searches will not show up in the listing. It is done this way so any searches made in your private forums are not shown to the regular members.
Credits: A big thank you goes out to AntiOnline for his original "Last 10 Searches" hack for vB2, partly on which this hack is based.
Version Information: Version 1.0 --Initial release
Version 1.1 --Re-did the template code to make it match the default style a little better and also added the ability to collaspe the table.
Installation overview: Files to edit: (1)
--search.php Templates to edit: (1)
--search_forums
For those wanting the HTL file for this, thanks to Frank, you can get it from this post.
The first image is what the other members will see and the second image is what the Admin will see.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
I've decided to abandon this, not because it's a bad hack. It seems to work great everywhere but my server lol. Need to cut down on excess code these days. I might look back into trying to get it to work when things calm down!
vb is also only showing the last hour of searches for me. This was on a fresh 3.0.3 install on my test board. So I did some investigating. I figured I would start at the scheduled tasks, so I took a look at the "Hourly Cleanup" entries. In the file ./includes/cron/cleanup.php I found:
PHP Code:
//searches expire after one hour
$DB_site->query("
### Remove stale searches ###
DELETE FROM " . TABLE_PREFIX . "search
WHERE dateline < " . (TIMENOW - 3600)
);
I have not tested this yet, but I don't know why it wouldn't work. You could change the 3600 to whatever you want to get the desired result. 86400 for 1 day, 604800 or 1 week, etc.
If I have problems I will report back.
Just an update to everyone, the above modification has been working flawlessly for the past few months, so if you are having only the last hours searches showing up, and you would like a week, make the mentioned change. My code is now:
PHP Code:
//searches expire after one week
$DB_site->query("
### Remove stale searches ###
DELETE FROM " . TABLE_PREFIX . "search
WHERE dateline < " . (TIMENOW - 604800)
);
Is there a way to make another usergroup view who searched for what? ie: super moderators to be able to see who searched for what as well as administrators.
Is there a way to make another usergroup view who searched for what? ie: super moderators to be able to see who searched for what as well as administrators.
Yes, but be careful who you allow to see who searched. There are those who will say you are messing with privacy issues.
Look for the following in search.php and add the usergroup in there with an OR statement.
PHP Code:
if ($bbuserinfo['usergroupid']=="6") { $lastsearch="
I've installed and tested this okay, but... is it the normal behaviour of this hack to forget the most recent searches after a certain period of time or...?
I've installed and tested this okay, but... is it the normal behaviour of this hack to forget the most recent searches after a certain period of time or...?