The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
Hi everyone,
I'm trying to input this code into my template: Code:
<if condition="$p['users-online']">$p[users-online]</if> Code:
Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ']' in /home/mysite/public_html/includes/adminfunctions_template.php(3537) : eval()'d code on line 128 Any idea what's wrong? If needed, here is some of the code it's around... Code:
<!-- begin beta status -->
<tbody>
<tr>
<td class="thead" width="100%" colspan="6">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_shoutcast')"><img id="collapseimg_forumhome_shoutcast" src="$stylevar[imgdir_button]/collapse_thead$vbcollapse[collapseimg_forumhome_shoutcast].gif" alt="" border="0" /></a>
<div class="smallfont"><b>JabbaTown BETA</b></div>
</td>
</tr>
</tbody>
<tbody id="collapseobj_forumhome_shoutcast" style="$vbcollapse[collapseobj_forumhome_shoutcast]">
<tr>
<td rowspan="3" class="alt2" align="center"><A href="javascript:clientPopup();" ><img src="http://www.jabbacommunity.com/images/beta.gif" alt="JabbaTown BETA" border="0"></a></td>
<td valign="top" align="left" class="alt1">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td width="50%" class="alt1" align="center">
<a href="javascript:clientPopup();" ><img src="images/jabbatown.PNG" alt="JabbaTown BETA" border="0"></a>
<br />
<a href="http://www.jabbacommunity.com/faq.php?faq=fre_ask_q#faq_howbeta">Want an account?</a>
</td>
<td rowspan="2" width="50%" align="center"><div class="smallfont"><b>Statistics</b>
<br />
Server Status: <if condition="$p['maintenance-mode']">
<FONT color="#FF8000">Maintenance</FONT></B><BR />
<else /><if condition="$p['server-status']=='online'">
<B><FONT color="#00FF00">Online</FONT></B><BR />
<else />
<B><FONT color="#FF0000">Offline</FONT></B><BR />
</if>
</if>
Jabbas Online: <if condition="$p['users-online']">$p[users-online]</if>
</div></td>
</tr>
</table>
</td>
</tr>
</tbody>
<!-- end beta status -->
|
|
#2
|
|||
|
|||
|
Try chnaging to:
HTML Code:
<if condition="$p[users-online]">$p[users-online]</if> |
|
#3
|
|||
|
|||
|
Are you sure thats the only change you made? (does it save without that line)
|
|
#4
|
||||
|
||||
|
@Marco; tried... doesn't work.
@merk; yes, it saves without that line. |
|
#5
|
|||
|
|||
|
Change all instants of users-online to users_online. The template system will not allow you to use - in variables.
|
|
#6
|
||||
|
||||
|
Quote:
|
|
#7
|
|||
|
|||
|
Not sure why. I've experianced this problem awhile ago and that fixed it for me. Uisng - in variables always seemed to be bad coding IMHO. Just my $0.02.
|
|
#8
|
||||
|
||||
|
Ah, strange. I guess I can live without it :P Thanks for all the help.
|
|
#9
|
|||
|
|||
|
No problem man.
|
|
#10
|
|||
|
|||
|
Quote:
But I see no reason why it shouldnt work D: |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|