vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Statistics Modifications - Forum Search Stats 1.0 (https://vborg.vbsupport.ru/showthread.php?t=139829)

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

Quote:

Originally Posted by Tom_S (Post 1193246)
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>


under_takers 06-25-2007 06:27 PM

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

powerful_rogue 06-28-2007 02:10 PM

Quote:

Originally Posted by Nick0r (Post 1272598)
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:

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.

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:
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>


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

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.

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.


All times are GMT. The time now is 02:38 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.01483 seconds
  • Memory Usage 1,771KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete