• 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
    • Template Argument Spacing Not Stripped

    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: Template Argument Spacing Not Stripped

    • Issue Tools
      • View Changes
    1. issueid=1905 August 10, 2010 3:33 PM
      pegasus pegasus is offline
      VaultWiki Team
      Template Argument Spacing Not Stripped

      It is customary when plugging values into templates to put extra spaces around the equals sign like so:
      Code:
      [template] Template Name
      | param1 = value1
      [/template]
      However, this results in spaces around value1 in the template output, and can cause the template name not to be detected correctly.

      Fixed for the next build. In vault/class/bbcode.php, find:
      Code:
      			$args = $this->strip_front_back_whitespace(substr($text, $parampos + 1, strlen($text) - $parampos - 1), 1);
      		}
      
      		$vault->fetch_instance('string');
      		$templatename = $this->strip_front_back_whitespace($vault->string->substr($text, 0, $parampos), 1);
      		$templatelow = $vault->string->tolower($templatename);
      Replace with:
      Code:
      			$args = trim($this->strip_front_back_whitespace(substr($text, $parampos + 1, strlen($text) - $parampos - 1), 10));
      		}
      
      		$vault->fetch_instance('string');
      		$vault->fetch_instance('encode');
      
      		$templatename = $this->strip_front_back_whitespace($vault->string->substr($text, 0, $parampos), 10);
      		$templatelow = $vault->string->tolower($vault->encode->encode($templatename, TEMPLATE_SPACE));
      In vault/class/bbcode/template.php, find:
      Code:
      				$fetch['title'] = $vault->string->tolower($fetch['title']);
      Replace with:
      Code:
      				$fetch['title'] = $vault->string->tolower($vault->encode->encode($fetch['title'], TEMPLATE_SPACE));
    Issue Details
    Issue Number 1905
    Issue Type Bug
    Project VaultWiki 3.x Series
    Category Templates
    Status Fixed
    Priority 5 - Minor Bugs / Small Tweaks
    Affected Version 3.0.2
    Fixed Version 3.0.3
    Milestone VaultWiki 3.0.5
    Software DependencyAny
    Users able to reproduce bug 1
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. This petition for a change to Confirmed was accepted
      August 14, 2010 7:42 AM
      Mokonzi Mokonzi is offline
      Senior Member
      Applied this fix, but not getting much success with it. Most of my templates are showing up as new (red link).
       
    2. August 14, 2010 11:57 AM
      pegasus pegasus is offline
      VaultWiki Team
      If that's the case, I would undo the file edits mentioned above and wait for the next release (due to yet another security issue, we are aiming to get a patch out today). In the mean time, "some" broken templates are better than "most" broken templates. I probably left out an edit or two that's required to get this working, but it is working again on our boards.
      Reply Reply  
    3. August 14, 2010 12:13 PM
      Mokonzi Mokonzi is offline
      Senior Member
      No problem. I'll wait for that then. Thanks for the good work
      Reply Reply  
    4. August 18, 2010 1:45 PM
      Mokonzi Mokonzi is offline
      Senior Member
      Still seem to be broken templates for me
      Reply Reply  
    5. August 18, 2010 2:08 PM
      pegasus pegasus is offline
      VaultWiki Team
      I think this is the issue you are now having: http://www.vaultwiki.org/issues/1929/
      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 11:13 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.