Not signed in (Sign In)

Categories

Vanilla 1.1.5 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    •  
      CommentAuthorJazzman
    • CommentTimeJun 4th 2006 edited
     # 1
    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!
    •  
      CommentAuthorskube
    • CommentTimeMar 5th 2007
     # 2
    Call me anal, but you should probably add type to line 54, just so everything continues to validate.

    type=\"text/css\"
    •  
      CommentAuthorTomTester
    • CommentTimeMar 5th 2007
     # 3
    Skube, man, are you on Jazz's case here today or what?
    •  
      CommentAuthorMark
    • CommentTimeMar 5th 2007
     # 4
    I think the problem is that Jazzy's add-ons are so kickass that everyone has them.
    •  
      CommentAuthorskube
    • CommentTimeMar 5th 2007
     # 5
    Yeah, I'm really not targeting Jazzman. I just happen to use everything the guy makes. :)
    •  
      CommentAuthor[-Stash-]
    • CommentTimeMar 7th 2007
     # 6
    Keep the suggestions coming skube. We always want things to get better.
    • CommentAuthortaylan
    • CommentTimeMar 9th 2007 edited
     # 7
    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;
  1.  # 8
    where do u add the code?
    • CommentAuthormissyac
    • CommentTimeMar 11th 2007
     # 9

    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);
    • CommentAuthortaylan
    • CommentTimeMar 12th 2007 edited
     # 10
    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);
    •  
      CommentAuthoricouto
    • CommentTimeMar 15th 2007
     # 11
    Can anyone confirm, that this extension works with the latest (1.1.2) version of Vanilla? - or are there any manual edits required?
    • CommentAuthordhdesign
    • CommentTimeMar 15th 2007
     # 12
    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.
    •  
      CommentAuthoricouto
    • CommentTimeMar 20th 2007
     # 13
    @dhdesign: thank you for the info!

    Have the tweaks/fixes mentioned in this thread already been added to the latest version by Jazzman?
    •  
      CommentAuthorJDW
    • CommentTimeApr 9th 2007
     # 14
    After installing this extension, a display bug occurs above the icon. You can read more specifics about this bug in this thread.
    •  
      CommentAuthoricouto
    • CommentTimeApr 9th 2007 edited
     # 15
    @JDW: are you referring to the white background problem mentioned in this comment above?
    •  
      CommentAuthorJDW
    • CommentTimeApr 9th 2007
     # 16
    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!
    •  
      CommentAuthoricouto
    • CommentTimeApr 9th 2007
     # 17
    @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!
    •  
      CommentAuthorJDW
    • CommentTimeApr 9th 2007
     # 18
    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.)
    •  
      CommentAuthoricouto
    • CommentTimeApr 10th 2007
     # 19
    @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!
    •  
      CommentAuthorWanderer
    • CommentTimeApr 10th 2007
     # 20
    pic
       CSSEdit

    Posted: Tuesday, 10 April 2007 at 4:56PM

    • CommentAuthorkifo
    • CommentTimeApr 12th 2007
     # 21
    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?
    •  
      CommentAuthorJDW
    • CommentTimeApr 12th 2007
     # 22
    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?
    • CommentAuthorkifo
    • CommentTimeApr 16th 2007
     # 23
    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.
    • CommentAuthorjeffk
    • CommentTimeMay 28th 2007 edited
     # 24
    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?)
    • CommentAuthorscherem
    • CommentTimeMay 31st 2007 edited
     # 25
    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.
    • CommentAuthorvishal
    • CommentTimeJun 13th 2007
     # 26
    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?
    • CommentAuthorscherem
    • CommentTimeJun 19th 2007
     # 27
    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?
    • CommentAuthordepape0
    • CommentTimeJun 26th 2007
     # 28
    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
    • CommentAuthorjohnny_n
    • CommentTimeJul 16th 2007 edited
     # 29
    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?
    • CommentAuthorHerrgeist
    • CommentTimeJul 18th 2007 edited
     # 30
    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.
    • CommentAuthorHerrgeist
    • CommentTimeJul 18th 2007 edited
     # 31
    cool addon
    •  
      CommentAuthorrayk
    • CommentTimeJul 19th 2007 edited
     # 32
    How do I change the quality of the resize?

    Okay here is how to up the quality of attached images -> on line 262

    if (!@$SaveFunction($Thumb, $OutputImage ))


    add number after $OutputImage,

    if (!@$SaveFunction($Thumb, $OutputImage, 100))
    •  
      CommentAuthor[-Stash-]
    • CommentTimeJul 19th 2007
     # 33
    Nice find :)
    •  
      CommentAuthorrayk
    • CommentTimeJul 19th 2007 edited
     # 34
    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?
    • CommentAuthorHerrgeist
    • CommentTimeJul 19th 2007
     # 35
    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?
  2.  # 36
    Have you got the gdlib libraries compiled into your PHP install? That's one you probably have to ask your hosts.
    • CommentAuthorHerrgeist
    • CommentTimeJul 19th 2007
     # 37
    ok. just wanted to be sure there is nothing I can do from my end. I will get with the host.

    Thanks!
    • CommentAuthorholmes
    • CommentTimeJul 20th 2007 edited
     # 38
    thanks for the great extension.
    • CommentAuthorreap
    • CommentTimeAug 15th 2007 edited
     # 39
    rayk
    Hmm, how hard is it to add animated gif and transparency support (png and gif) ?


    word
  3.  # 40
    Version number changed from 1.1 to 1.2.
  4.  # 41
    Uploaded version 1.2 of Account Pictures.
    •  
      CommentAuthorJazzman
    • CommentTimeAug 16th 2007
     # 42
    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.
    • CommentAuthorKronok
    • CommentTimeAug 16th 2007
     # 43
    Has anyone gotten PredefinedAttributes working properly with this extension?
    •  
      CommentAuthordkodr
    • CommentTimeAug 17th 2007
     # 44
    @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?
    •  
      CommentAuthor[-Stash-]
    • CommentTimeAug 17th 2007
     # 45
    I assumed "Now supports ImageMagick" meant that it can use that or GD, whichever you decide? Jazzman?
    •  
      CommentAuthordkodr
    • CommentTimeAug 17th 2007
     # 46
    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.
    •  
      CommentAuthorJazzman
    • CommentTimeAug 17th 2007
     # 47
    @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.
    •  
      CommentAuthordkodr
    • CommentTimeAug 17th 2007
     # 48
    That did the trick. Thank you! ;-)
    • CommentAuthorpm4872
    • CommentTimeAug 31st 2007
     # 49
    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.
    • CommentAuthorChadFenwick
    • CommentTimeSep 3rd 2007 edited
     # 50
    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?