Page 1 of 1

error with Wordgraph

Posted: 6. January 2010 08:58
by GulfKnight
Your Portal Version: 1.0.0RC3
Your phpBB Type: Standard phpBB3
MODs installed: Yes
Your knowledge: Beginner

PHP Version: 3.0.6

What have you done before the problem was there?


What have you already tryed to solve the problem?


Description and Message
The last three days my Wordgraph have been working weird everything is listed and is not showing the correct count. see the pics.
Image

Re: error with Wordgraph

Posted: 14. January 2010 18:04
by GulfKnight
Any help please!!

Re: error with Wordgraph

Posted: 16. January 2010 10:50
by GulfKnight
Is this the right place to request support for the mod??? or i am doing something wrong !! :roll:

Re: error with Wordgraph

Posted: 16. January 2010 14:18
by Marc
What SQL Server are you using? We already had a thread like that and it seems like there is something wrong with the your database if that happens. Could you send me a database dump of your phpbb_search_wordlist and phpbb_search_wordmatch tables? There is no private data in there, but still send it to me via PM.

Re: error with Wordgraph

Posted: 16. January 2010 15:57
by Marc
Open portal/block/wordgraph.php

Find:

Code: Select all

// Get words and number of those words
$sql = 'SELECT l.word_text, COUNT(*) AS word_count  
    FROM ' . SEARCH_WORDLIST_TABLE . ' AS l, ' . SEARCH_WORDMATCH_TABLE . ' AS m
    WHERE m.word_id = l.word_id 
    GROUP BY m.word_id, l.word_text 
    ORDER BY word_count DESC'; 
$result = $db->sql_query_limit($sql, $portal_config['portal_wordgraph_max_words']); 
Replace with:

Code: Select all

// Get words and number of those words
$sql = 'SELECT word_text, word_count, word_id
    FROM ' . SEARCH_WORDLIST_TABLE . '
    GROUP BY word_id, word_text 
    ORDER BY word_count DESC'; 
$result = $db->sql_query_limit($sql, $portal_config['portal_wordgraph_max_words']); 
By the way, it was actually showing the correct count, but the words with the high counts were not shown.

Re: error with Wordgraph

Posted: 16. January 2010 16:05
by GulfKnight
Thanks a lot, it's working :D

Take care,
GK

Re: error with Wordgraph

Posted: 16. January 2010 16:42
by Foxy
Thanks for the fix, it has made a difference to the way my wordgraph is displayed. However,when I set the number of words to display, I always seen to get this message when I click on a word in the wordgraph:

The following words in your search query were ignored because they are too common words: admin.
You must specify at least one word to search for. Each word must consist of at least 3 characters and must not contain more than 14 characters excluding wildcards.


It seems to work btter if I set the number of word to display at 300+, then the wrodgraph is huge.

Regards, Foxy

Re: error with Wordgraph

Posted: 16. January 2010 17:44
by Marc
That is the behavior of phpBB. Nothing I change there. ;)