Welcome, Guest. Please login or register.
Did you miss your activation email?
May 16, 2012, 11:52:33 PM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155098 Posts in 21664 Topics by 7721 Members
Latest Member: arrow345
* Home Help Search Login Register
Pages: [1] 2 3   Go Down
Print
Author Topic: Tagcloud für Suche, News, WYSIWYG und meistbesuchte Seiten, und etwas mehr  (Read 13754 times)
thorn

Offline Offline

Posts: 980


WWW
« on: June 22, 2008, 06:47:27 PM »

Hallo,

SearchTools V0.62.07 - (last updated on Apr, 25, 2010) bugfixes only.


Mit diesem Modul kann man Tagclouds (Wortwolken) erzeugen für
  • Suche: meistgesuchte Begriffe, sowohl von der internen Suche als auch von Google&Co.
  • Seiten: meistbesuchte Seiten
  • News: meistbenutzte Wörter in den News
  • WYSIWYG: meistbenutzte Wörter auf den WYSIWYG-Seiten
  • Keywords: Keywords von allen Seiten (veraltet, besser "Free-Field" benutzen)
  • Description: Description von allen Seiten (veraltet, besser "Free-Field" benutzen)
  • "Free-Field": ein beliebiges Feld aus der Datenbank
außerdem folgende Listen (benötigen Geo-IP-Modul)
  • letzte Besucher: List der letzten Besucher mit Land, Hostname, vergangene Zeit
  • Herkunft: Liste der häufigsten Herkunftsländer
Die Tagclouds werden nun gecached, sodass die Darstellung erheblich schneller geschieht.

Die Google-Tacloud und die Listen benötigen den User-Tracker. Dafür gibt es nun im Modul-Verzeichnis eine Datei wb_index.php, die man einfach gegen die Originale wb/index.php austauchen kann. Besser ist es, die nötigen Änderungen im Template vorzunehmen. Siehe dazu die online-Hifle (Hilfe -> Tagclouds -> Konfiguration).

Das neue Admin-Tool für die GeoIP-Daten findet sich hier: http://www.websitebaker2.org/forum/index.php/topic,11174.0.html

Die Tagclouds und Listen lassen sich per CSS frei gestalten, ein Beispiel-Layout ist dabei.

Nach der Installation findet man unter AdminTools ein neues Modul mit Namen "SearchTools" - dort ist unter dem Punkt "Hilfe"-->"Tagcloud" alles Notwendige erklärt.

Unter dem Punkt "User-Tracker" gibt es daneben einen funktionsfähigen - aber immer noch nicht ganz fertiggestellten - User-Tracker.

Mindestanforderung: WebsiteBaker 2.7 und mySQL 4.1 oder höher, PHP 4.1 (besser 4.3, für Nutzung der WhoIS-Abfrage notwendig).

thorn.


This product includes Whois.php from easyDNS Technologies Inc. & Mark Jeftovic
This product (optionally) includes GeoLite data created by MaxMind, available from http://maxmind.com/
« Last Edit: April 27, 2010, 08:02:51 AM by thorn » Logged

albatros

Offline Offline

Posts: 673


WWW
« Reply #1 on: June 23, 2008, 05:49:38 PM »

Hallo Thorn,

da hat es sich ja gelohnt, immer wieder an "tagclouds für WB" zu denken. Vielleicht übermittle ich Dir als Nächstes versuchsweise mal meine Bankverbindung per Gedankenübertragung.  grin

Das Modul werde ich mir in jedem Fall mal genauer ansehen. Schon jetzt vielen Dank für Deine Arbeit!!!

Gruß

Uwe
Logged
Stefek
WebsiteBaker Org e.V.

Offline Offline

Posts: 4868



« Reply #2 on: June 23, 2008, 06:37:37 PM »

Ich wollte auch mal groß Lob aussprechen!
Dieses Modul ist beachtlich.
Ebenso wie das Working-Copy Modul beachtlich ist.

Respekt Thorn!

Stefek
Logged

"In a time of universal deceit, telling the truth becomes a revolutionary act."
- George Orwell, Nineteen eighty-four (1984)
frank76

Offline Offline

Posts: 81


WWW
« Reply #3 on: July 20, 2008, 08:21:16 PM »

könnt ihr mir ein praxisbeispiel geben, wofür ich das gebauchen kann?

habe keine ahnung was das ist und was ich damit machen kann (bzw. was ES für mich machen kann)

Wortwolken....hab ich noch nie gehört.

gruß

frank
Logged
thorn

Offline Offline

Posts: 980


WWW
« Reply #4 on: July 20, 2008, 09:05:23 PM »

Hallo,

das erste Bild zeigt so eine ominöse Wortwolke  wink
Die Darstellung ist der CSS einstellbar.

Das zweite Bild zeigt den User-Tracker (ich hoffe man erkennt noch etwas in dem verkleinerten Bild).
Ich benutze den User-Tracker in erster Linie um die Spam-Bots zu beobachten.

thorn.
Logged

frank76

Offline Offline

Posts: 81


WWW
« Reply #5 on: July 21, 2008, 12:42:50 PM »

hab mir das modul mal installiert, aber so richtig raffen was ich damit soll tu ich nicht.

Logged
Frediwan

Offline Offline

Posts: 89


WWW
« Reply #6 on: July 28, 2008, 12:22:27 PM »

Hallo, ich habe leider 1und1 . die bieten nur sql 4.0 oder 5.0 an. läuft die cloud auch unter 5.0?? oder besser: kann man das modul auch an 4.0 anpassen? gruß frediwan.
Logged
thorn

Offline Offline

Posts: 980


WWW
« Reply #7 on: July 28, 2008, 01:12:27 PM »

Hallo,

das Modul benötigt mindestens mySQL 4.1, mySQL 5.x geht also auch.

Mit mySQL 4.0 oder kleiner geht das auf keinen Fall - vor allem weil ich haufenweise Subqueries einsetzte, und die gibt es erst seit 4.1.

thorn.
Logged

SaschaN

Offline Offline

Posts: 62


« Reply #8 on: August 20, 2008, 02:11:47 PM »

Lokal hatte ich keine Probleme mit dem Modul (ist übrigens sehr toll), nun aber auf dem Server mit mySQL Version 4.1.22 funktioniert die Tagcloud-Sache bei mir leider nicht. Welche weiteren Voraussetzungen, die ich nicht bedacht habe, gibt es vielleicht noch, die dazu führen können, dass das Modul nicht angezeigt wird?

Das Problem ist, dass das PHP-Skript im Admin-Menü dann einfach abbricht und den Rest der Seite nicht mehr lädt, sodass ich das Modul leider garnicht einsetzen kann.
Logged
thorn

Offline Offline

Posts: 980


WWW
« Reply #9 on: August 20, 2008, 05:54:44 PM »

Hallo,

Das Problem ist, dass das PHP-Skript im Admin-Menü dann einfach abbricht und den Rest der Seite nicht mehr lädt, sodass ich das Modul leider garnicht einsetzen kann.

kannst du bitte mal unter Optionen -> Erweiterte Optionen: PHP-Fehlerberichte auf E-ALL stellen? Dann sollte zumindest eine Fehlermeldung kommen.

thorn.

PS: mal so gefragt, benutzt du nur die Tagclouds, oder hast du auch Verwendung für den User-Tracker?
Logged

shellyvision

Offline Offline

Posts: 4


« Reply #10 on: September 18, 2008, 12:16:17 AM »

We are looking for a module that tracks and gives stats/logs of what users type in the 'search' box on the local webpage.  Its my understanding that the SearchTools by Thorn will do the trick.

I am having some trouble with the SearchTools module posted by Thorn.  In a nutshell I have done a clean new version of WB 2.7 for testing this module and installed the 2 modules 'searchtools_0.54.55' and 'searchtools_geoip_0 8.09'.  Everything installs correctly, no problem here.

Unfortunately all the documentation is in German and I have tried to translate it via online url translators, but there may be something I am still missing.  Whats happening is it is just not working at all.  All the modules (noted above) are installed correctly, I can also see the dB tables in phpmyadmin) but when I type in some search criterion in the search box there is NO entries that I can see being made in the dB with the data entered.

After some more reading I also found this post by Thorn.  I've put this in a 'code' section on a test page and on a page by itself but still get NO data returned.
if(file_exists(WB_PATH.'/modules/searchtools/tagcloud/tagcloud.php')) {
  require_once(WB_PATH.'/modules/searchtools/tagcloud/tagcloud.php');
  $tags = fetch_tagcloud('linear', 99999, 0, 'st_module_keywords');
  display_tagcloud($tags, 'Search:');
}

if(file_exists(WB_PATH.'/modules/searchtools/tagcloud/tagcloud.php')) {
  require_once(WB_PATH.'/modules/searchtools/tagcloud/tagcloud.php');
  $tags = fetch_tagcloud('linear', 99999, 0, 'st_module_descripti ons');
  display_tagcloud($tags, 'Search:');
}


I'm not quite sure what I am missing yet.  Is there an english step by step on how to make this work?
If anyone could offer some input it would be greatly appreciated.


thx
sheldon
Logged
thorn

Offline Offline

Posts: 980


WWW
« Reply #11 on: September 18, 2008, 06:00:29 PM »

Hello,

you have to use at least mySQL 4.1 to make use of this module.

Please set ERROR_Level to E_ALL (Settings->Advanced Settings->PHP Error Reporting Level),
and activate debugging in searchtools (Admin-Tools->SearchTools->Config), set Debug enabled and Level Info. The log will be written to wb/media/st-log/
Please report the output.


BTW: at time of writing there are still no fancy analysis tools in the "searchtools" related to the search  evil
It's mainly used as tagcloud-generator and user-tracker.

thorn.
Logged

shellyvision

Offline Offline

Posts: 4


« Reply #12 on: September 18, 2008, 10:13:21 PM »

Hi Thorn,

Thanks for your feedback... it helped immensely .  I turned on PHP error reporting and debug as you indicated.  I never saw any php errors but the log file you mentioned was enough for me to track down the issues (at least my issues).  We are running MySQL 4.1.20 with PHP 4.3.9.

I did find a couple of items that needed to be changed (in order for it to work for me).  Here are my findings:

Issue 1:
In the 'media/st-log/(logfile.txt)' file I was getting this error:
'modules/searchtools/search.php-341:st_store_query() failed'.
So I also took a look at the 'media/(logfile.txt)' log file created and found this:
'errstr: SQL failed: Unknown column 'r_ip_addr' in 'field list'.

In 'search.php' file the function st_store_query() has this line:
'//    if($query = $database->query("INSERT INTO `$table_queries` (`u_id`,`a_id`,`len`,`date`,`p_id`,`ip_addr`,`r_ip_addr`,`score`,`referrer`,`query_string`) VALUES($user_id,$agent_id,$query_len,$now,$path_id,INET_ATON('$ip_addr'),INET_ATON('{$_SERVER['REMOTE_ADDR']}'),$score,'$ref_str','$query_string')")) {
'

The dB 'mod_searchtools_que ries' table does not have a field called 'r_ip_addr', instead its just 'r_ip'.  So to fix this for me I just simply changed the code above to 'r_ip' for the INSERT statement.



Issue 2:
Again referring to the log files noted above I found this error in the 'searchtools/functions.php' file:
errstr: SQL failed: Unknown column '...mod_searchtools_ tags.u_id' in 'on clause'

The issue was this statement: INNER JOIN `$table_users` USING(`u_id`). 
To fix I change this code:
SELECT `tag`,
                count(*) AS `count`,
                SUM($factor+((1-$factor)/($date_to-$date_from))*(`date`-$date_from)) AS `hist_count`,
                min(`date`) AS `min_d`,
                max(`date`) AS `max_d`
FROM `$table_queries`
INNER JOIN `$table_queries2tags` USING(`q_id`)
INNER JOIN `$table_tags` USING(`t_id`)
INNER JOIN `$table_users` USING(`u_id`)
WHERE `p_id` = $path_id AND `date` between $date_from AND $date_to
$sql_clean_tags
GROUP BY `tag`
ORDER BY `count` DESC
LIMIT $limit

To this:
SELECT t.tag,
                count(*) AS `count`,
                SUM($factor+((1-$factor)/($date_to-$date_from))*(`date`-$date_from)) AS `hist_count`,
                min(q.date) AS `min_d`,
                max(q.date) AS `max_d`
FROM `$table_queries` q
INNER JOIN `$table_queries2tags` q2t USING(`q_id`)
INNER JOIN `$table_tags` t USING(`t_id`)
INNER JOIN `$table_users` u ON q.u_id = u.u_id
WHERE q.p_id = $path_id AND q.date between $date_from AND $date_to
$sql_clean_tags
GROUP BY t.tag
ORDER BY `count` DESC
LIMIT $limit


It could just be our servers and maybe I'm the only one with this issue, but these are just the changes that I had to do to get it working.  Thank you very much for this module and for pointing me in the right direction to get it working.


thx muchly
sheldon



Logged
thorn

Offline Offline

Posts: 980


WWW
« Reply #13 on: September 19, 2008, 12:05:32 AM »

Hello,

Issue 1:
'errstr: SQL failed: Unknown column 'r_ip_addr' in 'field list'.
Oh, its present in upgrade.php, but not in install.php. Will fix this.

Quote
The dB 'mod_searchtools_que ries' table does not have a field called 'r_ip_addr', instead its just 'r_ip'.  So to fix this for me I just simply changed the code above to 'r_ip' for the INSERT statement.
Please change this to `r_ip_addr` (in Database, too), or the spam-bot detection-code may throw errors.

Quote
Issue 2:
Again referring to the log files noted above I found this error in the 'searchtools/functions.php' file:
errstr: SQL failed: Unknown column '...mod_searchtools_ tags.u_id' in 'on clause'
Is this a strict-sql-mode-thingy or a mysql 4 restriction huh - don't know

Quote
FROM `$table_queries` q
INNER JOIN `$table_queries2tags` q2t USING(`q_id`)
INNER JOIN `$table_tags` t USING(`t_id`)
INNER JOIN `$table_users` u ON q.u_id = u.u_id
will check all code for this issue

[after some reading: the join-processing changed in 5.0.12 to follow SQL:2003 standard, see http://dev.mysql.com/doc/refman/5.1/en/join.html
Quote from: mySQL docu
Suppose also that you have this NATURAL JOIN on the three tables:
SELECT ... FROM t1 NATURAL JOIN t2 NATURAL JOIN t3;
Previously
(before 5.0.12), the left operand of the second join was considered to be t2, whereas it should be the nested join (t1 NATURAL JOIN t2) (since 5.0.12). As a result, the columns of t3 are checked for common columns only in t2, and, if t3 has common columns with t1, these columns are not used as equi-join columns.]

Thanks for testing.


If you find this module not useful for your needs (e.g too much functions you don't need), you may find this old piece of code helpfully. It shows how to use the new search-function to fetch each local search-query.
To test this, just append this code to modules/wysiwyg/search.php
Code: (search.php)
if(!defined('WB_PATH')) { exit("Cannot access this file directly"); }

// Extract tags from local search-query and print to screen (in utf-8 coding)
// This script is called on every search
// NEEDS WB >= 2.7RC3
function wysiwyg_search_after($func_vars) {
    // get search_url_array (utf-8 coded), search_path and database (and others).
    extract($func_vars, EXTR_PREFIX_ALL, 'func');

    foreach($func_search_url_array as $tag) {
        var_dump($tag);
        // write to database
    }

    return(true);
}
Later on you may make your own module around this function.



thorn.
Logged

shellyvision

Offline Offline

Posts: 4


« Reply #14 on: September 19, 2008, 04:27:13 PM »

Will do...

thx again for your feedback
sheldon
Logged
bupaje

Offline Offline

Posts: 519


WWW
« Reply #15 on: September 29, 2008, 08:33:05 AM »

Thank you for your hard work. I am not sure I know all the settings yet, but am testing this. I am very impressed by your contributions.
Logged

My Blog, My Site
thorn

Offline Offline

Posts: 980


WWW
« Reply #16 on: October 04, 2008, 10:11:46 PM »

Hallo,

gerade hochgeladen:
SearchTools V0.61.01

Wichtigste Änderung:
Die tagclouds werden nun gecached, wodurch die Darstellung erheblich beschleunigt wird.
Nicht gecached werden die "meistbesuchte-Seiten"-Tagcloud, sowie die Listen ("letzte Besucher" und "User-Herkunft").

thorn.
Logged

Ronja

Offline Offline

Posts: 66



« Reply #17 on: February 15, 2009, 04:50:40 PM »

Hi,

sorry für die sicher dumme Frage, aber wie baut man das Teil ein?
Wenn ich den benötigten Code in der index.php eintrage passiert rein gar nichts.
Wäre für Hilfe sehr dankbar smiley

LG Ronja
Logged

I love WB!
thorn

Offline Offline

Posts: 980


WWW
« Reply #18 on: February 15, 2009, 05:48:12 PM »

Hallo,

welche index.php meinst du?

Zur Nutzung der Page-Cloud oder der Google-Searchcloud reicht es
in die index.php des Templates dies am Ende (vor dem </body>-tag) einzufügen
Code:
<?php
if(file_exists(WB_PATH.'/modules/searchtools/search.php')) {
  require_once(
WB_PATH.'/modules/searchtools/search.php');
  if(
PAGE_ID!=// TODO: search for a better way to do this
     
&& !(defined('POST_ID') || defined('ITEM_ID') || defined('catalog_ID') || defined('SONG_ID') || defined('IMAGE_ID'))
     && (!isset(
$_SERVER['HTTP_REFERER']) || (isset($_SERVER['HTTP_REFERER']) && !preg_match('#/modules/guestbook/gstbk_add.php#'$_SERVER['HTTP_REFERER'])))
     && (!isset(
$_SERVER['PHP_SELF']) || (isset($_SERVER['PHP_SELF']) && (PAGES_DIRECTORY!='' && preg_match('#'.PAGES_DIRECTORY.'/#'$_SERVER['PHP_SELF'])) && !preg_match('#/modules/#'$_SERVER['PHP_SELF'])))
  ) {
    
$this_page_id PAGE_ID;
    
$func_vars = array('database'=>$database,'search_path'=>'st_special_ut','search_url_array'=>array(''.$this_page_id));
    
searchtools_search_after($func_vars);
  }
}
?>

</body>
</html>

Für WYSIWYG, ... -Tagclouds braucht man dies allerdings nicht.

Zur Erzeugung der Clouds siehe die Online-Hilfe (Admin-Tools -> SearchTools -> Hilfe).

thorn.
Logged

Ronja

Offline Offline

Posts: 66



« Reply #19 on: February 15, 2009, 08:43:31 PM »

Hallo Thorn,

danke für Deine Hilfe. Ich schau mir das morgen noch einmal an. Ich meinte schon die index.php des Templates smiley. aber ich bekomme halt keine "Wolke" zu sehen.

Liebe Grüße
Ronja
Logged

I love WB!
thorn

Offline Offline

Posts: 980


WWW
« Reply #20 on: February 21, 2009, 10:20:14 PM »

Hallo,

nach langer Zeit mal wieder ein Update, allerdings nur eine Fehlerbehebung.

Seit 0.60.1 funktionierte das Backend nicht mehr, wenn man, wie empfohlen, searchtools_geoip deinstalliert hatte. -- Bah, hat das denn keiner gemerkt?!

thorn.
Logged

Ralf (Berlin)

Offline Offline

Posts: 1314


« Reply #21 on: May 06, 2009, 07:39:49 PM »

Hallo Thorn,

ich fange gerade an, damit zu experimentieren, ein Problem ist mir aufgefallen:

In der functions.bot.php fehlt

Code:
require_once(WB_PATH.'/modules/searchtools/functions_cidr.php');

dadurch greift der Aufruf:

Code:
   // check ip
    if($ip==$ip_real) {
        foreach(array_merge($config['ip_list_drop_array'],$config['ip_list_spambots_array']) as $cidr) {
            if(ip_in_cidr($ip, $cidr)) {
                $b += ST_IB_IP_SPAMBOT_LIST;
                if(ST_DEBUG_ENABLED &ST_BOT) mySTErrorLog("bot: match in CIDR $cidr");
                break;
            }
        }

ins Leere...

Gruß
Ralf
Logged
thorn

Offline Offline

Posts: 980


WWW
« Reply #22 on: May 07, 2009, 09:52:11 PM »

Hallo,

ein weiterer bugfix. Behebt den vorgenannten Fehler.


thorn.
Logged

albatros

Offline Offline

Posts: 673


WWW
« Reply #23 on: May 09, 2009, 03:59:15 PM »

Hallo Thorn,

ich wollte bei einer Website endlich die Auswirkungen und Nutzung der Tagcloud mittels Search-Tools(neuste Version) und Abschnitt(Code2) auf der Startseite testen. Allerdings bekomme ich dann ein Umlaute-Problem, das ich sonst nicht habe.

Hast Du vielleicht irgendwelche Ideen, Tipps oder Hinweise für mich? Vielen Dank im Voraus!!!

Gruß

Uwe

Edit: WB2.7, UTF-8. Module: showmenu2, simplepagehead, topics0.3, anytopics0.4, droplets, fancybox, code2
« Last Edit: May 09, 2009, 04:05:15 PM by albatros » Logged
thorn

Offline Offline

Posts: 980


WWW
« Reply #24 on: May 09, 2009, 05:25:40 PM »

Hallo,

hast du nur das Modul installiert, oder auch Dateien geändert (wie in der Dokumentation beschrieben)?

thorn.
Logged

Pages: [1] 2 3   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!