Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID Sign In with Twitter
Support for Vanilla Forums Cloud product

In this Discussion

Follow Us


Account Pictures

edited August 2007 in Questions
This discussion is related to the Account Pictures addon.
Account Pictures
«1345

Comments

  • 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?
  • MarkMark Vanilla Staff
    I think the problem is that Jazzy's add-ons are so kickass that everyone has them.
  • 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);
    imageSaveAlpha($Original, true);
    imageAlphaBlending($Thumb, false);
    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 {
    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);

    imageAlphaBlending($Original, false);
    imageSaveAlpha($Original, true);
    imageAlphaBlending($Thumb, false);
    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 {
    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 {
    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 {
    padding:9px 0px 9px 30px;
    margin-right: 6px;
    background-repeat:no-repeat;
    display: inline;
    background: #fff center center no-repeat;
    }


    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!
  • pic
       CSSEdit

    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.
  • 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.
«1345
Sign In or Register to comment.