View Full Version : Recent Queries: From the Last 30 Days
calorie
01-21-2007, 10:00 PM
This mod displays information about search queries from the last thirty days, starting from the day you install this mod. It does not include 'getnew' or 'getdaily' queries. The search ID link is active if you allow search sharing, the search was less than an hour ago, and the search has results. The IP address is resolvable like it is on the WOL page. The recent queries table created by this mod is in the same format as the vB search table, should you wish to make personal extensions to this mod. The number of results for the same query may vary, depending on how you set your vB permissions. See the screenshot.
Terminatoronly
01-22-2007, 06:40 AM
cool i like it much so if a member search and i didnt see his search so i can know he wanted this so i go and post it :D thats awsem nice work installed and nominated :D and voted too :D
and first reply ;) with first install and nominate :D and vote too lol i think i am going crazy right now thats because of ur hack i like it much :D
SaN-DeeP
01-22-2007, 06:52 AM
testing right now.. /me installs and nomiates this hack for motm
sensimilla
01-22-2007, 07:07 AM
Great hack, useful!
Snake
01-22-2007, 08:57 AM
Thanks! :D
Very useful addition.
Is it possible to clear the results once a month. I can imagine after a few months there could be pages of results !?
Clicked install.
FleaBag
01-22-2007, 09:03 AM
I really like this too! I've tried for several incarnations of vB the "last X searches on search page" hack but it never seemed to pick up the searches correctly. Hopefully this one will play ball for me. Will install when I get home from work!
And THANK YOU. :)
* FleaBag also nominates for MOTM.
Terminatoronly
01-22-2007, 12:42 PM
Very useful addition.
Is it possible to clear the results once a month. I can imagine after a few months there could be pages of results !?
Clicked install.
i think you can from admincp (mantanience)
joeychgo
01-22-2007, 01:53 PM
Love the idea. I have few suggestions --
First -- It looks like if someone clicks new posts that it records that. I see a few entries that are: Key Word(s): --- so im guessing thats what it is.
Second, I have a question. I have a few entries I see where it shows as guest but then gives a username under 'Query' - Is that someone searching for all posts by a user? If so - is this really necessary? Like 'New Posts' I dont know what value listing that search has.
Third - a running tally on how many times someone is searching a particular phrase might be helpful.
projectego
01-22-2007, 04:23 PM
Very cool hack indeed... thanks, calorie!
calorie
01-22-2007, 08:43 PM
Thanks for the thanks, installs, ratings, and nominations. :D
@TTG: The mod automatically deletes from its table any entry over thirty days old.
@joeychgo: The 'getnew' and 'getdaily' searches should not be recorded. When members search, they can search on Key Word(s) and/or User Name. If one of those fields is blank, then dashes appear. That might be what you are seeing. Also, the Member column is who searched; the Query column contains what was searched. The other columns are there for additional information about the search.
Milad
01-23-2007, 01:48 AM
This is nice, and may be used to show queries from last 30 days in clouds for forums that use fulltext search
Paul M
01-23-2007, 02:30 AM
Nice.
Not if I'll use this yet, but it's a great idea so I've nominated anyway. :)
joeychgo
01-23-2007, 12:18 PM
@joeychgo: The 'getnew' and 'getdaily' searches should not be recorded. When members search, they can search on Key Word(s) and/or User Name. If one of those fields is blank, then dashes appear. That might be what you are seeing. Also, the Member column is who searched; the Query column contains what was searched. The other columns are there for additional information about the search.
See attachment for what im talking about. It shows as 'guest' but a username is coming up under 'query'. But, if the search is not by a guest, then no username under 'query'.
thx for this hack pretty good one ^^ will help me see how cleaver my users are using the search function xD
calorie
01-24-2007, 02:08 PM
Thanks again for the thanks, installs, ratings, and nominations. :)
@joeychgo: The Member column is who searched, and the Query column contains what was searched, i.e., the first row of your screenshot shows that Guest searched for Danny Boy, and the last two rows of your screenshot show that wenchupover searched for him/herself and then did another search for google analytics. Note that Guest could be a person or bot, and that when doing a search, it's possible to query on Key Word(s), User Name, or both.
MorrisMcD
01-24-2007, 07:19 PM
Is it possible to restrict to only admins and/or mods?
calorie
01-25-2007, 12:44 AM
In the recent_queries.php file find:
require_once('./global.php');
And afterwards add the following:
if (!is_member_of($vbulletin->userinfo, 5, 6, 7))
{
exit();
}
Where 5, 6, 7 represents these groups:
5 : Super Moderators
6 : Administrators
7 : Moderators
stomph
01-25-2007, 04:44 AM
Thanks for this, very useful!
When I imported the product, it didn't create the table 'rq_recent_queries'. I don't know why.. when I ran the SQL from the .xml file manually I got an error from MySQL. Maybe it's an old version (4.0.25)?
Well, I created the table manually and just copied the structure from the search-table over as that's what I assumed the SQL should have done.. then reimported the product and now it works! :)
MorrisMcD
01-25-2007, 11:55 AM
In the recent_queries.php file find:
require_once('./global.php');
And afterwards add the following:
if (!is_member_of($vbulletin->userinfo, 5, 6, 7))
{
exit();
}
Where 5, 6, 7 represents these groups:
5 : Super Moderators
6 : Administrators
7 : Moderators
Thanks!
htrshgytrs
01-31-2007, 11:49 PM
This is nice, and may be used to show queries from last 30 days in clouds for forums that use fulltext search
I'd be keen to display the common searches in a cloud, how could this be done?
htrshgytrs
02-01-2007, 12:29 AM
i used the cloud from here (https://vborg.vbsupport.ru/showthread.php?t=136839) and altered the SQL to return common search terms in the cloud. Not pretty or too clever, but it works!
I changed this:
$wordcloud_infos = $db->query_read("
SELECT SUM(score) AS f1, t2.title AS f2
FROM " . TABLE_PREFIX . "postindex AS t1, " . TABLE_PREFIX . "word AS t2
WHERE t1.wordid = t2.wordid GROUP BY t1.wordid ORDER BY f1 DESC LIMIT 100
");
to this:
$wordcloud_infos = $db->query_read("
SELECT count(query) AS f1, query AS f2
FROM " . TABLE_PREFIX . "rq_recent_queries AS t1
WHERE t1.sortby = 'lastpost' AND t1.searchuser = '' GROUP BY f2 ORDER BY
f1 DESC LIMIT 100
");
athlon64bit
04-01-2008, 01:09 AM
Still working fine on version 3.6.9 just if anyone is wondering. I love this mod, being able to log search results or details should I say is very useful.
Thanks.:D
Boofo
04-01-2008, 01:52 AM
I have guests allowed to search but when I do a search as a guest, it doesn't show up in the listing. I am using 3.7.0 RC1. Also, this doesn't record the search made in the drop down on the navbar. Shouldn't it pick that up to?
athlon64bit
04-30-2008, 02:14 AM
Will this be made available for vb3.7? It is a brilliant mod. I hope so.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.