• 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
    • BB code issue: bb tag after pipe (really anoying)

    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: BB code issue: bb tag after pipe (really anoying)

    • Issue Tools
      • View Changes
    1. issueid=2517 November 3, 2011 1:10 PM
      Lord Doys Lord Doys is offline
      Junior Member
      BB code issue: bb tag after pipe (really anoying)

      Ok, i am getting a bit frustrated when working with tables (and this happens with other tags as well)

      when you have a tag like [ div ] style="whatever" | actual displayed text [ /div ] this works just fine
      but when you want for example a list inside a div
      Code:
      [div] style="whatever" |
      [list][*][wiki="Adamantine"]Adamantine[/wiki][*][wiki="Alchemical Silver"]Alchemical Silver[/wiki][*][wiki="Cold Iron"]Cold Iron[/wiki][*][wiki="Crystal, Deep"]Crystal, Deep[/wiki][*][wiki="Crystal, Mundane"]Crystal, Mundane[/wiki][*][wiki="Darkwood"]Darkwood[/wiki][*][wiki="Dragonhide"]Dragonhide[/wiki][*][wiki="Mithral"]Mithral[/wiki][/list]
      [/div]
      then the DIV goes insane and does not render/parse

      often with DIV i can use the &nbsp workaround, but for tables aaaaargh

      I've put up some code again on my testpage

      • 1Table issue
      • 2DIV issue


      https://www.vaultwiki.org/demo/TestArjan
    Issue Details
    Issue Number 2517
    Issue Type Bug
    Project VaultWiki 3.x Series
    Category BB-Code Parsing
    Status Fixed
    Priority 3 - Loss of Functionality
    Affected Version 3.0.14
    Fixed Version 3.0.15
    Milestone (none)
    Software DependencyAny
    Users able to reproduce bug 0
    Users unable to reproduce bug 0
    Attachments 0
    Assigned Users (none)
    Tags (none)




    1. November 3, 2011 5:06 PM
      pegasus pegasus is offline
      VaultWiki Team
      The DIVs are working as designed as far as I can tell. If all attributes are invalid, VaultWiki thinks it is regular text and that you wanted a real | in your text. To avoid this issue with templates especially, always make sure there is at least 1 valid attribute, like style="visibility: visible"

      For tables, make the following changes. In vault/class/bbcode.php, find:
      Code:
      	function do_strip_space_after($current_cycle, $pending_text)
      Add before:
      Code:
      	/**
      	* Parses out specific white space before or after cetain tags and does nl2br
      	*
      	* @param	string	Text to process
      	* @param	bool	Whether to translate newlines to <br /> tags
      	*
      	* @return	string	Processed text
      	*/
      	function parse_whitespace_newlines($text, $do_nl2br = true)
      	{
      		if ($do_nl2br)
      		{
      			$text = nl2br($text);
      		}
      
      		return $text;
      	}
      Find:
      Code:
      		$lists["$parser_rules"] = $tag_list;
      Add before:
      Code:
      		if ($tag_list['no_option']['list'])
      		{
      			// [LIST]
      			$tag_list['no_option']['list']['strip_space_before'] = 1;
      		}
      
      		if ($tag_list['option']['list'])
      		{
      			// [LIST=XXX]
      			$tag_list['option']['list']['strip_space_before'] = 1;
      		}
      
      		if ($tag_list['no_option']['indent'])
      		{
      			// [INDENT]
      			$tag_list['no_option']['indent']['strip_space_before'] = 1;
      		}
      
      		if ($tag_list['option']['indent'])
      		{
      			// [INDENT=XXX]
      			$tag_list['option']['indent']['strip_space_before'] = 1;
      		}
      Reply Reply  
    2. November 3, 2011 5:50 PM
      Lord Doys Lord Doys is offline
      Junior Member
      Cheers,

      Although i see one more issue with it... then i edit the page and press the top left button to go to source mode.. it messes up the table.
      It looks like its interfering with the vbulletin one?

      at the testpage you see what happened. I didnt changes any code, just switched back and forth wysiwyg and source and saved
      Reply Reply  
    3. November 3, 2011 6:10 PM
      Lord Doys Lord Doys is offline
      Junior Member
      ok i give up.. i dont get it anymore

      take a look at: http://www.birthright.net/forums/sho...vel_Adjustment

      then try to edit that table, and you'll never get it to display right again ...
      Reply Reply  
    4. November 3, 2011 6:54 PM
      pegasus pegasus is offline
      VaultWiki Team
      Does your editor start in WYSIWYG mode or source mode? I can't edit the table or see the source, as I don't have an account at the site. If you have a test account you can PM it to me.

      Please also be specific about what happens when you edit it. There is a bug in vBulletin that strips all whitespace from posts at random times when changing editor modes or saving; this is supposedly fixed in 4.1.8 but that is unreleased so I can't confirm. Also I don't know if that is your issue or something else.
      Reply Reply  
    5. November 4, 2011 5:17 AM
      Lord Doys Lord Doys is offline
      Junior Member
      I think the WYSIWYG editor is indeed the problem, when i put the setting on "Standard" in msg posting options it doesnt seem to have that problem.
      I will leave the setting for now on WYSIWYG so you can verify.
      Reply Reply  
    6. November 5, 2011 1:54 AM
      pegasus pegasus is offline
      VaultWiki Team
      WYSIWYG still seems to be disabled globally. I can't choose that editor type with the test account provided.
      Reply Reply  
    7. November 5, 2011 6:15 AM
      Lord Doys Lord Doys is offline
      Junior Member
      eh, yes i turned it off again yesterday because i was editing
      Reply Reply  
    8. November 5, 2011 4:15 PM
      pegasus pegasus is offline
      VaultWiki Team
      Okay I see the problem. This was already fixed as part of another report, but you need to edit vault/plugins/bbcode.php. Find:
      Code:
      				'preserve_space' => array('|-', '!-')
      Replace with:
      Code:
      				'preserve_space' => array('|', '!')
      Reply Reply  
    9. November 6, 2011 4:58 AM
      Lord Doys Lord Doys is offline
      Junior Member
      cheers!
      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:34 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.