MyBB Community Forums

Full Version: Parse error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
sorry, you must add {$changstats} in the header file. my bad Sad
What? In the header? Where in the header?
installed on localhost, worked fine, but dont know why it gave parse error at live site. it is showing that error when browsing the "all forums" and "order 2" tabs
well, I have no idea how to get this to work, dont want it anyway.....sorry.
(2010-12-18, 09:34 PM)TheGodFather Wrote: [ -> ]sorry, you must add {$changstats} in the header file. my bad Sad

No, it is not working there. Open plugin file, you'll see global_end hook, which means that it goes inside the footer template.

I added the same var "{$changstats}" in footer too, nothing works... not sure what this plugin going to do :s
thats weird. its working for us, but only giving error for me.
i added the {$changstats} to bottom of index page and it worked.
This error is nearly always an error in a template. Look at line 559 of the plugin file, it'll be eval'ing a template, that'll be the cause.
thanks matt, as you said, this template code is causing the problem. i just removed the whole code from the changuondyu_latestpost_bit template of global templates and i found its working as empty box without getting the values.

here is the template code causing error.
<tr>
<td width="100%" nowrap="nowrap"><span class="smalltext"><a href="showthread.php?tid=$latestpost[tid]&action=lastpost" title="$latestpost[fulltitle]">$latestpost[subject]</span></td>
<td nowrap="nowrap"><span class="smalltext"><if condition="$pstatus=='old'"><font color="#C0C0C0"></if>$latestpost[lastpost]&nbsp;<if condition="$pstatus=='old'"></font></if>&nbsp;</span></td>
<td  nowrap="nowrap" title="$latestpost[fulllastposter]"><span class="smalltext"><a href="member.php?action=profile&uid=$latestpost[lastposteruid]">$latestpost[lastposter]</a>&nbsp;</span></td>
<td nowrap="nowrap" align="right"><span class="smalltext">$latestpost[replies]&nbsp;</span></td>
<td nowrap="nowrap" align="right"><span class="smalltext">$latestpost[views]&nbsp;</span></td>
<td nowrap="nowrap" title="$latestpost[forumnamefull]"><span class="smalltext"><a href="forumdisplay.php?fid=$latestpost[fid]">$latestpost[forumname]</a></span></td>
</tr>

i went further and removed one by one lines of code from the above code and found that by removing this code, solved the problem but the forum date and time column is not displaying the stats box.

<td nowrap="nowrap"><span class="smalltext"><if condition="$pstatus=='old'"><font color="#C0C0C0"></if>$latestpost[lastpost]&nbsp;<if condition="$pstatus=='old'"></font></if>&nbsp;</span></td>
problem solved. thanks matt.
dont know why, but by removing the two instances of
<if condition="$pstatus=='old'"> </if>
these lines of code from the
<td nowrap="nowrap"><span class="smalltext"><if condition="$pstatus=='old'"><font color="#C0C0C0"></if>$latestpost[lastpost]&nbsp;<if condition="$pstatus=='old'"></font></if>&nbsp;</span></td>
solved the problem. but can we make that line work in other way?
<if condition="$pstatus=='old'"> </if> in another format.
installed php in template conditions plugin and so it might not allowing using of this
<if condition="$pstatus=='old'"> </if>
condition, can we use it in different format?
You can use conditionals like this;

$pstatus = 'old';
<if $condition == $pstatus then> 
// do something here
</if>
Pages: 1 2 3