Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

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

Category: Statistics Modifications - Version: 3.6.7 Rating:
Released: 07-21-2007 Last Update: Never Installs: 66
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 ...

The 1st version was here
https://vborg.vbsupport.ru/showthread.php?t=139829

What is new in Version 2
  1. Most searched keywords in smaller text.
  2. Most searched keywords leads to results page directly instead of search page.
  3. Fixed random list bug.
  4. Fixed blank keyword bug.
  5. An option for choosing who can see search stats in homepage.
  6. Censor words listed in Most searched stats according to Forum's censor list.
  7. Solved "<span dir=rtl>" problem.
  8. Solved TABLE_PREFIX problem.
  9. Solved falsy search count when user clicks on links on "most searched keyword stats". ((Thanx to h2ojunkie))
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.

Screens





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 2.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'] AND in_array($vbulletin->userinfo['usergroupid'], $allowed_groups)">
<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

ALSO, many thanx for all who helped in testing and debugging the 1st version, the list is long so i couldnt name them here

Show Your Support

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

Comments
  #2  
Old 07-22-2007, 09:14 PM
coderphp's Avatar
coderphp coderphp is offline
 
Join Date: Nov 2006
Location: Egypt
Posts: 204
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

screenshots
Reply With Quote
  #3  
Old 07-22-2007, 09:17 PM
txspaderz's Avatar
txspaderz txspaderz is offline
 
Join Date: Apr 2006
Location: Houston
Posts: 109
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Sounds like a good idea. I'll wait for other's opinions on it
Reply With Quote
  #4  
Old 07-22-2007, 10:27 PM
h2ojunkie h2ojunkie is offline
 
Join Date: Sep 2004
Posts: 57
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I hope I'm not stepping on any toes, cause I really do love this mod.

I just tested V2 on 3.6.4 to see if it would work and get the following error when trying to view search stats in admincp. (I know, i'm too lazy to do the full 3.6.7 update and settled for just the security patches)

Code:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /my/path/forum/admincp/search_stats.php on line 18
I used the same fix on V2 that I did on V1 to solve the problem
in search_stats.php
Replace this:
PHP Code:
    $records=$db->query_read("SELECT * FROM  " TABLE_PREFIX "coder_searchstats");
    
$num=mysql_num_rows($records);

    
$records=$db->query_read("SELECT s.id, s.query, s.dateline, s.count FROM " TABLE_PREFIX "coder_searchstats AS s ORDER BY `count` DESC LIMIT $eu$limit");
    
$pa ceil($eu/$limit)+1;
    
$to ceil($num/$limit);
    
print_form_header();
    
print_table_header($vbphrase['coder_searchstats_show'] . "(Page $pa of $to)"5);
    if(
mysql_num_rows($records) > 0
With this:
PHP Code:
    $recordcount=$db->query_first("SELECT COUNT(*) AS count FROM  " TABLE_PREFIX "coder_searchstats");
    
$num=$recordcount['count'];

    
$records=$db->query_read("SELECT s.id, s.query, s.dateline, s.count FROM " TABLE_PREFIX "coder_searchstats AS s ORDER BY `count` DESC LIMIT $eu$limit");
    
$pa ceil($eu/$limit)+1;
    
$to ceil($num/$limit);
    
print_form_header();
    
print_table_header($vbphrase['coder_searchstats_show'] . "(Page $pa of $to)"5);
    if(
$num 0
Also the "Most searched keywords" block on forum home still shows to usergroups that don't have permissions to see it.

The actual search terms don't show up (just the word "None") but the block itself still shows. I would think the entire section should not show if they don't have viewing permissions. It doesn't make sense to show a 'search stats' box with nothing in it.

So I changed the FORUMHOME template edit from this:
Code:
<if condition="$vbulletin->options['setting_searchstats_showuser']">
To this:
Code:
<if condition="$vbulletin->options['setting_searchstats_showuser'] AND in_array($vbulletin->userinfo['usergroupid'], $allowed_groups)">
Thanks for the great mod!!!
Reply With Quote
  #5  
Old 07-22-2007, 10:52 PM
johnrizz's Avatar
johnrizz johnrizz is offline
 
Join Date: Apr 2006
Posts: 333
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

very nice
Reply With Quote
  #6  
Old 07-22-2007, 10:55 PM
edenx edenx is offline
 
Join Date: Nov 2006
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How can I show the most searched keywords using vbadvanced? like a search cloud?
Reply With Quote
  #7  
Old 07-22-2007, 11:46 PM
Wayne Luke's Avatar
Wayne Luke Wayne Luke is offline
Senior Member
 
Join Date: Jan 2002
Location: Southern California
Posts: 1,694
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Does the list of most searched for terms have to go in the "what's going on box"? I think that is the most illogical place to put it.
Reply With Quote
  #8  
Old 07-22-2007, 11:52 PM
coderphp's Avatar
coderphp coderphp is offline
 
Join Date: Nov 2006
Location: Egypt
Posts: 204
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by h2ojunkie View Post
I hope I'm not stepping on any toes, cause I really do love this mod.

I just tested V2 on 3.6.4 to see if it would work and get the following error when trying to view search stats in admincp. (I know, i'm too lazy to do the full 3.6.7 update and settled for just the security patches)

Code:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /my/path/forum/admincp/search_stats.php on line 18
I used the same fix on V2 that I did on V1 to solve the problem
in search_stats.php
Replace this:
PHP Code:
    $records=$db->query_read("SELECT * FROM  " TABLE_PREFIX "coder_searchstats");
    
$num=mysql_num_rows($records);

    
$records=$db->query_read("SELECT s.id, s.query, s.dateline, s.count FROM " TABLE_PREFIX "coder_searchstats AS s ORDER BY `count` DESC LIMIT $eu$limit");
    
$pa ceil($eu/$limit)+1;
    
$to ceil($num/$limit);
    
print_form_header();
    
print_table_header($vbphrase['coder_searchstats_show'] . "(Page $pa of $to)"5);
    if(
mysql_num_rows($records) > 0
With this:
PHP Code:
    $recordcount=$db->query_first("SELECT COUNT(*) AS count FROM  " TABLE_PREFIX "coder_searchstats");
    
$num=$recordcount['count'];

    
$records=$db->query_read("SELECT s.id, s.query, s.dateline, s.count FROM " TABLE_PREFIX "coder_searchstats AS s ORDER BY `count` DESC LIMIT $eu$limit");
    
$pa ceil($eu/$limit)+1;
    
$to ceil($num/$limit);
    
print_form_header();
    
print_table_header($vbphrase['coder_searchstats_show'] . "(Page $pa of $to)"5);
    if(
$num 0
i tested it again and i didnt face this problem
i dont know maybe u have another hack which interfere with this?

Quote:
Originally Posted by h2ojunkie View Post
Also the "Most searched keywords" block on forum home still shows to usergroups that don't have permissions to see it.

The actual search terms don't show up (just the word "None") but the block itself still shows. I would think the entire section should not show if they don't have viewing permissions. It doesn't make sense to show a 'search stats' box with nothing in it.

So I changed the FORUMHOME template edit from this:
Code:
<if condition="$vbulletin->options['setting_searchstats_showuser']">
To this:
Code:
<if condition="$vbulletin->options['setting_searchstats_showuser'] AND in_array($vbulletin->userinfo['usergroupid'], $allowed_groups)">
Thanks for the great mod!!!
fixed thank you..
please re-download the product
Reply With Quote
  #9  
Old 07-22-2007, 11:56 PM
PixelFx PixelFx is offline
 
Join Date: Dec 2002
Posts: 1,117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

looks cool thanks for sharing .. won't install yet, but looks really nice .. great job
Reply With Quote
  #10  
Old 07-22-2007, 11:57 PM
coderphp's Avatar
coderphp coderphp is offline
 
Join Date: Nov 2006
Location: Egypt
Posts: 204
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by stone0075 View Post
very nice
thanx

Quote:
Originally Posted by edenx View Post
How can I show the most searched keywords using vbadvanced? like a search cloud?
id ont know about installation with vbadvanced

Quote:
Originally Posted by Wayne Luke View Post
Does the list of most searched for terms have to go in the "what's going on box"? I think that is the most illogical place to put it.
can u clearify why u think that?
Reply With Quote
Reply


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 12:35 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04488 seconds
  • Memory Usage 2,339KB
  • 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
  • (8)bbcode_code
  • (4)bbcode_php
  • (5)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
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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