Version: 1.00, by AntiOnline
Developer Last Online: Jun 2004
Version: 2.2.x
Rating:
Released: 03-06-2002
Last Update: Never
Installs: 156
No support by the author.
Greetings All:
Updated 3/11/2002: Hack now shows the date and time each search was made, plus the number of results. Also included is the security fix by firefly (thanks).
Updated 3/8/2002: It now also links those search words to the previous search results.
Here's just a little fun feature that I added for my users, and thought that I would share with everyone else. It works with versions 2.03 and up, requires no modifications to your database, and should take less than 2 minutes to install:
This hack displays the last 10 searches made by your users on your main site search page. It uses your censor options to make sure nothing naughty shows up (unless, that is, you want it to).
Originally posted by Squirre1 Hey FireFly, you might want to check me on this one...
I looked into this because I have not been able to see any searchs that I am performing
Are you searching with a regular user account?
Quote:
.. Based on the below quote from the MySQL manual:
If the search was performed by a guest which has an account value of "0", it tries to do the NOT IN which it can not compare to anything because that account does not exist in the user table...
I think this should be a correct query, I have tested here and it is working with no issues:
SELECT searchid,postids,dateline,querystring FROM search LEFT JOIN user USING (userid) WHERE querystring!="" AND (usergroupid NOT IN (5,6,7) OR search.userid = "0") ORDER BY searchid desc LIMIT 0,10
I guess I'm not sure why you would need to add the OR search.userid = "0" part. I'm not very good at mySQL, though.
Quote:
Also, as a note to some people, I had to upgrade my search.php in order the get the links created correctly so other users could access them. Otherwise, I got a user is not authorized message.
Enjoy this info folks.... !!
How did you upgrade? I am running 2.2.9 and it seems to work fine here.
When I say I had to upgrade... It was from the 2.2.6 Search.php to the 2.2.9 search.php... Also, the listings that did not get displayed were guest listing... Guests also have the option to search my forums and it was there searches that were not coming up in the last 10 searches list... BUT, registered users searches were...
I see what you mean now. Their searches don't show on the listing, but they are still able to search. I like it the way it is now, though. I also allow them to search, but not be listed in the last 15 (I set it to that). Gives them more of an incentive to register.
And i don't think you want to have Mods and admins searches shown...unless there is a way of checking user permissions in the search(if the user is an admin or mod then it shows All post by the admin or mod). IMO, a serious flaw in security.
Just so everyone knows, I think this was fixed in vBulletin 2.2.8 so that permissions are checked before sending the user the search results. I've checked on my forum and search results matching threads said user doesn't have access to no longer seem to show up. As a result I have removed the 'not in 5,6,7' part of the hack on my forums and things are working peachy.
Just so everyone knows, I think this was fixed in vBulletin 2.2.8 so that permissions are checked before sending the user the search results. I've checked on my forum and search results matching threads said user doesn't have access to no longer seem to show up. As a result I have removed the 'not in 5,6,7' part of the hack on my forums and things are working peachy.
Just installed this hack, very cool. I'm addicted to vB hacking now!