Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Suki on January 07, 2009, 12:41:41 AM

Title: On / Off Avatar Frame
Post by: Suki on January 07, 2009, 12:41:41 AM
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

Description
This 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.

Changelog
04/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
Title: Re: On / Off Avatar Frame
Post by: emilio05 on January 07, 2009, 01:28:10 AM
Nice

Thanks
Title: Re: On / Off Avatar Frame
Post by: Sabre™ on January 07, 2009, 02:05:20 AM
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 :)
Title: Re: On / Off Avatar Frame
Post by: islam2hamy on January 07, 2009, 05:14:47 AM
Nice

Thanks
Title: Re: On / Off Avatar Frame
Post by: islam2hamy on January 07, 2009, 05:23:41 AM
don't work good with Arabic language  :'(
Title: Re: On / Off Avatar Frame
Post by: 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
Title: Re: On / Off Avatar Frame
Post by: 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
Title: Re: On / Off Avatar Frame
Post by: Özgür on January 07, 2009, 03:09:06 PM
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.
Title: Re: On / Off Avatar Frame
Post by: 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!
Title: Re: On / Off Avatar Frame
Post by: Yigal on January 08, 2009, 12:58:47 AM
SO PRETTY
Title: Re: On / Off Avatar Frame
Post by: islam2hamy on January 08, 2009, 02:04:50 AM
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
Title: Re: On / Off Avatar Frame
Post by: Özgür on January 08, 2009, 05:24:12 AM
Try this. i'm not sure =)
Title: Re: On / Off Avatar Frame
Post by: islam2hamy on January 08, 2009, 05:48:29 AM
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.
Title: Re: On / Off Avatar Frame
Post by: Özgür on January 08, 2009, 06:18:14 AM
right & left fixing. but top & bottom i can't fix. im sorry :(
Title: Re: On / Off Avatar Frame
Post by: islam2hamy on January 08, 2009, 06:47:14 AM
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.
Title: Re: On / Off Avatar Frame
Post by: Jessikard on January 08, 2009, 07:39:59 AM
works fine - thx
Title: Re: On / Off Avatar Frame
Post by: SilverKnight on January 08, 2009, 12:08:18 PM
Not bad, im guessing the weird middle image is if they don't have a custom avatar?
Title: Re: On / Off Avatar Frame
Post by: bullbreedluverz on January 08, 2009, 12:09:23 PM
yeah if member dont have an avatar they get grey 1 for offline and green 1 for online
Title: Re: On / Off Avatar Frame
Post by: 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
Title: Re: On / Off Avatar Frame
Post by: qubbah on January 08, 2009, 03:00:57 PM
for me is it too big avatar setting/frame.

Anybody can make it smaller?

Like 60/60
Title: Re: On / Off Avatar Frame
Post by: Asshandler on January 08, 2009, 03:10:28 PM
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.
Title: Re: On / Off Avatar Frame
Post by: Filipina on January 08, 2009, 09:09:47 PM
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.   
Title: Re: On / Off Avatar Frame
Post by: - 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.
Title: Re: On / Off Avatar Frame
Post by: 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
Title: Re: On / Off Avatar Frame
Post by: - Lawrence - on January 10, 2009, 02:43:31 PM
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?
Title: Re: On / Off Avatar Frame
Post by: bullbreedluverz on January 10, 2009, 02:49:40 PM
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
Title: Re: On / Off Avatar Frame
Post by: matasanos on January 11, 2009, 07:51:45 AM
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?
Title: Re: On / Off Avatar Frame
Post by: Yağız... on January 11, 2009, 08:27:28 AM
@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.
Title: Re: On / Off Avatar Frame
Post by: islam2hamy on January 11, 2009, 11:27:28 AM
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.
Title: Re: On / Off Avatar Frame
Post by: 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.
Title: Re: On / Off Avatar Frame
Post by: grafitus on January 12, 2009, 09:03:38 AM
I can't help you because my English speak not good :(

Understanding for thanks..
Title: Re: On / Off Avatar Frame
Post by: Yağız... on January 12, 2009, 09:17:22 AM
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?
Title: Re: On / Off Avatar Frame
Post by: xrunner on January 12, 2009, 11:34:10 AM
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.
Title: Re: On / Off Avatar Frame
Post by: Yağız... on January 12, 2009, 12:05:52 PM
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".
Title: Re: On / Off Avatar Frame
Post by: xrunner on January 12, 2009, 12:25:52 PM
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?
Title: Re: On / Off Avatar Frame
Post by: Yağız... on January 12, 2009, 01:08:49 PM
No, it'll just make the avatar more smaller.
Title: Re: On / Off Avatar Frame
Post by: xrunner on January 12, 2009, 01:31:17 PM
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?
Title: Re: On / Off Avatar Frame
Post by: 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.
Title: Re: On / Off Avatar Frame
Post by: matasanos on January 14, 2009, 05:26:07 PM
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?
Title: Re: On / Off Avatar Frame
Post by: 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>
Title: Re: On / Off Avatar Frame
Post by: matasanos on January 17, 2009, 09:09:23 AM
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
Title: Re: On / Off Avatar Frame
Post by: ɔɔɔɔɔɔuɥoɾ 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
Title: Re: On / Off Avatar Frame
Post by: Garry1953 on February 10, 2009, 01:12:55 AM
Nice Mod.
I used the edits for my 65x65 Avatars

Works fine on my forum v2.0 RC1
Title: Re: On / Off Avatar Frame
Post by: victoryrock on February 12, 2009, 12:24:06 AM
Can someone fix my Display.Template.php so that this Mod can work for me...?

Thanks!

victoryrock
Title: Re: On / Off Avatar Frame
Post by: MaryLouW on March 04, 2009, 05:24:32 AM
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?
Title: Re: On / Off Avatar Frame
Post by: Rhyme on September 29, 2009, 09:24:14 PM
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?
Title: Re: On / Off Avatar Frame
Post by: Anpu on December 05, 2009, 10:33:20 AM
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!
Title: Re: On / Off Avatar Frame
Post by: Dallape on February 01, 2010, 11:04:41 AM
Can you create a red frame for hidden users, like busy status on Windows Live Messenger?
(http://ultraphoto.org/images/026p9pz1ugcw434x18u.jpg)
Title: Re: On / Off Avatar Frame
Post by: grafitus on February 03, 2010, 02:13:18 PM
I can do that. But I'll this modification not develop anymore. I'm sorry...
Title: Re: On / Off Avatar Frame
Post by: !RFAN on March 30, 2010, 04:19:34 PM
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

Title: Re: On / Off Avatar Frame
Post by: 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.
Title: Re: On / Off Avatar Frame
Post by: KensonPlays on July 09, 2010, 05:21:14 PM
Just like MSN Messenger avatar border!!!!!
Title: Re: On / Off Avatar Frame
Post by: ɔɔɔɔɔɔuɥoɾ on July 10, 2010, 12:05:12 AM
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!
Title: Re: On / Off Avatar Frame
Post by: inter on November 08, 2010, 05:32:57 AM
SMF 2.0 RC4  ???
Title: Re: On / Off Avatar Frame
Post by: grafitus on November 08, 2010, 10:05:12 AM
Sorry, this modification will not be developed anymore...
Title: Re: On / Off Avatar Frame
Post by: Suki on August 08, 2011, 06:59:45 PM
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
Title: Re: On / Off Avatar Frame
Post by: inter on August 09, 2011, 11:25:40 AM
error!  :)
Title: Re: On / Off Avatar Frame
Post by: Suki on August 09, 2011, 11:53:40 AM
define "error"  I can't and won't help if you don't provide enough details...


Title: Re: On / Off Avatar Frame
Post by: ^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
Title: Re: On / Off Avatar Frame
Post by: NHWD on August 13, 2011, 10:49:00 PM
Thank you! I was looking for something like this
Title: Re: On / Off Avatar Frame
Post by: Suki on August 14, 2011, 07:23:28 PM
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.
Title: Re: On / Off Avatar Frame
Post by: Suki on August 24, 2011, 08:33:47 PM
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/
Title: Re: On / Off Avatar Frame
Post by: ^HeRaCLeS^ on August 25, 2011, 11:12:02 AM
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 ;)
Title: Re: On / Off Avatar Frame
Post by: Suki on August 25, 2011, 11:26:20 AM
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.
Title: Re: On / Off Avatar Frame
Post by: ^HeRaCLeS^ on August 25, 2011, 11:33:38 AM
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
Title: Re: On / Off Avatar Frame
Post by: Suki on August 30, 2011, 11:23:23 AM
New version 2.0.1:

Changelog

30/08/2011  version 2.0.1

fixed a bug with uploaded avatars width.
Title: Re: On / Off Avatar Frame
Post by: ^HeRaCLeS^ on August 30, 2011, 12:23:05 PM
Excellent work. Congratulations Miss ;)
Title: Re: On / Off Avatar Frame
Post by: Hackathon on August 30, 2011, 05:23:18 PM
Thanks.. I love this mod.. . :)
Title: Re: On / Off Avatar Frame
Post by: Suki on January 04, 2012, 07:26:19 PM
New version

Changelog
04/01/2012  version 2.0.2
-Compatibility for 2.0.x
-Minor bug fixes
Title: Re: On / Off Avatar Frame
Post by: Bugo on January 05, 2012, 10:20:25 PM
HTML validation errors:
Quotedocument type does not allow element "div" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
Title: Re: On / Off Avatar Frame
Post by: Suki on January 06, 2012, 09:24:15 AM
Fixed.
Title: Re: On / Off Avatar Frame
Post by: Bugo on January 06, 2012, 06:31:58 PM
Big thanks.
Title: Re: On / Off Avatar Frame
Post by: Hristo on January 26, 2013, 05:39:36 PM
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.
Title: Re: On / Off Avatar Frame
Post by: Suki on January 26, 2013, 07:01:17 PM
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.
Title: Re: On / Off Avatar Frame
Post by: Hristo on January 27, 2013, 06:46:45 AM
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
Title: Re: On / Off Avatar Frame
Post by: Suki on January 27, 2013, 08:39:32 AM
Thanks, I updated the mod to remove the extra stuff.
Title: Re: On / Off Avatar Frame
Post by: tMicky on May 13, 2013, 08:31:36 AM
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?