I'm sorry, I think I was not clear (again) I have a link in the header - my profile - which is constructed to use this code:
Code:
<span><a href="{$mybb->settings['bburl']}/member.php?action=profile">My Profile</a></span>
|
A lot of mybb sites seem to use this construct for a profile link. When I click on that link (My Profile) THEN it gives the link below:
Code:
http://www.leefish.nl/mybb/member.php?action=profile
|
And that is when the referrals are not visible.
I would like to be able to share this update, but as so many sites are using this construct then it could be perceived as broken. Thats bad, so I was wondering how to make the plugin see that the link
Code:
http://www.leefish.nl/mybb/member.php?action=profile
|
is the same as
Code:
http://www.leefish.nl/mybb/user-1.html
|
(12-08-2010 05:17 PM)leefish Wrote: [ -> ]I'm sorry, I think I was not clear (again) I have a link in the header - my profile - which is constructed to use this code:
Code:
<span><a href="{$mybb->settings['bburl']}/member.php?action=profile">My Profile</a></span>
|
A lot of mybb sites seem to use this construct for a profile link. When I click on that link (My Profile) THEN it gives the link below:
Code:
http://www.leefish.nl/mybb/member.php?action=profile
|
But that's an invalid link as there's no uid in the URL.
It probably should be
HTML Code
<span><a href="{$mybb->settings['bburl']}/member.php?action=profile&uid={$mybb->user['uid']}">My Profile</a></span>
|
But if you want the SEF/SEO URLs, you need to use get_profile_link somewhere, eg:
PHP Code:
$userlink = get_profile_link($mybb->user['uid']);
|
EDIT: okay, it looks like MyBB will fall back to the current user if no uid is supplied.
In which case, you'd retrieve the user ID through $uid. In other words, replace $mybb->input['uid'] with $GLOBALS['uid']
Thank you - that has fixed it - its weird though, as that OTHER link construct was/is definitely working...... But it only worked if it was the logged in user viewing the profile.
So if I clicked it - it showed my profile, but if another member of leefish used it it showed their profile. Anyway, I feel sure that this construct is better.
Thank you
(12-08-2010 06:33 PM)ZiNgA BuRgA Wrote: [ -> ]EDIT: okay, it looks like MyBB will fall back to the current user if no uid is supplied.
In which case, you'd retrieve the user ID through $uid. In other words, replace $mybb->input['uid'] with $GLOBALS['uid']
Interesting - if I use the $GLOBALS['uid'] construct then its the same as before - no referrals showing on profile via that "My Profile" link in the member block, whereas if I use the uid={$mybb->user['uid']} construct then referrals show on profile via "My Profile" link in the member block.
If I wasn't clear, I was referring to changing the code in the plugin, from:
Code:
AND u.referrer = '".intval($mybb->input['uid'])."'
|
to
Code:
AND u.referrer = '".intval($GLOBALS['uid'])."'
|