Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard

Reply
 
Thread Tools
Forum Search Stats 1.0 Details »»
Forum Search Stats 1.0
Version: 1.00, by coderphp coderphp is offline
Developer Last Online: Jan 2023 Show Printable Version Email this Page

Category: Statistics Modifications - Version: 3.6.4 Rating:
Released: 02-18-2007 Last Update: 02-22-2007 Installs: 65
DB Changes Uses Plugins Template Edits
Additional Files  
No support by the author.

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:
Code:
</table>
<br />
<!-- end what's going on box -->
ADD:
Code:
<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...

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #112  
Old 06-20-2007, 05:19 PM
Nick0r Nick0r is offline
 
Join Date: Nov 2003
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #113  
Old 06-20-2007, 05:27 PM
feverhost feverhost is offline
 
Join Date: Jan 2005
Posts: 27
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cool Mod.. thx!!
Reply With Quote
  #114  
Old 06-24-2007, 12:11 AM
msalman msalman is offline
 
Join Date: Jun 2007
Location: islamic-life.com
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Tom_S View Post
Installed then Uninstalled. It crashed my board:
you need to replace the install code and uninstall code lines in xml file with following

Code:
<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>
Reply With Quote
  #115  
Old 06-25-2007, 06:27 PM
under_takers under_takers is offline
 
Join Date: May 2007
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hello, i just install this module and after this i get this error

Quote:
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
Reply With Quote
  #116  
Old 06-28-2007, 02:10 PM
powerful_rogue powerful_rogue is offline
 
Join Date: Jan 2007
Location: Kent
Posts: 603
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Nick0r View Post
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?
Reply With Quote
  #117  
Old 07-01-2007, 07:33 AM
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Posts: 1,987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default



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:

HTML Code:
  <td class="alt1" width="100%"><span dir="rtl"><a rel="nofollow" href="http://www.roma-antiqua.de/forum/search.php?do=process&amp;query=jugendherberge"><font size="3">jugendherberge</font></a></span>&nbsp;&nbsp;<span dir="rtl"><a rel="nofollow" href="http://www.roma-antiqua.de/forum/search.php?do=process&amp;query=rom meer"><font size="3">rom meer</font></a></span>&nbsp;&nbsp;<span dir="rtl"><a rel="nofollow" href="http://www.roma-antiqua.de/forum/search.php?do=process&amp;query=romapass"><font size="2">romapass</font></a></span>&nbsp;&nbsp;<span dir="rtl"><a rel="nofollow" href="http://www.roma-antiqua.de/forum/search.php?do=process&amp;query=Roma Pass"><font size="3">Roma Pass</font></a></span>&nbsp;&nbsp;<span dir="rtl"><a rel="nofollow" href="http://www.roma-antiqua.de/forum/search.php?do=process&amp;query=Toiletten"><font size="3">Toiletten</font></a></span>&nbsp;&nbsp;<span dir="rtl"><a rel="nofollow" href="http://www.roma-antiqua.de/forum/search.php?do=process&amp;query=Kolosseum"><font size="5">Kolosseum</font></a></span>&nbsp;&nbsp;<span dir="rtl"><a rel="nofollow" href="http://www.roma-antiqua.de/forum/search.php?do=process&amp;query=tempel"><font size="2">tempel</font></a></span>&nbsp;&nbsp;<span dir="rtl"><a rel="nofollow" href="http://www.roma-antiqua.de/forum/search.php?do=process&amp;query=taxi pauschale"><font size="3">taxi pauschale</font></a></span>&nbsp;&nbsp;<span dir="rtl"><a rel="nofollow" href="http://www.roma-antiqua.de/forum/search.php?do=process&amp;query=taxi"><font size="2">taxi</font></a></span>&nbsp;&nbsp;<span dir="rtl"><a rel="nofollow" href="http://www.roma-antiqua.de/forum/search.php?do=process&amp;query=Fiumicino"><font size="2">Fiumicino</font></a></span>&nbsp;&nbsp;</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.
Reply With Quote
  #118  
Old 07-01-2007, 12:36 PM
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Posts: 1,987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
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>&nbsp;&nbsp;";
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 "&nbsp;&nbsp;" 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!
Code:
$r = round($rat*$put['count']);
$most_searched .= "<a href=\"search.php?q=". $put['query'] ."\"><font size=\"".$r."\">" . strip_tags($put['query']) . "</font></a> &nbsp;&nbsp;";
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).

---

Furthermore I centered the keywords, which is really easy to do. Instead of the original template-modification-code provided, use this:
Code:
<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>
Reply With Quote
  #119  
Old 07-01-2007, 08:24 PM
cellarius's Avatar
cellarius cellarius is offline
 
Join Date: Aug 2005
Posts: 1,987
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #120  
Old 07-02-2007, 09:10 PM
BrettMo BrettMo is offline
 
Join Date: Feb 2007
Posts: 33
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
Database error in vBulletin 3.6.5:

Invalid SQL:
SELECT COUNT(`id`) AS `cFROM 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.
Reply With Quote
  #121  
Old 07-03-2007, 06:16 PM
Expertu Expertu is offline
 
Join Date: May 2006
Location: Bucharest
Posts: 26
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:35 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05034 seconds
  • Memory Usage 2,329KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (1)bbcode_html
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete