Quote:
Originally Posted by h2ojunkie
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
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