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

0 Members and 1 Guest are viewing this topic.

Offline RoadDogg

  • Sr. Member
  • ****
  • Posts: 488
    • View Profile
    • Düsipixel
Re: [MOD] Search Statistics v1.2
« Reply #45 on: April 17, 2005, 11:46:23 PM »
It gives same worth as your first code ?

For support requests please don´t forget link to your Gallery/to phpinfo.php
Code: [Select]
<?
phpinfo()
?>
safe_mode must turned OFF
Please check Error Messages

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Search Statistics v1.2
« Reply #46 on: April 18, 2005, 12:04:51 AM »
It gives same worth as your first code ?
as I said I didnt test it.
also if u didnt remove my first code, then it will owerwrite result from the last posted code.
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 RoadDogg

  • Sr. Member
  • ****
  • Posts: 488
    • View Profile
    • Düsipixel
Re: [MOD] Search Statistics v1.2
« Reply #47 on: April 18, 2005, 11:04:45 AM »
Code: [Select]
$sql = "SELECT SUM(count) AS num
        FROM ".SEARCH_STATS_TABLE;
$total = $site_db->query_firstrow($sql);
$site_template->register_vars("total_count", $total['num']);

It works, no idea what I did yesterday. Uploaded wrong file or something  :roll:

 :!: Thank you  :!:

For support requests please don´t forget link to your Gallery/to phpinfo.php
Code: [Select]
<?
phpinfo()
?>
safe_mode must turned OFF
Please check Error Messages

Offline Vincent

  • 4images Moderator
  • Addicted member
  • *****
  • Posts: 1.195
    • View Profile
    • www.foto-kocher.com
Re: [MOD] Search Statistics v1.2
« Reply #48 on: April 27, 2005, 10:01:28 AM »
Hello
could you tell me how to reset the search statistic?

sincerly
vincent
Beati pauperi spiritus

4images 1.7 // My Installed Mods


Offline RoadDogg

  • Sr. Member
  • ****
  • Posts: 488
    • View Profile
    • Düsipixel
Re: [MOD] Search Statistics v1.2
« Reply #49 on: April 27, 2005, 10:36:16 AM »
clear 4images_search_stats table via phpMyadmin?!

For support requests please don´t forget link to your Gallery/to phpinfo.php
Code: [Select]
<?
phpinfo()
?>
safe_mode must turned OFF
Please check Error Messages

Offline artpics

  • Full Member
  • ***
  • Posts: 173
    • View Profile
    • my site
Re: [MOD] Search Statistics v1.2
« Reply #50 on: May 09, 2005, 04:21:13 AM »
hello i have installed this mod all is working but i get this printed out



on screen, where in the code can i remove this please v1.71, i have deleted the DB field and run the stats_install but still the same


thanks

RT

Offline artpics

  • Full Member
  • ***
  • Posts: 173
    • View Profile
    • my site
Re: [MOD] Search Statistics v1.2
« Reply #51 on: May 10, 2005, 05:30:16 PM »
is this why this is happening
  http://www.4homepages.de/forum/index.php?topic=6806.0

as it did not show these tags when i had 1.7 :(

edited ..................

yes i found the answer click above  :D

Offline max.cady

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Re: [MOD] Search Statistics v1.2
« Reply #52 on: May 12, 2005, 09:31:16 PM »
Danke für den Link zu dem conditional tags mod. Ich hatte das gleiche Problem .... ist jetzt gelöst  :mrgreen:

Offline artpics

  • Full Member
  • ***
  • Posts: 173
    • View Profile
    • my site
Re: [MOD] Search Statistics v1.2
« Reply #53 on: May 12, 2005, 09:34:23 PM »
 :D

Offline Dandily

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: [MOD] Search Statistics v1.2
« Reply #54 on: June 29, 2005, 05:16:43 PM »
I have a strange thing, only phrases are added to search statistics...
i check the mysql with phpMyAdmin and there are no words, only phrases...

Search are working good, but i have no statistics about searching words.

What it could be?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Search Statistics v1.2
« Reply #55 on: June 30, 2005, 12:41:17 AM »
recheck Step 1.2

P.S. so, where does the single word goes after the search?
For example try to search for a random, unique string, and check database if that string was added at all.

P.P.S. can we test it?
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 Dandily

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: [MOD] Search Statistics v1.2
« Reply #56 on: June 30, 2005, 03:12:25 PM »
Thanks a lot!

It was my stuipid fault...
I was trying to install this mod two times, but every time i missed step 1.2 :)

Thanks again.

P.S. I`m also from Russia, but i`m from Moscow.

Offline SAD

  • Newbie
  • *
  • Posts: 23
    • View Profile
    • Туристические ФотоАльбомы
Re: [MOD] Search Statistics v1.2
« Reply #57 on: July 05, 2005, 01:39:11 PM »
Look stats only admin.

Open search_stats.php

find
Code: [Select]
include(ROOT_PATH.'includes/page_header.php');

add after

Code: [Select]
if ($user_info['user_level'] != ADMIN) {
  show_error_page($lang['no_permission']);
}
Sergey


Offline Vincent

  • 4images Moderator
  • Addicted member
  • *****
  • Posts: 1.195
    • View Profile
    • www.foto-kocher.com
Re: [MOD] Search Statistics v1.2
« Reply #58 on: September 01, 2005, 11:24:23 PM »
Hello
i have the Problem that the words are added to the Phrases - but i have added step 1.2

http://www.foto-kocher.com/search_stats.php

Code: [Select]
    elseif ($split_words[$i] != "" && strlen($split_words[$i]) >= MIN_SEARCH_KEYWORD_LENGTH && strlen($split_words[$i]) <= MAX_SEARCH_KEYWORD_LENGTH && !in_array($split_words[$i], $stopword_list)) {
// start Search_stat
if (count($split_words) == 1) {
      $sql = "UPDATE ".SEARCH_STATS_TABLE."
      SET count = count + 1, word = 1, date = ".time().", ".$who." = ".$who." + 1
      WHERE text LIKE '".addslashes(str_replace("*", "", $split_words[$i]))."' AND word = 1";
      $site_db->query($sql);
    if (!$site_db->affected_rows()) {
      $sql = "INSERT INTO ".SEARCH_STATS_TABLE."
              (text, word, date, ".$who.")
              VALUES
              ('".addslashes(str_replace("*", "", $split_words[$i]))."', 1, ".time().", 1)";
      $site_db->query($sql);
    }
}
// end Search_stat

so who else coud be the fault?
Beati pauperi spiritus

4images 1.7 // My Installed Mods


Offline Vincent

  • 4images Moderator
  • Addicted member
  • *****
  • Posts: 1.195
    • View Profile
    • www.foto-kocher.com
Re: [MOD] Search Statistics v1.2
« Reply #59 on: September 02, 2005, 09:00:03 AM »
i Found out that this mess with phrase and word only happen with count, if i change to date it works fine!

why this happen?

and would do i have to change to have it by default sorted by date?

sincerly
vincent
Beati pauperi spiritus

4images 1.7 // My Installed Mods