• 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
    • The align Attribute Doesn't Work in Tables

    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: The align Attribute Doesn't Work in Tables

    • Issue Tools
      • View Changes
    1. issueid=1507 May 1, 2010 4:30 PM
      Mokonzi Mokonzi is offline
      Senior Member
      The align Attribute Doesn't Work in Tables
      The align Attribute Doesn't Work in Tables

      The align Attribute doesn't seem to work when used in tables in templates. Atm it's ignored and doesn't float the table left or right. I've had to use style="float:right" to make a table float right. That wasn't the case before the latest RC.
    Issue Details
    Issue Number 1507
    Issue Type Bug
    Project VaultWiki 3.x Series
    Category BB-Code Parsing
    Status Fixed
    Priority 2 - Fatal / Database Errors
    Affected Version 3.0.0 RC 2
    Fixed Version 3.0.0 RC 3
    Milestone VaultWiki 3.0.0
    Software DependencyAny
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. May 2, 2010 12:00 PM
      pegasus pegasus is offline
      VaultWiki Team
      Is it stripped from the BB-Code, or does it appear in the page output and do nothing? Please link to such a table.
      Reply Reply  
    2. May 2, 2010 12:21 PM
      Mokonzi Mokonzi is offline
      Senior Member
      It's not stripped, but it's malformed in the output.

      Example template: http://www.thexuniverse.com/showwiki...box+Ship+Stats
      Example Output: http://www.thexuniverse.com/showwiki/Octopus+Raider

      What it's doing is taking this section of the template:

      [table] class="infoboxmain250box" align="right"
      |-
      | class="infoboxright" |
      And adjusting it to:
      <table align="right&lt;br" class="infoboxmain250box"><tr ><td class="infoboxright"><br />
      As you can see it's inserting the align attribute first, and breaking it by adding &lt;br after the right part of the attribute.
      Reply Reply  
    3. May 2, 2010 1:02 PM
      pegasus pegasus is offline
      VaultWiki Team
      This is very odd, but try editing vault/special_class_table.php. Find:
      Code:
      		$lines = explode("\n" , $text);
      Replace with:
      Code:
      		$splitter = "\n";
      
      		if ($this->parser->options['do_nl2br'])
      		{
      			$splitter = "&lt;br /&gt;\n";
      		}
      
      		$lines = explode($splitter, $text);
      Find:
      Code:
      					$lines["$key"] = "\n" . $line;
      Replace with:
      Code:
      					$lines["$key"] = $splitter . $line;
      And just in case for SPANs and DIVs, edit vault/special_class_cleaner.php. Find:
      Code:
      		if (empty($attributes) OR is_class_type($this->parser, 'plaintext'))
      Add before:
      Code:
      		$attributes = strip_tags($attributes);
      Reply Reply  
    4. May 2, 2010 1:19 PM
      Mokonzi Mokonzi is offline
      Senior Member
      Nope, lost the template all together now...
      Reply Reply  
    5. May 2, 2010 1:33 PM
      pegasus pegasus is offline
      VaultWiki Team
      In vault/special_class_table.php, find:
      Code:
      		if ($this->parser->options['do_nl2br'])
      		{
      			$splitter = "&lt;br /&gt;\n";
      		}
      
      		$lines = explode($splitter, $text);
      Replace with:
      Code:
      		if ($this->parser->options['do_nl2br'])
      		{
      			$lines = preg_split('#&lt;br /&gt;(?:\r\n|\r|\n)#s', $text);
      			$splitter = "&lt;br /&gt;\n";
      		}
      		else
      		{
      			$lines = explode($splitter, $text);
      		}
      Reply Reply  
    6. May 2, 2010 1:45 PM
      Mokonzi Mokonzi is offline
      Senior Member
      Perfect, works a charm
      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 10:02 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.