Author Topic: [Mod] More Statistics for your visitors  (Read 200308 times)

0 Members and 1 Guest are viewing this topic.

Offline Stoleti

  • Hero Member
  • *****
  • Posts: 574
    • View Profile
Re: [Mod] More Statistics for your visitors
« Reply #90 on: January 31, 2006, 02:11:29 AM »
I'm using a MOD (Files List 1.3) by V@no , and i want know how can i added the number of files on STATS !?

Total Files : XX

 :?:

And make it only for Admin / Reg. Members  :?

Offline lemccoy

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
    • DrunkIsland
Re: [Mod] More Statistics for your visitors
« Reply #91 on: February 10, 2006, 08:06:22 PM »
I have the guestbook mod and i have made a counter for the number of guestbook entries:

Code: [Select]
//-----------------------------------------------------
//--- Guestbook Signatures-----------------------------
//-----------------------------------------------------
$sql = "SELECT SUM(comment_id) AS sum
         FROM ".GUESTBOOK_TABLE;
 $row = $site_db->query_firstrow($sql);

 $sum = (isset($row['sum'])) ? $row['sum'] : 0;
 $total_signatures = "".$lang['total_signatures']."<B> ".$row['sum']."</B>\n";
 
 $site_template->register_vars("total_signatures", $total_signatures);
unset($total_signatures);

With the corresponding language and calls etc.  However, when it counts it counts deleted posts as there.  I know because I made an entry, deleted it, made another entry.  It now says there are 2 instead of 1.  Is there a better variable to count than the "comment_id"?

Offline IcEcReaM

  • Hero Member
  • *****
  • Posts: 714
    • View Profile
    • My little Testboard
Re: [Mod] More Statistics for your visitors
« Reply #92 on: February 10, 2006, 09:39:47 PM »
Code: [Select]
//-----------------------------------------------------
//--- Guestbook Signatures-----------------------------
//-----------------------------------------------------
$sql = "SELECT COUNT(comment_id) AS sum
         FROM ".GUESTBOOK_TABLE;
$row = $site_db->query_firstrow($sql);

$sum = (isset($row['sum'])) ? $row['sum'] : 0;
$total_signatures = "".$lang['total_signatures']."<B> ".$row['sum']."</B>\n";

$site_template->register_vars("total_signatures", $total_signatures);
unset($total_signatures);

you should use COUNT instead of SUM,
so the number of entries is outputed and not the sum of the comment_id.
Coding is a everlasting competition between programmers who tries to write larger, better and idiot-safe programs and the universe producing larger and stupider idiots...
...so far the universe won
bump

Offline lemccoy

  • Jr. Member
  • **
  • Posts: 90
    • View Profile
    • DrunkIsland
Re: [Mod] More Statistics for your visitors
« Reply #93 on: February 10, 2006, 09:57:17 PM »
Great, that works.  Thanks.

Offline fish4carp

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [Mod] More Statistics for your visitors
« Reply #94 on: April 14, 2006, 08:42:37 PM »
Hi

Where abouts do I place the following below in the home.html, categories.html, lightbox.html & top.html, Thanks.  :D

Gallery Statistics
{total_users}
{total_votes}
{total_comments}
{total_hits}
{total_downloads}
{total_rating}

Offline IWS_steffen

  • Full Member
  • ***
  • Posts: 128
    • View Profile
    • Kreuzfahrtschiffe gestern und heute
Re: [Mod] More Statistics for your visitors
« Reply #95 on: April 17, 2006, 10:31:21 AM »
toller MOD

klappt alles super. Danke

Gruüsse aus Hamburg

Steffen

Offline fish4carp

  • Pre-Newbie
  • Posts: 3
    • View Profile
Re: [Mod] More Statistics for your visitors
« Reply #96 on: April 17, 2006, 11:25:48 AM »
To Vraxor

Please can you tell me how you edited your home.html etc so it shows the Site Statistics
 like you have them.

Thanks

Offline Zyga

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: [Mod] More Statistics for your visitors
« Reply #97 on: May 19, 2006, 09:44:08 PM »
meybe someone could help me show number of registered users only for admin ?

Offline mstgokcen

  • Newbie
  • *
  • Posts: 44
    • View Profile
total images?
« Reply #98 on: July 21, 2006, 10:14:25 AM »
is anyone put this code to show total images...I get the code total categories but still there is no code for total images...

Offline CharlieF.

  • Pre-Newbie
  • Posts: 9
    • View Profile
Re: [Mod] More Statistics for your visitors
« Reply #99 on: July 26, 2006, 05:37:34 PM »
Hi,
the mod works great.

The only thing is that the stats won't show up on the details, member and search sites.

Here's how i tried to implement it:
Code: [Select]
<table width="100%" border="0" cellspacing="0" cellpadding="0">
   <tr>
   <td class="head1">
   <table width="100%" border="0" cellspacing="0" cellpadding="3">
    <tr>
    <td class="head1" valign="top" background="{template_url}/images/top_bg.gif">Statistik</td>
    </tr>
    <tr>
    <td class="row2" valign="top">
{total_users} <br />
{total_votes} <br />
{total_comments} <br />
{total_hits} <br />
{total_downloads} <br /></td>
    </tr>
   </table>
   </td>
   </tr>
  </table>

The strange thing is that "Statistik" is displayed on every page just the stats themselves do not.
I'd appreciate any help.

regards
Charlie

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [Mod] More Statistics for your visitors
« Reply #100 on: July 26, 2006, 06:13:23 PM »
@ CharlieF.
... you must insert the following in your details.php, member.php a.s.o ...
Code: [Select]
include(ROOT_PATH.'includes/stats.php');
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline CharlieF.

  • Pre-Newbie
  • Posts: 9
    • View Profile
Re: [Mod] More Statistics for your visitors
« Reply #101 on: July 26, 2006, 06:33:15 PM »
Thanks mawenzi.
For some reason i just forgot that in these files.
Again, thanks alot :D

Offline mstgokcen

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: total images?
« Reply #102 on: July 27, 2006, 12:15:41 PM »
is anyone put this code to show total images...I get the code total categories but still there is no code for total images...


how can we see total images?

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [Mod] More Statistics for your visitors
« Reply #103 on: July 27, 2006, 02:06:15 PM »
@ mstgokcen

... all total images on index ...  :wink:
... in stats.php use this ...
Code: [Select]
//-----------------------------------------------------
// --- All total images -----
//-----------------------------------------------------
  $sql = "SELECT COUNT(*) AS all_total_images
          FROM ".IMAGES_TABLE."
          WHERE image_active = 1";
  $row = $site_db->query_firstrow($sql);
  $all_total_images = $row['all_total_images'];
  $lang_all_total_images = $lang['all_total_images'];
  $site_template->register_vars("all_total_images", $all_total_images);
  $site_template->register_vars("lang_all_total_images", $lang_all_total_images);
  unset($all_total_images);
  unset($lang_all_total_images);
//-----------------------------------------------------

... in /lang/<your_lang>/main.php use this ...
Code: [Select]
$lang['all_total_images'] = "Total Images :";

... now you can use in home.html this tags ...
Code: [Select]
{lang_all_total_images} {all_total_images}
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline mstgokcen

  • Newbie
  • *
  • Posts: 44
    • View Profile
Re: [Mod] More Statistics for your visitors
« Reply #104 on: July 27, 2006, 03:22:22 PM »
tnx a lot it is ok