4images Modifications / Modifikationen > Mods & Plugins (Releases & Support)

[Mod] Most Ever Users Online

(1/2) > >>

This mod is obsolete due to v2 is out:

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:
/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

--- Code: ---  $site_template->register_vars(array(
--- End code ---

Replace with:
--- Code: ---//-----------------------------
//---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
 SET setting_value = '$most_users'
 WHERE setting_name = 'most_users'";
"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'],

--- End code ---

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

At the end of the file, just before ?> add this:
--- Code: ---
$lang['mueo'] = "Most users ever online was ";
$lang['mueo_date'] = "on";
--- End code ---

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

Add this:

--- Code: ---{lang_mueo} <B>{mueo}</B> {lang_mueo_date} {mueo_date}
--- End code ---

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.

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: ---<table width="450" border="0" cellspacing="0" cellpadding="1">
    <td class="head1">
      <table width="100%" border="0" cellspacing="0" cellpadding="3">
          <td valign="top" class="head1">{new_member}</td>
          <td valign="top" class="head1">{lang_user_online}</td>
          <td valign="top" class="row2">{new_member}</td>
          <td valign="top" class="row2"> {lang_user_online_detail} <br />
            {user_online_list} </td>
          <td valign="top" class="row2"> {lang_mueo} {mueo} {lang_mueo_date} {mueo_date}</td>

--- End code ---

what did I wrong

just fixed

it works

Yet another great mod!
Installed in just a few minutes!

Keep up the excellent work!  :D

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?


[0] Message Index

[#] Next page

Go to full version