4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: edwin on January 04, 2003, 02:28:37 PM
-
Here i am again, i'm a little bit further , but still trying.
I want to make visible on the site to my visitors how many people are using 4images
Can someone please take another look and tell me how i make the numbers of the guest and users visable
I think it should be possible even with 1.61
Thanks in advance
http://www.foto-janssen.nl
-
unfortunetly I dont have chance compare v1.6 with v1.7 script, so
here is stats script from v1.7. (/includes/stats.php)
backup your file and change it to this code:<?php
//-----------------------------------------------------
//--- Show number of Users ----------------------------
//-----------------------------------------------------
$sql = "SELECT COUNT(*) as users
FROM ".USERS_TABLE."
WHERE user_id <> ".GUEST;
$row = $site_db->query_firstrow($sql);
$total_users = "".$lang['users']."<B> ".$row['users']."</B>\n";
$site_template->register_vars("total_users", $total_users);
unset($total_users);
//-----------------------------------------------------
//--- 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 = "".$lang['total_hits']."<B> ".$row['sum']."</B>\n";
$site_template->register_vars("total_hits", $total_hits);
unset($total_hits);
//-----------------------------------------------------
//--- Votes -------------------------------------------
//-----------------------------------------------------
$sql = "SELECT SUM(image_votes) AS sum
FROM ".IMAGES_TABLE;
$row = $site_db->query_firstrow($sql);
$sum = (isset($row['sum'])) ? $row['sum'] : 0;
$total_votes = "".$lang['total_votes']."<B> ".$row['sum']."</B>\n";
$site_template->register_vars("total_votes", $total_votes);
unset($total_votes);
//-----------------------------------------------------
//--- 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 = "".$lang['total_downloads']."<B> ".$row['sum']."</B>\n";
$site_template->register_vars("total_downloads", $total_downloads);
unset($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 = "".$lang['total_comments']."<B> ".$row['sum']."</B>\n";
$site_template->register_vars("total_comments", $total_comments);
unset($total_comments);
?>
see if it's gonna work.
good luck. ;)
-
I found the problem
in sessions.php it was set to be visable for ADMIN, when i changed it to guest it was visible for everybody
Many regards to everybody