Announcement

Collapse
No announcement yet.

<if> <else /> </if> show up as new rows in source.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • GriZzm0
    Member
    • Feb 2005
    • 51
    • 3.8.x

    <if> <else /> </if> show up as new rows in source.

    Well, its nothing seriouse. Just something that bugs me.
    If you have a code like this.
    Code:
    <div class="blah">
    <if condition="$show['inlinemod']">
    	Blah
    <else />
    	Blah blah
    </if>
    </div>
    It will show up like this in the source.
    Code:
    <div class="blah">
    
    	Blah
    
    
    </div>
    In what file can I edit so that wont happend? I guess there is like \n\r at the end of that line or something.
    OTFans.net Administrator
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    You just have to remove the line breaks and spaces from the conditional code itself. Put it all on one line.

    Comment

    • GriZzm0
      Member
      • Feb 2005
      • 51
      • 3.8.x

      #3
      Originally posted by Jake Bunce
      You just have to remove the line breaks and spaces from the conditional code itself. Put it all on one line.
      Yeah. I know that works. But that makes it harder to read while editing. I was just looking around in adminfunctions_template.php but didn't find it.
      OTFans.net Administrator

      Comment

      • GriZzm0
        Member
        • Feb 2005
        • 51
        • 3.8.x

        #4
        Ok. I tried that now. And it wont work if you have an if on the last row in that template. Then it will creat a new row anyway. Would be great if someone could tell me where to edit so that wont happend.
        OTFans.net Administrator

        Comment

        • Jake Bunce
          Senior Member
          • Dec 2000
          • 46598
          • 3.6.x

          #5
          I don't know where that code is. That is a www.vbulletin.org question.

          IMO, it's not worth trying to "fix" since extra formatting in the source makes no functional difference.

          Comment

          widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
          Working...
          😀
          🥰
          🤢
          😎
          😡
          👍
          👎