MyBB Community Forums

Full Version: .. remove the post-bit info for a certain user (or usergroup if possible)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
So I've seen this on the infamous LeafForums .NET and wondered how the owner removed his Post Bit for whenever he post a post/thread/announcement. However it is still on his profile page. Can anyone help me with this? .. I'm way more of a CSS and "high-end" HTML programmer, and know little to zero about PHP. Thanks in advance. (Board URL: http://wolforums.co.uk)
you can use template conditionals plugin for such requirements.
required guidance is available in the plugin's release thread.

with the template conditionals plugin installed,
basically the code can be like below
<if $post['uid'] <> yourUID then>
--- code to be executed --- 
</if>

Edit: see also templates related guidance
(2017-04-25, 10:28 AM).m. Wrote: [ -> ]you can use template conditionals plugin for such requirements.
required guidance is available in the plugin's release thread.

with the template conditionals plugin installed,
basically the code can be like below
<if $post['uid'] <> yourUID then>
--- code to be executed --- 
</if>

Edit: see also templates related guidance

So, would I go into my Templates & Styles to do this? And what template would I expand?
what exactly you want to remove ?
if it is the block with Posts number, Threads number, Joined date .. etc then
postbit_author_user template needs to be modified (in Post Bit Templates group)
(2017-04-25, 10:57 AM).m. Wrote: [ -> ]what exactly you want to remove ?
if it is the block with Posts number, Threads number, Joined date .. etc then
postbit_author_user template needs to be modified (in Post Bit Templates group)

Ohh ok, and yes the Posts number, Threads number, and Joined date. But I already know that part, but wouldn't that remove it for all users?
please concentrate a little on the suggested sample code.
condition is used the get the required result.
:O I see now, OK had a little brain cramp thank you for helping!

So would it look something something like this?

[Image: MfmA1Rx.png]
^ remove newly added code.
add <if $post['uid'] <> 1 then> at the beginning of the template
And add </if> at the end of the template
(2017-04-25, 12:47 PM).m. Wrote: [ -> ]^ remove newly added code.
add <if $post['uid'] <> 1 then> at the beginning of the template
And add </if> at the end of the template

OK I got it now. I see how the statement works within the <if> again thanks!
now to apply such code for a usergroup (eg. administrators => group id = 4)
you can use code like below
<if $post['usergroup'] <> 4 then>
--- code to be executed --- 
</if> 
Pages: 1 2