Why is this not closed?

Discussion in 'HTML & Website Design' started by Okenyon, Apr 26, 2010.

  1. #1
    <!-- Ads after first post -->
    <if condition="!$GLOBALS['FIRSTPOSTID']">
    
    $spacer_open
    <div style="padding:0px 0px $stylevar[cellpadding]px 0px">
    
    <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
    <tr>
        <td class="thead" align="left">Partner Sites</td>
    </tr>
    <tr>
        <td class="alt1" align="center">
    
    <div align=center>
    
    <if condition="is_member_of($bbuserinfo, 1)">
    <a href="http://manlystuff.com/forum/register.php"><img src="http://www.manlystuff.com/images/registerbanner.gif"></a>
    <br />
    <else />
    </div>
        </td>
    </tr>
    </table>
    </div>
    $spacer_close
    </if>  
    </if>  
    
    </if>  
    
    
    Code (markup):

     
    Okenyon, Apr 26, 2010 IP
  2. Ulquiorra

    Ulquiorra Peon

    Messages:
    422
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Firstly, it is a good idea to tell people where the hell the code you're posting is from.

    Secondly, I see two <if> statements being opened and three being closed.
     
    Ulquiorra, Apr 26, 2010 IP
  3. carfanatic01

    carfanatic01 Peon

    Messages:
    239
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Well.?? what seems to be the solution now.?? if we remove the extra<if>.. Would it work.??
     
    carfanatic01, Apr 26, 2010 IP
  4. Ulquiorra

    Ulquiorra Peon

    Messages:
    422
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Tell me where this code is from. My best guess is a vBulletin template.

    Those </if> tags may be closing other tags that were opened earlier in the template.

    What is the error vBulletin gives you? It is not letting you save? In that case, what was the original saved code?
     
    Ulquiorra, Apr 26, 2010 IP
  5. Okenyon

    Okenyon Banned

    Messages:
    528
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    28
    #5
    it's from www.manlystuff.com

    - when you view a thread as guest the threads go abit mad and move to the right!

    any help?
     
    Okenyon, Apr 26, 2010 IP
  6. Ulquiorra

    Ulquiorra Peon

    Messages:
    422
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Look here:

    <if condition="is_member_of($bbuserinfo, 1)">
    <a href="http://manlystuff.com/forum/register.php"><img src="http://www.manlystuff.com/images/registerbanner.gif"></a>
    <br />
    <else />
    </div>
        </td>
    </tr>
    </table>
    </div>
    $spacer_close
    </if>
    Code (markup):
    Your else statement is closing the tags. This means the tags will only close if the if statement evaluates to false.

    Fix it like this (for example):

    <if condition="is_member_of($bbuserinfo, 1)">
    <a href="http://manlystuff.com/forum/register.php"><img src="http://www.manlystuff.com/images/registerbanner.gif"></a>
    </if>
    <br />
    </div>
        </td>
    </tr>
    </table>
    </div>
    $spacer_close
    
    Code (markup):
     
    Ulquiorra, Apr 26, 2010 IP
  7. Okenyon

    Okenyon Banned

    Messages:
    528
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    28
    #7
    thanks man!
     
    Okenyon, Apr 26, 2010 IP
  8. Brandon Sheley

    Brandon Sheley Illustrious Member

    Messages:
    9,721
    Likes Received:
    612
    Best Answers:
    2
    Trophy Points:
    420
    #8
    search in your admincp, it's a setting your vboptions
    what are you posting your articles on?
    \and what's this have to do with the OP's question??
     
    Brandon Sheley, Apr 27, 2010 IP