Reply New Topic
2011/3/20 6:47:43
#1
Offline
Home away from home

News: News By Author

QM-B and myself where checking out News the other day - and noticed that the Avatar is not displayed on the newsbythisauthor.php page.

The template definately uses the <{$user_avatarurl}> smarty - and I've tried both with Profile enabled and disabled, and with Gravatar disabled and enabled - but the image name is not carried over in any of these cases.... despite being shown in both the core-user info and on profile user info.

I'm really unsure as to why, and how we can get this smarty working correctly

Any thoughts on this.

This is running with the trunk version of news, and the latest trunk version of 1.3


Edited by UnderDog on 2011/3/21 5:49:34

2011/3/20 7:07:03
#2
Offline
Home away from home

Re: News: News By Author

Sorry - the page in question is called by: url/modules/news/newsbythisauthor.php?uid=1


2011/3/20 7:22:17
#3
Offline
Home away from home

Re: News: News By Author

maybe one of this parts have been changed?
$authname = $thisuser->getVar('uname');

$xoopsTpl->assign('user_avatarurl', XOOPS_URL.'/uploads/' . $thisuser->getVar('user_avatar'));

Both are from /news/newsbythisauthor.php


2011/3/20 7:30:08
#4
Offline
Home away from home

Re: News: News By Author

I certainly think it could be connected. The only url displayed is the equivilent to: XOOPS_URL.'/uploads/'

We tried manually replacing the . $thisuser->getVar('user_avatar')); bit with a static image - and this displayed... so something about the getVar isn't working.

I tried to compare it with the routine used in Profile - but as that's IPF based - the method was rather different.


2011/3/20 13:35:47
#5
Online
Home away from home

Re: News: News By Author

I may have spotted the trouble - in kernel/user.php. try adding the $id parameter to the __construct() methods, so you get this


class XoopsUser extends icms_member_user_Object {
private $_deprecated;
public function __construct(&$id) {
parent::__construct($id);
$this->_deprecated = icms_core_Debug::setDeprecated('icms_member_user_Object', sprintf(_CORE_REMOVE_IN_VERSION, '1.4'));
}
}

class XoopsGuestUser extends XoopsUser {
private $_deprecated;
public function __construct(&$id) {
parent::__construct($id);
$this->_deprecated = icms_core_Debug::setDeprecated('icms_member_user_Object', sprintf(_CORE_REMOVE_IN_VERSION, '1.4'));
}
}

_________________
Christian Web Resources
Facebook

2011/3/20 13:42:12
#6
Offline
Home away from home

Re: News: News By Author

Thanks Steve - will add this to the test server :)


2011/3/20 13:47:32
#7
Offline
Home away from home

Re: News: News By Author

Yes - its working well in the test server

Can you commit the change?


2011/3/21 4:15:58
#8
Online
Home away from home

Re: News: News By Author


_________________
Christian Web Resources
Facebook

Reply New Topic extras
 Previous Topic   Next Topic
You can view topic.
You can start a new topic.
You can reply to posts.
You cannot edit your posts.
You cannot delete your posts.
You cannot add new polls.
You cannot vote in polls.
You cannot attach files to posts.
You can post without approval.