4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: effemmess on June 27, 2003, 03:59:07 PM

Title: [MOD]More than more statistics
Post by: effemmess on June 27, 2003, 03:59:07 PM
Hallo an alle Statistik-Fetischisten!

ich bin dabei eine neue stats.php zu programmieren, die erstens viele Auswertungsmöglichkeiten bietet und zweitens sehr flexibel einsetzbar ist.
Die Idee dazu war geboren nach der Implementation von Vraxor´s stats.php (http://www.4homepages.de/forum/viewtopic.php?t=3303). :D

Bisher (V1.0) habe ich verschiedene Funktionalitäten zur Auswertung der user und der votes eingebaut. Weitere werden folgen... :)
Als Beispiel schaut euch folgende Site an:http://www.auf-einem-blick.de/4images/index.php

Mindestvoraussetzungen:
- 4images 1.7  :wink:
erweiterte Voraussetzungen (nicht zwingend erforderlich aber sehr hilfreich!):
- v@no´s Votes saved in DB (http://www.4homepages.de/forum/viewtopic.php?t=6123)
- effemmess´s Extension for Votes saved in DB (http://www.4homepages.de/forum/viewtopic.php?t=6404)
- effemmess´s Old votes 2 DB
 (http://www.4homepages.de/forum/viewtopic.php?t=6405)

1. neue .../includes/stats.php anlegen
 (vorher natürlich evtl. existierende sichern!)
einfügen:
Code: [Select]
<?PHP
//-----------------------------------------------------
//--- stats.php V1.1 by effemmess ---------------------
//--- based on Vraxor´s stats.php ---------------------
//--- for 4images V1.7 by Jan -------------------------
//-----------------------------------------------------

//-----------------------------------------------------
//--- Variableninitialisierung-------------------------
//-----------------------------------------------------
$time=time();
$m1 =60;
$h1 =$m1*60;
$T1 =$h1*24;
$T7 =$T1*7;
$T30=$T1*30;
(date("w",$time)==0) ? $date_w = 7 : $date_w = date("w",$time);


$ts_today_at_0           =mktime(0,0,0,date("m",$time),date("d",$time),date("Y",$time));
$ts_yesterday_at_0       =$ts_today_at_0-$T1;
$ts_1st_of_month         =mktime(0,0,0,date("m",$time),1,date("Y",$time));
$ts_1st_of_month_before  =mktime(0,0,0,date("m",$ts_1st_of_month-1),1,date("Y",$ts_1st_of_month-1));
$ts_this_monday          =$ts_today_at_0-$T1*($date_w-1);
$ts_last_monday          =$ts_this_monday-$T7;
$ts_24h_before           =$time-$T1;
$ts_7days_before         =$time-$T7;
$ts_30days_before        =$time-$T30;

//-----------------------------------------------------
//--- Funktionen --------------------------------------
//-----------------------------------------------------
function sql_add($from=0,$to=0,$field){
  $sql_add_from=$field." >= ".$from;
  $sql_add_to  =$field." <= ".$to;
  $sql_add = "";
  if ($from != 0 ||$to != 0){
    if ($from != 0) $sql_add .=$sql_add_from;
    if ($from != 0 && $to != 0) $sql_add .=" AND ";
    if ($to   != 0) $sql_add .=$sql_add_to;
  }
  return $sql_add;
}

function num_users($from=0,$to=0,$field="user_joindate"){
  global $site_db, $select_mode;

  if ($from != 0 ||$to != 0){
    $sql_where=" AND ";
  }
  $sql = "SELECT COUNT(*) as users
          FROM ".USERS_TABLE."
          WHERE user_id <> ".GUEST.$sql_where.sql_add($from,$to,$field);
  $row = $site_db->query_firstrow($sql);
  $num_users = $row['users'];
  return $num_users;
}
function num_votes_itable($from=0,$to=0,$field="image_date"){
  global $site_db, $select_mode;

  if ($from != 0 ||$to != 0){
    $sql_where=" WHERE ";
  }
  $sql = "SELECT SUM(image_votes) AS votes
          FROM ".IMAGES_TABLE.$sql_where.sql_add($from,$to,$field);  
  $row = $site_db->query_firstrow($sql);
  $num_votes = (isset($row['votes'])) ? $row['votes'] : 0;
  return $num_votes;
}

function num_votes_vtable($from=0,$to=0,$field="vote_date"){
  global $site_db, $select_mode;
  if ($from != 0 ||$to != 0){
    $sql_where=" WHERE ";
  }
  $sql = "SELECT count(*) AS votes
          FROM ".VOTED_TABLE.$sql_where.sql_add($from,$to,$field);  
  $row = $site_db->query_firstrow($sql);
  $num_votes = (isset($row['votes'])) ? $row['votes'] : 0;
  return $num_votes;
}
//-----------------------------------------------------
//--- Show number of Users ----------------------------
//-----------------------------------------------------
//total
  $total_users = num_users();
  $lang_total_users = $lang['users'];
  $lang_since_begin_new_users = $lang['since_begin_new_users'];
  $site_template->register_vars("total_users", $total_users);
  $site_template->register_vars("lang_total_users", $lang_total_users);
  $site_template->register_vars("lang_since_begin_new_users", $lang_since_begin_new_users);
  unset($total_users);
  unset($lang_total_users);
//today new
  $today_new_users = num_users($ts_today_at_0,0);
  $lang_today_new_users = $lang['today_new_users'];
  $site_template->register_vars("today_new_users", $today_new_users);
  $site_template->register_vars("lang_today_new_users", $lang_today_new_users);
  unset($today_new_users);
  unset($lang_today_new_users);
//yesterday new
  $yesterday_new_users = num_users($ts_yesterday_at_0,$ts_today_at_0);
  $lang_yesterday_new_users = $lang['yesterday_new_users'];
  $site_template->register_vars("yesterday_new_users", $yesterday_new_users);
  $site_template->register_vars("lang_yesterday_new_users", $lang_yesterday_new_users);
  unset($yesterday_new_users);
  unset($lang_yesterday_new_users);
//this week new
  $this_week_new_users = num_users($ts_this_monday,0);
  $lang_this_week_new_users = $lang['this_week_new_users'];
  $site_template->register_vars("this_week_new_users", $this_week_new_users);
  $site_template->register_vars("lang_this_week_new_users", $lang_this_week_new_users);
  unset($this_week_new_users);
  unset($lang_this_week_new_users);
//last week new
  $last_week_new_users = num_users($ts_last_monday,$ts_this_monday);
  $lang_last_week_new_users = $lang['last_week_new_users'];
  $site_template->register_vars("last_week_new_users", $last_week_new_users);
  $site_template->register_vars("lang_last_week_new_users", $lang_last_week_new_users);
  unset($last_week_new_users);
  unset($lang_last_week_new_users);
//this month new
  $this_month_new_users = num_users($ts_1st_of_month,0);
  $lang_this_month_new_users = $lang['this_month_new_users'];
  $site_template->register_vars("this_month_new_users", $this_month_new_users);
  $site_template->register_vars("lang_this_month_new_users", $lang_this_month_new_users);
  unset($this_month_new_users);
  unset($lang_this_month_new_users);
//last month new
  $last_month_new_users = num_users($ts_1st_of_month_before,$ts_1st_of_month);
  $lang_last_month_new_users = $lang['last_month_new_users'];
  $site_template->register_vars("last_month_new_users", $last_month_new_users);
  $site_template->register_vars("lang_last_month_new_users", $lang_last_month_new_users);
  unset($last_month_new_users);
  unset($lang_last_month_new_users);

//-----------------------------------------------------
//--- Votes -------------------------------------------
//-----------------------------------------------------
//total
  $total_votes = num_votes_vtable();
  $lang_total_votes = $lang['votes'];
  $lang_since_begin_new_votes = $lang['since_begin_new_votes'];
  $site_template->register_vars("total_votes", $total_votes);
  $site_template->register_vars("lang_total_votes", $lang_total_votes);
  $site_template->register_vars("lang_since_begin_new_votes", $lang_since_begin_new_votes);
  unset($total_votes);
  unset($lang_total_votes);
//today new
  $today_new_votes = num_votes_vtable($ts_today_at_0,0);
  $lang_today_new_votes = $lang['today_new_votes'];
  $site_template->register_vars("today_new_votes", $today_new_votes);
  $site_template->register_vars("lang_today_new_votes", $lang_today_new_votes);
  unset($today_new_votes);
  unset($lang_today_new_votes);
//yesterday new
  $yesterday_new_votes = num_votes_vtable($ts_yesterday_at_0,$ts_today_at_0);
  $lang_yesterday_new_votes = $lang['yesterday_new_votes'];
  $site_template->register_vars("yesterday_new_votes", $yesterday_new_votes);
  $site_template->register_vars("lang_yesterday_new_votes", $lang_yesterday_new_votes);
  unset($yesterday_new_votes);
  unset($lang_yesterday_new_votes);
//this week new
  $this_week_new_votes = num_votes_vtable($ts_this_monday,0);
  $lang_this_week_new_votes = $lang['this_week_new_votes'];
  $site_template->register_vars("this_week_new_votes", $this_week_new_votes);
  $site_template->register_vars("lang_this_week_new_votes", $lang_this_week_new_votes);
  unset($this_week_new_votes);
  unset($lang_this_week_new_votes);
//last week new
  $last_week_new_votes = num_votes_vtable($ts_last_monday,$ts_this_monday);
  $lang_last_week_new_votes = $lang['last_week_new_votes'];
  $site_template->register_vars("last_week_new_votes", $last_week_new_votes);
  $site_template->register_vars("lang_last_week_new_votes", $lang_last_week_new_votes);
  unset($last_week_new_votes);
  unset($lang_last_week_new_votes);
//this month new
  $this_month_new_votes = num_votes_vtable($ts_1st_of_month,0);
  $lang_this_month_new_votes = $lang['this_month_new_votes'];
  $site_template->register_vars("this_month_new_votes", $this_month_new_votes);
  $site_template->register_vars("lang_this_month_new_votes", $lang_this_month_new_votes);
  unset($this_month_new_votes);
  unset($lang_this_month_new_votes);
//last month new
  $last_month_new_votes = num_votes_vtable($ts_1st_of_month_before,$ts_1st_of_month);
  $lang_last_month_new_votes = $lang['last_month_new_votes'];
  $site_template->register_vars("last_month_new_votes", $last_month_new_votes);
  $site_template->register_vars("lang_last_month_new_votes", $lang_last_month_new_votes);
  unset($last_month_new_votes);
  unset($lang_last_month_new_votes);
//by 10<=user_id<=20 (example!)
  $from =18;
  $to   =18;
  $field="user_id";
  $user_id_votes = num_votes_vtable($from,$to,$field);
  $lang_user_id_votes = $lang['user_id_votes'];
  $site_template->register_vars("user_id_votes", $user_id_votes);
  $site_template->register_vars("lang_user_id_votes", $lang_user_id_votes);
  unset($user_id_votes);
  unset($lang_user_id_votes);
//by 1000<=image_id<=2000 (example!)
  $from =1000;
  $to   =2000;
  $field="image_id";
  $image_id_votes = num_votes_itable($from,$to,$field);
  $lang_image_id_votes = $lang['image_id_votes'];
  $site_template->register_vars("image_id_votes", $image_id_votes);
  $site_template->register_vars("lang_image_id_votes", $lang_image_id_votes);
  unset($image_id_votes);
  unset($lang_image_id_votes);

//-----------------------------------------------------
//--- Hits --------------------------------------------
//-----------------------------------------------------
  $sql = "SELECT SUM(image_hits) AS sum
          FROM ".IMAGES_TABLE;
  $row = $site_db->query_firstrow($sql);

  $sum = (isset($row['sum'])) ? $row['sum'] : 0;
  $total_hits = $row['sum'];
  $lang_total_hits = $lang['total_hits'];
 
  $site_template->register_vars("total_hits", $total_hits);
  $site_template->register_vars("lang_total_hits", $lang_total_hits);
  unset($total_hits);
  unset($lang_total_hits);

//-----------------------------------------------------
//--- Downloads ---------------------------------------
//-----------------------------------------------------
  $sql = "SELECT SUM(image_downloads) AS sum
          FROM ".IMAGES_TABLE;
  $row = $site_db->query_firstrow($sql);

  $sum = (isset($row['sum'])) ? $row['sum'] : 0;
  $total_downloads = $row['sum'];
  $lang_total_downloads = $lang['total_downloads'];
 
  $site_template->register_vars("total_downloads", $total_downloads);
  $site_template->register_vars("lang_total_downloads", $lang_total_downloads);
  unset($total_downloads);
  unset($lang_total_downloads);

//-----------------------------------------------------
//--- Comments ----------------------------------------
//-----------------------------------------------------
  $sql = "SELECT SUM(image_comments) AS sum
          FROM ".IMAGES_TABLE;
  $row = $site_db->query_firstrow($sql);

  $sum = (isset($row['sum'])) ? $row['sum'] : 0;
  $total_comments = $row['sum'];
  $lang_total_comments = $lang['total_comments'];
 
  $site_template->register_vars("total_comments", $total_comments);
  $site_template->register_vars("lang_total_comments", $lang_total_comments);
  unset($total_comments);
  unset($lang_total_comments);

  $lang_total_images = $lang['total_images'];
  $site_template->register_vars("lang_total_images", $lang_total_images);
  unset($lang_total_comments);
  $lang_total_categories = $lang['total_categories'];
  $site_template->register_vars("lang_total_categories", $lang_total_categories);
  unset($lang_total_categories);

//-----------------------------------------------------
//--- Templates ---------------------------------------
//-----------------------------------------------------
  $stats = $site_template->parse_template("stats_box");
  $site_template->register_vars("stats", $stats);
  unset($stats);
?>

2. Sprachdatei ergänzen - .../lang/xxx/main.php:
Code: [Select]
//-----------------------------------------------------
//--- Statistics --------------------------------------
//-----------------------------------------------------
$lang['total_images']          = "Bilder:";
$lang['total_categories']      = "Kategorien:";
$lang['users']                 = "Mitglieder:";
$lang['total_hits']            = "Hits:";
$lang['total_votes']           = "Votes:";
$lang['total_downloads']       = "Downloads:";
$lang['total_comments']        = "Kommentare:";

$lang['today_new_users']       = "heute:";
$lang['yesterday_new_users']   = "gestern:";
$lang['this_week_new_users']   = "diese Woche:";
$lang['last_week_new_users']   = "letzte Woche:";
$lang['this_month_new_users']  = "diesen Monat:";
$lang['last_month_new_users']  = "letzten Monat:";
$lang['since_begin_new_users'] = "seit Anfang:";
                                                                 
$lang['today_new_votes']       = $lang['today_new_users'];      
$lang['yesterday_new_votes']   = $lang['yesterday_new_users'];  
$lang['this_week_new_votes']   = $lang['this_week_new_users'];
$lang['last_week_new_votes']   = $lang['last_week_new_users'];
$lang['this_month_new_votes']  = $lang['this_month_new_users'];
$lang['last_month_new_votes']  = $lang['last_month_new_users'];
$lang['since_begin_new_votes'] = $lang['since_begin_new_users'];

für die beiden enthaltenen Beispiele sind hier noch keine Einträge vorhanden...
 3. .../templates/xxx/style.css ergänzen:
Code: [Select]
.head3 {

  background-color: #e1e1e1;

  color: #ffffff;

  font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif;

  font-size: 11px;

  font-weight: bold;

}

4. Templates erstellen - hier: .../templates/xxx/stats_box.html
Code: [Select]
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td class="head2" height="20" align="center">S i t e - S t a t i s t i k</td>
  </tr>
  <tr>
    <td class="head3" height="20" align="center">Gesamt-Statistik</td>
  </tr>
  <tr>
    <td class="row2">
      <table width="100%" border="0">
        <tr class="row1">
          <td align="left" width=60%>
            {lang_total_images}<br>
            {lang_total_categories}<br>
            {lang_total_users}<br>
            {lang_total_hits}<br>
            {lang_total_downloads}
            {lang_total_votes}<br>
            {lang_total_comments}<br>
          </td>
          <td align="right" width="40%">
            <B>{total_images}</B><br>
            <B>{total_categories}</B><br>
            <B>{total_users}</B><br>
            <B>{total_hits}</B><br>
            <B>{total_downloads}</B><br>
            <B>{total_votes}</B><br>
            <B>{total_comments}</B><br>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td class="head3" height="20" align="center">neue Mitglieder</td>
  </tr>
  <tr>
    <td class="row2">
      <table width="100%" border="0">
        <tr class="row1">
          <td align="left" width=60%>
            {lang_today_new_users}<br>
            {lang_yesterday_new_users}<br>
            {lang_this_week_new_users}<br>
            {lang_last_week_new_users}<br>
            {lang_this_month_new_users}<br>
            {lang_last_month_new_users}<br>
            {lang_since_begin_new_users}<br>
          </td>
          <td align="right" width="40%">
            <B>{today_new_users}</B><br>
            <B>{yesterday_new_users}</B><br>
            <B>{this_week_new_users}</B><br>
            <B>{last_week_new_users}</B><br>
            <B>{this_month_new_users}</B><br>
            <B>{last_month_new_users}</B><br>
            <B>{total_users}</B><br>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td class="head3" height="20" align="center">neue Stimmen</td>
  </tr>
  <tr>
    <td class="row2">
      <table width="100%" border="0">
        <tr class="row1">
          <td align="left" width=60%>
            {lang_today_new_votes}<br>
            {lang_yesterday_new_votes}<br>
            {lang_this_week_new_votes}<br>
<!--
            {lang_last_week_new_votes}<br>
            {lang_this_month_new_votes}<br>
            {lang_last_month_new_votes}<br>
-->
            {lang_since_begin_new_votes}<br>
          </td>
          <td align="right" width="40%">
            <B>{today_new_votes}</B><br>
            <B>{yesterday_new_votes}</B><br>
            <B>{this_week_new_votes}</B><br>
<!--
            <B>{last_week_new_votes}</B><br>
            <B>{this_month_new_votes}</B><br>
            <B>{last_month_new_votes}</B><br>
-->
            <B>{total_votes}</B><br>
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
</table>

5.Eintrag {stats} an beliebiger Position in einem Haupt-Template platzieren - hier als Bsp. in .../template/xxx/home.html
Code: [Select]
...
<!--rechts-->
 {if random_image}
                  <table width="100%" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td class="head2" height="20" align="center"> <img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_random_image}</td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                    <tr>
                      <td align="center" class="row1">
   <br />
                        {random_image}
<br />
                        <br />
                      </td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                  </table>
 {endif random_image}
 {potd_image}
                  {stats}
<!--rechts Ende-->
...


Wie schon oben gesagt, werde ich das ganze weiter ausbauen. Es wird weitere Auswertungen für Kommentare, Downloads, Postcards und evtl. auch Hits geben. Die in der stats.php enthaltenen Funktionen werden zukünftig evtl. in die functions.php oder eine functions-stats.php ausgelagert.

Viel Spaß!  :)
effemmess

PS: wenn ihr die erweiterten Voraussetzungen nicht erfüllt, müsst ihr natürlich einige Funktionalitäten aus der stats.php entfernen!!! Man sollte aber leicht erkennen, was dort raus muß... :wink:

V1.0
- first release
V1.1
- bug fixed date(w)
Title: Re: [MOD]More than more statistics
Post by: glitzer on March 20, 2005, 10:47:57 PM
Can somebody help me, i get always the fault:

Code: [Select]
DB Error: Bad SQL Query: SELECT count(*) AS votes FROM VOTED_TABLE
Table 'xxxx.VOTED_TABLE' doesn't exist

DB Error: Bad SQL Query: SELECT count(*) AS votes FROM VOTED_TABLE WHERE vote_date >= 1111273200
Table 'xxxxx.VOTED_TABLE' doesn't exist

DB Error: Bad SQL Query: SELECT count(*) AS votes FROM VOTED_TABLE WHERE vote_date >= 1111186800 AND vote_date <= 1111273200
Table 'xxxx.VOTED_TABLE' doesn't exist

DB Error: Bad SQL Query: SELECT count(*) AS votes FROM VOTED_TABLE WHERE vote_date >= 1110754800
Table 'xxxx.VOTED_TABLE' doesn't exist

DB Error: Bad SQL Query: SELECT count(*) AS votes FROM VOTED_TABLE WHERE vote_date >= 1110150000 AND vote_date <= 1110754800
Table 'xxxx.VOTED_TABLE' doesn't exist

DB Error: Bad SQL Query: SELECT count(*) AS votes FROM VOTED_TABLE WHERE vote_date >= 1109631600
Table 'xxxxx.VOTED_TABLE' doesn't exist

DB Error: Bad SQL Query: SELECT count(*) AS votes FROM VOTED_TABLE WHERE vote_date >= 1107212400 AND vote_date <= 1109631600
Table 'xxxxx.VOTED_TABLE' doesn't exist

DB Error: Bad SQL Query: SELECT count(*) AS votes FROM VOTED_TABLE WHERE user_id >= 18 AND user_id <= 18
Table 'xxx.VOTED_TABLE' doesn't exist

I think i have to make a mysql table ..but i don´t how i do this.

Thanx a lot.

P.s xxx i make for my pagename
Title: Re: [MOD]More than more statistics
Post by: Bilal on March 26, 2005, 07:30:18 AM
Can someone post the whole thing in english  :oops: I don't know german!  :(
Title: Re: [MOD]More than more statistics
Post by: gwaggli on March 30, 2005, 11:09:40 AM
Hallo

Ich habe alles gemacht wie oben beschrieben. Habe auch alle Erweiterungen neu installiert. Dennoch erscheint mir keine Statistik :(

Unter http://foto.cini.ch kann man mein Album ansehen. Unter dem Zufallsbild, sollte die Statistik erscheinen, aber es erscheint nur ein dünner kaum erkennbarer Strich.

Ich bitte um Hilfe

Greets gwaggli
Title: Re: [MOD]More than more statistics
Post by: ascanio on April 05, 2005, 08:08:07 AM
Here is the modification in /lang/main.php in spanish:

Code: [Select]
//-----------------------------------------------------
//--- Statistics --------------------------------------
//-----------------------------------------------------
$lang['total_images']          = "Total fotos::";
$lang['total_categories']      = "Categorías:";
$lang['users']                 = "Usuarios registrados:";
$lang['total_hits']            = "Impactos:";
$lang['total_votes']           = "Votos:";
$lang['total_downloads']       = "Descargas:";
$lang['total_comments']        = "Comentarios:";

$lang['today_new_users']       = "Hoy";
$lang['yesterday_new_users']   = "Ayer";
$lang['this_week_new_users']   = "Esta semana:";
$lang['last_week_new_users']   = "La semana pasada:";
$lang['this_month_new_users']  = "Este mes:";
$lang['last_month_new_users']  = "Mes pasado";
$lang['since_begin_new_users'] = "Nuevos Usuarios";
                                                                 
$lang['today_new_votes']       = $lang['today_new_users'];     
$lang['yesterday_new_votes']   = $lang['yesterday_new_users']; 
$lang['this_week_new_votes']   = $lang['this_week_new_users'];
$lang['last_week_new_votes']   = $lang['last_week_new_users'];
$lang['this_month_new_votes']  = $lang['this_month_new_users'];
$lang['last_month_new_votes']  = $lang['last_month_new_users'];
$lang['since_begin_new_votes'] = $lang['since_begin_new_users'];
Title: Re: [MOD]More than more statistics
Post by: ascanio on April 05, 2005, 07:44:21 PM
Hi i have installed this Mod and it does work but this part does not
Code: [Select]
<B>{today_new_votes}</B><br>
           <B>{yesterday_new_votes}</B><br>
           <B>{this_week_new_votes}</B><br>
<!--
           <B>{last_week_new_votes}</B><br>
           <B>{this_month_new_votes}</B><br>
           <B>{last_month_new_votes}</B><br>
Title: Re: [MOD]More than more statistics
Post by: martrix on April 05, 2005, 08:34:24 PM
And did you install also these mods:

Mindestvoraussetzungen:
- 4images 1.7  :wink:
erweiterte Voraussetzungen (nicht zwingend erforderlich aber sehr hilfreich!):
- v@no´s Votes saved in DB (http://www.4homepages.de/forum/viewtopic.php?t=6123)
- effemmess´s Extension for Votes saved in DB (http://www.4homepages.de/forum/viewtopic.php?t=6404)
- effemmess´s Old votes 2 DB
 (http://www.4homepages.de/forum/viewtopic.php?t=6405)

 :?:

as long as you won't save the votes in you DB (first mod), you won't be able to get statistics about votes...
and
as long as you won't save the vote-date (second mod), you won't be able to get statistics about the time of voting...
Title: Re: [MOD]More than more statistics
Post by: ascanio on April 05, 2005, 09:33:40 PM
thanks for replay I installed them I think i don't understand german i did what i could i just upload them to the plugign folder an execute them is that what i have to do?
Title: Re: [MOD]More than more statistics
Post by: martrix on April 05, 2005, 09:49:30 PM
OK, if you did install the mods, then everything should work fine...

but only if there are already data for the needed statistics ;)
that means - if there's no data for the stats, you can't have any stats  8O

If you don't have any votes where the vote_date is saved, you won't get any statistic-output.

Is that right?
Title: Re: [MOD]More than more statistics
Post by: ascanio on April 05, 2005, 11:35:21 PM
ok thanks!!! I was confused but in these statistic are the any that shows that hits per dya per week and per month?
Title: Re: [MOD]More than more statistics
Post by: tikle on April 16, 2005, 12:55:31 AM
im use phpBB

can you halp me?

Quote
DB Error: Bad SQL Query: SELECT COUNT(*) as users FROM phpbb_users WHERE user_id <> -1 AND user_joindate >= 1113602400
Unknown column 'user_joindate' in 'where clause'

DB Error: Bad SQL Query: SELECT COUNT(*) as users FROM phpbb_users WHERE user_id <> -1 AND user_joindate >= 1113516000 AND user_joindate <= 1113602400
Unknown column 'user_joindate' in 'where clause'

DB Error: Bad SQL Query: SELECT COUNT(*) as users FROM phpbb_users WHERE user_id <> -1 AND user_joindate >= 1113170400
Unknown column 'user_joindate' in 'where clause'

DB Error: Bad SQL Query: SELECT COUNT(*) as users FROM phpbb_users WHERE user_id <> -1 AND user_joindate >= 1112565600 AND user_joindate <= 1113170400
Unknown column 'user_joindate' in 'where clause'

DB Error: Bad SQL Query: SELECT COUNT(*) as users FROM phpbb_users WHERE user_id <> -1 AND user_joindate >= 1112306400
Unknown column 'user_joindate' in 'where clause'

DB Error: Bad SQL Query: SELECT COUNT(*) as users FROM phpbb_users WHERE user_id <> -1 AND user_joindate >= 1109631600 AND user_joindate <= 1112306400
Unknown column 'user_joindate' in 'where clause'
Title: Re: [MOD]More than more statistics
Post by: police22 on April 26, 2005, 05:56:13 PM
on this MORE THAN MORE STATS, these 2 commands will not show up while in the template stats_box.html
{total_images}
{total_categories}
but I can put them in the, say home.html, it works.. why is that. something need to be changed in the function.php or something

I do have version 1.7.1 but I think did the same thing in 1.7 but not for sure..

Thanks for the help.
Title: Re: [MOD]More than more statistics
Post by: V@no on April 27, 2005, 12:09:06 AM
My german is poor..gee..my german is none...so, I belive that's happening if u include stats.php inside functions.php file, but it should work if u include it from page_header.php instead (should be at the end of page_header.php) or if u included after page_header.php included...(how many times I repeaded word "include"? sounds like a broken record :?)
Title: Re: [MOD]More than more statistics
Post by: police22 on April 27, 2005, 01:05:08 AM
My german is poor..gee..my german is none...so, I belive that's happening if u include stats.php inside functions.php file, but it should work if u include it from page_header.php instead (should be at the end of page_header.php) or if u included after page_header.php included...(how many times I repeaded word "include"? sounds like a broken record :?)

Ok.. um.. WHAT?  :lol:
that i see nothing goes in to funtions.php.. so not for sure what you mean there. but.. why would the directions i have for this code that goes in the stats.php is totaly different now. i have tried both of them but nothing.. finally got my votes to work right.. guess after 1.7.1 upgrade or something it quit as it was working before.. but that is neither here nor there, I dont know.. i am totally confusing myself now..  :cry:  :roll:
Title: Re: [MOD]More than more statistics
Post by: pierse on May 25, 2005, 11:16:41 AM
I cant get this to work either.  :(
Title: Re: [MOD]More than more statistics
Post by: pierse on May 28, 2005, 06:17:09 PM
I finally got it to work... however, I have messed something up and I can not find where the correct code is...

The code I removed and cant find were I messed it up from is the code for total images & total categories. I realize this is really dumb... but please forgive me.. I'm learning ;)
Title: Re: [MOD]More than more statistics
Post by: waleed on May 28, 2005, 08:58:38 PM
when i try to run  old_votes2db.php - change_voted_a_install.php got this error
Warning: main(./../admin/admin_global.php): failed to open stream: No such file or directory in /usr/home/maghna/www/old_votes2db.php on line 8

Fatal error: main(): Failed opening required './../admin/admin_global.php' (include_path='.:') in /usr/home/maghna/www/old_votes2db.php on line 8
  any idea ?
Title: Re: [MOD]More than more statistics
Post by: bikoo on May 29, 2005, 12:01:01 PM
thnx aloot gr8 job
its work wiz me 100%
Title: Re: [MOD]More than more statistics
Post by: pierse on June 13, 2005, 02:47:51 PM

The code I removed and cant find were I messed it up from is the code for total images & total categories. I realize this is really dumb... but please forgive me.. I'm learning ;)

Please help.  Thanks.
Title: Re: [MOD]More than more statistics
Post by: V@no on June 13, 2005, 03:11:14 PM
Do u use more then one language on your gallery? if no, then add the missing words directly into the template.
Title: Re: [MOD]More than more statistics
Post by: dosensteck on June 13, 2005, 11:18:14 PM
Can somebody help me, i get always the fault:

Code: [Select]
DB Error: Bad SQL Query: SELECT count(*) AS votes FROM VOTED_TABLE
Table 'xxxx.VOTED_TABLE' doesn't exist

DB Error: Bad SQL Query: SELECT count(*) AS votes FROM VOTED_TABLE WHERE vote_date >= 1111273200
Table 'xxxxx.VOTED_TABLE' doesn't exist

DB Error: Bad SQL Query: SELECT count(*) AS votes FROM VOTED_TABLE WHERE vote_date >= 1111186800 AND vote_date <= 1111273200
Table 'xxxx.VOTED_TABLE' doesn't exist

DB Error: Bad SQL Query: SELECT count(*) AS votes FROM VOTED_TABLE WHERE vote_date >= 1110754800
Table 'xxxx.VOTED_TABLE' doesn't exist

DB Error: Bad SQL Query: SELECT count(*) AS votes FROM VOTED_TABLE WHERE vote_date >= 1110150000 AND vote_date <= 1110754800
Table 'xxxx.VOTED_TABLE' doesn't exist

DB Error: Bad SQL Query: SELECT count(*) AS votes FROM VOTED_TABLE WHERE vote_date >= 1109631600
Table 'xxxxx.VOTED_TABLE' doesn't exist

DB Error: Bad SQL Query: SELECT count(*) AS votes FROM VOTED_TABLE WHERE vote_date >= 1107212400 AND vote_date <= 1109631600
Table 'xxxxx.VOTED_TABLE' doesn't exist

DB Error: Bad SQL Query: SELECT count(*) AS votes FROM VOTED_TABLE WHERE user_id >= 18 AND user_id <= 18
Table 'xxx.VOTED_TABLE' doesn't exist

I think i have to make a mysql table ..but i don´t how i do this.

Thanx a lot.

P.s xxx i make for my pagename


hy

search this:
Code: [Select]
function num_users($from=0,$to=0,$field="user_joindate"){

an replace with:
Code: [Select]
function num_users($from=0,$to=0,$field="user_regdate"){

@effemmess: danke für den mod, funktioniert wunderbar (bis auf die eine änderung - das is aber nur wegen phpbb so)  hoffe da kommt noch viel mehr :)
Title: Re: [MOD]More than more statistics
Post by: pierse on June 14, 2005, 11:57:16 PM
Do u use more then one language on your gallery? if no, then add the missing words directly into the template.

I got it to work.  The stats.php was being called before the page_header.php there were no numbers for the variables. I moved the page_header.php up in the process. 

Thanks.
Title: Re: [MOD]More than more statistics
Post by: Michael on July 16, 2005, 11:48:10 AM
Hallo, ein großartiger Mod der "fast" auf Anhieb sofort funktioniert  :)

Ein Problem habe ich nun aber, die "Neuen Stimmen" bleiben bei mir auf 0 stehen, vermisse ich da einen Eintrag in der DB ??

Gruß, Michael
Title: Re: [MOD]More than more statistics
Post by: Michael on July 16, 2005, 12:18:55 PM
habe nun das [Plugin] Old votes 2 DB installiert und die Einträge sind da, ist es normal das man mir unter Neue Stimmen "heute" 6102 Einträge anzeigt ???
Außerdem werden die neuen Bewertungen nicht mitgezählt  :roll:
Title: Re: [MOD]More than more statistics
Post by: TomYork on July 22, 2005, 02:49:45 AM
on this MORE THAN MORE STATS, these 2 commands will not show up while in the template stats_box.html
{total_images}
{total_categories}
but I can put them in the, say home.html, it works.. why is that. something need to be changed in the function.php or something

I do have version 1.7.1 but I think did the same thing in 1.7 but not for sure..

Thanks for the help.



I have the same error...

{total_images}
{total_categories}


These variables don't show on the stats of my gallery...


Please, help me!
Title: Re: [MOD]More than more statistics
Post by: TomYork on July 27, 2005, 02:58:02 AM
help please :(
Title: Re: [MOD]More than more statistics
Post by: Rookie79 on July 30, 2005, 02:15:54 PM
Ich habe alles wie beschrieben ohne eine Fehlermeldung installiert aber ich habe überhaupt keine Statistik Anzeige !?

Warum?

4images 1.7.1

broken english

i've installed everything without any error but nothing happend!?

Why?

thanx
Title: Re: [MOD]More than more statistics
Post by: Rookie79 on July 30, 2005, 05:16:06 PM
Ich habs gefunden

http://www.4homepages.de/forum/index.php?topic=7901.0

unter "Including the statistics in Index.php:"

aber nun habe ich das gleiche Problem wie "Busologo"

i try it in english

look at the topic to solve the problem

but now {total_images} and {total_categories} fail
Title: Re: [MOD]More than more statistics
Post by: Silentclaw on August 01, 2005, 11:04:45 AM
Mod funktioniert mit kleinen Einschränkungen  :(
Installation hat wunderbar funktioniert daher erst mal großes Lob.  :D
Hab aber das gleiche Problem wie meine Vorredener.
Keine Anzeige der Bilder und der Kategorien.  :(

Danke für Eure Hilfe
Title: Re: [MOD]More than more statistics
Post by: bunelul on November 22, 2005, 01:22:53 AM

...
Mindestvoraussetzungen:
- 4images 1.7  :wink:
...

Hello

I can`t understand: IS this mod working with version 1.7.1 or isn`t.
Help me, please.

Thanks.
Title: Re: [MOD]More than more statistics
Post by: Darkness2001 on November 30, 2005, 08:32:11 PM
Hallo,

habe auch wie oben das Problem, dass Bilder und Kategorien nicht angezeit werden ?

Komischer WEISE wenn ich auf Kontrollcenter Klicke, dann sehe ich Sie .

Wo liegt der Fehler ?

Grüße Darkness  :mrgreen:

The problem in english:

I have the MOD install, it works (fast) fine.

My problem is, the {total_images} and the {total_categories} see I not in the home.html and many other sites (The code include (ROOT_PATH.'includes/stats.php'); is in all sites!). The secound statistik can I see now under memberedit_profil.html.

Whats wrong ?

Greez Darkness  :twisted:
Title: Re: [MOD]More than more statistics
Post by: Fastian on January 15, 2006, 04:03:52 PM
I tried everything that i could think of  (with  my limited knowledge)

But I cant seem to show
{total_images}
{total_categories}
Using this mod.

The default one from Home.html show up nicely.

Can some one translate this in english ?
Quote
Wie schon oben gesagt, werde ich das ganze weiter ausbauen. Es wird weitere Auswertungen für Kommentare, Downloads, Postcards und evtl. auch Hits geben. Die in der stats.php enthaltenen Funktionen werden zukünftig evtl. in die functions.php oder eine functions-stats.php ausgelagert.

Viel Spaß!   
effemmess

PS: wenn ihr die erweiterten Voraussetzungen nicht erfüllt, müsst ihr natürlich einige Funktionalitäten aus der stats.php entfernen!!! Man sollte aber leicht erkennen, was dort raus muß...

Help please
Title: Re: [MOD]More than more statistics
Post by: Darkness2001 on January 15, 2006, 05:18:32 PM
Hello,

I had had also this error.
You must place line:

require(ROOT_PATH.'includes/stats.php');

under this line:

include(ROOT_PATH.'includes/page_header.php');

set, then it folds marvelously.

Greet Darkness  :mrgreen:

I have also for a long time tried out to I the rausgefunden had. On some sides the line sits "page_header.php" somewhat more deeply, must search.
Title: Re: [MOD]More than more statistics
Post by: ktwenrick on March 12, 2006, 12:38:15 AM
english please?
Title: Re: [MOD]More than more statistics
Post by: Arro on March 12, 2006, 09:35:18 AM
Hi,
ich habe den Statistik Mod auch eingebaut und folgenden Fehler erhalten (s.Bild)
(http://www.camperboard.de/4imagesfehler.jpg)

Dabei muß ich sagen, dass 4images in das WBB eingebunden ist und ich schon joindate in regdate geändert habe.
Was mich wundert ist, dass er -1 als userid angibt, diese userid gibt es nicht.
Der Fehler muß also im Bereich:

Code: [Select]
$sql = "SELECT COUNT(*) as users
         FROM ".USERS_TABLE."
         WHERE user_id <> ".GUEST.$sql_where.sql_add($from,$to,$field);
 $row = $site_db->query_firstrow($sql);
 $num_users = $row['users'];
 return $num_users;

liegen.
Es wäre super, wenn jemand helfen könnte
Gruß Arro
Title: Re: [MOD]More than more statistics
Post by: IcEcReaM on March 12, 2006, 06:55:03 PM
Nutz meinen Statistik Mod, der ist voll 4images kompatibel vom Code her,
und läuft auch mit einer nicht standardgemässen 4images Version was die Usertabellen angeht.
Title: Re: [MOD]More than more statistics
Post by: Arro on March 14, 2006, 06:30:23 AM
Hi Icecream,
ich hatte mir natürlich deinen Mod auch angesehen, fand aber die Idee, dass die Statistik nur das Wesentliche anzeigt und das auf der Hauptseite so klasse an dem Mod.
Deine Statistik zeigt zwar alles an, aber sorry das ist mir schon zu viel, da werden die User zugeschüttet und können je nachdem mit den ganzen Werten nichts anfangen.
Ausserdem setzt dein Mod einige Mods vorraus, die ich gar nicht einbauen wollte.
Gruß Arro
Title: Re: [MOD]More than more statistics
Post by: IcEcReaM on March 14, 2006, 05:22:34 PM
Na gut, will dich zu nichts überreden.
Nur noch kurz eine Sache zu meinem Mod falls das falsch rübergekommen ist.
Man kann alle Optionen in der Config auch ausschalten,
dann werden die gar nicht abgefragt (spart Querys) und auch nicht angezeigt.
Die zusätzlichen Mods sind keine Vorraussetzung nur eine Option.

Meiner Meinung nach, sind Anzeigen auf der Startseite (die ja sehr häufig aufgerufen wird),
immer so eine Sache, da sie wenn sie nicht ordentlich gecodet sind, ne Menge Querys (Abfragen) erzeugen,
dann wundert es mich manchmal nicht, dass Leute über Performance meckern,
wenn auf der Startseite schon 40-50 Querys erzeugt werden (zum Vergleich ein gutes Board erzeugt MAX. 10-20 Querys, wobei gute Boards teilweise unter 10 Querys schon bleiben).

Wenn du diesen Mod kompatibel machen willst,
musst du leider so einige Querys hier ändern, da (leider) bei den meisten Mods einfach von einer Standard 4images Struktur ausgegangen wird.
Was du z.b. machen kannst, ist:
Code: [Select]
WHERE user_idersetzen durch
Code: [Select]
WHERE ".get_user_table_field("","user_id")."
allerdings sind da bestimmt noch einige andere nicht standardkonforme Werte,
die da abgefragt werden.
Title: Re: [MOD]More than more statistics
Post by: Arro on March 14, 2006, 05:46:11 PM
Meiner Meinung nach, sind Anzeigen auf der Startseite (die ja sehr häufig aufgerufen wird),
immer so eine Sache, da sie wenn sie nicht ordentlich gecodet sind, ne Menge Querys (Abfragen) erzeugen,
dann wundert es mich manchmal nicht, dass Leute über Performance meckern,
wenn auf der Startseite schon 40-50 Querys erzeugt werden (zum Vergleich ein gutes Board erzeugt MAX. 10-20 Querys, wobei gute Boards teilweise unter 10 Querys schon bleiben).

Wenn du diesen Mod kompatibel machen willst,
musst du leider so einige Querys hier ändern, da (leider) bei den meisten Mods einfach von einer Standard 4images Struktur ausgegangen wird.
Was du z.b. machen kannst, ist:
Code: [Select]
WHERE user_idersetzen durch
Code: [Select]
WHERE ".get_user_table_field("","user_id")."
allerdings sind da bestimmt noch einige andere nicht standardkonforme Werte,
die da abgefragt werden.
Hallo IceCream,
du hast völlig Recht mit deiner Aussage und die hat was, ich wollte hier auch keinenfalls deinen Mod schlechtreden ich wäre froh wenn ich zu so etwas überhaupt in der Lage wäre.
Ich fand es halt nur informativ, das ganze auf der Startseite (als kleine Info) zu haben.
Ich werde jetzt mal deinen Lösungsansatz ausprobieren und vielen Dank dafür
Gruß Arro
Title: Re: [MOD]More than more statistics
Post by: Arro on March 14, 2006, 05:48:50 PM
Noch ein kleiner Nachtrag:
Das war es Icecream, damit wird es angezeigt, ich bin dir sehr dankbar.
Gruß Arro
Title: Re: [MOD]More than more statistics
Post by: Fastian on July 02, 2006, 10:59:29 PM
Its been a long time I have added this mod. Few days back, I found out that the total number of votes shown by this mod are different than the no. of votes I currently have.

If you see Top Wallpapers (top.php) you will clearly see that the number of votes are more than 28 shown by this mod.
BestofWallpapers.Com (http://www.bestofwallpapers.com)

Its not a big problem but I will like to know what is the problem?
At least tell me where to start digging ? 
Title: Re: [MOD]More than more statistics
Post by: Fastian on July 04, 2006, 10:17:11 PM
Its been a long time I have added this mod. Few days back, I found out that the total number of votes shown by this mod are different than the no. of votes I currently have.

If you see Top Wallpapers (top.php) you will clearly see that the number of votes are more than 28 shown by this mod.
BestofWallpapers.Com (http://www.bestofwallpapers.com)

Its not a big problem but I will like to know what is the problem?
At least tell me where to start digging ? 


Anyone ?? Should I just ignore it ??
Title: Re: [MOD]More than more statistics
Post by: wh-em on October 21, 2006, 08:32:29 AM
hi evrey one


how I can make it work on V1.7.3

??



i have this err

An unexpected error occured. Please try again later.



pleeez help
Title: Re: [MOD]More than more statistics
Post by: {{DELIKANLIM}} on January 25, 2007, 08:48:38 PM
Die Version A habe ich installiert und es funktioniert alles, außer die DB Votes. Da steht jetzt allerdings "An unexpected error occured. Please try again later." Vorher stand aber, dass es Probleme mit der Datenbank gibt.
Hier ist die Adresse:
http://www.delikanlim.net/galery/

Könnten Sie mir bitte helfen?
Ich danke im Vorraus.
Title: Re: [MOD]More than more statistics
Post by: Fastian on January 28, 2007, 08:18:39 PM
I have just tried on a new installation and looks like this mod is working just fine with v 1.7.4.
So i thought to let you guys know. :)
Thanks for the mode.
Title: Re: [MOD]More than more statistics
Post by: Hallo2007 on June 18, 2007, 11:18:47 PM
Hi, hab grad alles nach Anleitung gemacht, leider kommt bei mir keine Statistik. Die Mods habe ich nicht installiert, da dort steht nicht zwingend notwendig. Was genau könnte der Fehler sein?
Title: Re: [MOD]More than more statistics
Post by: mawenzi on June 18, 2007, 11:29:29 PM
... hab grad alles nach Anleitung gemacht ...

... offensichtlich nicht, denn sonst würde es funktionieren ...
... und ohne URL um sich dein Problem mal anzusehen (bei der mageren Problembeschreibung) geht es halt nicht ... ;)
Title: Re: [MOD]More than more statistics
Post by: Fragezeichen on June 20, 2007, 07:28:52 PM
i also have installed both mods bevor,but when i insert the statistic i just can see the random image on a second place, nothing more.
im using 4images 1.7.4
Title: Re: [MOD]More than more statistics
Post by: AntiNSA2 on June 30, 2007, 05:22:27 AM
Hello,

I had had also this error.
You must place line:

require(ROOT_PATH.'includes/stats.php');

under this line:

include(ROOT_PATH.'includes/page_header.php');

set, then it folds marvelously.

Greet Darkness  :mrgreen:

I have also for a long time tried out to I the rausgefunden had. On some sides the line sits "page_header.php" somewhat more deeply, must search.


I know I should know this... but which file must we put this code in? I have been away from 4images for more than a year and have forgotten...

Thanks--

Robert
Title: Re: [MOD]More than more statistics
Post by: mawenzi on June 30, 2007, 12:25:27 PM
@Robert aka AntiNSA2

... you must put this code in every page (php-file) you want to show the statistics ...
Title: Re: [MOD]More than more statistics
Post by: michl on July 27, 2007, 08:57:50 AM
Hi,

I'm new to this, but i had the same problem with Users and Categories. I had to add

include(ROOT_PATH.'includes/page_header.php');

in

includes/stats.php

Now it works great!

Michl
Title: Re: [MOD]More than more statistics
Post by: d1eter on September 12, 2008, 06:33:58 AM
sadly..,
I can't get it to work in 1.7.6 version...

doesnt' show anything at all.

 :cry:
Title: Re: [MOD]More than more statistics
Post by: mawenzi on September 12, 2008, 11:59:28 AM
sadly..,

... yes ... no link, no url, no error messages, no infos at all ...
... so there is no way for help ...
Title: Re: [MOD]More than more statistics
Post by: ashfaq on January 10, 2009, 05:30:45 PM
Will anyone plz translate it to english as i have use google translator but some codes text is in other language so if you plz help..
Title: Re: [MOD]More than more statistics
Post by: ashfaq on January 21, 2009, 03:21:11 PM
Will anyone plz share english version of this mod ?
Title: Re: [MOD]More than more statistics
Post by: mawenzi on January 21, 2009, 03:43:25 PM
@ ashfaq

... for mod translation use this : Google-Translation (http://translate.google.com/translate?u=http%3A%2F%2Fwww.4homepages.de%2Fforum%2Findex.php%3Ftopic%3D6484.0&sl=de&tl=en&hl=de&ie=UTF-8) ...
... and for code-translation in step 2 use this : ...
Code: [Select]
//------------------------------------------------ -----
//--- Statistics --------------------------------------
//------------------------------------------------ -----
$lang ['total_images'] = "Images:";
$lang ['total_categories'] = "Category:";
$lang ['users'] = "Members:";
$lang ['total_hits'] = "Hits:";
$lang ['total_votes'] = "Votes:";
$lang ['total_downloads'] = "Downloads:";
$lang ['total_comments'] = "Comments:";

$lang ['today_new_users'] ="Today:";
$lang ['yesterday_new_users'] = "Yesterday:";
$lang ['this_week_new_users'] = "This Week";
$lang ['last_week_new_users'] = "Last Week:";
$lang ['this_month_new_users'] = "This Month:";
$lang ['last_month_new_users'] = "Last Month:";
$lang ['since_begin_new_users'] = "Since Beginning:";

PS. ... google translation is a very fine tool ... ;)
Title: Re: [MOD]More than more statistics
Post by: ashfaq on February 03, 2009, 08:44:44 AM
Na this mod is not working for me but only show ... then random image and again ... but nothing else, i dont know when i did everything right then why its not showing statistics ? i did the following steps...

1: First i make a new page by given code and name it : stats.php
2: For second step i add given code in lang/english/main.php at page end before ?>
3: At third step i add css code in my template style.css at page end
4: For Forth step i make a new file named stats_box.html  and put this file in my templates folder
5: Put this given code at my template home.html

So you see everything is ok then why its not showing stats ?

Plz notice that i didnt installed these codes that author mentioned.
Quote
- V @ no's Votes saved in DB
- effemmess´s Extension for Votes saved in DB - Extension for effemmess's Votes saved in DB
- effemmess´s Old votes 2 DB - Old effemmess's votes 2 DB
Title: Re: [MOD]More than more statistics
Post by: AntiNSA2 on March 01, 2009, 10:34:55 AM
I can only find one of the two mods here on the forum... is this mod still alive? where can I find the mods that need to be installed ? I tried the search already.....
Title: Re: [MOD]More than more statistics
Post by: AntiNSA2 on March 06, 2009, 03:29:58 AM
Mindestvoraussetzungen:
- 4images 1.7  Wink
erweiterte Voraussetzungen (nicht zwingend erforderlich aber sehr hilfreich!):

- v@no´s Votes saved in DB
This is here:
http://www.4homepages.de/forum/index.php?topic=6123.0


- effemmess´s Extension for Votes saved in DB
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Where is this mod????
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- effemmess´s Old votes 2 DB
this is here:
http://www.4homepages.de/forum/index.php?topic=6405.new#new



Thanks-
Title: [MOD] Advanced Statistik - without Vote-Stats / Erweiterte Statistik - Ohne Vote
Post by: Benny Change on October 15, 2009, 02:07:04 AM
Changelog:

:flag-de:
Hallo,
diese Mod basiert auf einen fertigen Code aus einem Arabischen Thread. Ich habe diesen nur etwas erweitert und an die Version 1.7.7 angepasst.

:flag-en:(Google Translate)
Hello,
This mod is based on a warrant from a code Arabian thread. I did this just to the expanded and adapted version 1.7.7.

Step 1

Open / Öffne: index.php
Search / Suche:
else {
  $template = "";
}
include(ROOT_PATH.'includes/page_header.php');
Add after / füge darunter:
include(ROOT_PATH.'includes/stats.php');

Step 2

Open / Öffne: lang/YOUR-LANGUAGE/main.php
Add the End of File -above- / Füge am Ende der Datei -vor-
?>
This / Das ein
:flag-de:
//-----------------------------------------------------
//--- Statistics --------------------------------------
//-----------------------------------------------------
$lang['total_images']          = "Bilder:";
$lang['total_categories']      = "Kategorien:";
$lang['users']                 = "Mitglieder:";
$lang['total_hits']            = "Hits:";
$lang['total_downloads']       = "Downloads:";
$lang['total_comments']        = "Kommentare:";

$lang['today_new_users']       = "heute:";
$lang['yesterday_new_users']   = "gestern:";
$lang['this_week_new_users']   = "diese Woche:";
$lang['last_week_new_users']   = "letzte Woche:";
$lang['this_month_new_users']  = "diesen Monat:";
$lang['last_month_new_users']  = "letzten Monat:";
$lang['since_begin_new_users'] = "seit Anfang:";
                                                                  
$lang['today_new_votes']       = $lang['today_new_users'];      
$lang['yesterday_new_votes']   = $lang['yesterday_new_users'];  
$lang['this_week_new_votes']   = $lang['this_week_new_users'];
$lang['last_week_new_votes']   = $lang['last_week_new_users'];
$lang['this_month_new_votes']  = $lang['this_month_new_users'];
$lang['last_month_new_votes']  = $lang['last_month_new_users'];
$lang['since_begin_new_votes'] = $lang['since_begin_new_users'];
:flag-en:
//-----------------------------------------------------
//--- Statistics --------------------------------------
//-----------------------------------------------------
$lang['total_images']          = "Pictures:";
$lang['total_categories']      = "Categories:";
$lang['users']                 = "Members:";
$lang['total_hits']            = "Hits:";
$lang['total_downloads']       = "Downloads:";
$lang['total_comments']        = "Comments:";

$lang['today_new_users']       = "Today:";
$lang['yesterday_new_users']   = "Yesterday:";
$lang['this_week_new_users']   = "This Week:";
$lang['last_week_new_users']   = "Last Week:";
$lang['this_month_new_users']  = "This Month:";
$lang['last_month_new_users']  = "Last Month:";
$lang['since_begin_new_users'] = "Since Begin:";
                                                                  
$lang['today_new_votes']       = $lang['today_new_users'];      
$lang['yesterday_new_votes']   = $lang['yesterday_new_users'];  
$lang['this_week_new_votes']   = $lang['this_week_new_users'];
$lang['last_week_new_votes']   = $lang['last_week_new_users'];
$lang['this_month_new_votes']  = $lang['this_month_new_users'];
$lang['last_month_new_votes']  = $lang['last_month_new_users'];
$lang['since_begin_new_votes'] = $lang['since_begin_new_users'];

Step 3

Open / Öffne: templates/YOUR-TEMPLATE/home.html
Search / Suche
{endif random_image}
Add after / Füge danach ein
{stats}

Step 4
Download now the files from the ZIP file in your directory 4images / Lade nun die Dateien aus der ZIP-Datei in deinem 4images Verzeichnis

- include/stats.php
- templates/YOUR-TEMPLATE/stats_box.html

Step 5
Open / Öffne: templates/your-dein-template/stats_box.html
Ersetze mit / Replace with
Code: [Select]
<table width="150" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td height="20" colspan="2" class="head2"> <img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />Statistik</td>
                    </tr>
                    <tr>
                      <td colspan="2" class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                    <tr>
                      <td align="left" class="row1">{lang_total_images}</td>
                      <td align="right" class="row1"><B>{total_images}</B></td>
                    </tr>
                    <tr>
                      <td align="left" class="row2">{lang_total_categories}</td>
                      <td align="right" class="row2"><B>{total_categories}</B></td>
                    </tr>
                    <tr>
                      <td align="left" class="row1">{lang_total_users}</td>
                      <td align="right" class="row1"><B>{total_users}</B></td>
                    </tr>
                    <tr>
                      <td align="left" class="row2">{lang_total_hits}</td>
                      <td align="right" class="row2"><B>{total_hits}</B></td>
                    </tr>
                    <tr>
                      <td align="left" class="row1">{lang_total_downloads}</td>
                      <td align="right" class="row1"><B>{total_downloads}</B></td>
                    </tr>
                    <tr>
                      <td align="left" class="row2">{lang_total_comments}</td>
                      <td align="right" class="row2"><B>{total_comments}</B></td>
                    </tr>
                    <tr>
                      <td colspan="2" class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                    <tr>
                      <td height="20" colspan="2" class="head2"><img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />Neue User</td>
                    </tr>
                    <tr>
                      <td align="left" class="row1">{lang_today_new_users}</td>
                      <td align="right" class="row1"><B>{today_new_users}</B></td>
                    </tr>
                    <tr>
                      <td align="left" class="row2">{lang_yesterday_new_users}</td>
                      <td align="right" class="row2"><B>{yesterday_new_users}</B></td>
                    </tr>
                    <tr>
                      <td align="left" class="row1">{lang_this_week_new_users}</td>
                      <td align="right" class="row1"><B>{this_week_new_users}</B></td>
                    </tr>
                    <tr>
                      <td align="left" class="row2">{lang_last_week_new_users}</td>
                      <td align="right" class="row2"><B>{last_week_new_users}</B></td>
                    </tr>
                    <tr>
                      <td align="left" class="row1">{lang_this_month_new_users}</td>
                      <td align="right" class="row1"><B>{this_month_new_users}</B></td>
                    </tr>
                    <tr>
                      <td align="left" class="row2">{lang_last_month_new_users}</td>
                      <td align="right" class="row2"><B>{last_month_new_users}</B></td>
                    </tr>
                    <tr>
                      <td align="left" class="row1">{lang_since_begin_new_users}</td>
                      <td align="right" class="row1"><B>{total_users}</B></td>
                    </tr>
                  </table>

Demo: http://4images-aio.benny-boehnke.info/index.php
Title: Re: [MOD] Advanced Statistik - without Vote-Stats / Erweiterte Statistik - Ohne Vote
Post by: Rembrandt on October 15, 2009, 06:29:05 AM
Hi!

...
Aber die Downloads werden nicht angezeigt. !?
But the downloads don´t show !?...
die werden bei dir schon angezeigt, nur ist deine tabelle in der höhe verschoben.

mfg Andi
Title: Re: [MOD]More than more statistics
Post by: Benny Change on October 15, 2009, 01:37:26 PM
Wo du Recht hast ^^
Title: Re: [MOD]More than more statistics
Post by: Tino23 on August 09, 2010, 06:56:23 PM
Hi, ich hab bei mir die Statistik auf allen Seiten eingefügt, habe aber den Effekt das sie in der detail.html nicht angezeigt wird. Auf allen anderen Seiten geht es und ich habe da nichts anders gemacht... hat da einer eine Idee?

Link (http://tino23.lsfs.de/lmj/)

Quelltext meiner detail.html (Zeile 252)

Code: [Select]
{header}
<table width="980" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td>
<table cellpadding="0" cellspacing="0"  width="100%" border="0" bgcolor="#000000">
 <tr>
  <td width="100%">
   <table border="0" cellpadding="0" cellspacing="0" bgcolor="#000000" width="100%" height="136" background="{template_url}/images/bbcell.gif">
    <tr>
     <td align="center"><img src="{template_url}/images/4imgs.gif" width="985" height="136" align="center" alt="" /></td>
       </tr>
  </table>
</td>
</tr>
</table>
</td>
  </tr>
  <tr>
    <td class="bordercolor">
      <table width="100%" border="0" cellspacing="1" cellpadding="0">
        <tr>
          <td class="tablebgcolor">
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
   <tr>
    <td class="navbar" height="23">
     <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
       <td align="left" width="50%">
        <img src="{template_url}/images/spacer.gif" width="4" height="4" alt="" />{clickstream}</td>
       <td align="right" width="50%">
        <a href="{url_top_images}"><b>{lang_top_images}</b></a>&nbsp;|
        <a href="{url_new_images}"><b>{lang_new_images}</b></a>&nbsp;&nbsp;
       </td>
      </tr>
     </table>
    </td>
   </tr>
  </table>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="150" class="row2" valign="top">
                  <table width="150" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td class="head2" height="20"><img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_registered_user}</td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                    <tr>
                      <td align="center" class="row1">{user_box} </td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                  </table>
                  {if random_cat_image}
                  <table width="150" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                      <td class="head2" height="20"> <img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />{lang_random_image}</td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                    <tr>
                      <td align="center" class="row1">
                        <br />
                        {random_cat_image}
                        <br />
                        <br />
                      </td>
                    </tr>
                    <tr>
                      <td class="tablebgcolor"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
                    </tr>
                  </table>
                  {endif random_cat_image}
                  <br />
                </td>
                <td width="1" class="bordercolor" valign="top"><img src="{template_url}/images/spacer.gif" width="1" height="1" alt="" /></td>
                <td width="18" valign="top"><img src="{template_url}/images/spacer.gif" width="18" height="18" alt="" /></td>
                <td width="100%" valign="top"><br />

<table width="100%" border="0" cellspacing="0" cellpadding="1">
                    <tr>
                      <td class="bordercolor">
                        <table width="100%" border="0" cellspacing="0" cellpadding="3">
                          <tr valign="top">
                            <td class="row2">
                                                          {if prev_image_name}{lang_prev_image}<br />
                              <b><a href="{prev_image_url}">{prev_image_name}</a></b>
                                                          <!-- <br /><br /><a href="{prev_image_url}"><img src="{prev_thumb_file}" border="1"></a> -->
                                                          {endif prev_image_name}&nbsp;</td>
                            <td align="right" class="row2">
                                                          &nbsp;{if next_image_name}{lang_next_image}<br />
                              <b><a href="{next_image_url}">{next_image_name}</a></b>
                                                          <!-- <br /><br /><a href="{next_image_url}"><img src="{next_thumb_file}" border="1"></a> -->
                                                          {endif next_image_name}</td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
<br>
                  <b class="title">{image_name}</b>{if image_is_new} <sup class="new">{lang_new}</sup>{endif image_is_new}
                  <hr size="1" />
                  {if msg}<b>{msg}<br /><br /></b>{endif msg}
                  <div align="center">
                                    {image}
                                    {if admin_links}<br />{admin_links}<br />{endif admin_links}   <br />
                                     <table width="100%" border="0" cellspacing="0" cellpadding="1">
                    <tr>
                      <td class="bordercolor">
                        <table width="100%" border="0" cellspacing="0" cellpadding="3">
                          <tr valign="top" class="row2">
               <td align="left" width="33%">{if prev_image_name}&nbsp;{lang_prev_image}{endif prev_image_name}</td>
               <td align="center" width="33%" class="head3"><b>{rate}</b></td>
               <td align="right" width="33%">{if next_image_name}{lang_next_image}&nbsp;{endif next_image_name}</td>
              </tr>
              <tr valign="bottom">
               <td align="left" width="33%">{if prev_image_name}&nbsp;<a href="{prev_image_url}"><img src="{prev_thumb_file}" border="0" height="50"></a>{endif prev_image_name}</td>
               <td align="center" valign="middle" width="33%">{if rate_form}{rate_form}{endif rate_form}</td>
               <td align="right" width="33%">{if next_image_name}<a href="{next_image_url}"><img src="{next_thumb_file}" border="0" height="50"></a>{endif next_image_name}</td>
              </tr>
            </table>
                      </td>
                    </tr>
                  </table>
                  
                                    <br />{lightbox_button}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{postcard_button}&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;{download_button}&nbsp;&nbsp; <!-- {download_zip_button} -->
                                  </div><br />

                  <table width="100%" border="0" cellspacing="0" cellpadding="1">
                    <tr>
                      <td class="bordercolor">
                        <table width="100%" border="0" cellpadding="3" cellspacing="0">
                                                  <tr>
                            <td class="head1" valign="top" colspan="2">{image_name}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row1"><b>{lang_description}</b></td>
                            <td valign="top" class="row1">{image_description}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row2"><b>{lang_keywords}</b></td>
                            <td valign="top" class="row2">{image_keywords}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row1"><b>{lang_date}</b></td>
                            <td valign="top" class="row1">{image_date}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row2"><b>{lang_hits}</b></td>
                            <td valign="top" class="row2">{image_hits}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row1"><b>{lang_downloads}</b></td>
                            <td valign="top" class="row1">{image_downloads}</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row2"><b>{lang_rating}</b></td>
                            <td valign="top" class="row2">{image_rating} ({image_votes}
                              {lang_votes})</td>
                          </tr>
                          <tr>
                            <td valign="top" class="row1"><b>{lang_file_size}</b></td>
                            <td valign="top" class="row1">{image_file_size}</td>
                          </tr>
                                                  <tr>
                            <td valign="top" class="row2"><b>{lang_added_by}</b></td>
                            <td valign="top" class="row2">{user_name_link}</td>
                          </tr>

                        </table>
                      </td>
                    </tr>
                  </table>
                                  {if iptc_info}<br />
                                  <table width="100%" border="0" cellspacing="0" cellpadding="1">
                  <tr>
                    <td class="bordercolor">
                      <table width="100%" border="0" cellpadding="3" cellspacing="0">
                        <tr>
                            <td class="head1" valign="top" colspan="2">IPTC Info</td>
                          </tr>
                                  {iptc_info}
                        </table>
                      </td>
                    </tr>
                  </table>
                  {endif iptc_info}
                                 {if exif_info}
                  <br />
                  <table width="100%" border="0" cellspacing="0" cellpadding="1">
                    <tr>
                      <td class="bordercolor">
                        <table width="100%" border="0" cellpadding="3" cellspacing="0">
                          <tr>
                            <td class="head1" valign="top" colspan="2">EXIF Info</td>
                          </tr>
                          {exif_info}
                        </table>
                      </td>
                    </tr>
                  </table>
                  {endif exif_info}

                  {if allow_comments}
                                  <a name="comments"></a>
                                  <br />
                  <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
                    <tr>
                      <td class="head1" valign="top">
                        <table width="100%" border="0" cellpadding="3" cellspacing="1">
                          <tr>
                            <td valign="top" class="head1">
                                                          {lang_author}
                                                        </td>
                                                        <td valign="top" class="head1">
                                                          {lang_comment}
                                                        </td>
                          </tr>
                          {comments}
                        </table>
                      </td>
                    </tr>
                  </table>
                                  <br />
                                  {comment_form}
                  {endif allow_comments}
                                  <br /><br />

                 <p>&nbsp;</p>
                </td>
                <td width="19" valign="top"><img src="{template_url}/images/spacer.gif" alt="" width="19" height="19" /></td>
                <td width="1" class="bordercolor" valign="top"><img src="{template_url}/images/spacer.gif" alt="" width="1" height="1" /></td>
              <td width="150" class="row2" valign="top">



                  <table width="150" border="0" cellspacing="0" cellpadding="0">
                    <tr class="bordercolor">
                      <td class="head2" height="20"><img src="{template_url}/images/spacer.gif" alt="" width="4" height="4" />Fahrzeug - Info</td>
                    </tr>

                    <tr>
                      <td align="center" class="row1">                  <p align="center">
                    <!-- <?php
                    
echo date("d.m.Y, H:i");
                        
?>
-->
                  </p>
<?php include("{template_url}/4darkm.php"); ?>
{stats}
</table>




          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td>

    </td>
  </tr>
</table>
{footer}
Title: Re: [MOD]More than more statistics
Post by: Rembrandt on August 09, 2010, 07:08:00 PM
Hi, ich hab bei mir die Statistik auf allen Seiten eingefügt, habe aber den Effekt das sie in der detail.html nicht angezeigt wird. ...
wenn du die stats rechts auf der detail seite meinst , die werden angezeigt, wenn nicht lese mal die nächsten 3 posts von hier weg:
http://www.4homepages.de/forum/index.php?topic=6484.msg95378#msg95378

mfg Andi
Title: Re: [MOD]More than more statistics
Post by: Tino23 on August 10, 2010, 03:07:15 PM
Danke erst einmal für die Antwort, aber die Gesamtstatistik wird nach wie vor nicht Angezeigt, wenn ich mit die Details eines Bildes anzeigen lasse. Schau mal auf der Startseite, da ist unter der Besucherstatistik noch eine Gesamtstatistik, die Fehlt aber plötzlich auf der Datailseite.

Der Teil in der Index.php sollte auch richtig eingefügt sein, geht ja auch soweit...

Code: [Select]
else {
  $template = "";
}
include(ROOT_PATH.'includes/page_header.php');

//--- Statistik MOD Anfang ---------------------------------
include(ROOT_PATH.'includes/stats.php');
//--- Statistik MOD Ende - ---------------------------------
Title: Re: [MOD]More than more statistics
Post by: Rembrandt on August 11, 2010, 05:53:15 AM
wenn du die statistik überall angezeigt haben möchtest mußt du die stats.php in der page_header.php includen.
Title: Re: [MOD]More than more statistics
Post by: Tino23 on August 11, 2010, 10:46:15 PM
Kannst du mir mal den Code dafür geben, wo und wie ich das in der page_header.php mache?
Title: Re: [MOD]More than more statistics
Post by: Rembrandt on August 12, 2010, 05:57:04 AM
versuche es mal
Code: [Select]
include(ROOT_PATH.'includes/stats.php');
//-----------------------------------------------------
//--- Register Global Vars ----------------------------
//-----------------------------------------------------
und aus der index nimmst du es raus