4images Modifications / Modifikationen > Mods & Plugins (Releases & Support)
[Mod] Most Ever Users Online
V@no:
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: --- $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
$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'],
--- 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.
LoOpP:
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">
<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>
--- End code ---
what did I wrong
LoOpP:
just fixed
it works
www.girls-on-bikes.com:
Yet another great mod!
Installed in just a few minutes!
Keep up the excellent work! :D
ascanio:
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?
Navigation
[0] Message Index
[#] Next page
Go to full version