Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Not Solved [How To?] How To Echo Postbit User Information In Other Templates?
#1
Not Solved
Hello,

Is it possible to show the postbit information in other templates, including username, avatar, and all the other info in the postbit?

For example, I would like to echo the entire postbit including {$post['usertitle']}, {$post['groupimage']}, {$post['useravatar']} and {$post['user_details']} in multiple different templates.
#2
Not Solved
Hi,

It is possible to use this information in other templates. But the images will need to be enclosed in img tags and the registration date, reputation and warning points are all formatted properly in the code itself. So all you're basically getting is raw information from the DB. Regardless here are the variables you can use Smile

{$mybb->user['usertitle']}
<img src="{$mybb->usergroup['image']}"/>
<img src="{$mybb->user['avatar']}"/>
{$mybb->user['postnum']}
{$mybb->user['regdate']}
{$mybb->user['reputation']}
{$mybb->user['warningpoints']}
Thanks, Polarbear541
#3
Not Solved
(2014-03-10, 11:33 PM)Polarbear541 Wrote: Hi,

It is possible to use this information in other templates. But the images will need to be enclosed in img tags and the registration date, reputation and warning points are all formatted properly in the code itself. So all you're basically getting is raw information from the DB. Regardless here are the variables you can use Smile

{$mybb->user['usertitle']}
<img src="{$mybb->usergroup['image']}"/>
<img src="{$mybb->user['avatar']}"/>
{$mybb->user['postnum']}
{$mybb->user['regdate']}
{$mybb->user['reputation']}
{$mybb->user['warningpoints']}

Hello,

Thank you for your help, but some things don't turn out correct. The regdate turns out like "1383734057" instead of "Nov 2013" and the warningpoints turns out like "0" instead of "0%" and nothing is a hyperlink, just text.

Is there a way to 'exactly' echo the current postbit in another template, with complete functionality (with links working)?
#4
Not Solved
As I said the registration date, reputation and warning level are formatted within the code of showthread.php, member.php and everything else which actually displays this information.

Echoing the postbit out of the postbit templates and files isn't possible without either changing the core files or using a plugin. This is because the postbit uses information from the post (such as whether it is an announcement, preview or PM) to generate itself, if you are showing it outside of a post, it won't have this information Smile
Thanks, Polarbear541
#5
Not Solved
(2014-03-11, 12:55 AM)Polarbear541 Wrote: As I said the registration date, reputation and warning level are formatted within the code of showthread.php, member.php and everything else which actually displays this information.

Echoing the postbit out of the postbit templates and files isn't possible without either changing the core files or using a plugin. This is because the postbit uses information from the post (such as whether it is an announcement, preview or PM) to generate itself, if you are showing it outside of a post, it won't have this information Smile

Would you know someone who is willing to show me the core file edits? I'm willing to pay whoever can do that for me.


Forum Jump:


Users browsing this thread: 1 Guest(s)