4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: V@no on February 10, 2003, 03:39:21 AM

Title: [Mod] Most Ever Users Online
Post by: V@no 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 (http://come.no-ip.com/files.php?id=13)" 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.
Title: [Mod] Most Ever Users Online
Post by: LoOpP 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
Title: [Mod] Most Ever Users Online
Post by: LoOpP on May 17, 2003, 02:33:18 PM
just fixed

it works
Title: [Mod] Most Ever Users Online
Post by: www.girls-on-bikes.com on May 30, 2003, 10:28:18 AM
Yet another great mod!
Installed in just a few minutes!

Keep up the excellent work!  :D
Title: Re: [Mod] Most Ever Users Online
Post by: ascanio 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?
Title: Re: [Mod] Most Ever Users Online
Post by: V@no on April 07, 2005, 11:54:14 PM
they are gone after the hack...
Title: Re: [Mod] Most Ever Users Online
Post by: V@no 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]