MyBB Community Forums

Full Version: Show post count of user in MyBB gomobile
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How would I go about doing this? I've managed to show current user logged in post count, but can't figure the variable for owner of the post in postbit to show post count for that user.
You're after {$post['postnum']}
The easiest way to find something that shows on the desktop theme is to just look in the template for it.
Yes, that works. Thanks. I looked and tried different variables for over an hour. Which desktop template is it in?

Is there documentation that shows what each variable is?
^ most probably Cameron was referring to MyBB's default theme (i.e. stock theme) templates
(2013-11-03, 03:48 AM)DrXotick Wrote: [ -> ]Yes, that works. Thanks. I looked and tried different variables for over an hour. Which desktop template is it in?
It was in postbit_author_user, I found it by looking through the main postbit template and finding, that as {$post['user_details']}, so I just looked through the user-related postbit templates.

(2013-11-03, 03:48 AM)DrXotick Wrote: [ -> ]Is there documentation that shows what each variable is?
Not as far as I know Sad
Yes. I had found user_details in UCP templates, but had no idea where they were coming from. Thanks.
They are coming from PHP files - core and plugins. Not all are used in default theme but that's the easiest way to find them if you know the template system and aren't acknowledged in PHP. But if you would be keen on it, for example the variable you were looking for is to be found at line 293 in inc/functions_post.php:
$post['postnum'] = my_number_format($post['postnum']);

There are also some pages which make it easier to look for a variable inside all files, for example: http://sourcedocs.mybboard.nl/nav.html?_...index.html
Yea. I figured it was buried in PHP somewhere. I generally look myself for half an hour or so. Google as well before posting. So do make some effort prior to asking.

Thanks for the reference page. Still maybe difficult to find exactly which variable is needed since there's no description and there's several thousand variables there. Good reference nonetheless.