PDA

View Full Version : Template Issue Going from 3.8.7 to 4.2.1


JamesN
05-28-2013, 12:16 AM
I've upgraded a test copy of my forums from 3.8.7 to 4.2.1 and am incorporating my Google Ads into the new template structure.

In the postbit_legacy template in 3.8.7, I had the below code. If I add it to the postbit_legacy template in 4.2.1 I get the attached error.


<if condition="$post[postcount] % $vboptions[maxposts] == "4"">
<table class="tborder" cellpadding="6" cellspacing="0" border="0" width="100%" align="center" style="margin-top: 1px; border-top: 0">
<tr valign="top">
<td class="alt1" align="center">
<!-- show google script -->
</td>
</tr>
</table>
</if>


How can I do this in 4.2.1?

JamesN
05-28-2013, 12:47 AM
I got it working through this, but the problem I have now is that it doesn't appear in Firefox. It works fine in IE and Chrome though and I can't figure out why. Any ideas guys?


<vb:if condition="$post[postcount] % $vboptions[maxposts] == 4">
<table class="tborder" cellpadding="6" cellspacing="0" border="0" width="100%" align="center" style="margin-top: 1px; border-top: 0">
<tr valign="top">
<td class="alt1" align="center">
<!-- show google script -->
</td>
</tr>
</table>
<br>
</vb:if>

nerbert
05-28-2013, 12:49 AM
Ooooooooooooooh you have a lot to learn to catch up with vB4 coding. Just be glad you learned to code with vB3, if you started with vB4 you would never learn.

Template conditionals look like this in vB4

<vb:if condtion=" ....... "> Something <vb:else /> Something else </vb:if>

And you shoudl probably use single quotes around that 4, Or maybe no quotes at all.

JamesN
05-28-2013, 12:51 AM
Thanks nerbert - please see my most recent post though, may have crossed :)