1
pablo103
missing avatar
  • 2008/9/12 15:27

  • pablo103

  • Not too shy to talk

  • Posts: 181

  • Since: 2008/2/3 1


I have a problem with displaying avatars in system block new users. If there is no avatar set for the user the system can t find the image.gif In the source view i can see that it looks into uploads folder without specifying the file. How to solve this problem and where are those definitions for displaying avatars?

i am using XOOPS 2.0.18
thanks in advance!

2
trabis
Re: missing avatar
  • 2008/9/12 15:32

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


I donĀ“t see what is the problem. What do you see in the source code?

3
pablo103
Re: missing avatar
  • 2008/9/12 15:35

  • pablo103

  • Not too shy to talk

  • Posts: 181

  • Since: 2008/2/3 1


it looks like this:

<td align="center">             
<
img src="http://www.mywebsite.com/uploads/" alt="" width="32" /><br />              
<
a href="http://www.mywebsite.com/userinfo.php?uid=183896">userofmysite</a>       </td>


after /uploads/ it should pick for the blank.gif file...

4
trabis
Re: missing avatar
  • 2008/9/12 15:38

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


No, it should not even try to pick blank.gif.
Have you done changes in the template or in the block?
If not, look into the database and see if the default image for users is blank.gif.

5
pablo103
Re: missing avatar
  • 2008/9/12 15:56

  • pablo103

  • Not too shy to talk

  • Posts: 181

  • Since: 2008/2/3 1


I have smartprofile instaled and it was a bug. Thanks for helping the solution is here if enyone needs:http://smartfactory.ca/modules/newbb/viewtopic.php?topic_id=2251&forum=30

best

6
trabis
Re: missing avatar
  • 2008/9/12 16:09

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


In system/blocks/system_blocks.php

Find:
if ( $options[1] == ) {
            
$block['users'][$i]['avatar'] = $newmembers[$i]->getVar('user_avatar') != 'blank.gif' XOOPS_UPLOAD_URL.'/'.$newmembers[$i]->getVar('user_avatar') : '';
        } else {
            
$block['users'][$i]['avatar'] = '';
        }


Replace by:
if ( $options[1] == ) {
            
$block['users'][$i]['avatar'] = $newmembers[$i]->getVar('user_avatar') != '' XOOPS_UPLOAD_URL.'/'.$newmembers[$i]->getVar('user_avatar') : '';
        } else {
            
$block['users'][$i]['avatar'] = '';
        }

7
pablo103
Re: missing avatar
  • 2008/9/12 16:42

  • pablo103

  • Not too shy to talk

  • Posts: 181

  • Since: 2008/2/3 1


Ok Thanks, you are right, now it works! THANKS!

Login

Who's Online

274 user(s) are online (182 user(s) are browsing Support Forums)


Members: 0


Guests: 274


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Apr 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits