1
gray
userpage
  • 2009/5/10 22:10

  • gray

  • Just popping in

  • Posts: 3

  • Since: 2009/5/10


hi guyz

I also wantto put users avatar with username together on last pages block.

I put this code <{$user.avatar}> to userpage_block_last.html but its just shown last registered users avatar

I am new on XOOPS and actually I dont understand php much more..

Can anybody please help me??

2
gray
Re: userpage
  • 2009/5/14 17:26

  • gray

  • Just popping in

  • Posts: 3

  • Since: 2009/5/10


any idea_?

3
iHackCode
Re: userpage

edit the toArray function in userpage\class\userpage.php

so it looks like this
function toArray($format 's')
    {
        
$ret = array();
        foreach (
$this->vars as $k => $v) {
            
$ret[$k] = $this->getVar($k$format);
        }
        
$ret['up_url_rewrited'] = $this->getURL();
        
$ret['up_href_title'] = $this->getHrefTitle();
        
$ret['up_created_formated'] = formatTimestamp($this->getVar('up_created'), userpage_utils::getModuleOption('dateformat'));
        
$ret['user_name'] = $this->uname();
        
//## ADDED ##
        
$user_handler =& xoops_gethandler('user');
        
$thisUser $user_handler->get($this->getVar('up_uid'));
        
$ret['user_avatar'] = '.XOOPS_URL.'/uploads/'.$thisUser->getVar('user_avatar').'" alt="'.$ret['user_name'].'"/>';
        
//## ADDED ##
        
return $ret;
    }


then you can use <{$page.user_avatar}> in that template.
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

4
gray
Re: userpage
  • 2009/6/2 19:32

  • gray

  • Just popping in

  • Posts: 3

  • Since: 2009/5/10


thank you Bandit-x, its working :)

now its seems cooler than before

5
Anonymous
Re: userpage
  • 2009/6/2 22:09

  • Anonymous

  • Posts: 0

  • Since:


Has this been shared with the Instant Zero guys?

6
iHackCode
Re: userpage

Quote:

JAVesey wrote:
Has this been shared with the Instant Zero guys?


nope. don't know how.
CBB / LatestNews / Publisher / XM-Spotlight

(ノ◕ヮ◕)ノ*:・゚✧

Login

Who's Online

382 user(s) are online (283 user(s) are browsing Support Forums)


Members: 0


Guests: 382


more...

Donat-O-Meter

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

Latest GitHub Commits