ogetbilo
06-09-2004, 09:19 AM
I followed the instructions in
http://www.vbadvanced.com/membersarea.php?do=viewmanual&productid=4&pageid=6
to get left and right sidebars displayed in my forum's homepage.
Fine, it is working as desired. But now some of my users say they want to have the forum home page without any sidebars. So I thought I can do this with some if conditionals (ie I can let users select whether they want to see the sidebar or not).
I first went to 'add new user profile field'.
I created a multiple-selection checkbox field with only one content: "use plain forumhome page". If this is checked, the sidebars should not show up on the forumhome page. The field was given a name 'field11'.
Then I opened the vba_portal template
I replaced
<if condition="$show['left_column']">
<td width="$vba_options[portal_leftcolwidth]">
$home[leftblocks]
</td>
<!-- Spacer Cell -->
<td width="$vba_options[portal_colspacing]"><img alt="" src="$vboptions[bburl]/$vboptions[cleargifurl]" width="$vba_options[portal_colspacing]" /></td>
<!-- / Spacer Cell -->
</if>
with
<if condition="THIS_SCRIPT == 'index' AND $bbuserinfo[field11]">
<else/>
<if condition="$show['left_column']">
<td width="$vba_options[portal_leftcolwidth]">
$home[leftblocks]
</td>
<!-- Spacer Cell -->
<td width="$vba_options[portal_colspacing]"><img alt="" src="$vboptions[bburl]/$vboptions[cleargifurl]" width="$vba_options[portal_colspacing]" /></td>
<!-- / Spacer Cell -->
</if>
</if>
to disable the left column on forumhome page for those who check the checkbox 'field11'.
But it's not working. No matter whether that checkbox is checked or not, the left column does not show on the forumhome page, as well as on the vbaCMPS page.
What did I do wrong?
http://www.vbadvanced.com/membersarea.php?do=viewmanual&productid=4&pageid=6
to get left and right sidebars displayed in my forum's homepage.
Fine, it is working as desired. But now some of my users say they want to have the forum home page without any sidebars. So I thought I can do this with some if conditionals (ie I can let users select whether they want to see the sidebar or not).
I first went to 'add new user profile field'.
I created a multiple-selection checkbox field with only one content: "use plain forumhome page". If this is checked, the sidebars should not show up on the forumhome page. The field was given a name 'field11'.
Then I opened the vba_portal template
I replaced
<if condition="$show['left_column']">
<td width="$vba_options[portal_leftcolwidth]">
$home[leftblocks]
</td>
<!-- Spacer Cell -->
<td width="$vba_options[portal_colspacing]"><img alt="" src="$vboptions[bburl]/$vboptions[cleargifurl]" width="$vba_options[portal_colspacing]" /></td>
<!-- / Spacer Cell -->
</if>
with
<if condition="THIS_SCRIPT == 'index' AND $bbuserinfo[field11]">
<else/>
<if condition="$show['left_column']">
<td width="$vba_options[portal_leftcolwidth]">
$home[leftblocks]
</td>
<!-- Spacer Cell -->
<td width="$vba_options[portal_colspacing]"><img alt="" src="$vboptions[bburl]/$vboptions[cleargifurl]" width="$vba_options[portal_colspacing]" /></td>
<!-- / Spacer Cell -->
</if>
</if>
to disable the left column on forumhome page for those who check the checkbox 'field11'.
But it's not working. No matter whether that checkbox is checked or not, the left column does not show on the forumhome page, as well as on the vbaCMPS page.
What did I do wrong?