• 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
    • remove br from bbcode code box

    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: remove br from bbcode code box

    • Issue Tools
      • View Changes
    1. issueid=672 July 10, 2009 8:49 AM
      gary.brain gary.brain is offline
      Junior Member
      remove br from bbcode code box

      Hi, i noticed that the wiki addes the < br > to each line in a [ code ] where as it does not do this on a basic forum post.

      Is it possible to remove this.

      G.
    Issue Details
    Issue Number 672
    Issue Type Bug
    Project VaultWiki 3.x Series
    Category BB-Code Parsing
    Status Fixed
    Priority 5 - Minor Bugs / Small Tweaks
    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. July 10, 2009 11:10 AM
      pegasus pegasus is offline
      VaultWiki Team
      Wiki posts process new lines in a different order than basic forum posts do. I am not sure why the < br > tag would cause an issue. Is there a specific problem you are having?
      Reply Reply  
    2. July 11, 2009 5:54 AM
      gary.brain gary.brain is offline
      Junior Member
      not realy, its just all the lines in a code box have an extra line between them making the post longer.

      as the [ code ] is a <pre>code</pre> output there is no need for the extra line space.

      e.h mine looks like this

      Code:
      test
      
      test
      
      test
      but I noticed it does not happen on this forum.

      What does your style code look like in the bbcode_code

      yours looks like this.

      Code:
      test
      test
      test
      Reply Reply  
    3. July 11, 2009 12:54 PM
      pegasus pegasus is offline
      VaultWiki Team
      In vault/special_class_bbcode.php, find:
      Code:
      		$this->current_tag['name'] = 'code';
      
      		eval('$html = "' . str_replace("\r\n", '', fetch_template($template)) . '";');
      Replace with:
      Code:
      		$code = nl2br($code);
      		$this->current_tag['name'] = 'code';
      
      		eval('$html = "' . fetch_template($template) . '";');
      
      		$html = preg_replace('#(\r|\n)#', '', $html);
      Find:
      Code:
      		$code = str_replace(array("\r\n", "\r", "\n"), "<br />", $code);
      
      		eval('$html = "' . str_replace("\r\n", '', fetch_template($template)) . '";');
      Replace with:
      Code:
      		$code = nl2br($code);
      
      		eval('$html = "' . fetch_template($template) . '";');
      
      		$html = preg_replace('#(\r|\n)#', '', $html);
      Reply Reply  
    4. July 13, 2009 3:43 AM
      gary.brain gary.brain is offline
      Junior Member
      works a treat, many thanks

      G.
      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:20 PM.
    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.