MyBB Community Forums

Full Version: Hide Custom Postbit
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hi,

With the help of others on this forum I was able to make a custom postbit.

However, I need to know how to have it so that the postbit only appears for those who actually filled the correlating field in registration. Here is one of the lines I'm using:

<a href="http://xfire.com/profile/{$post['fid4']}"target="_blank"><img src="http://laggygamerz.com/vis/icons/small/menu_xfire.png" /></a>

So basically, if fid4 = blank, then it should hide that entire code.

Thanks in advanced,

Scroll
You'll need to use the template conditionals plugin, found here: http://mybbhacks.zingaburga.com/showthread.php?tid=464
Thanks!

However, I'm a noob in all things programming, I have no idea how to work this.

I've installed the plugin but have no idea what to write in the postbit template. Undecided
Try this:

<if $post['fid4'] then>
<a href="http://xfire.com/profile/{$post['fid4']}"target="_blank"><img src="http://laggygamerz.com/vis/icons/small/menu_xfire.png" /></a>
</if>
Didn't work. When i insert that code entire post goes blank.
Odd. Are you using the codepress editor? If so, try disabling it. ACP > preferences > Enable Codepress = No
Codepress disabled (Ahhh much nicer!), same issue.

Does the plugin you posted earlier have any prerequisites?
Not that I know of. It's always worked just fine for me. Try this instead:

<if $post['fid4'] != '' then>
<a href="http://xfire.com/profile/{$post['fid4']}"target="_blank"><img src="http://laggygamerz.com/vis/icons/small/menu_xfire.png" /></a>
</if>
Still no luck.

Could it have something to do with nginx or any other PHP settings server-side?
I sincerely doubt it. It could be down to my lack of experience using the plugin though Wink
Pages: 1 2