Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Account Pictures

124678

Comments

  • Is there not an extension specific configuration page?
  • 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;
  • I am not well versed in SQL statements. Can you give me some code to copy/paste? I appreciate the help!
  • 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!)
  • @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.
  • 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');
  • 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).
  • That solved the problem straight away Jakob. I just switched those two lines over. Thanks.
  • 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.
  • i haven't used this addon, but you can display a picture on your profile page, and your icon follows you around.
  • 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.
  • 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.
  • 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.
  • 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.
  • Yeah... but still. I think it would be nice to have it all on one page.
  • 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...
  • 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
  • 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?!
  • 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.
Sign In or Register to comment.