MyBB Community Forums

Full Version: Show Reputation in postbit in a particular set of forums?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey guys, hopefully just a quick one.

I want to show members reputation in their postbits but only in a particular forum, for example in forum id 18, 19, 20.

Elsewhere, there would be no reputation in the postbit.

Im using the PHP and Conditions in Templates plugin by Zinga.

Thing is, im getting the following error:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /*****/*****/public_html/inc/functions_post.php(399) : eval()'d code on line 5

using this code in my templates:

<if in_array($GLOBALS['forum']['fid'],&nbsp;array(21))&nbsp;then>
{$post['replink']}
</if>

(it keeps adding the nbsp)

I read somewhere that deleting:

<?xml version="1.0" encoding="UTF-8"?>

from htmldoctype might solve it, but it isn't in there. I'm using Normal Theme, think it could be anywhere else?
Try this;
<if in_array($post['fid'],array(21)) then>
{$post['replink']}
</if>
Hey Yaldaram, thanks for the tip but i think i had a problem (im not sure) with something to do with xml(?) which was just always not allowing php code to be put into my templates.

I could be talking complete rubbish there but i think there is something right in what i said.

I worked around it by directly editing functions_post.php and putting an if statement in there, it works fine.