Howdy, Stranger!

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

Try Vanilla Forums Cloud product

Ready to contribute?

Amazing! Sign our contributors' agreement and then join us on GitHub.

Vanilla 2.2.1 is now available.
Please upgrade to 2.1.x here. The 2.0 branch is no longer being updated.

[FIXED] some user thumbnails doesn't show up

This discussion is related to the User List addon.
AoleeAolee Hobbyist & Coder ✭✭
edited February 2011 in Vanilla 2.0 Help
Hi, i would like to ask why some user's thumbnail doesn't show up? image broken but the user's have a picture, and link is working. i noticed image doesn't show for users who haven't posted anything yet.
Tagged:

Comments

  • AoleeAolee Hobbyist & Coder ✭✭
    ok found out that those Photo value in the DB is an external url (e.g. http://graph.facebook.com/812583467/picture) . and it doesn't display the thumbnail in userlist sidebar.
  • AoleeAolee Hobbyist & Coder ✭✭
    edited May 2011
    i think this happens for users who logged in using a facebook account.
    the img src is becoming

    src="uploads/http://ngraph.facebook.com/1105074448/picture"

    for a quick patch, i just changed this line

    from

    Url('uploads/'.ChangeBasename($User->Photo, 'n%s'))

    to

    ((stristr($User->Photo,"http://"))?$User->Photo:Url('uploads/'.ChangeBasename($User->Photo, 'n%s')))

    meaning if there's an HTTP:// found in the photo value use the value directly.

    ******
    edited:

    file to modify is class.userlistmodule.php
  • Aolee, I have this same problem but can you clarify where the file can be found that needs this line to be changed
  • AoleeAolee Hobbyist & Coder ✭✭
    sorry forgot to indicate the filename.

    you can change it on class.userlistmodule.php

    :)
  • Thanks...

    For some reason I didn't receive an E-mail from your last message (May18) to say that you responded, although I didn't create this post, but have commented I would have expected to receive an E-mail. Within my vanilla profile all options are ticked to receive notifications. Checked my junk mail also...

    Is this a known issue....

    I know its not directly linked with this post but noticed this issue as a result.
  • lucluc ✭✭
    You need to bookmark/follow the discussion if you want a notification.
  • ChanuxChanux Admin of Geek.lk ✭✭

    @Aolee i had same problem. now fixed it using your advice. thank you so much.

  • @Aolee Is this plugin able to show the Vanillicon icons? I'm using Vanillicon but this plugin is not able to show the Vanillicon icons. I have already made the modifications suggested by you. Thanks for your help.

  • @Aolee - I looked at your Who's Online plugin and tried to fix this plugin to show Vanillicon icons using the code in Who's Online. I got the icons working, but the icons are different from what I see on user's profile. The icons that I see on the User Profile and Who's Online plugin match perfectly though.

    The icons for Facebook and Google users are showing up fine.

    Any idea what could be wrong?

  • AoleeAolee Hobbyist & Coder ✭✭

    yes i've mod my userlist plugin to display vanillicon, but didn't enable it in my site as most of the pic appearing are vanillicons, i can share my plugin script. but maybe later :)

  • OK, I solved the problem by adding some debug statements. I found that the Vanillicon plugin relies on User Email field in order to generate the Avatars. The Who's Online plugin queries for that field, but User List doesn't. After adding that field to the query, it works!

    Thanks.

  • AoleeAolee Hobbyist & Coder ✭✭
  • AoleeAolee Hobbyist & Coder ✭✭
    edited March 2012

    For other pips, here's the link for the modded UserList.

    http://pinoyau.info/plugins/UserList-vanillicon.zip



    Check out my other Plugins here

    Patty_OZUTES
  • AoleeAolee Hobbyist & Coder ✭✭

    yes i've mod my userlist plugin to display vanillicon, but didn't enable it in my site as most of the pic appearing are vanillicons, i can share my plugin script. but maybe tomorrow as im really sleepy now. its 2am here in SG :)

  • Thanks Aolee,

    I was just having the same problems with this until I came across this.

  • Can anyone post how to include the vanillicons ? thanks

  • i know where the controls are, the question was how to modify to include the vanillicons not just profile pictures

  • peregrineperegrine MVP
    edited September 2014

    @lxlelinux said:
    i know where the controls are, the question was how to modify to include the vanillicons not just profile pictures

    what version of vanilla 2.0 are you running? and what theme?

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • peregrineperegrine MVP
    edited September 2014

    @lxlelinux

    If you are using vanillicons plugin

    then in userlist plugin

    in class.userlistmodule.php

    change line 16

    from
    $Select='u.UserID, u.Name, u.Photol';

    to
    $Select='u.UserID, u.Name, u.Photo,u.Email';

    and change later in code

    from

     foreach($this->Users->Result() as $User) {
                      ?>
                      <li>
                         <?php
                         if($Photo) {
                             if(!empty($User->Photo)) {
                                echo "<a href=\"".Url('/profile/'.$User->Name)."\"><img src=\"".Url('uploads/'.ChangeBasename($User->Photo, 'p%s'))."\" alt=\"".$User->Name."\" title=\"".$User->Name."\" /></a><br />";
                             } else {
                                echo "<a href=\"".Url('/profile/'.$User->Name)."\"><img src=\"".Url('plugins/UserList/user.png')."\" alt=\"".$User->Name."\" title=\"".$User->Name."\" /></a><br />";
                             }
                         } else {
                            echo UserAnchor($User);
                         }
                         ?>
                      </li>
                      <?php
                      }
    

    to

                       foreach($this->Users->Result() as $User) {
                          ?>
                          <li>
                             <?php
                                    echo UserPhoto($User);
                             ?>
                          </li>
                          <?php
                         }
    

    but you might be better off with a different plugin...

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • I'll give it a shot peregine. I'm still on 2.0.8 err whatever the latest update to the 2.0 series was, if you have another suggestion for a different plugin I'm all ears, you know your stuff so I'll probably go with whatever you suggest.

  • peregrineperegrine MVP
    edited September 2014

    what's your goal?

    to show all the members on your forum?

    If you have all your members on showing on panel of every page. It potential two extra database reads on every page view of your forum discussions

    where as a separate members viewing page.

    any of the other member list plugins in the addons sections that show vanillicons.
    e.g.

    http://vanillaforums.org/addon/memberslistenh-plugin
    and a few others.

    if you want to show online users - whosonline works in vanilla 2.0.18.x and there are at least three versions of the plugin in forum discussions that present user photos in the discussions.

    I'd spend my energy going to vanilla 2.1.3 rather than fooling around with plugins in 2.0.18.x (since the vanilla version 2.0.18.x is not supported in 3 months).

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • Implemented, very nice, works great, note: there is a typo in your original $Select='u.UserID, u.Name, u.Photol'; just had to remove the 'l' from photo and it found it. thanks man, much appreciated.

  • see my post. above I edited it.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.