Author Topic: [Mod] Most Ever Users Online  (Read 71007 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 :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
[Mod] Most Ever Users Online
« on: February 10, 2003, 03:39:21 AM »
This mod is obsolete due to v2 is out:
http://www.4homepages.de/forum/index.php?topic=7290.0


This little "MOD" will log and show Most Ever Users Online (same as on this board, just look at the bottom of index page)

There are only 3 files to modify:
/includes/sessions.php
/lang/<yourlanguage>/main.php
/templates/<yourtemlplate>/whos_online.html
I chosed this temlplate, but u can add this to any template(s) u wish.

So, here it goes:

Step 1.
Open /includes/sessions.php

Find:
Code: [Select]
 $site_template->register_vars(array(
Replace with:
Code: [Select]
//-----------------------------
//---Most ever users online----
//-----------------------------
  if ($num_total_online > preg_replace("/,[0-9]+/", "",$config['most_users'])) {
  $most_users = $num_total_online.",".time();
  $config['most_users'] = $most_users; //ensure that this will be displayed right now, not after second refresh
  $sql = "UPDATE ".SETTINGS_TABLE."
 SET setting_value = '$most_users'
 WHERE setting_name = 'most_users'";
  $site_db->query($sql);
  }
  $site_template->register_vars(array(
"mueo" => preg_replace("/,[0-9]+/", "",$config['most_users']),
"mueo_date" => format_date($config['date_format'].", ".$config['time_format'], preg_replace("/[0-9]+,/", "", $config['most_users'])),
"lang_mueo" => $lang['mueo'],
"lang_mueo_date" => $lang['mueo_date'],




Step 2.
Open /lang/<yourlanguage>/main.php

At the end of the file, just before ?> add this:
Code: [Select]

$lang['mueo'] = "Most users ever online was ";
$lang['mueo_date'] = "on";
 



Step 3.
Open /temlates/<yourtemplate>/whos_online.html

Add this:
Code: [Select]
{lang_mueo} <B>{mueo}</B> {lang_mueo_date} {mueo_date}


Step 4.
Download "MEUO Install" file

extract it in root of your 4images dir. And run it(http://yoursite/install_mueo.php)

Upload all modified files.

P.S. at first I wrote this mod using two fields in DB, to store "most users" and date in separate fields. the code was smaller.
so, if someone think it's better use two fields in DB, I can post it too.
« Last Edit: April 08, 2005, 12:19:57 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 LoOpP

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
[Mod] Most Ever Users Online
« Reply #1 on: May 16, 2003, 02:48:41 PM »
I have all done how you wrote but

I'cant see the stats in my home.html

my whos_online.html looks like this
Code: [Select]
<table width="450" border="0" cellspacing="0" cellpadding="1">
  <tr>
    <td class="head1">
      <table width="100%" border="0" cellspacing="0" cellpadding="3">
        <tr>
          <td valign="top" class="head1">{new_member}</td>
        </tr>
        <tr>
          <td valign="top" class="head1">{lang_user_online}</td>
        </tr>
        <tr>
          <td valign="top" class="row2">{new_member}</td>
        </tr>
        <tr>
          <td valign="top" class="row2"> {lang_user_online_detail} <br />
            {user_online_list} </td>
        </tr>
        <tr>
          <td valign="top" class="row2"> {lang_mueo} {mueo} {lang_mueo_date} {mueo_date}</td>
        </tr>
      </table>
    </td>
  </tr>
</table>


what did I wrong

Offline LoOpP

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
[Mod] Most Ever Users Online
« Reply #2 on: May 17, 2003, 02:33:18 PM »
just fixed

it works

Offline www.girls-on-bikes.com

  • Full Member
  • ***
  • Posts: 145
    • View Profile
    • http://www.girls-on-bikes.com/
[Mod] Most Ever Users Online
« Reply #3 on: May 30, 2003, 10:28:18 AM »
Yet another great mod!
Installed in just a few minutes!

Keep up the excellent work!  :D

Offline ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: [Mod] Most Ever Users Online
« Reply #4 on: April 07, 2005, 04:23:06 PM »
Hi I install this MOD some time ago and I think that there were more than these tags for the dates {mueo_date} and I don't remeber them could some one said what they were?

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] Most Ever Users Online
« Reply #5 on: April 07, 2005, 11:54:14 PM »
they are gone after the hack...
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 :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [Mod] Most Ever Users Online
« Reply #6 on: April 08, 2005, 12:19:10 AM »
This mod is obsolete due to v2 is out:
http://www.4homepages.de/forum/index.php?topic=7290.0

[locked]
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)