MyBB Community Forums

Full Version: Grab UID from Page Link
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi! I'm trying to implement this:

<if $mybb->user['uid'] == {$mybb->settings['bburl']}/newpoints.php?action=shop&shop_action=myitems&uid={$mybb->user['uid']} then>{$send}{$sell}
	<else>
		</if>

So that the {$send}{$sell} only appears to users that have the same UID as the one in the page link. What am I doing wrong here?

Please don't insult me if this is an easy fix. My brain is still groggy from a surgery.
you compare an uid with an url, it will never match.
I don't know conditional template, but peharps you have access to $thread['uid'] that you can compare to $mybb->user['uid']
(2021-10-15, 08:50 AM)Crazycat Wrote: [ -> ]you compare an uid with an url, it will never match.
I don't know conditional template, but peharps you have access to $thread['uid'] that you can compare to $mybb->user['uid']

I don't think MYBB supportsĀ 
`$thread['uid']`
unfortunately.
It depends on where you're putting it, it will exist if a thread has been loaded.