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 cannot understand, i've resinstalled the hack, even installed it on a blank forum install.
Attatched is my Search.php and Template file if you can see anything wrong. The Search Template is a reverted one, with the hack added. The same goes for the search.php file, only with your above query modifications.
I have tried rebuilding search indexes etc.
PM a link to your search.php file and I will take a look at it. We can't post full vb files in posts in here, sorry.
Attatched, is an extract of the search.php (relevant), too save time.
Everything looks normal to me. I don't run 3.0.3 yet so is there anyone who has installed this on 3.0.3. that can maybe help us figure out what is going on? And I will do some checking on this end to see if I can come up with some sort of answer for you. Hang in there, we'll get it working for you.
Everything looks normal to me. I don't run 3.0.3 yet so is there anyone who has installed this on 3.0.3. that can maybe help us figure out what is going on? And I will do some checking on this end to see if I can come up with some sort of answer for you. Hang in there, we'll get it working for you.
I have 3.0.3 and it's working for me just fine. I didn't have a chance to look at your template, but your search.php snipit looks just like mine.
I think he did the template snippets a few posts up if you want to look at it.
I actually took a look at the search.php snippit, and found 2 things that did not match up to mine. 2 Queries:
Mine:
PHP Code:
$querycount=$DB_site->query_first("SELECT COUNT(*) AS orderedids FROM " . TABLE_PREFIX . "search LEFT JOIN " . TABLE_PREFIX . "user USING (userid) WHERE query!='' AND usergroupid NOT IN (5,6,7)");
His:
PHP Code:
$querycount=$DB_site->query_first("
SELECT COUNT(*) AS orderedids FROM " . TABLE_PREFIX . "search AS search
LEFT JOIN " . TABLE_PREFIX . "user AS user USING (userid)
WHERE query!=''
AND usergroupid NOT IN (5,6,7)
");
(note the query has been cut up with line breaks)
Then another query:
mine:
PHP 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");
his:
PHP Code:
$lastsearches=$DB_site->query("
SELECT search.searchid,search.orderedids,search.dateline,search.query,search.userid,use r.username,user.userid,user.usergroupid
FROM " . TABLE_PREFIX . "search AS search," . TABLE_PREFIX . "user AS user
WHERE query!=''
AND user.userid = search.userid
// AND usergroupid NOT IN (5,6,7)
ORDER BY searchid desc LIMIT 0,15
");
(again note the line breaks and commented out line)
So, I would reset those 2 queries to the ones in the install file, just to see if that gets you anywhere. I would have thought they would have worked broken up like that.
I commented out that line, following the install.txt instructions if Iwanted admin searches to show up. Because I use table prefixes in my install, Boofo kindly designed those queries to allow it to auto detect my table prefixes
but in another with vb3.0.3 im having some problems.
Quote:
Database error in vBulletin 3.0.3:
Invalid SQL: SELECT search.searchid,search.orderedids,search.dateline, search.query,search.userid,user.username,user.user id,user.usergroupid FROM forosearch,forouser WHERE query!='' AND user.userid = search.userid AND usergroupid NOT IN (5,6,7) ORDER BY searchid desc LIMIT 0,15