The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
vB3 15 Most Recent Searches Made By Our Members Details »» | |||||||||||||||||||||||||||
vB3 15 Most Recent Searches Made By Our Members
Developer Last Online: Jun 2012
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
|
Comments |
#102
|
|||
|
|||
Quote:
|
#103
|
|||
|
|||
Boofo - Great mod! Do you have some php code that can be run to view ALL searches done which the admin can install/hide somewhere separately from the VB output to keep track of all searches? Maybe this admin version could have a text box so you can specify the amount of entries to display.
|
#104
|
|||
|
|||
Yeah tables with a prefix have problems with this hack.
|
#105
|
|||
|
|||
I can't get it to work... i use vb3_ as my table prefix... any way to make it work?
Thanks!! Here's the error I get... Database error in vBulletin 3.0.3: Code:
Database error in vBulletin 3.0.3: Invalid SQL: SELECT search.searchid,search.orderedids,search.dateline,search.query,search.userid,user.username,user.userid,user.usergroupid FROM vb3_search,vb3_user WHERE query!='' AND user.userid = search.userid AND usergroupid NOT IN (5,6,7) ORDER BY searchid desc LIMIT 0,15 mysql error: Unknown table 'search' in field list mysql error number: 1109 |
#106
|
|||
|
|||
I got it to work...
I changed the SELECT query (line 14 of the part to be added to search.php) from: Code:
$lastsearches=$DB_site->query("SELECT search.searchid,search.orderedids,search.dateline,search.query,search.userid,user.username,user.userid,user.usergroupid FROM " . TABLE_PREFIX . "search," . TABLE_PREFIX . "user WHERE query!='' AND user.userid = search.userid AND usergroupid NOT IN (5,6,7) ORDER BY searchid desc LIMIT 0,15"); Code:
$lastsearches=$DB_site->query("SELECT vb3_search.searchid,vb3_search.orderedids,vb3_search.dateline,vb3_search.query,vb3_search.userid,vb3_user.username,vb3_user.userid,vb3_user.usergroupid FROM " . TABLE_PREFIX . "search," . TABLE_PREFIX . "user WHERE query!='' AND vb3_user.userid = vb3_search.userid ORDER BY searchid desc LIMIT 0,15"); I also wrapped the search_forums template edit with this conditional, because I wanted only Admin to see the recent searches. Code:
<if condition="$bbuserinfo[usergroupid] == 6"> </if> |
#107
|
|||
|
|||
One more question... Is there some sort of time limit that the most recent searches are cached for?
When I tested it around 8pm it listed like 4 searches, now it's a bit after 10 and they aren't listed any more? Thanks! |
#108
|
||||
|
||||
Quote:
PHP Code:
|
#109
|
||||
|
||||
*clicks install
thats now 100 installs well done |
#110
|
||||
|
||||
Works great on VB3.0.3 THANK YOU!
|
#111
|
||||
|
||||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|