Author Topic: [MOD] Search Statistics v1.2  (Read 139156 times)

0 Members and 1 Guest are viewing this topic.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[MOD] Search Statistics v1.2
« on: June 04, 2003, 08:49:17 AM »
This MOD was originaly created by www.girls-on-bikes.com ( http://4homepages.de/forum/viewforum.php?f=11 )
I just adopted it as a "public" MOD
[MOD] Search Statistics v1.5 | Works with 1.7.2 - 1.7.4 thanks to ivan

------ Overview -----------
This MOD will log all searched words and phrases and count each unique word/phrase. When searched with just one word, it will be logged/count as "word" and when searched with two or more words it will be logged and count as a "phrase" and will not log/count each separate word from that phrase.

------ News ----------------
v1.2.
- Added count of who was searching word/phrase (guest, user or admin) (edit search_stats.php and set $show_more to 1 or 0)
- Date display now can be anabled/disabled (edit search_stats.php and set $show_date to 1 or 0)
v1.1.
- Added log last search date of word/phrase


All neccessery files and instruction u can find in this file:
http://gallery.vano.org/file30dl (see attachment below)

demo:
http://gallery.vano.org/search
(there is a link "Search Statistics" at the left-bottom)
« Last Edit: March 06, 2009, 01:45:07 AM by V@no »
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline www.girls-on-bikes.com

  • Full Member
  • ***
  • Posts: 145
    • View Profile
    • http://www.girls-on-bikes.com/
[MOD] Search Statistics v1.2
« Reply #1 on: June 04, 2003, 09:38:13 PM »
Awesome, thanks V@no!
I'm glad to see somebody could take the idea and turn it into a real mod.
I'll have to try out the "official" version when I get home.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[MOD] Search Statistics v1.2
« Reply #2 on: June 04, 2003, 10:48:03 PM »
Thx xwall for finding an error in the code, I have fixed at my site, but forgot update the installation guide...
if u already have installed this MOD, find in /search.php:
Code: [Select]
if (count($split_words) < 1) {and replace with:
Code: [Select]
if (count($split_words) == 1) {
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline bernd

  • Full Member
  • ***
  • Posts: 214
    • View Profile
[MOD] Search Statistics v1.2
« Reply #3 on: June 04, 2003, 10:58:23 PM »
great Mod - I'll work a little on it and will repost it as an admin plugin as for our purpose we rather not make it accessible for the users.

Thanks again - I'm sort of struggeling with getting all your mods into my installation ;)
You deliver faster than I can install 'em ...

cheers,
Bernd

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[MOD] Search Statistics v1.2
« Reply #4 on: June 04, 2003, 11:02:03 PM »
Quote from: bernd
great Mod - I'll work a little on it and will repost it as an admin plugin as for our purpose we rather not make it accessible for the users.

yes, good idea! I think this should be done in the first place...
also, since u dont want show it to the public, then u might want make it to log all words, because right now it will log words that are not in the "bad" list (the ones, that u can set in 4images settings)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[MOD] Search Statistics v1.2
« Reply #5 on: June 06, 2003, 12:50:43 PM »
I just updated this mod. Now it uses only one table in the database, that means only one query needed to pull out data. Also, added date log when word/phrase was searched last time.
You'll need do again all steps and manualy delete 4images_search_words and 4images_search_phrases tables
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Xwall

  • Full Member
  • ***
  • Posts: 100
    • View Profile
    • http://www.xwall.tk
[MOD] Search Statistics v1.2
« Reply #6 on: June 07, 2003, 05:32:37 PM »
Who makes the search Guest? user? admin?  :wink:

Is it possible knowledge it?  8)

Great MOD.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[MOD] Search Statistics v1.2
« Reply #7 on: June 07, 2003, 08:42:56 PM »
Quote from: Xwall
Who makes the search Guest? user? admin?  :wink:

Is it possible knowledge it?  8)

Great MOD.

done :D
redownload the package, read upgrade instructions at the bottom of the intallation guide.

P.S. the installer will automaticaly determin if database already exist and if it needs to be updated or create new one.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Xwall

  • Full Member
  • ***
  • Posts: 100
    • View Profile
    • http://www.xwall.tk
[MOD] Search Statistics v1.2
« Reply #8 on: June 08, 2003, 11:15:57 AM »
Excellent work!!!

The last requirement that is needed in this mod is, How many results that appear when making the search?  :wink:

Phrases (love hewitt)  Count (3)  Guests (1)  Users (2)  Admins (0)  Results (27)

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[MOD] Search Statistics v1.2
« Reply #9 on: June 08, 2003, 07:44:37 PM »
Quote from: Xwall
The last requirement that is needed in this mod is, How many results that appear when making the search?  :wink:

Phrases (love hewitt)  Count (3)  Guests (1)  Users (2)  Admins (0)  Results (27)

do u mean to log how many images where found when searched word/phrase? :? are u sure?
but u always just can click on the phrase/word and find it out yourself...(I can add an extra code that wont count admin when hit from the search stats - that would be more accurate.)
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Xwall

  • Full Member
  • ***
  • Posts: 100
    • View Profile
    • http://www.xwall.tk
[MOD] Search Statistics v1.2
« Reply #10 on: June 09, 2003, 11:31:11 AM »
Quote from: V@no

(I can add an extra code that wont count admin when hit from the search stats - that would be more accurate.)


if you can do it, do it.  8)

If to see the number of results is not the best thing, at least to know if there are results of that search (Results [Yes] [No]).

I am interested in the searches that do not have results.  :?

Offline Xwall

  • Full Member
  • ***
  • Posts: 100
    • View Profile
    • http://www.xwall.tk
[MOD] Search Statistics v1.2
« Reply #11 on: June 12, 2003, 11:01:34 AM »
V@no why dont you put something similar like PMS (Deleted selected and Deleted all).  

Some words or phrases are crazy  8O and to erase them i must go to the Data Base.  :wink:

Offline kaisuny

  • Pre-Newbie
  • Posts: 6
    • View Profile
Installation error
« Reply #12 on: June 14, 2003, 03:24:36 AM »
Install failed?
Code: [Select]

CREATE TABLE `4images_search_stats` ( `text` varchar( 255 ) NOT NULL default \'\', `word` tinyint( 1 ) NOT NULL default \'0\', `count` mediumint( 10 ) NOT NULL default \'1\', `date` int( 11 ) NOT NULL default \'0\', `guests` mediumint( 10 ) NOT NULL default \'0\', `users` mediumint( 10 ) NOT NULL default \'0\', `admins` mediumint( 10 ) NOT NULL default \'0\', KEY `text` ( `text` ) ) TYPE = MYISAM


DB Error: Bad SQL Query: CREATE TABLE `4images_search_stats` ( `text` varchar( 255 ) NOT NULL default \'\', `word` tinyint( 1 ) NOT NULL default \'0\', `count` mediumint( 10 ) NOT NULL default \'1\', `date` int( 11 ) NOT NULL default \'0\', `guests` mediumint( 10 ) NOT NULL default \'0\', `users` mediumint( 10 ) NOT NULL default \'0\', `admins` mediumint( 10 ) NOT NULL default \'0\', KEY `text` ( `text` ) ) TYPE = MYISAM
You have an error in your SQL syntax near '\'\', `word` tinyint( 1 ) NOT NULL default \'0\', `count` mediumint( 10 ) NOT NU' at line 1
CREATE TABLE `4images_search_stats` ( `text` varchar( 255 ) NOT NULL default \'\', `word` tinyint( 1 ) NOT NULL default \'0\', `count` mediumint( 10 ) NOT NULL default \'1\', `date` int( 11 ) NOT NULL default \'0\', `guests` mediumint( 10 ) NOT NULL default \'0\', `users` mediumint( 10 ) NOT NULL default \'0\', `admins` mediumint( 10 ) NOT NULL default \'0\', KEY `text` ( `text` ) ) TYPE = MYISAM



Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Administrator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Installation error
« Reply #13 on: June 14, 2003, 11:44:20 PM »
Quote from: kaisuny
Install failed?

ooopss :oops:
please either open search_stats_install.php and replace all \' to '
or redownload the package.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline edwin

  • Full Member
  • ***
  • Posts: 199
    • View Profile
    • http://www.foto-janssen.nl
[MOD] Search Statistics v1.2
« Reply #14 on: June 16, 2003, 11:39:15 AM »
for wich version is this mod ?