This extension will allow your users to upload their icon and picture and store it on your server. You'll have to create an upload directory and make it writeable. Also, the files which will get uploaded should have writing permissions.
You can change the icon and picture sizes on the settings tab. It will overrule the default Vanilla 1 css to display your custom sized images so you don't need to change the stylesheet manually.
Uploaded images will automatically be resized and cropped!
Other Requirements (if any):
skube Call me anal, but you should probably add type to line 54, just so everything continues to validate.type=\"text/css\"
Skube, man, are you on Jazz's case here today or what?
Mark I think the problem is that Jazzy's add-ons are so kickass that everyone has them.
skube Yeah, I'm really not targeting Jazzman. I just happen to use everything the guy makes. :)
Keep the suggestions coming skube. We always want things to get better.
I modified this add-on slightly to allow transparency in images. When resized, transparent images were getting a black background.
Here is the code in case anyone is interested:imageAlphaBlending($Original, false);<br />imageSaveAlpha($Original, true);<br />imageAlphaBlending($Thumb, false);<br />imageSaveAlpha($Thumb, true);
You might also want to remove the white background colour from the CSS (it blocks the divider line in FF2 Mac OS X):#Comments .CommentHeader li div.CommentIcon {<br /> background: transparent center center no-repeat;
where do u add the code?
Taylan: What line do you put the transparent image code on?
I modified this add-on slightly to allow transparency in images. When resized, transparent images were getting a black background.
Here is the code in case anyone is interested:
imageAlphaBlending($Original, false);
imageSaveAlpha($Original, true);
imageAlphaBlending($Thumb, false);
imageSaveAlpha($Thumb, true);
Sorry about that - you can make the call right after $Thumb is created through imagecreatetruecolor around line 260:$Thumb = imagecreatetruecolor($ThumbWidth, $ThumbHeight);<br /><br />imageAlphaBlending($Original, false);<br />imageSaveAlpha($Original, true);<br />imageAlphaBlending($Thumb, false);<br />imageSaveAlpha($Thumb, true);
Can anyone confirm, that this extension works with the latest (1.1.2) version of Vanilla? - or are there any manual edits required?
Yes, this does work with 1.1.2. After installing, make sure you go to Settings and change any of the preferences for Account Pictures.
Also, make sure you create an uploads folder, and a folder inside that called AccountPictures, and CHMOD both to 777 so that the you can upload images.
@dhdesign: thank you for the info!
Have the tweaks/fixes mentioned in this thread already been added to the latest version by Jazzman?
After installing this extension, a display bug occurs above the icon. You can read more specifics about this bug in this thread.
@JDW: are you referring to the white background problem mentioned in this comment above?
icouto,
Thank you for alerting me to that tip. The specific part of taylan's post which refers to what I was talking about is as follows:
You might also want to remove the white background colour from the CSS (it blocks the divider line in FF2 Mac OS X):#Comments .CommentHeader li div.CommentIcon {<br /> background: transparent center center no-repeat;
It is unfortunate that Jazzman (the author of Account Pictures) could not do this for us, as I am not sure exactly how it is to be done. I opened the /forum/extensions/AccountPictures/default.php file in TextWrangler. I see that line#47 looks similar to the one mentioned in taylan's post, as follows:#Comments .CommentHeader li div.CommentIcon { <br /> padding: {IconHeight}px 0px {IconHeight}px {IconWidth}px; }
But what is one supposed to do at this point? Should we REPLACE line#47 with taylan's code? Or should we somehow merge the two lines together?
Thanks!
@JDW: if I remember correctly, you are actually supposed to open the default "vanilla.css" style-sheet. Somewhere in there, you will see the line above, except that instead of the word "transparent", you will see "white", or "#FFF", or something like it. Just replace that text with "transparent", and it will work ok!
I hope this helps!
icouto,
Thank you for the suggestion. It works perfectly to solve the problem!
For the sake of assisting others who may wish to try this, note that I edited the following file in TextWrangler:
/forum/themes/vanilla/styles/default/vanilla.css
Inside that vanilla.css file, the following code appears, starting at Line#554:#Comments .CommentHeader li div.CommentIcon {<br /> padding:9px 0px 9px 30px;<br /> margin-right: 6px;<br /> background-repeat:no-repeat;<br /> display: inline;<br /> background: <a href="/search?Search=%23fff">#fff</a> center center no-repeat;<br /> }
Replace "#fff" with "transparent" and save. The gray line problem is now gone!
(As an aside, it would seem this is technically a "Vanilla bug" and really should be fixed in the next release.)
@JDW: I see from your postings - and your icon - that you are a Mac user, using the venerable TextWrangler. Although I, too, like TextWrangler a lot, I have found that for CSS work there is nothing - and I really mean NOTHING - that compares to MacRabbit's "CSSEdit". It makes playing around with CSS an absolute joy!
Wanderer Posted: Tuesday, 10 April 2007 at 4:56PM
I must first say that this extension is really great and it has been installed and in use since Day 1.
I have a slight problem here as I am using the forum on a server with safe_mode (not sure if this is relevant) and I find that I cannot CHMOD, edit, delete or download the files uploaded by Account Pictures.
I want to remove some unused files inside. What is the best way to do this?
kifo,
If you are not allowed to change permissions on files/folders on your server via FTP clients, then you need to speak to your host provider about giving you such power! Or turn off this "safe_mode" whatever it is, as such would appear to be preventing you for performing even the most basic tasks on your server files.
Who is your web service provider, by the way?
Thanks for the reply! I doubt I can get them to turn off safe_mode. It is clearly stated in the hosting FAQ.
Oh I am running it on www.nearlyfreespeech.net.
If I wanted to change the file name format (dump the MD5), would I only have to adjust this line:
$this->UploadPath, md5($InputName . $UserID) .'.'. strtolower($FileExtension), '0', '1');
TO something like:
$this->UploadPath, $InputName . '-' . $UserID) .'.'. strtolower($FileExtension), '0', '1');
What value instead of $InputName would I use for their username or Full name? ($username? $fullname?)
Jeffk, any luck?
Also does anyone know if this extension updates pictures for the user, or if it just keeps adding new pictures to the upload folder. I.E. if a user changes his display picture often, I don't want there to be 15 images not being used taking up HD space.
vishal is this a secure plugin? i'm not too much of an expert on php but is it safe from someone uploading a vicious script and executing it?
I'm noticing that the Account Picture isn't posting to the account page. The Icon is posting instead. Is this a setting in the files?
I have issues with the picture sizing
i have my thumbnails at 50x50, and that's fine
but my account picture is at
280x *nothing*
and i can't seem to do anything to change it!
help
I'm using this extension with Jazzman's theme but after turning on the extension and uploading an image for my account, the image doesn't display properly. The image isn't lined up with the account name (it's a bit too far above meaning it displays over the dividing line between comments). So I unchecked the extension to revert back -- and now the account picture displays properly! The problem obviously must lie in the .php file, but I don't know enough to track it down. Any ideas?
EDIT: I've replaced the variable div.CommentIcon in the .php file with the fixed-width specified in the vanilla.css file and everything seems OK. Anyone know why/if this would be a problem later on?
do I put the uploads folder inside the AccountPictures folder?
I keep getting this error:
Some problems were encountered
Your version of PHP does not appear to have GIF conversion support.
cool addon
rayk How do I change the quality of the resize?
Okay here is how to up the quality of attached images -> on line 262 <br />if (!@$SaveFunction($Thumb, $OutputImage ))
add number after $OutputImage,if (!@$SaveFunction($Thumb, $OutputImage, 100))
Nice find :)
rayk Hmm, how hard is it to add animated gif and transparency support (png and gif) ? Or is that going to make the extension less secure?
I am really having trouble with this one. It keeps telling me that I don't have JPEG or GIF conversion support, but I don't have any problems with changing permissions on my server. The folders are both set to 777.
Does anyone know why I might be having this problem with uploading the pics?
Have you got the gdlib libraries compiled into your PHP install? That's one you probably have to ask your hosts.
ok. just wanted to be sure there is nothing I can do from my end. I will get with the host.
Thanks!
thanks for the great extension.
rayk
Hmm, how hard is it to add animated gif and transparency support (png and gif) ?
word
Version number changed from 1.1 to 1.2.
Uploaded version 1.2 of Account Pictures.
Changes:
Version 1.2 - 16.08.2007, Jazzman
- Removed security check as it is not needed for this addon
- Added type="text/css" to style tag (skube)
- CSS fix: white background changed to transparent (taylan)
- Changed image processing to phpThumb
- Now supports ImageMagick
You'll have to remove the old settings from your conf/settings.php in order it to work properly. I haven't found out how to resize/crop animated gifs though.
Has anyone gotten PredefinedAttributes working properly with this extension?
@Kronok: Just enable the PredefinedAttributes extension after enabling Account Pictures.
Guess my host doesn't provide ImageMagick. Is it possible to further use this extension?
I assumed "Now supports ImageMagick" meant that it can use that or GD, whichever you decide? Jazzman?
Yeah, I thought so too :] but the extension gives me this error:Notice: Undefined index: ACCOUNTPICTURES_IMAGEMAGICK_PATH in /srv/www/vhosts/multistrefa.info/httpdocs/extensions/AccountPictures/default.php on line 146
whenever I upload a picture.
@lipa: it's missing in your conf/settings.php. You'll either need to remove all ACCOUNTPICTURES_ lines, or add $Configuration['ACCOUNTPICTURES_IMAGEMAGICK_PATH'] = ''; to your conf/settings.php
And yes, it will use GD as default. ImageMagick will only be just if a path has been given.
That did the trick. Thank you! ;-)
hi community,
first step on this "faboulistic fo", and ... a question :
Is there any way to chmod 755 instead of 777 ?
And my users pictures are allways chmod 600, never 777, how can i fix that ?
Thanks for all.
Hmmm... Does this need a image larger then say 64x64 to work? I've tried to add smaller ones but they will never show up. I have a 20x60 image I would like to use but I also want my user to have the ability to use upto 64x64 or anything under that.
It seems it will only work if it HAS to resize the image.
I'm not using ImageMagick, should I?
Resilient Images uploaded have a really low quality. Is there any way to have the process set to retain quality? I read a post above by rayk mentioning adding a value after $OutputImage such as 100. Following that the image processing changed to phpThumb and line 262 refers to something else completely.
Does anyone know where I would now put this value?
Addons are custom features that you can add to your Vanilla forum. Addons are created by our community of developers and people like you!
We review addons to make sure they are safe and don't cause bugs. An addon is considered to be "Vanilla Approved" once our review process is complete.