Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=1584)
On / Off Avatar Frame
Author: Suki (http://missallsunday.com)
Compatibility-SMF 2.0.x only
DescriptionThis mod will add a frame around you user's avatar, if the user is online the frame wil be green, if not, the frame is gray.
Features-No language strings, works with every language
-No theme edits, works on every theme.
-Uses css3 properties, you can easily edit the frame look by editing the /Themes/your_theme/css/avatar_frame_mod.css file.
License * This SMF modification is subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this SMF modification except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
Settings-No settings, just install and use.
Languages-No language strings are needed.
Changelog04/01/2012 version 2.0.2
-Compatibility for 2.0.x
-Minor bug fixes
30/08/2011 version 2.0.1
-Fixed a bug with uploaded avatars width.
08/08/2011 version 2.0
-Complete rewrite of the mod.
-No more template edits
-Cleaner code
Nice
Thanks
For those that arent entirely sure what this does:
See the green online and grey offline color to the left under your name?
Well instead of that, this mod places a green glow/border around your avatar when youre online, and a grey one when youre offline.
Pretty cool!
Thanks mate :)
Nice
Thanks
don't work good with Arabic language :'(
Quote from: islam2hamy on January 07, 2009, 05:23:41 AM
don't work good with Arabic language :'(
your language is crazy :D
Quote from: BOS4O on January 07, 2009, 11:24:54 AM
Quote from: islam2hamy on January 07, 2009, 05:23:41 AM
don't work good with Arabic language :'(
your language is crazy :D
are you kidding ??
Arabic is (right to left) language
Nice mod @grafitus congratulations.
Quote from: islam2hamy on January 07, 2009, 12:00:04 PM
Quote from: BOS4O on January 07, 2009, 11:24:54 AM
Quote from: islam2hamy on January 07, 2009, 05:23:41 AM
don't work good with Arabic language :'(
your language is crazy :D
are you kidding ??
Arabic is (right to left) language
you try for this images (rtl.zip)
if can't fix, try rtl2.zip.
someone can help me??
i have the part that this mod modify like this:
// Show avatars, images, etc.?
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
{
if ($context['user']['is_logged'])
echo '<a href="'.$scripturl.'?action=profile;u='.$message['member']['id'].'">', $message['member']['avatar']['image'], '</a><br />';
elseif ($context['user']['is_guest'])
echo '<a href="'.$scripturl.'?action=register">', $message['member']['avatar']['image'], '</a><br />';
}
//No Avatar? Get the default Avatar! (Not that if it does not exist it will grow from some where :P)
elseif( !empty( $modSettings['attachmentDefaultavatar'] ) )
echo '<a href="'.$scripturl.'', $context['user']['is_logged'] ? '?action=profile;u='.$message['member']['id'].'' : 'action=register' ,'"><img src="', $modSettings['attachmentDefaultavatar'], '" /></a><br />';
how to add the mod there?
thanks!
SO PRETTY
Quote from: Özgür | ЯocKayseri link=topic=284589.msg1869211#msg1869211
/quote]
you try for this images (rtl.zip)
if can't fix, try rtl2.zip.
thank you for help
rtl, don't work good.
rtl2, need some edit.
see the images attached
Try this. i'm not sure =)
Quote from: Özgür | ЯocKayseri on January 08, 2009, 05:24:12 AM
Try this. i'm not sure =)
don't work good.
rtl2, was Better than it.
right & left fixing. but top & bottom i can't fix. im sorry :(
Quote from: Özgür | ЯocKayseri on January 08, 2009, 06:18:14 AM
right & left fixing. but top & bottom i can't fix. im sorry :(
ok, no problem, thank you at all :D
i will wait and see what (! !' grafitus) can do.
works fine - thx
Not bad, im guessing the weird middle image is if they don't have a custom avatar?
yeah if member dont have an avatar they get grey 1 for offline and green 1 for online
I installed this on my 1.1.7, and my avatars disappeared completely. No errors, just no avatars.
Here's my Display.template after the mod is installed.
What went wrong?
http://www.othersi.com
for me is it too big avatar setting/frame.
Anybody can make it smaller?
Like 60/60
Quote from: Asshandler on January 08, 2009, 02:57:23 PM
I installed this on my 1.1.7, and my avatars disappeared completely. No errors, just no avatars.
Here's my Display.template after the mod is installed.
What went wrong?
http://www.othersi.com
Uninstalled the mod for now, here's my Display.template with everything back to how I had it.
Hi i liked this MOD idea but for reasons unknown to me when I installed it the members avatar pics on the post pages were really distorted. I tried to adjust the size of the avatars but it just never seemed to look right. Maybe I will check back see if anyone else notices this problem.
My site is: http://diddsforums.bksmf.net/forum (http://diddsforums.bksmf.net/forum)
It doesn't work for me. I don't know why, can someone please tell me.
Quote from: - Lawrence - on January 10, 2009, 02:19:51 PM
My site is: http://diddsforums.bksmf.net/forum (http://diddsforums.bksmf.net/forum)
It doesn't work for me. I don't know why, can someone please tell me.
are you using default core theme or custom theme?
if its a custom theme you have to install it manually, as is the case with most mods
Quote from: bullbreedluverz on January 10, 2009, 02:32:28 PM
Quote from: - Lawrence - on January 10, 2009, 02:19:51 PM
My site is: http://diddsforums.bksmf.net/forum (http://diddsforums.bksmf.net/forum)
It doesn't work for me. I don't know why, can someone please tell me.
are you using default core theme or custom theme?
if its a custom theme you have to install it manually, as is the case with most mods
What is the code I need to use then? And where should I add it to?
on the page where you downloaded the mod there is Manual Install Instructions for SMF, there is a drop down box that you select your version of SMF then click Submit, that will then bring up a list of files that need to be edited and the edits to place in them, (you will need a text editor like notepad2 or Notepad++ to do this) these files are in your forum files in your root directory - in this case it is simply the display.template.php found in /Themes/(Yourtheme)/Display.template.php
then you would need to unzip (using winrar or winzip) the mod that you downloaded to use FTP to upload the image files used for this mod to /Themes/(Yourtheme)/Images
**** ITS IMPORTANT YOU MAKE A BACK UP OF YOUR display.template.php INCASE THE EDITS YOU MAKE DONT WORK YOU CAN THEN UPLOAD YOUR BACK UP ****
it does sound bit complicated but this is actually an easy edit to do but if you dont feel confident in doing it you can attatch your display.template.php here and ask someone else to do it for you but you will still need to unzip the mod package to get the images to FTP
Quote from: matasanos on January 07, 2009, 04:01:13 PM
someone can help me??
i have the part that this mod modify like this:
// Show avatars, images, etc.?
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']) && !empty($message['member']['avatar']['image']))
{
if ($context['user']['is_logged'])
echo '<a href="'.$scripturl.'?action=profile;u='.$message['member']['id'].'">', $message['member']['avatar']['image'], '</a><br />';
elseif ($context['user']['is_guest'])
echo '<a href="'.$scripturl.'?action=register">', $message['member']['avatar']['image'], '</a><br />';
}
//No Avatar? Get the default Avatar! (Not that if it does not exist it will grow from some where :P)
elseif( !empty( $modSettings['attachmentDefaultavatar'] ) )
echo '<a href="'.$scripturl.'', $context['user']['is_logged'] ? '?action=profile;u='.$message['member']['id'].'' : 'action=register' ,'"><img src="', $modSettings['attachmentDefaultavatar'], '" /></a><br />';
how to add the mod there?
thanks!
anyone?
@matasanos;
Try this:
// Show avatars, images, etc.?
if (!empty($settings['show_user_images']) && empty($options['show_no_avatars']))
if (empty($message['member']['avatar']['image']))
{
//No Avatar? Get the default Avatar! (Not that if it does not exist it will grow from some where :P)
if(!empty($modSettings['attachmentDefaultavatar']))
{
echo '
<a href="'.$scripturl.'', $context['user']['is_logged'] ? '?action=profile;u='.$message['member']['id'].'' : 'action=register' ,'"><img src="', $modSettings['attachmentDefaultavatar'], '" /></a>';
}
else
{
echo '
<div align="center" style="overflow: auto; width: 100%;"><img src="' . $settings['images_url'] . '/avatar_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '/autoavatar.png" alt="" width="130" border="0" /></div>';
}
echo '<a href="'.$scripturl.'?action=profile;u='.$message['member']['id'].'">', $message['member']['avatar']['image'], '</a><br />';
}
else
{
echo '
<div align="center">
<table width="130" border="0" cellpadding="0" cellspacing="0">
<tr>
<td rowspan="3">
<img src="' . $settings['images_url'] . '/avatar_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '/01.png" width="19" height="123" alt="" />
</td>
<td colspan="2">
<img src="' . $settings['images_url'] . '/avatar_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '/02.png" width="113" height="12" alt="" />
</td>
</tr>
<tr>
<td>
<img src="' . $message['member']['avatar']['href'] . '" width="94" height="94" alt="" />
</td>
<td rowspan="2">
<img src="' . $settings['images_url'] . '/avatar_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '/03.png" width="19" height="111" alt="" />
</td>
</tr>
<tr>
<td>
<img src="' . $settings['images_url'] . '/avatar_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '/04.png" width="94" height="17" alt="" />
</td>
</tr>
</table>
</div>';
}
I'll try to make a patch for RTL.
Quote from: Yağız on January 11, 2009, 08:27:28 AM
I'll try to make a patch for RTL.
yes , please .
thank you.
Pretty mod but a suggestion would be a control to make the frame different colors to suit different colored themes out there.
Also, a flaw is that it makes everyone's avatar square, introducing distortion into member's avatars that aren't already square. This makes them aggravated!
And, when the browser window is minimized left to right the frame starts to cut off and looks pretty bad.
Thanks.
I can't help you because my English speak not good :(
Understanding for thanks..
Quote from: xrunner on January 11, 2009, 11:28:44 AM
Pretty mod but a suggestion would be a control to make the frame different colors to suit different colored themes out there.
Also, a flaw is that it makes everyone's avatar square, introducing distortion into member's avatars that aren't already square. This makes them aggravated!
And, when the browser window is minimized left to right the frame starts to cut off and looks pretty bad.
Thanks.
Can I have a picture of this issues please?
Quote from: Yağız on January 12, 2009, 09:17:22 AMCan I have a picture of this issues please?
Sure, just click on my banner and look at my forum, your mod is currently installed. I had my graphics guy change the color of the frames manually, however you can see that the mod distorts anybody's avatar that is not perfectly square.
Can you tell me how to change the settings in whatever file the mod changes so I can set the frame/avatar size smaller by editing the file myself.
Quote from: xrunner on January 12, 2009, 11:34:10 AM
Can you tell me how to change the settings in whatever file the mod changes so I can set the frame/avatar size smaller by editing the file myself.
Find in your Display.template.php:
<img src="' . $message['member']['avatar']['href'] . '" width="94" height="94" alt="" />
Change width="94" and height="94".
Quote from: Yağız on January 12, 2009, 12:05:52 PM<img src="' . $message['member']['avatar']['href'] . '" width="94" height="94" alt="" />
Change width="94" and height="94".
OK, will that also make the frame smaller around the avatar?
No, it'll just make the avatar more smaller.
Quote from: Yağız on January 12, 2009, 01:08:49 PM
No, it'll just make the avatar more smaller.
Great, but if the frame isn't smaller it won't be a complete solution. How then do I make the frame smaller? Are there the same size controls for the frame in the file?
I didn't tried but, you can try to change all the width="19", width="113" etc.
Quote from: Yağız on January 12, 2009, 01:35:20 PM
I didn't tried but, you can try to change all the width="19", width="113" etc.
yes, you can make it with that tip
but for me is impossible make the frame smaller around the 65x65 avatar
anyone?
I have 65x65 avatars and this is the scaling I used to get the frames sized right -
<tr>
<td rowspan="3">
<img src="' . $settings['images_url'] . '/avatar_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '/01.png" width="13" height="86" alt="" /></td>
<td colspan="2">
<img src="' . $settings['images_url'] . '/avatar_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '/02.png" width="78" height="8" alt="" /></td>
</tr>
<tr>
<td>
<img src="' . $message['member']['avatar']['href'] . '" width="65" height="66" alt="" /></td>
<td rowspan="2">
<img src="' . $settings['images_url'] . '/avatar_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '/03.png" width="13" height="78" alt="" /></td>
</tr>
<tr>
<td>
<img src="' . $settings['images_url'] . '/avatar_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '/04.png" width="65" height="12" alt="" /></td>
</tr>
Quote from: xrunner on January 15, 2009, 09:57:19 PM
I have 65x65 avatars and this is the scaling I used to get the frames sized right -
<tr>
<td rowspan="3">
<img src="' . $settings['images_url'] . '/avatar_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '/01.png" width="13" height="86" alt="" /></td>
<td colspan="2">
<img src="' . $settings['images_url'] . '/avatar_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '/02.png" width="78" height="8" alt="" /></td>
</tr>
<tr>
<td>
<img src="' . $message['member']['avatar']['href'] . '" width="65" height="66" alt="" /></td>
<td rowspan="2">
<img src="' . $settings['images_url'] . '/avatar_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '/03.png" width="13" height="78" alt="" /></td>
</tr>
<tr>
<td>
<img src="' . $settings['images_url'] . '/avatar_' . ($message['member']['online']['is_online'] ? 'on' : 'off') . '/04.png" width="65" height="12" alt="" /></td>
</tr>
thank you so much!!!
only one more thing
<table width="87" ???
EDIT: ok, 90 is the correct width!
thanks
Hi, i have the mod working perfectly thanks, its great :)
one thing though, the offline status images, they have an outer white border, it don't look good on my dark gray background.
Is there anyway you could upload some images that have a transparent background?
I'm not good at editing the images I tried already, I cant get it right
Thanks
JohnCcCcCc
Nice Mod.
I used the edits for my 65x65 Avatars
Works fine on my forum v2.0 RC1
Can someone fix my Display.Template.php so that this Mod can work for me...?
Thanks!
victoryrock
I installed this mod tonight but all it did was make my avatars larger. There was no box around it. Is there something else that I need to change?
I've just installed this mod manually to a different theme other then the default. I've already checked the images and they are all in place, I've checked the mods coding on the template and there is no directory listed in the code but just in case I had placed the images in both the skins directory and the default skins directory. I'm not exactly sure what's missing. I'm almost thinking it has to do with the size? The avatars being used on my sight are 100x100. Do I have to change the sizing in the code or the images for the on/off myself to make the sizes work?
Hi all.
First, let me say this mod looks fantastic! Thanks a lot for it.
Now, little problem:
when I tried to install it in other theme, I found one problem: theme doesnt have Display.template.php. Ok I didnt panic and browsed for specific code parts in other php files I have there, but I didnt find anything.
Any idea how to solve this problem?
Theme is Tolkien
Thank you very much!
Can you create a red frame for hidden users, like busy status on Windows Live Messenger?
(http://ultraphoto.org/images/026p9pz1ugcw434x18u.jpg)
I can do that. But I'll this modification not develop anymore. I'm sorry...
i was able to apply this mod on my prev theme but i cant on new theme which has some different code and i cant modify them that is why i need your help..here is display.template.php file of the theme
Quote from: ♪ JohnCcCcCc ♫ on January 20, 2009, 09:59:40 PM
Hi, i have the mod working perfectly thanks, its great :)
one thing though, the offline status images, they have an outer white border, it don't look good on my dark gray background.
Is there anyway you could upload some images that have a transparent background?
I'm not good at editing the images I tried already, I cant get it right
Thanks
JohnCcCcCc
Fix of images in attach.
Just like MSN Messenger avatar border!!!!!
Quote from: Anpu on July 09, 2010, 05:15:48 PM
Quote from: ♪ JohnCcCcCc ♫ on January 20, 2009, 09:59:40 PM
Hi, i have the mod working perfectly thanks, its great :)
one thing though, the offline status images, they have an outer white border, it don't look good on my dark gray background.
Is there anyway you could upload some images that have a transparent background?
I'm not good at editing the images I tried already, I cant get it right
Thanks
JohnCcCcCc
Fix of images in attach.
Thanks!
SMF 2.0 RC4 ???
Sorry, this modification will not be developed anymore...
This mod is now updated for SMF 2.0
Changelog
08/08/2011 version 2.0
-Complete rewrite of the mod.
-No more template edits
-Cleaner code
error! :)
define "error" I can't and won't help if you don't provide enough details...
Hi Miss.
I downloaded the mod to see the improvements and I realized that you have a small bug
If you set different sizes: External avatars and Uploadable avatars
Only take the size of the External.
I attached images
Regards
Thank you! I was looking for something like this
Quote from: ^HeRaCLeS^ on August 13, 2011, 06:19:41 AM
Hi Miss.
I downloaded the mod to see the improvements and I realized that you have a small bug
If you set different sizes: External avatars and Uploadable avatars
Only take the size of the External.
I attached images
Regards
I'm going to check this.
After a quick check you're right, the query that populates $user_profile does not fetch the attach's height and width, I will have to modify that query a little bit to be able to obtain the attached avatar's width.
I tracked it just in case I forgot about this:
http://missallsunday.com/issue.9.0/
I have a mod designed like this, and instead of giving style to a div, give it directly to the image style.
Maybe you can do so. That way you have to not check the size.
Regards ;)
It will be probably easier, yet you will need to modify the image to give the ID or class.
I prefer a div because it allows you to have more control over the frame.
Anyway it is solved, was just a matter of adding a.width to the query, that way $profile['width'] is available and can be used.
Quote from: Miss All Sunday
It will be probably easier, yet you will need to modify the image to give the ID or class.
Yes yes :D
Quote from: Miss All Sunday
Anyway it is solved, was just a matter of adding a.width to the query, that way $profile['width'] is available and can be used.
Excellent ;)
Glad you found a solution.
Regards
New version 2.0.1:
Changelog
30/08/2011 version 2.0.1
fixed a bug with uploaded avatars width.
Excellent work. Congratulations Miss ;)
Thanks.. I love this mod.. . :)
New version
Changelog
04/01/2012 version 2.0.2
-Compatibility for 2.0.x
-Minor bug fixes
HTML validation errors:
Quotedocument type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
Fixed.
Big thanks.
Suki, first of all thank you for the mod.
Today I found something related to the mod you may want to know. Check this thread:
http://www.simplemachines.org/community/index.php?topic=495886.0
I'm not qualified to say it's mod's bug, or if the mod just triggers/reveals some SMF bug. Either ways I have no any other troubles with this mod.
And whats the actual problem?
This mod doesn't mess with sessions in any way and it doesn't sent any headers either, this mod is just a big ternary, I?m sorry but I see no relation between your problem and this mod.
The problem is:
http://bg-gradina.org/test-1.php - new forum install + this mod installed
http://bg-gradina.org/test-2.php - new forum install no mods installed
On top of the first linked page I see these lines:
Warning: Cannot modify header information - headers already sent by (output started at /home/hobiseme/public_html/bg-gradina/test-1/Sources/Load.php:2753) in /home/hobiseme/public_html/bg-gradina/test-1/Sources/Subs.php on line 3335
Warning: Cannot modify header information - headers already sent by (output started at /home/hobiseme/public_html/bg-gradina/test-1/Sources/Load.php:2753) in /home/hobiseme/public_html/bg-gradina/test-1/Sources/Subs.php on line 3336
Warning: Cannot modify header information - headers already sent by (output started at /home/hobiseme/public_html/bg-gradina/test-1/Sources/Load.php:2753) in /home/hobiseme/public_html/bg-gradina/test-1/Sources/Subs.php on line 3342
Warning: Cannot modify header information - headers already sent by (output started at /home/hobiseme/public_html/bg-gradina/test-1/Sources/Load.php:2753) in /home/hobiseme/public_html/bg-gradina/test-1/Sources/Subs.php on line 3345
I had tested it on a forum with 75 mods installed only after I uninstalled this mod the warnings disappeared, so I thought it's somehow related to the mod. But as I said I have never had any other problems with it.
Please, note, I do not ask for support. It really looks like this is an odd case, so do not bother with it. I just wanted to point it out. I will find a way to achieve what I want without using template_header();
Once again, thank you for the mod!
Edit: Found the reason for the warnings. The mod adds extra row after the ?> in Load.php
Thanks, I updated the mod to remove the extra stuff.
Quote from: Suki on January 27, 2013, 08:39:32 AM
Thanks, I updated the mod to remove the extra stuff.
After installing this mod, I keep getting these errors:
Quote
http://mydomain.com/index.php?http://mydomain.com/Themes/Music_2_0/css/avatar_frame_mod.css
8: Undefined index: disable_avatar
File: ../Themes/Music_2_0/BoardIndex.template.php (main sub template - eval?)
Line: 202
Strangely, this error doesn't show up in my local host test site. Any suggestions?