Not signed in (Sign In)

Categories

Vanilla 1.1.4 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.
    •  
      CommentAuthorResilient
    • CommentTimeSep 4th 2007
     # 51
    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?
    • CommentAuthorjpack
    • CommentTimeSep 7th 2007
     # 52
    I was running into a problem where if I specified both the icon and account picture on the same submit I got "cannot redeclare phpThumb class", so I changed line 148 to include_once rather than include and that seems to have fixed it.
    •  
      CommentAuthorrayk
    • CommentTimeSep 10th 2007
     # 53
    Resilient: I'm using an older version of this addon, I think 1.1. Haven't played with the new addon to find where it's gone to :(.
    • CommentAuthoredmundor
    • CommentTimeSep 15th 2007
     # 54
    I just installed Account Pictures, and chmoded the uploads folder and everything, but when I test it by uploading a photo, I get the following error:

    phpThumb() v1.7.7-200612252156 in file "phpthumb.class.php" on line 216
    setSourceFilename(/my/path/to/4a99f1fa87d9aad9d670250a36c7a017.jpg) set $this->sourceFilename to "/my/path/to/4a99f1fa87d9aad9d670250a36c7a017.jpg" in file "phpthumb.class.php" on line 234

    The error is a whole lot longer than that, but that's just the first error that it spits out. Also keep in mind that I changed my real path to /my/path/to for this post. ;)

    Can anyone tell me what's happening?
    •  
      CommentAuthorerryl
    • CommentTimeSep 24th 2007 edited
     # 55
    This is going to be long but I set the permissions, I made the folders but I keep getting this error:
    phpThumb() v1.7.7-200612252156 in file "phpthumb.class.php" on line 216
    setSourceFilename(/hsphere/local/home/erryl/arkansaslesbians.com/hp_vanilla/extensions/AccountPictures/Uploads4cd353e1b3bee4df59c3db62a3252b22.jpg) set $this->sourceFilename to "/hsphere/local/home/erryl/arkansaslesbians.com/hp_vanilla/extensions/AccountPictures/Uploads4cd353e1b3bee4df59c3db62a3252b22.jpg" in file "phpthumb.class.php" on line 234
    file_exists() = 0 in file "phpthumb.class.php" on line 1036
    is_executable() = 0 in file "phpthumb.class.php" on line 1037
    ImageMagickThumbnailToGD() aborting because cannot find convert in $this->config_imagemagick_path (), and `which convert` returned () in file "phpthumb.class.php" on line 1066
    $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 825
    $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 835
    $this->thumbnailQuality set to "75" in file "phpthumb.class.php" on line 852
    ResolveFilenameToAbsolute() NOT prepending $this->config_document_root (/hsphere/local/home/erryl/arkansaslesbians.com) to $filename (/hsphere/local/home/erryl/arkansaslesbians.com/hp_vanilla/extensions/AccountPictures/Uploads4cd353e1b3bee4df59c3db62a3252b22.jpg) resulting in ($AbsoluteFilename = "/hsphere/local/home/erryl/arkansaslesbians.com/hp_vanilla/extensions/AccountPictures/Uploads4cd353e1b3bee4df59c3db62a3252b22.jpg") in file "phpthumb.class.php" on line 959
    $this->sourceFilename set to "/hsphere/local/home/erryl/arkansaslesbians.com/hp_vanilla/extensions/AccountPictures/Uploads4cd353e1b3bee4df59c3db62a3252b22.jpg" in file "phpthumb.class.php" on line 754
    phpThumb() v1.7.7-200612252156 "/hsphere/local/home/erryl/arkansaslesbians.com/hp_vanilla/extensions/AccountPictures/Uploads4cd353e1b3bee4df59c3db62a3252b22.jpg" does not exist in file "phpthumb.class.php" on line 3404
    setCacheDirectory() starting with config_cache_directory = "" in file "phpthumb.class.php" on line 859
    $this->config_cache_directory () is not a directory in file "phpthumb.class.php" on line 895
    SetCacheFilename() failed because $this->config_cache_directory is empty in file "phpthumb.class.php" on line 2808
    starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 2665
    GetImageSize("/hsphere/local/home/erryl/arkansaslesbians.com/hp_vanilla/extensions/AccountPictures/Uploads4cd353e1b3bee4df59c3db62a3252b22.jpg") failed in file "phpthumb.class.php" on line 2688
    $this->useRawIMoutput=false because "fltr" is set in file "phpthumb.class.php" on line 1151
    ImageMagickThumbnailToGD() aborting because safe_mode is enabled in file "phpthumb.class.php" on line 1201
    ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 2695
    SetOrientationDependantWidthHeight() starting with ""x"" in file "phpthumb.class.php" on line 2644
    SetOrientationDependantWidthHeight() setting w="32", h="32" in file "phpthumb.class.php" on line 2660
    EXIF thumbnail extraction: (size=0; type=""; 0x0) in file "phpthumb.class.php" on line 2747
    starting SourceImageToGD() in file "phpthumb.class.php" on line 3005
    $this->useRawIMoutput=false because "fltr" is set in file "phpthumb.class.php" on line 1151
    ImageMagickThumbnailToGD() aborting because safe_mode is enabled in file "phpthumb.class.php" on line 1201
    starting ImageCreateFromFilename(/hsphere/local/home/erryl/arkansaslesbians.com/hp_vanilla/extensions/AccountPictures/Uploads4cd353e1b3bee4df59c3db62a3252b22.jpg) in file "phpthumb.class.php" on line 2920
    empty $filename or GetImageSize(/hsphere/local/home/erryl/arkansaslesbians.com/hp_vanilla/extensions/AccountPictures/Uploads4cd353e1b3bee4df59c3db62a3252b22.jpg) failed in file "phpthumb.class.php" on line 2969
    Populating $rawimagedata in file "phpthumb.class.php" on line 2977
    cannot fopen(/hsphere/local/home/erryl/arkansaslesbians.com/hp_vanilla/extensions/AccountPictures/Uploads4cd353e1b3bee4df59c3db62a3252b22.jpg) in file "phpthumb.class.php" on line 2988
    Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3046
    $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3098
    ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3100
    phpThumb() v1.7.7-200612252156 Unknown image type identified by "" () in SourceImageToGD()[3210] in file "phpthumb.class.php" on line 3404
    SourceImageToGD() failed in file "phpthumb.class.php" on line 312


    Can you help me?? THANK YOU anyone who can help me out here. Have a lovely day!!
    •  
      CommentAuthor[-Stash-]
    • CommentTimeSep 25th 2007
     # 56
    edmundor, erryl: edit, <code></code> and "Format comment as Html" are your friends ;)
    •  
      CommentAuthormonstr
    • CommentTimeOct 17th 2007 edited
     # 57
    Still nobody knows how to increase the quality?
    and:
    how do i turn off the resizing for images that fit in the max- values?
    •  
      CommentAuthorGodfather
    • CommentTimeOct 25th 2007 edited
     # 58
    ChadFenwick says, Sep 3rd 2007 (http://lussumo.com/community/?CommentID=74799)
    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.

    Got same situation, can anybody suggest how to decide this? In a few words, user uploads a images with right size, image files 've been uploaded to server, but vanilla shows a white space on where an image should be.
    • CommentAuthorgebbissimo
    • CommentTimeOct 28th 2007 edited
     # 59
    Hi, I tried to install it and also created the directories with chmod777. Nevertheless the thing doesn´t seem to work. (Do these directories need to be in "path/to/vanilla/uploads..." or in "path/to/vanilla/extensions/AccountPictures/uploads..."? Now I did both)

    When I try to upload pictures he doesn´t complain about anything, but the images won´t upload.

    (Btw. The addon Attachment 2 doesn´t work as well)


    O.k., I finally found the solution by accident. The problem is my webhost, which doesn´t support PHP Upload. (I never heard you can permit PHP, but forbid Upload, that´s why I didn´t check that option).
    So there´s no work-around for me unfortunately :(
    • CommentAuthorjakob_r
    • CommentTimeNov 1st 2007
     # 60
    To improve jpeg quality with the more recent phpthumb-based version of AccountPictures, try this (untried, but pretty sure it will work):

    Find this line in default.php

    $phpThumb->setParameter('zc', '1');

    after it ADD the following line:

    $phpThumb->setParameter('q', '100');

    (75 is the default setting)

    The full set of parameters are listed at the top of phpthumb.class.php if anyone's interested.
    • CommentAuthorSasquatch
    • CommentTimeNov 2nd 2007
     # 61
    I am moving my forum to a new server and it appears the image paths for icons and account pictures are not based on Application Path, they still refer to old domain and host. How do I fix this? Is there a setting that I need to change or am I out of luck. Please help
  1.  # 62
    Is there not an extension specific configuration page?
    • CommentAuthorjakob_r
    • CommentTimeNov 3rd 2007
     # 63
    T1, yes unfortunately it does that. The easiest (but fiddly) way is to correct it in the database using phpmyadmin etc (backup first!). In the table LUM_User do an SQL search in the Picture field for your domain-name and remove it altogether s that teh path starts with the opening / after the domain. From then on it should be okay if you transfer to another server, providing of course you don't change the path structure.

    The way to stop it in future is to find the two lines below (a few lines apart from each other) in function AccountPicturesForm (about 1/3 way into the default.php for the add-on) and replace BASE_URL (which includes the whole domain) with WEB_ROOT (which begins from the first / after the domain). You can verify the values for these in your conf/settings.php file:

    $User->Icon = $Context->Configuration['BASE_URL'] . $Context->Configuration['ACCOUNTPICTURES_UPLOAD_PATH'] . $FileName;
    and
    $User->Picture = $Context->Configuration['BASE_URL'] . $Context->Configuration['ACCOUNTPICTURES_UPLOAD_PATH'] . $FileName;
    • CommentAuthorSasquatch
    • CommentTimeNov 4th 2007
     # 64
    I am not well versed in SQL statements. Can you give me some code to copy/paste? I appreciate the help!
    • CommentAuthorjakob_r
    • CommentTimeNov 4th 2007 edited
     # 65
    I'm not well versed in SQL either, but I can use google ...

    UPDATE tablename SET tablefield = replace(tablefield,"findstring","replacestring");
    which I guess would translate to:

    UPDATE LUM_User SET Picture = replace(Picture,"http://your-domain.com","");
    (as always backup first if you're not sure!)
    • CommentAuthorSasquatch
    • CommentTimeNov 5th 2007
     # 66
    @Jakob_r
    Thanks for your help, I was able to get it working with the SQL statement.

    Thanks also for your direction to prevent this in the future. HOWEVER - Its seems the WEB_ROOT/BASE_URL doesn't have a purpose in the extension. It adds needless information into the database. For example, the WEB_ROOT value for my forum is infact "/forum/" this means when it writes to the database it which would cause me the same problem if i moved it to a dir called say "community". Really the only necessary/proper path should be the relative path to the pictures/icons by default "uploads/AccountPictures/" which is not likely to change as you move your forum.

    Unless my understanding of WEB_ROOT is incorrect and then therefore incorrect on my install. Is there documentation somewhere on what those should be or how they are generated.
    •  
      CommentAuthorBen
    • CommentTimeNov 7th 2007 edited
     # 67
    I'm having a conflict between the Predefined Attributes extension and this one.
    When trying to upload an image, I receive this error:

    Notice: Undefined property: UserManager::$User in /extensions/PredefinedAttributes/default.php on line 509
    The image does get uploaded and assigned successfully though.

    The referenced line is around:

    function PredefinedAttributes_AddFromPersonalInformation($UserManager) {
    $pa = new PredefinedAttributes($UserManager->Context, $UserManager->User);
    $pa->AddFromPersonalInformation($UserManager);
    }
    $Context->AddToDelegate('UserManager', 'PreIdentityUpdate', 'PredefinedAttributes_AddFromPersonalInformation');
    • CommentAuthorjakob_r
    • CommentTimeNov 8th 2007
     # 68
    Strange Ben, I'm using both and have no problem on that count (I have commented out the User Icons, though). Perhaps it's a plug-in order thing (FWIW: on mine Predefined Attributes is positioned after AccountPictures in conf/extensions.php).
    •  
      CommentAuthorpbear
    • CommentTimeNov 8th 2007
     # 69
    •  
      CommentAuthorBen
    • CommentTimeNov 9th 2007
     # 70
    That solved the problem straight away Jakob. I just switched those two lines over. Thanks.
    • CommentAuthorscherem
    • CommentTimeNov 10th 2007
     # 71
    I've asked this before I still haven't been able to find an answer to this, but when you use this extension, you can upload two files-- the icon and the picture. Why do you upload the picture? I doesn't appear to display anywhere beside the upload page.
    • CommentAuthorfysicsluvr
    • CommentTimeNov 10th 2007
     # 72
    i haven't used this addon, but you can display a picture on your profile page, and your icon follows you around.
    • CommentAuthorscherem
    • CommentTimeNov 11th 2007 edited
     # 73
    Let me clarify: I upload an account picture (icon is working fine), and this picture uploads fine, and is displayed on my account pictures setting page (showing the current picture uploaded), but the picture does not show up on my account profile page (All I see is the icon, name, and the user attributes data). Is there anything I have to do in the default.php of this to turn the feature 'on'?

    UPDATE:
    Got it to work by changing line 23 in account_profile.php from

    if ($this->User->Picture != "" && $this->User->Permission('PERMISSION_HTML_ALLOWED')) echo "<li class=\"Picture\" style=\"background-image: url('".$this->User->Picture."');\">&nbsp;</li>";

    to

    if ($this->User->Picture != "" ) echo "<li class=\"Picture\" style=\"background-image: url('".$this->User->Picture."');\">&nbsp;</li>";


    If anyone can explain to me where to either set PERMISSION_HTML_ALLOWED to true for all users, or why its there, that would be great.
    • CommentAuthorveteran
    • CommentTimeNov 13th 2007
     # 74
    Does this add on have all the latest fixes configured into the download. From reading the thread it seems user came across a lot of small bugs with reconmendations on how to fix it. There seems to many to even attempt. Have all the fixes been placed in the download so we can avoid mucking around in these files.
    • CommentAuthorNeverender
    • CommentTimeNov 14th 2007
     # 75
    users get confused when theres the Account Picture and Icon stuff on the personal information page AND a separate page for uploading account pictures. it seems like it would be more intuitive if the uploading functionality could be integrated with the personal information page.
    •  
      CommentAuthorBen
    • CommentTimeNov 14th 2007 edited
     # 76
    All you'd need to do is just hide the URL fields for icons from the Personal Information page. The Account Pictures extension fills them in anyway.
    • CommentAuthorNeverender
    • CommentTimeNov 15th 2007
     # 77
    Yeah... but still. I think it would be nice to have it all on one page.
    • CommentAuthorNeverender
    • CommentTimeNov 18th 2007
     # 78
    Does anyone know how the image names are created? I'm wondering if it would be possible to have them be named something like:

    icon_accountID.gif
    picture_accountID.gif.

    or something to that effect.
    I'm trying to show information outside of vanilla (in wordpress) and I don't really know how to do the queries for that. So instead of looking up the users icon in the database, I'm thinking maybe I can just point an <img> to uploads/AccountPictures/icon_accountID.gif or something.

    unless someone can help me with the mysql queries...
    • CommentAuthorpiers
    • CommentTimeNov 23rd 2007
     # 79
    I get the following error when trying to add pictures to my account:


    Fatal error: Cannot redeclare class phpthumb in /XXXXXXXX/forum/extensions/AccountPictures/phpThumb/phpthumb.class.php on line 18


    Does anyone know why this might be? I'm using Vanilla 1.1.4
    • CommentAuthormamee
    • CommentTimeNov 23rd 2007 edited
     # 80

    phpThumb() v1.7.7-200612252156 in file "phpthumb.class.php" on line 216
    setSourceFilename(/home/hobbybag/public_html/vanilla/uploads/a9a9b44c8012146d6c1bbf0a86e16c86.jpg) set $this->sourceFilename to "/home/hobbybag/public_html/vanilla/uploads/a9a9b44c8012146d6c1bbf0a86e16c86.jpg" in file "phpthumb.class.php" on line 234
    file_exists() = 0 in file "phpthumb.class.php" on line 1036
    is_executable() = 0 in file "phpthumb.class.php" on line 1037
    using ImageMagick path from `which convert` (/usr/bin/convert) in file "phpthumb.class.php" on line 1056
    ImageMagick version checked with "convert --version" in file "phpthumb.class.php" on line 1083
    ImageMagick convert --version says "Version: ImageMagick 6.2.6 12/21/06 Q16 http:" in file "phpthumb.class.php" on line 1091
    Addding ImageMagick formats to $AvailableImageOutputFormats (text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 819
    $AvailableImageOutputFormats = array(text;ico;bmp;wbmp;gif;png;jpeg) in file "phpthumb.class.php" on line 825
    $this->thumbnailFormat set to $this->config_output_format "jpeg" in file "phpthumb.class.php" on line 835
    $this->thumbnailQuality set to "75" in file "phpthumb.class.php" on line 852
    !$this->config_allow_src_above_docroot therefore setting "/home/hobbybag/public_html/vanilla/uploads/a9a9b44c8012146d6c1bbf0a86e16c86.jpg" (outside "/usr/local/apache/htdocs") to null in file "phpthumb.class.php" on line 1001
    $this->sourceFilename set to "" in file "phpthumb.class.php" on line 754
    phpThumb() v1.7.7-200612252156 "" does not exist in file "phpthumb.class.php" on line 3404
    setCacheDirectory() starting with config_cache_directory = "" in file "phpthumb.class.php" on line 859
    $this->config_cache_directory () is not a directory in file "phpthumb.class.php" on line 895
    SetCacheFilename() failed because $this->config_cache_directory is empty in file "phpthumb.class.php" on line 2808
    starting ExtractEXIFgetImageSize() in file "phpthumb.class.php" on line 2665
    GetImageSize("") failed in file "phpthumb.class.php" on line 2688
    $this->useRawIMoutput=false because "fltr" is set in file "phpthumb.class.php" on line 1151
    ImageMagickThumbnailToGD() aborting because $this->sourceFilename is empty in file "phpthumb.class.php" on line 1196
    ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 2695
    SetOrientationDependantWidthHeight() starting with ""x"" in file "phpthumb.class.php" on line 2644
    SetOrientationDependantWidthHeight() setting w="280", h="200" in file "phpthumb.class.php" on line 2660
    exif_thumbnail() does not exist, cannot extract EXIF thumbnail in file "phpthumb.class.php" on line 2742
    starting SourceImageToGD() in file "phpthumb.class.php" on line 3005
    $this->useRawIMoutput=false because "fltr" is set in file "phpthumb.class.php" on line 1151
    ImageMagickThumbnailToGD() aborting because $this->sourceFilename is empty in file "phpthumb.class.php" on line 1196
    Not using EXIF thumbnail data because $this->exif_thumbnail_data is empty in file "phpthumb.class.php" on line 3046
    $this->gdimg_source is still empty in file "phpthumb.class.php" on line 3098
    ImageMagickThumbnailToGD() failed in file "phpthumb.class.php" on line 3100
    phpThumb() v1.7.7-200612252156 Unknown image type identified by "" () in SourceImageToGD()[3210] in file "phpthumb.class.php" on line 3404
    SourceImageToGD() failed in file "phpthumb.class.php" on line 312


    Why am I getting this error?!
    • CommentAuthorjakob_r
    • CommentTimeNov 29th 2007
     # 81
    If you'd like the image is scaled to the maximum dimension (as I believe it used to be), rather than scaled to the minimum dimension and then cropped on the large direction, comment out the line

    // $phpThumb->setParameter('zc', '1');
    in function CreateImage in default.php.

    Reason: zc=1 switches on zoomcrop for phpthumb. zoomcrop is perhaps good for photos where most people are the centre of the photo but it is no good for logos.
    •  
      CommentAuthormonstr
    • CommentTimeDec 13th 2007
     # 82
    awww, crap. can anybody tell me how to chmod the files. the server i'm working at has some problems with this stugg, so i have to define the chmod value somewhere...
    •  
      CommentAuthorlegolas
    • CommentTimeDec 22nd 2007 edited
     # 83
    I have been trying to give myself an icon for the past 2 weeks now, and after I save the icon in the Account Pictures settings page, it redirects me to a blank page with a little black square icon in the upper left corner that reads nogd. What does that mean??? I have made the upload folder, set my permissions right and it just won't work for me.
    Come to find out, it has something to to with php-gd. You have to have it installed. I didn't. So for all you guys who get that little icon of noGD, now you know. -actually, it might be a good idea to list php-gd as one of the requirements in the AccountPictures "read me" file so the user doesn't have to go searching all over the net trying to find out what that little nogd icon means. For the beginner, I think it should be easier than this.
    •  
      CommentAuthorspode
    • CommentTimeJan 4th 2008
     # 84
    "I was running into a problem where if I specified both the icon and account picture on the same submit I got "cannot redeclare phpThumb class", so I changed line 148 to include_once rather than include and that seems to have fixed it."

    I had the same problem, came to the same conclusion, did the same fix. :)
    •  
      CommentAuthorspode
    • CommentTimeJan 5th 2008 edited
     # 85
    The problem I'm finding at the moment, is someone has specified an off-site image as their icon. Although it's 32 pixels wide. It's something like 128 pixels tall.

    It works fine if you upload a picture through the interface. I'm tempted to just edit the code so people can't inject a URL themselves, as this appears to the be only issue. And honestly, I think I'd sooner disable off-site images anyway.

    But on the off chance, has anyone else had this problem and/or fixed it?

    I'm using GD, not ImageMagick btw.

    Update:

    I didn't realise, but the ability to have an avatar as an off-site URL is built into Vanilla. The add-on is working perfectly, but it conflicts with the built in functionality. Is there a way of easily removing the options for those URLs in the Account settings, without editing too many files?

    Update 2:

    I have removed this functionality, by editing account_identity_form.php. Search for the line with "GetDefinition('AccountPicture') and I've changed the code to the following, which basically remarks the old code and adds in two hidden elements with the previous data in, to stop the values being erased. This doesn't protect against POST injection, but that's not a huge problem.

    /*
    echo '<li>
    <label for="txtPicture">'.$this->Context->GetDefinition('AccountPicture').'</label>
    <input type="text" name="Picture" value="'.$this->User->Picture.'" maxlength="255" class="SmallInput" id="txtPicture" />
    <p class="Description">
    '.$this->Context->GetDefinition('AccountPictureNotes').'
    </p>
    </li>
    <li>
    <label for="txtIcon">'.$this->Context->GetDefinition('Icon').'</label>
    <input type="text" name="Icon" value="'.$this->User->Icon.'" maxlength="255" class="SmallInput" id="txtIcon" />
    <p class="Description">
    '.$this->Context->GetDefinition('IconNotes').'
    </p>
    </li>
    </ul>';

    */

    //new code

    echo '<input type="hidden" name="Picture" value="'.$this->User->Picture.'" maxlength="255" class="SmallInput" id="txtPicture" />
    <input type="hidden" name="Icon" value="'.$this->User->Icon.'" maxlength="255" class="SmallInput" id="txtIcon" />';
  2.  # 86
    As administrator I tried to go into a user profile and upload a new avatar for them, it does not show the users account photos area though it shows the administrators, seems like a bug
    •  
      CommentAuthorlament
    • CommentTimeJan 10th 2008
     # 87
    Jazz,

    The Account Pictures and the Vanea Black theme aren't playing nice with each other.

    http://methodic.org/temp/badicon.gif

    help? thanks!
    •  
      CommentAuthorspode
    • CommentTimeJan 14th 2008
     # 88
    When I upload a new account picture that's portrait - say 600 long, 200 wide. I would expect it to resize it to the maximum height, and then crop the width - not the other way around.

    In my eyes, it needs some portait/landscape detection to know which takes priority, width or height.
    •  
      CommentAuthorspode
    • CommentTimeJan 14th 2008 edited
     # 89
    Update: fixed a bug with people who don't have an uploaded image.

    The following modification will IGNORE the height value. Any image will be resized to the set width (280 default). This is great for uploading portrait images.

    First, find:

    $this->Picture = $User->Picture . '?' . time();

    And afterwards add:

    if ($User->Picture)
    {
    $imagedetails = getimagesize($this->Picture);
    $this->PictureHeight = $imagedetails[1];
    }
    else
    {
    $this->PictureHeight=0;
    }

    This gets the size of the uploaded image, so that the style is set correctly on the image with viewing the images on the upload page.

    Then, find:

    $phpThumb->setParameter('h', $NewHeight);

    And remark the line. This means that only a new width is passed to phpthumb and is therefore scaled proportionally.

    Then find:

    $AddStyle = str_replace('{PictureHeight}', $Context->Configuration['ACCOUNTPICTURES_PICTURE_HEIGHT'], $AddStyle);

    And replace it with:

    $AddStyle = str_replace('{PictureHeight}', $pheight, $AddStyle);

    Any time before this line, say above all the $AddStyle declarations, add:

    $pheight = $Context->Configuration['ACCOUNTPICTURES_PICTURE_HEIGHT'];

    if ($Context->SelfUrl == 'account.php' && $Context->Session->UserID > 0)
    {
    $tuser = $UserManager->GetUserById($Context->Session->UserID);

    if ($tuser->Picture)
    {
    $imagedetails = getimagesize($tuser->Picture . '?' . time());
    $pheight = $imagedetails[1];
    }
    }

    And you're done! Note that this uses the GD library to get the image details. So if you're using ImageMagick, unless you have GD compiled as well, this won't work.
  3.  # 90
    anyone else notice that you cannot upload a avatar and a profile picture at the same time?
  4.  # 91
    It has been mentioned. Possibly something to do with the upload class being used twice and causing conflicts or something. hmm..
    •  
      CommentAuthorspode
    • CommentTimeJan 17th 2008
     # 92
    Michael - I had that problem, as did someone else, to quote "so I changed line 148 to include_once rather than include and that seems to have fixed it."
  5.  # 93
    ok I'll give it a try tonight and let you know
    •  
      CommentAuthorlament
    • CommentTimeJan 17th 2008 edited
     # 94
    the include_once doesn't fix the avatar showing up lower than the username with the VaneaBlack theme. any ideas?

    •  
      CommentAuthorspode
    • CommentTimeJan 18th 2008
     # 95
    Lament - the include_once wasn't meant to fix that, it fixes uploading both the icon and picture at the same time.

    For your issue, I had the same problem with the standard vanilla theme when going above the default 32x32.

    Your issue will be with the style sheet in some way - either the VaneaBlack theme was designed to take a smaller icon size, or wasn't designed for one at all.

    If you've not done much CSS, install the Web Developer plugin for FireFox and you will pretty quickly be able to diagnose what's going on :)
    • CommentAuthorfysicsluvr
    • CommentTimeJan 20th 2008
     # 96
    Is there any way to hide the account picture & icon url setting on the personal info page?
    •  
      CommentAuthorspode
    • CommentTimeJan 21st 2008
     # 97
    Yes - read my post above, explaining exactly how.
    • CommentAuthorfysicsluvr
    • CommentTimeJan 21st 2008 edited
     # 98
    i don't see what you mean??? there's a lot of fixes above, but not for the one I want... what i want to do is hide the url setting for icons & pictures, so the only way to get one is to upload it.

    I think i've figured it out though, im going to look for the lines that add that in /themes/account_preferences_form.php and comment them out.

    Edit ***account_identity_form.php
    • CommentAuthorfysicsluvr
    • CommentTimeJan 21st 2008
     # 99
    okay so that's not gonna work ... it doesn't add them one at a time, it adds them all aat once, and i don't know php well enough to exclude just those ones.
    •  
      CommentAuthorspode
    • CommentTimeJan 22nd 2008
     # 100
    Comment number 85 :)