Fork me on GitHub
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?
DQokYXV0aG5hbWUgPSAkdGhpc3VzZXItPmdldFZhcigndW5hbWUnKTsNCg==
DQokeG9vcHNUcGwtPmFzc2lnbigndXNlcl9hdmF0YXJ1cmwnLCBYT09QU19VUkwuJy91cGxvYWRzLycgLiAkdGhpc3VzZXItPmdldFZhcigndXNlcl9hdmF0YXInKSk7DQo=
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
Offline
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

DQpjbGFzcyBYb29wc1VzZXIgZXh0ZW5kcyBpY21zX21lbWJlcl91c2VyX09iamVjdCB7DQoJcHJpdmF0ZSAkX2RlcHJlY2F0ZWQ7DQoJcHVibGljIGZ1bmN0aW9uIF9fY29uc3RydWN0KCYkaWQpIHsNCgkJcGFyZW50OjpfX2NvbnN0cnVjdCgkaWQpOw0KCQkkdGhpcy0+X2RlcHJlY2F0ZWQgPSBpY21zX2NvcmVfRGVidWc6OnNldERlcHJlY2F0ZWQoJ2ljbXNfbWVtYmVyX3VzZXJfT2JqZWN0Jywgc3ByaW50ZihfQ09SRV9SRU1PVkVfSU5fVkVSU0lPTiwgJzEuNCcpKTsNCgl9DQp9DQoNCmNsYXNzIFhvb3BzR3Vlc3RVc2VyIGV4dGVuZHMgWG9vcHNVc2VyIHsNCglwcml2YXRlICRfZGVwcmVjYXRlZDsNCglwdWJsaWMgZnVuY3Rpb24gX19jb25zdHJ1Y3QoJiRpZCkgew0KCQlwYXJlbnQ6Ol9fY29uc3RydWN0KCRpZCk7DQoJCSR0aGlzLT5fZGVwcmVjYXRlZCA9IGljbXNfY29yZV9EZWJ1Zzo6c2V0RGVwcmVjYXRlZCgnaWNtc19tZW1iZXJfdXNlcl9PYmplY3QnLCBzcHJpbnRmKF9DT1JFX1JFTU9WRV9JTl9WRVJTSU9OLCAnMS40JykpOw0KCX0NCn0NCg==

_________________

Steve Twitter: @skenow Facebook: Steve Kenow


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
Offline
Home away from home

Re: News: News By Author


_________________

Steve Twitter: @skenow Facebook: Steve Kenow


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.