MyBB Community Forums

Full Version: is there a variable to call thread author in showthread template?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
similar to this:

[Image: NHbo3.png]
Try {$thread['username']} , but that screenshot is using Tomm's Avatar plugin I think. You can get the avatar using variables, but it is clunky and unreliable.

Something like {$thread['uid']} would give the uid (which helps to find the avatar) but as you would need to give the img type it will break if you allow different image types for avatars.
{$thread['username']} will work. Smile
Great, thanks.

Really wish there was a list of variables relating to user info and where it can be pulled. Maybe I should start keeping one.
$thread,$post,etc are some of the common variables.

Basically just use {$thread['some_column_name_from_threads_dbtable']} and it will fetch those values. Same with posts.
(2012-10-31, 01:24 PM)brad-t Wrote: [ -> ]Great, thanks.

Really wish there was a list of variables relating to user info and where it can be pulled. Maybe I should start keeping one.

You can always use the print_r($var) and it will show you all variables that you would like to know.