If you want a bar level for see the status of your IM Box, add this :
InstantMessage.php
<search>
// A folder, ie. outbox/inbox.
function MessageFolder()
{
global $txt, $scripturl, $db_prefix, $ID_MEMBER, $modSettings, $context;
</search>
<add after>
global $im_bar, $settings;
</add after>
<search>
$context['page_title'] = $txt[143];
</search>
<add after>
if (!$user_info['maxMessages'])
$im_bar = '<img src="' . $settings['images_url'] . '/bar_up.gif" width="106" height="5"><br><img src="' . $settings['images_url'] . '/bar_full.gif" width="106" height="11"><br><img src="' . $settings['images_url'] . '/bar_down.gif" width="106" height="5"><br><font color="red">Unlimited Space</font>';
else
if ($user_info['maxMessages'] - $max_messages != 0)
{
$bar = (($max_messages * 10) / ($user_info['maxMessages'] / 10));
$bar_fill = (int) $bar;
$bar_empty = $user_info['maxMessages'];
$bar_f = '<img src="' . $settings['images_url'] . '/bar_fill.gif" width="' . $bar_fill . '" height="11">';
$bar_empty = '<img src="' . $settings['images_url'] . '/bar_empty.gif" width="' . $bar_empty . '" height="11">';
$bar_fill = '<img src="' . $settings['images_url'] . '/bar_fill.gif" width="' . $bar_fill . '" height="11">';
$im_bar = '
<table width="110" cellpadding="0" cellspacing="0" border="0">
<tr><td align="left"><img src="' . $settings['images_url'] . '/bar_up.gif" width="106" height="5"></td></tr>
<tr><td align="left"><img src="' . $settings['images_url'] . '/bar_left.gif" width="3" height="11">' . $bar_f . '<img src="' . $settings['images_url'] . '/bar_right.gif" width="3" height="11">' . $bar_empty . '</td></tr>
<tr><td align="left"><img src="' . $settings['images_url'] . '/bar_down.gif" width="106" height="5"></td></tr>
<tr><td width="110" align="center"><font color="red">' . $max_messages . ' / ' . $user_info['maxMessages'] . '</font></td></tr>
</table>';
}
else
$im_bar = '<img src="' . $settings['images_url'] . '/bar_up.gif" width="106" height="5"><br><img src="' . $settings['images_url'] . '/bar_full.gif" width="106" height="11"><br><img src="' . $settings['images_url'] . '/bar_down.gif" width="106" height="5"><br><font color="red">Full Box !</font>';
</add after>
InstantMessage.template.php
<search>
// Version: 1.0; InstantMessage
function template_folder()
{
global $context, $settings, $options, $scripturl, $modSettings, $txt;
</search>
<add after>
global $im_bar;
</add after>
<search>
echo '
<tr>
<td colspan="5" class="catbg" height="25">
<table width="100%" cellpadding="2" cellspacing="0" border="0"><tr>
<td><b>', $txt[139], ':</b> ', $context['page_index'], '</td>
<td align="right"><input type="submit" value="', $txt['quickmod_delete_selected'], '" style="font-weight: normal;" /></td>
</tr></table>
</search>
<add after>
<div align="center">' . $im_bar . '</div>
</add after>
WARNING : This Tip use "Bar of Experience" Images. If you not have this mod installed, please download it and insert the images on yours folder.
Nice1 Fasan :)
i wrote it but return me back
Unlimited Space of message for gropu user where i have 60 message for example
Unlimited if is it your membergroup settings ;)
all my users have it ... :( to user with only 5 message as limit
Uhmm... i think five messages is to much little... set at 10 for minimal ;)
Nice tip Fasan. You should make a MOD!
Zitat von: edi67 in Januar 20, 2005, 01:12:38 NACHMITTAGS
all my users have it ... :( to user with only 5 message as limit
Change it :
$bar_fill = (int) $bar;
in
$bar_fill = (int) $bar;
if (!$bar_fill)
$bar_fill = 1;
FaSan
This isnt working, my all members see 'Unlimited Space'. Limit is 50.
Zitat von: Owdy in Januar 20, 2005, 05:26:47 NACHMITTAGS
This isnt working, my all members see 'Unlimited Space'. Limit is 50.
we have the same error
Zitat von: edi67 in Januar 21, 2005, 12:38:24 VORMITTAG
Zitat von: Owdy in Januar 20, 2005, 05:26:47 NACHMITTAGS
This isnt working, my all members see 'Unlimited Space'. Limit is 50.
we have the same error
As do I... Any fix for this yet??
Look the code. I' ve add this :
global $im_bar, $settings;
and this :
global $im_bar;
;)
Zitat von: FaSan in Januar 21, 2005, 10:20:12 VORMITTAG
Look the code. I' ve add this :
global $im_bar, $settings;
and this :
global $im_bar;
;)
exactly copied but the same errors all user have UNLIMITED messages
Fasan i still have the same error "'Unlimited Space'" and i just install it now :(
another thing after installation LOG ERRORS begin full of this errors for all members:
8: Undefined index: maxMessages
File: /home/forumzo7/public_html/Sources/InstantMessage.php
Linea: 232
may be something lost for example variable maxMessages
Fasan, where do you find the global user_info['maxMessages'] in your source ik can't find it in the sources ?? is it not user_info['messages'] ??
Ehmm.... :-\ :-\ :-\
Excuse me... i don't remeber :D
Uhmm on this ? http://www.simplemachines.org/community/index.php?topic=17277.msg183514#msg183514
>:( >:( >:(
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.ilmalocchio.net%2Fcommunity%2FSmileys%2Fmalocchio%2Fbanghead.gif&hash=65007b25b3d966b180750d3e10a478999b3e55a6) (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.ilmalocchio.net%2Fcommunity%2FSmileys%2Fmalocchio%2Fbanghead.gif&hash=65007b25b3d966b180750d3e10a478999b3e55a6) (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.ilmalocchio.net%2Fcommunity%2FSmileys%2Fmalocchio%2Fbanghead.gif&hash=65007b25b3d966b180750d3e10a478999b3e55a6) (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.ilmalocchio.net%2Fcommunity%2FSmileys%2Fmalocchio%2Fbanghead.gif&hash=65007b25b3d966b180750d3e10a478999b3e55a6) (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.ilmalocchio.net%2Fcommunity%2FSmileys%2Fmalocchio%2Fbanghead.gif&hash=65007b25b3d966b180750d3e10a478999b3e55a6) (https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fwww.ilmalocchio.net%2Fcommunity%2FSmileys%2Fmalocchio%2Fbanghead.gif&hash=65007b25b3d966b180750d3e10a478999b3e55a6)
Hello Fasan wil you control the next code, i have it working i think ?? If you like it, i put it in a Mod file ?? ( yes i know it of smf 1.1 ! )
i have add the next global in "InstantMessage.php"
global $bar_Pmlevel;
$bar_Pmlevel = 5 ; //later in a mod i change it for a Modsetting !
and i fix the bar itself take look at the code !
if (!$user_info['messages'])
$im_bar = '<img src="' . $settings['images_url'] . '/bar_up.gif" width="106" height="5"><br><img src="' . $settings['images_url'] . '/bar_full.gif" width="106" height="11"><br><img src="' . $settings['images_url'] . '/bar_down.gif" width="106" height="5"><br><font color="red">Unlimited Space</font>';
else
if ($user_info['messages'] - $bar_Pmlevel != 0)
{
$bar1 = ( $bar_Pmlevel / $user_info['messages'] );
$bar = ( 100 / $bar1 );
// $bar = (($user_info['messages'] * 10) / ($user_info['messages'] / 10 ));
echo $bar;
$bar_fill = (int) $bar;
$bar_empty = $user_info['messages'];
$bar_f = '<img src="' . $settings['images_url'] . '/bar_fill.gif" width="' . $bar_fill . '" height="11">';
$bar_empty = '<img src="' . $settings['images_url'] . '/bar_empty.gif" width="' . $bar_empty . '" height="11">';
$bar_fill = '<img src="' . $settings['images_url'] . '/bar_fill.gif" width="' . $bar_fill . '" height="11">';
$im_bar = '
<table width="110" cellpadding="0" cellspacing="0" border="0">
<tr><td align="left"><img src="' . $settings['images_url'] . '/bar_up.gif" width="106" height="5"></td></tr>
<tr><td align="left"><img src="' . $settings['images_url'] . '/bar_left.gif" width="3" height="11">' . $bar_f . '<img src="' . $settings['images_url'] . '/bar_right.gif" width="3" height="11">' . $bar_empty . '</td></tr>
<tr><td align="left"><img src="' . $settings['images_url'] . '/bar_down.gif" width="106" height="5"></td></tr>
<tr><td width="110" align="center"><font color="red"> ' . $user_info['messages'] . ' / ' . $bar_Pmlevel . '</font></td></tr>
</table>';
}
else
$im_bar = '<p>12</p><img src="' . $settings['images_url'] . '/bar_up.gif" width="106" height="5"><br><img src="' . $settings['images_url'] . '/bar_full.gif" width="106" height="11"><br><img src="' . $settings['images_url'] . '/bar_down.gif" width="106" height="5"><br><font color="red">Full Box !</font>';
Woeps ther is know controll about the messages, i can send 6/5 messages :( ?? how i fix that ?
Ok... i making the work mod and post it, in the next days.
Please, coming soon :D ;)
I hope it's also have the restriction's activate ? so when a user have is imbox or outbox full he can't send any massage ?? :) Please :D :D
It doesn't work to me. :(
Use smf 1.1. Its built in feature in it.
Zitat von: Owdy in Dezember 19, 2005, 11:06:15 NACHMITTAGS
Use smf 1.1. Its built in feature in it.
SMF 1.1 is not stable yet, also I use a custom theme I can't port to 1.1.
edit: it works! I've added this: http://www.simplemachines.org/community/index.php?topic=17277.msg183514#msg183514
Anything like this that works for 1.1RC2?
You're referring to 1.1 Beta version right? I can't use that because most if not all of the mods currently installed in my forum won't work with the beta. That's why I'm looking for a mod or codes to have this in 1.1 RC2.
No, 1.1 RC2
http://www.simplemachines.org/community/index.php?topic=17277.msg667246#msg667246