Forum Index
RegisterSearchFAQMemberlistUsergroupsLog in
resizeAvatar
Goto page 1, 2  Next
 
Reply to topic    Forum Index » Additional Downloads View previous topic
View next topic
resizeAvatar
Author Message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2736
Location: Germany

Post resizeAvatar Reply with quote
Adds a {avatar=width,height} tag to the templates and resizes the avatar to the given values.



resizeAvatar.zip
 Description:
resizeAvatar

Download
 Filename:  resizeAvatar.zip
 Filesize:  577 Bytes
 Downloaded:  607 Time(s)

Sun Nov 13, 2005 3:56 pm View user's profile Send private message
Guest








Please login to hide the ads.

Miro



Joined: 05 Apr 2006
Posts: 43

Post Reply with quote
where should this file be? in the main directory or in plugins/?
Fri Apr 21, 2006 12:24 am View user's profile Send private message
Ramon



Joined: 12 Oct 2005
Posts: 462
Location: Hoogeveen, NL

Post Reply with quote
Just put it in the directory "plugins".. Then - in the adminpanel - go to Manage Plugins, activate the resizeavatar plugin and you should be set Wink
Sat Apr 22, 2006 2:39 am View user's profile Send private message Visit poster's website
scottdallas



Joined: 04 May 2006
Posts: 1843
Location: US

Post Reply with quote
Can we have width,height,border?

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Sat Oct 21, 2006 5:37 pm View user's profile Send private message Visit poster's website AIM Address
erlendfl



Joined: 10 Jan 2007
Posts: 21

Post Reply with quote
Look here: http://engelsk-fotball.net/



You can see that I have use this plugin, but something bothers me. Does the height always have to be static? No I have {width=407,150} I only want to decide the width and then the height adjust itself. Is this possible with this plugin?



And is it also possible to change the alt-tag? No it is only saying avatar, and I don't know how to change it.



Thanks in advance! Smile
Wed Jan 10, 2007 2:57 pm View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 1843
Location: US

Post Reply with quote
The area to change the alt tag on this plugin is here:



Code:
$output = preg_replace("'{avatar=(.*?),(.*?)}'", ($row['avatar'] ? "<img src=\"".$row['avatar']."\" alt=\"image\" border=1 width=\"\\1\" height=\"\\2\" />" : ""),$output);




and in particular.. this spot of this code:



Code:
alt=\"image\"




Right now I have it set to a generic term which is 'image'... just change that to whatever you'd like it to say.. then upload it and clear your cache and check your site. Should show up. This does wonders for Google Image search results Smile I don't know about the other question you have about adjusting your height. Try a percentage maybe? I'll try it right now and see what happens.



That being said.. I tried changing the alt tag to {title}.. but it literally displayed the text "{title}" as my alt tag. How could I get the titles of the post to show up in this hack? Is it possible? That would make INCREDIBLE Google Image search results.

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Fri Apr 27, 2007 8:46 am View user's profile Send private message Visit poster's website AIM Address
scottdallas



Joined: 04 May 2006
Posts: 1843
Location: US

Post Reply with quote
I tried a percentage of 100% and it worked fine. So put something like this:



{avatar=407,100%}

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Fri Apr 27, 2007 8:57 am View user's profile Send private message Visit poster's website AIM Address
Mania



Joined: 03 Feb 2007
Posts: 106

Post Reply with quote
how can i use this plugin for Author Avatar?
like that
{author-avatar=40px,100%}

thanx
Wed Jun 18, 2008 12:31 pm View user's profile Send private message
Disharmony



Joined: 05 Jun 2008
Posts: 45

Post Reply with quote
This doesn't seem to be working for me. I have it set as {avatar=50,50} but nothing shows up.

If there's no work around on this, I guess you guys could just tell me what file do I edit to add a "/" on the avatar's img src (ie. <.... border="0" />) so it would validate? Very Happy
Thu Jun 26, 2008 3:45 pm View user's profile Send private message
FI-DD
Admin


Joined: 22 Sep 2005
Posts: 2736
Location: Germany

Post Reply with quote
Head.php:
Code:
$user_avatar[$row['username']] = ($row['avatar'] ? '<img src="'.$config_path_userpic_upload.'/'.$row['username'].'.'.$row['avatar'].'" alt="" border="0">' : '');

Thu Jun 26, 2008 5:37 pm View user's profile Send private message
acateoN



Joined: 12 Feb 2008
Posts: 47

Post Reply with quote
Sadly this plugin dont work for me. When using {avatar=50,50} nothing shows up. {avatar} works fine though. : (

_________________
www.xpl.se - Runs under CNR
Fri Jun 27, 2008 6:36 pm View user's profile Send private message
Disharmony



Joined: 05 Jun 2008
Posts: 45

Post Reply with quote
What's the point of this hack anyway? Isn't there a setting built in that lets you restrict avatar sizes to a certain width and height?

FI-DD wrote:
Head.php:
Code:
$user_avatar[$row['username']] = ($row['avatar'] ? '<img src="'.$config_path_userpic_upload.'/'.$row['username'].'.'.$row['avatar'].'" alt="" border="0">' : '');


Merci!
Sat Jun 28, 2008 3:44 am View user's profile Send private message
scottdallas



Joined: 04 May 2006
Posts: 1843
Location: US

Post Reply with quote
Quote:
What's the point of this hack anyway?


Makes it easier to make sure all your thumbnail images are the same size.

Quote:
Isn't there a setting built in that lets you restrict avatar sizes to a certain width and height?


Not that I know of, that's why this was created. If there is, well now there are 2 options for doing so Smile

_________________
www.scottdizzle.com uses cnr Smile
last update: 07-22-08: 8:30 pm
Tue Jul 08, 2008 11:05 pm View user's profile Send private message Visit poster's website AIM Address
Disharmony



Joined: 05 Jun 2008
Posts: 45

Post Reply with quote
I just checked and on the system settings there's an avatar width/height setting.
Wed Jul 09, 2008 3:00 am View user's profile Send private message
Partyism



Joined: 25 Sep 2007
Posts: 268

Post Reply with quote
Would be awesome if we could change the alt="" to the name of the picture
Mon Sep 15, 2008 5:41 pm View user's profile Send private message
Display posts from previous:    
Reply to topic    Forum Index » Additional Downloads All times are GMT + 1 Hour
Goto page 1, 2  Next
Page 1 of 2

 
Jump to: 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum



Powered by phpBB © 2001, 2005 phpBB Group
Design by Freestyle XL / Music Lyrics.