News:

SMF 2.1.6 has been released! Take it for a spin! Read more.

Main Menu

On / Off Avatar Frame

Started by All Colours Sam, January 07, 2009, 12:41:41 AM

Previous topic - Next topic

Asshandler

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.
The only thing necessary for the triumph of evil is for good men to do nothing.

Filipina

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.   


bullbreedluverz

Quote from: - Lawrence - on January 10, 2009, 02:19:51 PM
My site is: 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

- Lawrence -

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

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?

bullbreedluverz

#25
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

matasanos

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?

Yağız...

@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.

islam2hamy


Arabic Translator - Web Designer
My Mods / My Themes  //  GfxLand





xrunner

#29
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.

grafitus

I can't help you because my English speak not good :(

Understanding for thanks..

Yağız...

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?

xrunner

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.

Yağız...

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".

xrunner

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?

Yağız...

No, it'll just make the avatar more smaller.

xrunner

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?

Yağız...

I didn't tried but, you can try to change all the width="19", width="113" etc.

matasanos

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?

xrunner

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>

Advertisement: