• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
    • Wiki
    • Support
      • Manage Subscriptions
      • FAQ
      • Support For
        • VaultWiki 4.x Series
        • VaultWiki.org Site
    • What's New?
    • Buy Now
    • Manual
    • 
    • Support
    • VaultWiki 3.x Series
    • Bug
    • [/if] Prevents New <tr> being Parsed

    1. Welcome to VaultWiki.org, home of the wiki add-on for vBulletin and XenForo!

      VaultWiki allows your existing forum users to collaborate on creating and managing a site's content pages. VaultWiki is a fully-featured and fully-supported wiki solution for vBulletin and XenForo.

      The VaultWiki Team encourages you to join our community of forum administrators and check out VaultWiki for yourself.

    Issue: [/if] Prevents New <tr> being Parsed

    • Issue Tools
      • View Changes
    1. issueid=646 June 24, 2009 2:59 AM
      Mokonzi Mokonzi is offline
      Senior Member
      [/if] Prevents New <tr> being Parsed
      [/if] Prevents New <tr> being Parsed

      I've noticed that whenever an [if] command is placed in front of a |- for a new <tr> in a table template, the |- isn't parsed as a new line. Instead the table becomes a jumbled mess... as demonstrated here:
      http://www.thexuniverse.com/forum/sh...itle=Barracuda
      If I remove the [if] command from before the |-, the remaining [if] commands are parsed correctly, and the table works as planned.
      Any fix for this?
      Thanks for the help.
    Issue Details
    Issue Number 646
    Issue Type Bug
    Project VaultWiki 3.x Series
    Category BB-Code Parsing
    Status Fixed
    Priority 2 - Fatal / Database Errors
    Affected Version 2.3.2
    Fixed Version 2.5.0
    Milestone VaultWiki 2.5.x
    Software DependencyAny
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. June 24, 2009 12:13 PM
      pegasus pegasus is offline
      VaultWiki Team
      In AdminCP -> Plugins & Products -> Plugin Manager, find the CES VaultWiki Parser Extensions plugin for vault_templatecode_complete. Find and remove:
      PHP Code:
      'strip_space_after' => 10 
      Reply Reply  
    2. June 24, 2009 3:32 PM
      Mokonzi Mokonzi is offline
      Senior Member
      Awesome job as always pegasus
      Reply Reply  
    3. This petition for a change to Confirmed was rejected
      October 30, 2009 12:56 PM
      Mokonzi Mokonzi is offline
      Senior Member
      Was this ever fixed with the latest version?

      I'm getting this error again since I've upgraded (and therefore overwrote the file).
       
    4. October 30, 2009 3:34 PM
      pegasus pegasus is offline
      VaultWiki Team
      It's working correctly for me in our demo area. The page you linked in the first post also looks fine to me. See our template: [template]4columnROW[/template]
      Reply Reply  
    5. This petition for a change to Confirmed was rejected
      October 30, 2009 6:43 PM
      Mokonzi Mokonzi is offline
      Senior Member
      Played around with my template, and discovered the following:

      If you follow an IF command with another one, and have the |- on the same line or even the line after, it doesn't process the |- as a new row, as exemplified below:
      Code:
      [if={{{1|}}}]Something[/if][if={{{2|}}}]|-Something else[/if]
      or:
      Code:
      [if={{{1|}}}]Something[/if][if={{{2|}}}]
      |-Something else[/if]
       
    6. October 30, 2009 9:57 PM
      pegasus pegasus is offline
      VaultWiki Team
      According to the documentation, this is working as designed:
      "Whitespace is stripped from the following places: after the opening tag, around the [else /] tag, and before the closing tag. This allows you to create readable nested conditional code without worrying about the added whitespace. If you actually wanted to keep whitespace here, you need to break your code into multiple tags, or if HTML is enabled, you can use the appropriate entity code."
      - Parser Extensions
      In this case, you would need to put the no-width space character before your new line.
      Code:
      [if="{{{2|}}}"]​​&amp;#8203;
      |- Something else
      [/if]
      This method can also cause spacing issues within your table because the non-width space will be output.

      Something you may not be aware of is that the space around table data is trimmed anyway, so you don't even need to use the aforementioned method. You can put the line break OUTSIDE the IF tag, without the line break rendering.

      EDIT: However, this was a relatively arbitrary change we made to the conditional code to make it more readable for editors. This actually made it harder to use in a number of situations, such as yours. Since it's Working as Designed, we can't consider it a bug, but we will be making the change to sacrifice readability for usability.

      In vault/extensions/parser/parser_class_core.php, find and delete:
      Code:
      		$ifelse[0] = trim($ifelse[0], "\r\n\t");
      		$ifelse[1] = trim($ifelse[1], "\r\n\t");
      Reply Reply  
    7. October 31, 2009 3:30 AM
      Mokonzi Mokonzi is offline
      Senior Member
      I understand the problem with this now.

      Readability has always helped me follow through on what I wanted in development, but as you are saying, that's not enough in itself.

      I think you guys have done an excellent job with this software, and I appreciate the time you take to explain how things work, and to work with our (sometimes frustrating) feedback.

      Reply Reply  
    + Reply

    Assigned Users
    Loading Please Wait
    Tags
    Loading Please Wait
    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 12:26 AM.
    This site uses cookies to help personalize content, to tailor your experience, and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Learn more… Accept Remind me later
  • striker
    Powered by vBulletin® Version 4.2.5 Beta 2
    Copyright © 2023 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2023 DragonByte Technologies Ltd.
    Copyright © 2008 - 2013 VaultWiki Team, Cracked Egg Studios, LLC.