View Full Version : Statistics Modifications - Forum Search Stats 1.0
coderphp
02-18-2007, 10:00 PM
Hi all
Did you ever wondered what your users expect to find in your forums?
Did you ever wanted to know what are their needs?
Did you ever wanted to let them know what they can easily find?
If your answer is "Yes", then you must use this product ...
Features
1- Log user searches in your forums.
2- Show most searched keywords on the main forums page in away that demonstrates every keywords importance in your forums.
Version
Expected to work on all vBulletin 3.6 versions tell now.
Template Edits
1 template edit in FORUMHOME
Plugins
2 Plugins
Installation
1- Upload the directory "upload" contents to your forum root.
2- Import the attached product "[product] Forum Search Stats 1.0.xml" into your AdminCP.
3- Edit template "FORUMHOME":
BEFORE:
</table>
<br />
<!-- end what's going on box -->ADD:
<if condition="$vbulletin->options['setting_searchstats_showuser']">
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_events')"><img id="collapseimg_forumhome_events" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_events].gif" alt="" border="0" /></a>
$vbphrase[most_searched]
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_events" style="$vbcollapse[collapseobj_forumhome_events]">
<tr>
<td class="alt2"><img src="images/misc/search_stats.gif" alt="$vbphrase[most_searched]" border="0" /></td>
<td class="alt1" width="100%">$most_searched</td>
</tr>
</tbody>
</if>Finally, if you like the product Please show your support by clicking INSTALL..
you can also NOMINATE FOR MOD OF THE MONTH :)
IMPORTANT: after installation if you noticed that keyword font size is very large, wait and give it a try as font size is depending on num of search in ur forum, so wait and give it a try...
soletrader
02-19-2007, 10:29 AM
Installed! Thank you very much for this. Looks nice :)
TheBlackPoet
02-19-2007, 10:32 AM
great hack!! since i have a dark theme... i changed the graphic to something appropiate... and made the search result text smaller... but other than that.... this is great!! really nice..
i personally cant think of anything this hack needs to be any better
coderphp
02-19-2007, 10:36 AM
Installed! Thank you very much for this. Looks nice :)
thank you...
coderphp
02-19-2007, 10:38 AM
great hack!! since i have a dark theme... i changed the graphic to something appropiate... and made the search result text smaller... but other than that.... this is great!! really nice..
i personally cant think of anything this hack needs to be any better
thank you for your feedback...
dont change font size till you test the hack for sometime.. as keyword size is dependable upon its importance in ur forum.. :)
if you could put a url for ur forum as a demonstartion
TheBlackPoet
02-19-2007, 10:40 AM
Fatal error: Cannot re-assign $this in /xxxxxxxxxx/xxxxxxx/admincp/search_stats.php on line 14
??? i clicked on the show statistics and got this error....
the /xxxxxxxxxx/xxxxxxx/ is just my url info.. thats not a problem....
i just get a white page... with the error..
coderphp
02-19-2007, 10:46 AM
Fatal error: Cannot re-assign $this in /xxxxxxxxxx/xxxxxxx/admincp/search_stats.php on line 14
??? i clicked on the show statistics and got this error....
the /xxxxxxxxxx/xxxxxxx/ is just my url info.. thats not a problem....
i just get a white page... with the error..
so sorry Malik...
i think i was using the same name as $this class..
fixed the problem please re-upload the file "search_stats.php" from the new attachment
TheBlackPoet
02-19-2007, 10:50 AM
PERFECTION!!! works like a charm!!!! good job Mahmoud!!
projectego
02-19-2007, 11:20 AM
Wow! This looks awesome. Thanks very much, coderphp!
sarum
02-20-2007, 03:07 AM
very nice hack
*clicks installed*
ever thought about expanding this to show statistics by usergroups/users etc
coderphp
02-20-2007, 03:58 AM
PERFECTION!!! works like a charm!!!! good job Mahmoud!!
u welcome :)
Wow! This looks awesome. Thanks very much, coderphp!
thank you .. please click install
very nice hack
*clicks installed*
ever thought about expanding this to show statistics by usergroups/users etc
thank you..
bchertov
02-20-2007, 04:14 AM
When users search for multiple keywords, does it track them individually or as a group/phrase? It should do them individually, IMO.
coderphp
02-20-2007, 04:17 AM
When users search for multiple keywords, does it track them individually or as a group/phrase?
yes it tracks them as one phrase....
It should do them individually, IMO.
why should it? did the user entered them individually?!
BigJimTheLug
02-20-2007, 06:13 AM
thank you...
Thanks, you do great work!
coderphp
02-20-2007, 06:33 AM
Thanks, you do great work!
u welcome
Distance
02-20-2007, 06:44 AM
Wasn't this removed?
coderphp
02-20-2007, 06:51 AM
Wasn't this removed?
No it only needed update
maxicep
02-20-2007, 10:28 AM
very nice, thanks
coderphp
02-20-2007, 10:34 AM
very nice, thanks
u welcome :)
Moodeey
02-20-2007, 10:40 AM
INSTALLED, thx bro :)
gr8 one, it make the board like web 2.0 sites :D
موودي
coderphp
02-20-2007, 10:47 AM
INSTALLED, thx bro :)
gr8 one, it make the board like web 2.0 sites :D
موودي
u welcome.. glad to c u
يا أهلا مودي :)
Kihon Kata
02-20-2007, 11:29 AM
Installed
jwaany
02-20-2007, 12:05 PM
very nice hack
*clicks installed*
جواني
coderphp
02-20-2007, 03:48 PM
Installed
very nice hack
*clicks installed*
جواني
u welcome
mcyates
02-20-2007, 05:37 PM
When i click on one of the search terms on the forum home, the search term brings up nothing except for the search.php page with the search term in the search box, so the user has to click search to see the results.
I though the user would only have to click on the search term on the forum home, to bring up the searched terms.
coderphp
02-20-2007, 09:03 PM
When i click on one of the search terms on the forum home, the search term brings up nothing except for the search.php page with the search term in the search box, so the user has to click search to see the results.
I though the user would only have to click on the search term on the forum home, to bring up the searched terms.
nop :)
soletrader
02-20-2007, 09:33 PM
I installed the new update and nothing is showing now. Any help?
AMG021
02-20-2007, 09:34 PM
thanks dude!
coderphp
02-20-2007, 09:42 PM
I installed the new update and nothing is showing now. Any help?
be sure to do the 3 installation steps discussed in the first post
coderphp
02-20-2007, 09:42 PM
thanks dude!
anytime u welcome
AMG021
02-20-2007, 09:43 PM
Database error in vBulletin 3.6.4:
Invalid SQL:
SELECT MAX(`count`) AS m FROM coder_searchstats;
MySQL Error : Table 'amg209_forum.coder_searchstats' doesn't exist
Error Number : 1146
Date : Tuesday, February 20th 2007 @ 03:34:50 PM i got this error WHY ?
coderphp
02-20-2007, 09:47 PM
Database error in vBulletin 3.6.4:
Invalid SQL:
SELECT MAX(`count`) AS m FROM coder_searchstats;
MySQL Error : Table 'vastatic_forum.coder_searchstats' doesn't exist
Error Number : 1146
Date : Tuesday, February 20th 2007 @ 03:34:50 PM i got this error WHY ?
it tells that the hack table doesnt exist..
Please re-install the product again..
If for any reason the problem presists execute this query manually from the admincp:
CREATE TABLE `coder_searchstats` ( `id` int(10) unsigned NOT NULL auto_increment, `query` varchar(200) NOT NULL default '', `dateline` int(10) unsigned NOT NULL default '0', `count` int(11) NOT NULL default '0', PRIMARY KEY (`id`) ) ENGINE=MyISAM
AMG021
02-20-2007, 09:49 PM
ok
let me try again
this is wat i got
An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ENGINE=MyISAM' at line 1
coderphp
02-20-2007, 10:05 PM
ok
let me try again
this is wat i got
An error occurred while attempting to execute your query. The following information was returned.
error number: 1064
error desc: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ENGINE=MyISAM' at line 1
ok now it is clear for me
do the following:
1- reinstall the product.
2- execute this new query:
CREATE TABLE `coder_searchstats` ( `id` int(10) unsigned NOT NULL auto_increment, `query` varchar(200) NOT NULL default '', `dateline` int(10) unsigned NOT NULL default '0', `count` int(11) NOT NULL default '0', PRIMARY KEY (`id`) )
AMG021
02-20-2007, 11:03 PM
ok now it is clear for me
do the following:
1- reinstall the product.
2- execute this new query:
CREATE TABLE `coder_searchstats` ( `id` int(10) unsigned NOT NULL auto_increment, `query` varchar(200) NOT NULL default '', `dateline` int(10) unsigned NOT NULL default '0', `count` int(11) NOT NULL default '0', PRIMARY KEY (`id`) )
Thank you sooo much! It worked
coderphp
02-20-2007, 11:11 PM
Thank you sooo much! It worked
ok good
rwilkins108
02-21-2007, 01:38 AM
Works great, any chance of getting a way to remove 1 search term from the box, like the way Zoints Tags works (which looks similar) is that if you're an admin, there's an x next to each tag (or search term in this case) which will remove it. Also, it might be good to have a list of words that would be ignored, i've already got a swear word up on mine :)
Great work!
Thanks!!
HMBeaty
02-21-2007, 03:05 AM
I'm getting the following error on my forums after product upload....
Database error in vBulletin 3.6.4:
Invalid SQL:
SELECT MAX(`count`) AS m FROM vb_coder_searchstats;
MySQL Error : Table 'Redline.vb_coder_searchstats' doesn't exist
Error Number : 1146
Date : Tuesday, February 20th 2007 @ 09:54:06 PM
Script : http://www.mysite.org/forum/index.php
Referrer : http://www.mysite.org/forum/admincp/index.php?do=head
IP Address : xx.xx.xx.xx
Username : xxxxxxx
Classname : vb_database
I tried the fix above but it didn't work for me
HMBeaty
02-21-2007, 03:43 AM
Nevermind, I went in and manually edited the database. The problem is that your product is not creating the "TABLE_PREFIX" because its not in the product to include it. So you might want to fix that as well. Also, the "expand / collapse" doesn't work. It expands / collapses my "upcoming events"
EDIT: and that would be because you're USING the "upcoming events" module for it. As shown in your FORUMHOME template edit here:
onclick="return toggle_collapse('forumhome_events')
So you should fix that as well
HMBeaty
02-21-2007, 03:53 AM
/me uninstalled until fixes are made
coderphp
02-21-2007, 05:47 AM
Works great, any chance of getting a way to remove 1 search term from the box, like the way Zoints Tags works (which looks similar) is that if you're an admin, there's an x next to each tag (or search term in this case) which will remove it. Also, it might be good to have a list of words that would be ignored, i've already got a swear word up on mine :)
Great work!
Thanks!!
these two features will be added to the new version in the next few days..
I'm getting the following error on my forums after product upload....
Database error in vBulletin 3.6.4:
Invalid SQL:
SELECT MAX(`count`) AS m FROM vb_coder_searchstats;
MySQL Error : Table 'Redline.vb_coder_searchstats' doesn't exist
Error Number : 1146
Date : Tuesday, February 20th 2007 @ 09:54:06 PM
Script : http://www.mysite.org/forum/index.php
Referrer : http://www.mysite.org/forum/admincp/index.php?do=head
IP Address : xx.xx.xx.xx
Username : xxxxxxx
Classname : vb_database
I tried the fix above but it didn't work for me
You got this error because of the ENGINE parameter not acceptable by your MySQL engine...
anyway this problem solved.... please reinstall the product
Nevermind, I went in and manually edited the database. The problem is that your product is not creating the "TABLE_PREFIX" because its not in the product to include it. So you might want to fix that as well. Also, the "expand / collapse" doesn't work. It expands / collapses my "upcoming events"
EDIT: and that would be because you're USING the "upcoming events" module for it. As shown in your FORUMHOME template edit here:
onclick="return toggle_collapse('forumhome_events')
So you should fix that as well
yep i didnt notice that as i got it copied from the original module "upcoming events" :)
fixed please reinstall...
* Redlinemotorsports uninstalled until fixes are made
never mind .. problems fixed
thanx for ur feedback
Neal-UK
02-21-2007, 06:09 AM
Any way just for admins only to see this?
coderphp
02-21-2007, 06:14 AM
Any way just for admins only to see this?
sure it could be added to the new version..
but why?
as the main page stats is helpful for your website in search engines
Neal-UK
02-21-2007, 06:20 AM
Just thought someone could see what's being searched on a site, and then create posts on their own relating to what members are searching for.
Just a thought....
BigJimTheLug
02-21-2007, 06:31 AM
Can this be set so that only mods, admins, and supermods see the display?
I don't want members to see it.
coderphp
02-21-2007, 07:31 AM
Can this be set so that only mods, admins, and supermods see the display?
I don't want members to see it.
ok as this is requested again it will be added to the new version coming up in the upcoming few days
dutchbb
02-21-2007, 10:06 AM
Wow very good idea! definitely going to use this, installed + nominated :)
ps: too bad for us it adds 2 queries on forumhome :( Can you make it add the 2 queries only for admins when you add the feature mentioned above?
Thanks!
dutchbb
02-21-2007, 10:25 AM
PS: is it possible to release the photoshop file for the search incon, I like to change the matte color to match the background :)
PS2: (this is just a suggestion if you ever feel the need to further improve your mod) it would be nice to make the keyword links redirect to a more detailed statistics page that shows the users for the searched keywords, how many times it is searched for etc...
coderphp
02-21-2007, 10:36 AM
Wow very good idea! definitely going to use this, installed + nominated :)
ps: too bad for us it adds 2 queries on forumhome :( Can you make it add the 2 queries only for admins when you add the feature mentioned above?
Thanks!
yes it could.. maybe ill add that in the next version...
PS: is it possible to release the photoshop file for the search incon, I like to change the matte color to match the background :)
PS2: (this is just a suggestion if you ever feel the need to further improve your mod) it would be nice to make the keyword links redirect to a more detailed statistics page that shows the users for the searched keywords, how many times it is searched for etc...
attached the search icon large sized in png format, and another 2 alternative icons
and about ur suggestion it would be nice if i had time to add that .. thanx for ur feedback keep on messaging me :)
mcyates
02-21-2007, 04:47 PM
I've had to disable it as people where spamming the search box with urls to other sites, also a lot of people were swearing and basically just abusing the box.
dutchbb
02-21-2007, 04:51 PM
I've had to disable it as people where spamming the search box with urls to other sites, also a lot of people were swearing and basically just abusing the box.
In the forumhome template, paste this before the code: <if condition="$bbuserinfo[usergroupid] == 6">
and this after: </if>
So only admins can see it. It's good for finding keywords for your site, because if you know what users are searching for you can focus on those words to make articles, threads, tags, meta keywords, titles, etc.
Neal-UK
02-21-2007, 05:21 PM
I've had to disable it as people where spamming the search box with urls to other sites, also a lot of people were swearing and basically just abusing the box.
Slightly off topic, but when I view your football forum as a guest, I get the fist page showing the image url in the poll pushing the forums out....
See attached:
coderphp
02-21-2007, 07:32 PM
In the forumhome template, paste this before the code: <if condition="$bbuserinfo[usergroupid] == 6">
and this after: </if>
right and you can also use:
<if condition="$vbulletin->userinfo['usergroupid'] == 6">
</if>
So only admins can see it. It's good for finding keywords for your site, because if you know what users are searching for you can focus on those words to make articles, threads, tags, meta keywords, titles, etc.
Agree with you 100% as this is the main reason - for me - for programming this hack..
Masiello
02-22-2007, 08:09 AM
Hi, Ive my forum in a root and not in a /forum dir, I have install this mod but after the product is active the database error appear in a forum index, it don't find the table, any fix?
coderphp
02-22-2007, 09:58 AM
Hi, Ive my forum in a root and not in a /forum dir, I have install this mod but after the product is active the database error appear in a forum index, it don't find the table, any fix?
execute this query:
CREATE TABLE `coder_searchstats` ( `id` int(10) unsigned NOT NULL auto_increment, `query` varchar(200) NOT NULL default '', `dateline` int(10) unsigned NOT NULL default '0', `count` int(11) NOT NULL default '0', PRIMARY KEY (`id`) )
ncweb
02-22-2007, 03:20 PM
ok now it is clear for me
do the following:
1- reinstall the product.
2- execute this new query:
CREATE TABLE `coder_searchstats` ( `id` int(10) unsigned NOT NULL auto_increment, `query` varchar(200) NOT NULL default '', `dateline` int(10) unsigned NOT NULL default '0', `count` int(11) NOT NULL default '0', PRIMARY KEY (`id`) )
Great mod, I also had to use this query with mysql 4.1.21-standard and dev box with 4.0.26. Is there something missing from installer?
/installed ;)
nikki712
02-22-2007, 04:49 PM
great hack!! since i have a dark theme... i changed the graphic to something appropiate... and made the search result text smaller... but other than that.... this is great!! really nice..
i personally cant think of anything this hack needs to be any better
Can you please tell me how you made the text smaller?
Masiello
02-22-2007, 05:41 PM
execute this query:
CREATE TABLE `coder_searchstats` ( `id` int(10) unsigned NOT NULL auto_increment, `query` varchar(200) NOT NULL default '', `dateline` int(10) unsigned NOT NULL default '0', `count` int(11) NOT NULL default '0', PRIMARY KEY (`id`) )
Hello, the table that you have write already exist, this is the error with the product enabled:
Database error in vBulletin 3.6.4:
Invalid SQL:
SELECT MAX(`count`) AS m FROM vb_coder_searchstats;
MySQL Error : Table 'db.vb_coder_searchstats' doesn't exist
Error Number : 1146
Date : Thursday, February 22nd 2007 @ 08:34:40 PM
Script : http://www.mysite.com/index.php
Referrer : http://www.mysite.com/admincp/index.php?do=head
IP Address : xxx.xxx.xxx
Username : xxx
Classname : vb_database
I think have to create a table named vb_coder_searchstats and drop the table coder_searchstats.
HMBeaty
02-22-2007, 05:47 PM
Can you please tell me how you made the text smaller?
Hi Nikki, the easiest way I could do it was this...
Go into your admincp > plugins & products > plugin manager
and edit Forum Search Stats 1.0 at hook location forumhome_complete
Then change:
$rat = 5/$max;
To:
$rat = 2/$max;
You can change 2 to whatever number you want. 2 is just what I have mine at
dutchbb
02-22-2007, 06:44 PM
There seem to be something wrong... it shows a completely different list of keywords every F5, there is no ranking or words marked bigger because they are searched more? isn't that what statistics is about? Because this is pretty useless if you don't know what the top keywords are...
nikki712
02-22-2007, 07:43 PM
Hi Nikki, the easiest way I could do it was this...
Go into your admincp > plugins & products > plugin manager
and edit Forum Search Stats 1.0 at hook location forumhome_complete
Then change:
$rat = 5/$max;
To:
$rat = 2/$max;
You can change 2 to whatever number you want. 2 is just what I have mine at
Thank you so much!
coderphp
02-22-2007, 08:29 PM
Great mod, I also had to use this query with mysql 4.1.21-standard and dev box with 4.0.26. Is there something missing from installer?
/installed ;)
I dont know why this problem happens as it dodnt face me and the query seems standard to me..
anyway ill research the reason and let u know
coderphp
02-22-2007, 08:40 PM
There seem to be something wrong... it shows a completely different list of keywords every F5, there is no ranking or words marked bigger because they are searched more? isn't that what statistics is about? Because this is pretty useless if you don't know what the top keywords are...
go to admincp >> Search Stats >> Show stats
and tell me how many records are there??
blastup
02-22-2007, 08:49 PM
i can't see the side bar .. on the admincp .. the search statistics.. can you tell me why?.. i did everthing right..https://vborg.vbsupport.ru/external/2007/02/7.jpg
coderphp
02-22-2007, 09:13 PM
i can't see the side bar .. on the admincp .. the search statistics.. can you tell me why?.. i did everthing right..https://vborg.vbsupport.ru/attachment.php?attachmentid=60757&d=1171886071
make sure to upload the file "includes/xml/cpnav_coder_searchstats.xml"
dutchbb
02-23-2007, 09:49 AM
go to admincp >> Search Stats >> Show stats
and tell me how many records are there??
It's showing this error:
Fatal error: Cannot re-assign $this in /home/tijl/domains/dutchbodybuilding.com/public_html/forum/admincp/search_stats.php on line 14
My forum is on a subdomain..not sure if that has something to do with it?
coderphp
02-23-2007, 10:08 AM
It's showing this error:
Fatal error: Cannot re-assign $this in /home/tijl/domains/dutchbodybuilding.com/public_html/forum/admincp/search_stats.php on line 14My forum is on a subdomain..not sure if that has something to do with it?
it seems that u installed the very first version of the hack which has this error and was fixed...
please redownload the product & reupload the file admincp/search_stats.php to solve the problem
regards
dutchbb
02-23-2007, 10:31 AM
Strange.. uploaded files and product again, same problem.
coderphp
02-23-2007, 10:39 AM
Strange.. uploaded files and product again, same problem.
ok fixed now..
please redownload the product
BozzaJos
02-23-2007, 03:08 PM
Wow! This hack looks really good. Well done...
I was wondering if this hack also works for 3.5. Could you enlighten me coderphp? I really hope the answer is yes coz this hack would be a great addition to my site.
dutchbb
02-23-2007, 06:39 PM
ok fixed now..
please redownload the product
Working now, thanks, I didn't even know about the admincp statistics page, this is even better :)
dutchbb
02-23-2007, 07:30 PM
Another issue: top keyword shows blanc?
coderphp
02-23-2007, 11:20 PM
Wow! This hack looks really good. Well done...
I was wondering if this hack also works for 3.5. Could you enlighten me coderphp? I really hope the answer is yes coz this hack would be a great addition to my site.
yes tomorrow ill release the 3.5 version.. keep in touch :)
Working now, thanks, I didn't even know about the admincp statistics page, this is even better :)
ok
Another issue: top keyword shows blanc?
ill check that & let u know
lazytown
02-23-2007, 11:33 PM
Great mod, will install when its settled down for a few days :). How long does this keep a record of searches? I, like others, would like the option to have this admin-only or for everyone. Any idea of the load this might add to a very large forum (number of queries added to a page is not that relevant -- if it creates its own small table it's not that big of a deal).
Thanks!!!
-vissa
coderphp
02-24-2007, 06:43 AM
Great mod, will install when its settled down for a few days :). How long does this keep a record of searches? I, like others, would like the option to have this admin-only or for everyone. Any idea of the load this might add to a very large forum (number of queries added to a page is not that relevant -- if it creates its own small table it's not that big of a deal).
Thanks!!!
-vissa
for now you can clear search records whenever you want...
in the future versions ill consider adding a datastore field..
dutchbb
02-24-2007, 01:53 PM
ill check that & let u know
Ok thanks
Question: is it normal that keywords on forumhome are all the same size? I first thought that higher ranking keywords would be showed in a bigger font like with the Zoints Tags but it's not doing that on my forum. They are also showed in a randomly way, every page renewal it's a different list.
SimplyBen
02-24-2007, 05:21 PM
Here is an alternative favorite search icon. It is high quality 36x36 PSD. I can provide a bigger size of this upon request.
Here is the Icon put to use on a dark background...
http://www.andanotherone.com/forums/index.php
(?look near bottom)
coderphp
02-24-2007, 07:11 PM
Ok thanks
Question: is it normal that keywords on forumhome are all the same size? I first thought that higher ranking keywords would be showed in a bigger font like with the Zoints Tags but it's not doing that on my forum. They are also showed in a randomly way, every page renewal it's a different list.
of course size is specified depending on the popularity of the keyword in ur forum
coderphp
02-24-2007, 07:12 PM
Here is an alternative favorite search icon. It is high quality 36x36 PSD. I can provide a bigger size of this upon request.
Here is the Icon put to use on a dark background...
http://www.andanotherone.com/forums/index.php
(?look near bottom)
thanx for the icon...
of course anyone can replace the default icon with urs :)
ncweb
02-25-2007, 12:34 AM
Great mod, I also had to use this query with mysql 4.1.21-standard and dev box with 4.0.26. Is there something missing from installer?
/installed ;)
I dont know why this problem happens as it dodnt face me and the query seems standard to me..
anyway ill research the reason and let u know
Thanks Mahmoud, any chance of posting your mysql version? I'm a newb when it comes to mysql errors but still curious to know. I appreciate you work on this mod, I love being able to see what terms users are searching for. Also, I downloaded 2days ago.. what changes were made on 2/23/2007 and should I uninstall/upgrade? Thank you.
coderphp
02-25-2007, 05:22 AM
Thanks Mahmoud, any chance of posting your mysql version? I'm a newb when it comes to mysql errors but still curious to know. I appreciate you work on this mod, I love being able to see what terms users are searching for. Also, I downloaded 2days ago.. what changes were made on 2/23/2007 and should I uninstall/upgrade? Thank you.
MySQL version: 4.1.21
re-upload the file admincp/search_stats.php as the variable "$this" was renamed to "$thispage"
dutchbb
02-25-2007, 07:39 AM
of course size is specified depending on the popularity of the keyword in ur forum
Ok but can it be ordered so that keywords with more searches are displayed instead of the ones that have only 1 search? :)
coderphp
02-25-2007, 01:52 PM
Ok but can it be ordered so that keywords with more searches are displayed instead of the ones that have only 1 search? :)
Indeed keywords with more search times is displayed...
if you have all keywords searched just one time, then that means that no keyword is searched twice till now...
you can try to click on any keyword on the footer and search for it.. it is supposed to be larger the next time u visit the homepage
dutchbb
02-26-2007, 03:06 PM
But it shows keywords with only one search on forumhome while there are keywords with more than one search.
The statistics also still show the top keyword with a lot of searches but it is blank. So I think something is wrong on my board. Its not wrking like it should.
coderphp
02-26-2007, 04:16 PM
But it shows keywords with only one search on forumhome while there are keywords with more than one search.
The statistics also still show the top keyword with a lot of searches but it is blank. So I think something is wrong on my board. Its not wrking like it should.
ok there seems really something wrong... so u can re-install the hack & start testing it on ur own before people submit their searches
VIP66
02-26-2007, 06:10 PM
Thank you
VIP
unitedpunjab
02-26-2007, 08:00 PM
I modified the hack to process the search directly instead of taking to search page (I like it that way)
I am attaching the modified product file in case some one else want it that way,
Demo: http://www.unitedpunjab.co.uk/
coderphp
02-27-2007, 07:42 AM
I modified the hack to process the search directly instead of taking to search page (I like it that way)
I am attaching the modified product file in case some one else want it that way,
Demo: http://www.unitedpunjab.co.uk/
thank you
FireFish
03-01-2007, 03:31 AM
Nice mod; the only thing I'd change is the large font / font size representing the searches.
It makes my front page look inconsistent, so I disabled showing this on the front page.
I use it just to monitor from the AdminCP.
It would be nice to simply have the top searches there in a normal page font & do something like a mouse over or number next to each term in parenthesis representing search popularity.
coderphp
03-01-2007, 09:15 AM
Nice mod; the only thing I'd change is the large font / font size representing the searches.
It makes my front page look inconsistent, so I disabled showing this on the front page.
I use it just to monitor from the AdminCP.
It would be nice to simply have the top searches there in a normal page font & do something like a mouse over or number next to each term in parenthesis representing search popularity.
you can change the keywords font size this way:
Hi Nikki, the easiest way I could do it was this...
Go into your admincp > plugins & products > plugin manager
and edit Forum Search Stats 1.0 at hook location forumhome_complete
Then change:
$rat = 5/$max;To:
$rat = 2/$max;You can change 2 to whatever number you want. 2 is just what I have mine at
Tom_S
03-01-2007, 11:03 AM
Installed then Uninstalled. It crashed my board:
Database error in vBulletin 3.6.4:
Invalid SQL:
SELECT MAX(`count`) AS m FROM vb_coder_searchstats;
MySQL Error : Table 'myboard.vb_coder_searchstats' doesn't exist Error Number : 1146
Tom_S
03-01-2007, 11:21 AM
Okay...I read through all this thread and see that I have to manually fix this issue. It also says it would be updated and fixed in the next few days from the 21st but it isn't. I will wait until it is. doing it manually is no problem. just don't want to :p
Great mod though ;)
coderphp
03-01-2007, 09:00 PM
Okay...I read through all this thread and see that I have to manually fix this issue. It also says it would be updated and fixed in the next few days from the 21st but it isn't. I will wait until it is. doing it manually is no problem. just don't want to :p
Great mod though ;)
the new version isnot to be released now as im busy with my work...
u can query it manually though :)
dutchbb
03-19-2007, 04:11 PM
Is there a way to just show the top 5 most searched on forumhome? Without changing the fontsize, just 1. keyword 2. keyword 3. etc...
I'm guessing it's
ORDER BY RAND()
rand = random? How to make it order by most searched?
coffee
04-27-2007, 09:46 AM
Great job brother ..
Could you please add search terms from search engines like Google, Yahoo and MSN?
That can be done through reading visitor's browser header.
coderphp
05-02-2007, 06:54 AM
Is there a way to just show the top 5 most searched on forumhome? Without changing the fontsize, just 1. keyword 2. keyword 3. etc...
I'm guessing it's
ORDER BY RAND()
rand = random? How to make it order by most searched?
replace
ORDER BY RAND()
with
ORDER BY `count`
regards
coderphp
05-02-2007, 06:57 AM
Great job brother ..
Could you please add search terms from search engines like Google, Yahoo and MSN?
That can be done through reading visitor's browser header.
Ahlan mohammed :)
yes it could maybe soon ill add this feature
Regards
dutchbb
05-05-2007, 08:35 AM
replace
ORDER BY RAND()
with
ORDER BY `count`
regards
I tried it without succes.
Can you please check my plugin code for errors:
if($vbulletin->options['setting_searchstats_showuser']){
$most_searched = "";
$m = $db->query_read("SELECT MAX(`count`) AS m FROM " . TABLE_PREFIX . "coder_searchstats");
$ma = $db->fetch_array($m);
$max = $ma['m'];
if($max)
{
$rat = 5/$max;
$get = $db->query_read("SELECT * FROM " . TABLE_PREFIX . "coder_searchstats ORDER BY `count` LIMIT " . $vbulletin->options['setting_searchstats_showusernum']);
while($put = $db->fetch_array($get))
{
$r = round($rat*$put['count']);
$most_searched .= "<span dir=\"rtl\"><a href=\"search.php?q=". $put['query'] ."\"><font size=\"".$r."\">" . strip_tags($put['query']) . "</font></a></span> ";
}
}
else
{
$most_searched .= "None";
}
}
Thank you
coderphp
05-05-2007, 08:40 AM
I tried it without succes.
Can you please check my plugin code for errors:
Thank you
the code looks good
can u please copy the error u got?
dutchbb
05-05-2007, 09:12 AM
it didn't order on count. But I installed it again and now it seems to order ok :)
But I still get this problem with the blank keyword:
http://aycu14.webshots.com/image/17053/2005558204035538836_rs.jpg
dutchbb
05-05-2007, 09:17 AM
Now it's ordering random again... strange. Ill' try to disable other plugins, maybe something is interfering.
dutchbb
05-05-2007, 09:42 PM
Ok ordering is solved, needed to add 'DESC'
thanks anyway coder
Muellmann
05-05-2007, 10:21 PM
Works not, tableprefix at (un-)installcode missing. :down:
coderphp
05-30-2007, 09:51 PM
Ok ordering is solved, needed to add 'DESC'
thanks anyway coder
thank you
Cagonni
06-04-2007, 06:29 PM
gr8 work for seo ;)
Cagonni
06-05-2007, 04:59 AM
I modified the hack to process the search directly instead of taking to search page (I like it that way)
I am attaching the modified product file in case some one else want it that way,
you right.i permit guests to search keywords.Search engines can search directly to index more pages.but this hack doesnt search the keywords directly its only go to the search page and enter the keyword.I will try urs ;)
ricker
06-10-2007, 12:42 AM
I'm getting the blank keyword as well. Any fix for this?
jderouen
06-10-2007, 04:09 PM
It works great for me, however.... is there any way to get it NOT to list words that are in the censor filter? Ie: if you search for "the f word" (you know what I mean) it lists it, plain as day, under the searches. Not good if you run a family-oriented forum.
jderouen
06-11-2007, 10:48 PM
Ok ordering is solved, needed to add 'DESC'
thanks anyway coder
Can you tell me exactly what you changed to do this? I to want to order it by count.
Thanks!
Joe
dotJoel
06-20-2007, 12:31 AM
Excellent Mod, thankyou very much. I just manually had to enter the forum database prefix and worked a treat.
Regards,
Joel
Nick0r
06-20-2007, 05:19 PM
Great idea for a hack. I've asked many people about something exactly like this! There is no better keyword data than from your internal search!
Edit: gah - is there anyway that the output can be displayed on a page in the admin control panel. I don't want others to see this data, it should be used internally only. Like a list of the last 100 searches or something.
feverhost
06-20-2007, 05:27 PM
Cool Mod.. thx!!
msalman
06-24-2007, 12:11 AM
Installed then Uninstalled. It crashed my board:
you need to replace the install code and uninstall code lines in xml file with following
<installcode><![CDATA[$db->hide_errors();
$db->query_write("CREATE TABLE" .TABLE_PREFIX. "coder_searchstats ( `id` int(10) unsigned NOT NULL auto_increment, `query` varchar(200) NOT NULL default '', `dateline` int(10) unsigned NOT NULL default '0', `count` int(11) NOT NULL default '0', PRIMARY KEY (`id`) )");
$db->show_errors();]]></installcode>
<uninstallcode><![CDATA[$db->hide_errors();
$db->query_write("DROP TABLE" .TABLE_PREFIX. "coder_searchstats");
$db->show_errors();]]></uninstallcode>
under_takers
06-25-2007, 06:27 PM
Hello, i just install this module and after this i get this error
Database error in vBulletin 3.6.7:
Invalid SQL:
SELECT MAX(`count`) AS m FROM vb_coder_searchstats;
MySQL Error : Table 'ibp.vb_coder_searchstats' doesn't exist
Error Number : 1146
Date : Monday, June 25th 2007 @ 11:53:39 AM
Script : http://www.xxxxxx-xxxx.com/vb/forum.php
Referrer :
IP Address : 125.xxx.xx.xx
Username : xxxxxxxx
Classname : vb_database
powerful_rogue
06-28-2007, 02:10 PM
Great idea for a hack. I've asked many people about something exactly like this! There is no better keyword data than from your internal search!
Edit: gah - is there anyway that the output can be displayed on a page in the admin control panel. I don't want others to see this data, it should be used internally only. Like a list of the last 100 searches or something.
I also want to install this mod, but only have the data available in the admin section. Is this possible at all?
cellarius
07-01-2007, 07:33 AM
:confused:
When using this mod in Firefox, the keywords show weird behavior. For instance: a keyword like "Roma Pass" would show "Pass" at the end of line 2 and "Roma" at the beginning of line 1. (See screenshot 1, and yes, this is one keyword, not two). Also, as soon as one clicks a keyword, the keywords sort of jump around and even disintegrate before the search-page is loaded, and most of the time the search page isn't even loaded at all.
Link: http://www.roma-antiqua.de/forum/
Screenshots attached.
This is the source code of the page:
<td class="alt1" width="100%"><span dir="rtl"><a rel="nofollow" href="http://www.roma-antiqua.de/forum/search.php?do=process&query=jugendherberge"><font size="3">jugendherberge</font></a></span> <span dir="rtl"><a rel="nofollow" href="http://www.roma-antiqua.de/forum/search.php?do=process&query=rom meer"><font size="3">rom meer</font></a></span> <span dir="rtl"><a rel="nofollow" href="http://www.roma-antiqua.de/forum/search.php?do=process&query=romapass"><font size="2">romapass</font></a></span> <span dir="rtl"><a rel="nofollow" href="http://www.roma-antiqua.de/forum/search.php?do=process&query=Roma Pass"><font size="3">Roma Pass</font></a></span> <span dir="rtl"><a rel="nofollow" href="http://www.roma-antiqua.de/forum/search.php?do=process&query=Toiletten"><font size="3">Toiletten</font></a></span> <span dir="rtl"><a rel="nofollow" href="http://www.roma-antiqua.de/forum/search.php?do=process&query=Kolosseum"><font size="5">Kolosseum</font></a></span> <span dir="rtl"><a rel="nofollow" href="http://www.roma-antiqua.de/forum/search.php?do=process&query=tempel"><font size="2">tempel</font></a></span> <span dir="rtl"><a rel="nofollow" href="http://www.roma-antiqua.de/forum/search.php?do=process&query=taxi pauschale"><font size="3">taxi pauschale</font></a></span> <span dir="rtl"><a rel="nofollow" href="http://www.roma-antiqua.de/forum/search.php?do=process&query=taxi"><font size="2">taxi</font></a></span> <span dir="rtl"><a rel="nofollow" href="http://www.roma-antiqua.de/forum/search.php?do=process&query=Fiumicino"><font size="2">Fiumicino</font></a></span> </td>I suspect this behaviour might be due to the fact, that all keywords seem to be embeddet into a span-Tag: "<span dir="rtl">".
In IE everything works just fine.
cellarius
07-01-2007, 12:36 PM
Never mind, fixed it myself. Maybe you should think about changing the code accordingly?
I had to change the code of the "forumhome_complete" plugin. It's this piece of code:
$r = round($rat*$put['count']);
$most_searched .= "<span dir=\"rtl\"><a href=\"search.php?q=". $put['query'] ."\"><font size=\"".$r."\">" . strip_tags($put['query']) . "</font></a></span> ";I removed the <span>-Tag completely, which solved the problem of the "jumping" keywords when clicked in Firefox and spawned no other issues.
Next problem, which caused the funny line-changing-behaviour I described: If you insert " " only, Firefox will not allow linebreaks there - which is exactly as it should be (after all, nbsp stands for non breaking space). So linebreaks will only be where there happens to be a space in the keywords (i.e. if the search term consists of two words). Solution: Add a normal space in the code after the closing a-Tag.
So, the code from above looks like this and now works all well in Firefox!
$r = round($rat*$put['count']);
$most_searched .= "<a href=\"search.php?q=". $put['query'] ."\"><font size=\"".$r."\">" . strip_tags($put['query']) . "</font></a> ";
Attached you will find the altered addon-code with those changes applied. One version handles clicks like the original (goes to the search-page with the keyword filled in as search-term), one like the version by unitedpunjab (See this post (https://vborg.vbsupport.ru/showpost.php?p=1191366&postcount=87)).
---
Furthermore I centered the keywords, which is really easy to do. Instead of the original template-modification-code provided, use this:
<if condition="$vbulletin->options['setting_searchstats_showuser']">
<tbody>
<tr>
<td class="thead" colspan="2">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_events')"><img id="collapseimg_forumhome_events" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_events].gif" alt="" border="0" /></a>
$vbphrase[most_searched]
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_events" style="$vbcollapse[collapseobj_forumhome_events]">
<tr>
<td class="alt2"><img src="images/misc/search_stats.gif" alt="$vbphrase[most_searched]" border="0" /></td>
<td class="alt1" width="100%">$most_searched</td>
</tr>
</tbody>
</if>
cellarius
07-01-2007, 08:24 PM
Another question I have.
At my forum it seems that not the most searched keywords are displayed, but a random choice of all keywords. If I hit reload every so often, sometimes one or other of my most searched for keywords vanish.
BrettMo
07-02-2007, 09:10 PM
Database error in vBulletin 3.6.5:
Invalid SQL:
SELECT COUNT(`id`) AS `c` FROM PREFIXcoder_searchstats WHERE query='search this';
MySQL Error : Table 'user_dbname.PREFIXcoder_searchstats' doesn't exist
Error Number : 1146
Same as Under_takers, I see an error when I try to use this. I just disabled it and my site is working normally again so no harm done, but I really wanted to see what people search for. Any ideas how to fix that error?
Also, it would be great if you could make it so that it would log what people search for via the Zoints Tag search.
Expertu
07-03-2007, 06:16 PM
For all the people who have the SQL problem:
You have to rename the created table, MANUALLY, with PhpMyAdmin or other SQL management scripts, from coder_searchstats, to vb_coder_searchstats.
The creator of this module, appends all over the place, the VB standard table prefix, although he creates the database without it.
BrettMo
07-04-2007, 03:38 AM
For all the people who have the SQL problem:
You have to rename the created table, MANUALLY, with PhpMyAdmin or other SQL management scripts, from coder_searchstats, to vb_coder_searchstats.
The creator of this module, appends all over the place, the VB standard table prefix, although he creates the database without it.
That fixed my issue thanks. I manually changed the table to be PREFIXcoder_searchstats
For those who only want the search terms available to administrators, don't add the code to the bottom of your index page, instead just go to PhpMyAdmin and look and see what is in the table. Problem solved!
BrettMo
07-04-2007, 03:28 PM
Is anyone getting search spam? SOmeone in 8 hours has searched for search strings like this about 10 times <a href=" http:// [domain removed] . org/ pansat - 3500 . html ">[spam text]</a.> without the spaces so that it would actually work if it showed up anywhere. Is that targeted at mods like this?
cellarius
07-04-2007, 08:23 PM
For those who only want the search terms available to administrators, don't add the code to the bottom of your index page, instead just go to PhpMyAdmin and look and see what is in the table. Problem solved!
That's rather complicated. After all, there's a statistics page in AdminCP. :)
cellarius
07-12-2007, 11:09 AM
This mod sports a big "supported"-sign - yet no comment on all the problems mentioned here. :(
coderphp
07-22-2007, 08:01 PM
all problems is to be solved in the new version + new options
sorry for being late
thanx all for ur support
wait the new version today
drdeathuk69
07-22-2007, 11:47 PM
my pic does not show up on forumhome and yes i have it in right folder
www.autochat.co.uk
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.