![]() |
Last 10 Searches
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). Demo at http://www.AntiOnline.com/search.php Enjoy! Yours In CyberSpace, John Vranesevich Founder, AntiOnline |
nice hack, i like it, very simple to install... : )
|
]nice nifty hack! thanx! :D
censor options is a VERY good idea! ;) |
yeah, nice hack, is it possible to poste the threadwors as a link, so when you klick on this word, the forum search this word AND is it possile to post the username right from the searchwords!
the membername with link to the profile! greetz! |
Nice! Why not link the keywords to the searchid so if people see a search they like, they can click right to the results without having to re-run it or type anything in?
|
yes, this would be great, and can you show the user, who searched this words? AND how many results were in his search??
|
Greetings All:
I've added Overgrow's request, and updated the file to reflect the changes. I don't really like the idea of posting a user's name next to the search terms. I think it would be a privacy violation, and I for one would know that my users would have a fit. Code:
To update, for those of you that already have this installed: John Vranesevich Founder, AntiOnline.com |
Nice, installed here with some modifications. :)
|
Which modifications? :)
|
<a href="https://vborg.vbsupport.ru/search.php?s=" target="_blank">https://vborg.vbsupport.ru/search.php?s=</a>
|
In my opinion "Date and Time" column owe be broader...
|
@FireFly
can you plz post the code 4 this modifications, they are very usefull 4 me, THX, if you'll do that! cYa! |
I'll let AntiOnline do that, after all it is his hack. :)
|
Greetings All:
Geeze, thanks firefly =P I'll work on it tonight and post the updates. |
]YaY :D
|
Just a performance question: when the last 10 searches are exposed this way, I can easly assume most of users will try one or another ...
Question: are these searches cached ? How long they last on the search table in db ? Thanks |
Yes, all searches are cached in the database for 7 days IIRC (not sure about the time).
When the user clicks the link, only the results are shows and the search is not ran again. BTW there is a security issue with this hack that I will post a fix to later... |
Ok, if a user can find a searchid of a search that was done by an admin / mod, and goes to that search, he will see all posts inlcuding these in private forums he shouldn't see.
Of course, this hack makes it even easier to find these searches as they are just one click away. To solve the problem the hack created, replace the query: Code:
$lastsearches=$DB_site->query('SELECT searchid,querystring FROM search WHERE querystring!="" ORDER BY searchid desc LIMIT 0,10'); Code:
$lastsearches=$DB_site->query('SELECT searchid,querystring FROM search LEFT JOIN user USING (userid) WHERE querystring!="" AND usergroupid NOT IN (5,6,7) ORDER BY searchid desc LIMIT 0,10'); |
thx!
|
Quote:
O-T: have you noticed the small bug in search query_string when someone put the star BEFORE the word instead after ? :surprised This should be a bug due to some special char in regexp search. Submitted to vb.com, anyway... Bye and thanks again. |
Anyway this hack doesn't work to me.
It only shows the 10 most recent words searched, divided by ',' and each of them links to http://search.php/?action=showresult...der=descending ?!?!? Hwr, much different from the FireFly's implementation here... :) Thanks |
FireFly has modifications this hack. (post #8). But AntiOnline has promised the same way to update and itself hack.:)
|
Quote:
|
Yes please update the file! I really like the modifications firefly did!
Thanks! |
Greetings All:
As promised, I have updated this hack. 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). You can download this from the first post in this thread. (If you already have this hack installed, just copy/paste the new code over the old). (demo still at: http://www.AntiOnline.com/search.php) Enjoy! |
Greetings All:
BTW: this hack is finished, so if you could move it into the "Full Releases" forum I would appreciate it. |
1 question and 1 request.....
Q - This will only show the searches done by non-admin users correct? I search and it won't show anything. R - I seem to have problems with my users saying they are searching when they prob are not. Since the user id is stored in the database, is it possible to show the username of the person that searched? Possibly make it visible to admins and mods? Chris ps...thanks for the hack. |
Hack does not work. The data on search are not added.
|
Greetings All:
inetd, what version of vbulletin are you using? Has anyone else had problems with the recent update? |
I think this is because you are trying it. Try it as a normal user and see if the search is updated.
Chris |
Consider it installed :D
|
very nice hack. and thank you much for updating it!
|
Quote:
|
In Results column, may be, take away results from Private forums.
|
nice hack works well thanx
|
I have problems with my users saying they are searching when they prob are not. Since the user id is stored in the database, is it possible to show the username of the person that searched? Make it visible only to admins and mods?
Chris |
Hi.
Could be added even the search author column only to admin eyes ? Could be similar to the ip column in online.php... What do you think about ? Thanks |
Jawelin, you are right!!!
|
Quote:
|
That's what I was thinking. Anyone care to do it?
Chris |
All times are GMT. The time now is 04:46 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:
|