• Register
    • Help

    striker  0 Items
    Currently Supporting
    • Home
    • News
    • Forum
      • Try XenForo Demo
      • New Posts
      • FAQ
      • Calendar
      • Community
        • Groups
        • Albums
        • Member List
      • Forum Actions
        • Mark Forums Read
      • Quick Links
        • Today's Posts
        • Who's Online
      • Sponsor
        • Sponsor a Feature
        • List of Donors
    • Wiki
    • Support
    • What's New?
    • Buy Now
    • Manual
    • 
    • Forum
    • VaultWiki How-Tos
    • VaultWiki Questions
    • HTML Parsing

    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.

    Results 1 to 7 of 7

    Thread: HTML Parsing

    • Thread Tools
      • Show Printable Version
    1. September 18, 2015 #1
      bazaarocommunity
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      bazaarocommunity is offline
      Junior Member
      Join Date
      June 15, 2015
      Posts
      28
      Rep Power
      134

      HTML Parsing

      When I paste HTML into the wiki, it has strange behavior.

      1. First I type out all my HTML code.

      http://snag.gy/4gVH9.jpg

      2. Now I create the page. The output is kind of funky, with the spaces being far too large, so I attempt to go back and fix it.

      http://snag.gy/pYH9C.jpg

      3. Everything looks really nice and clean in the editor box, exactly how it is supposed to look. I didn't make any changes, I just opened the editor. I notice that all my HTML code is hidden though and there is no way to view it. I press save to see if the problem is resolved.

      http://snag.gy/nZqKR.jpg

      4. It appears that the Editor attempted to convert all of my HTML to BBCODE, but failed and eliminated all of the formatting.

      So, how do I preserve my HTML after creating a page?
      Reply With Quote Reply With Quote

    2. September 19, 2015 #2
      pegasus
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      pegasus is offline
      VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      2,959
      Blog Entries
      18
      Rep Power
      688
      XenForo's WYSIWYG editor (RTE) automatically adds P tags whenever you press enter. It also converts some HTML to BB-Code. If you don't want the HTML converted, the only way to prevent this would be to avoid using those tags that get converted (such as P tags, FONT tags, SPAN tags) and to use the corresponding BB-Codes instead. You can view your HTML in the non-WYSIWYG mode by clicking the toolbar icon that looks like a wrench.

      The only alternative we have found is to disable XenForo's WYSIWYG mode when HTML is allowed, but this unfortunately also removes the editor toolbar so you can't use any of the buttons at all. We are not sure if this is an acceptable trade-off and are waiting for enough customers to tell us to do it.

      We consider this to be a design flaw in XenForo. In vBulletin the editor toolbar is still there if you disable WYSIWYG. It is not possible to parse HTML in default XenForo, but it seems XenForo devs did not think the toolbar would be useful when viewing the raw BB-Code source in this mode.
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    3. September 19, 2015 #3
      bazaarocommunity
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      bazaarocommunity is offline
      Junior Member
      Join Date
      June 15, 2015
      Posts
      28
      Rep Power
      134
      Is there a source for a complete list of tags to avoid?

      It would help me immensely if you incorporated a feature to disable that conversion when using HTML. The Editor toolbar is useful mostly for simple pages that would not be built using HTML. I'm building entire pages in HTML. Could you include a check box in the page options to disable the toolbar and html conversion?
      Reply With Quote Reply With Quote

    4. September 19, 2015 #4
      pegasus
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      pegasus is offline
      VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      2,959
      Blog Entries
      18
      Rep Power
      688
      For now, you can make this change.

      In library/vw/XenForo/ViewPublic/Helper/Editor.php, find:
      Code:
      if (vw_Hard_Core::model('Node')->has_type($item, 'Template'))
      Replace with:
      Code:
      if (vw_Hard_Core::model('Node')->has_type($item, 'Template') OR vw_Hard_Core::model('Toolbar')->can('html'))
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    5. September 19, 2015 #5
      bazaarocommunity
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      bazaarocommunity is offline
      Junior Member
      Join Date
      June 15, 2015
      Posts
      28
      Rep Power
      134
      Quote Originally Posted by pegasus View Post
      For now, you can make this change.

      In library/vw/XenForo/ViewPublic/Helper/Editor.php, find:
      Code:
      if (vw_Hard_Core::model('Node')->has_type($item, 'Template'))
      Replace with:
      Code:
      if (vw_Hard_Core::model('Node')->has_type($item, 'Template') OR vw_Hard_Core::model('Toolbar')->can('html'))
      I tried that out, and it fixed the issue of converting the HTML to BBCODE, but I'm still having issues where the HTML isn't parsing correctly. There are large spaces between tables. Any ideas how I can resolve that?

      http://snag.gy/eiWu5.jpg

      Code:
      <table cellpadding="1" cellspacing="0" width="100%" border="1">
      <tr>
      <td colspan="4">General Information</td>
      </tr>
      <tr>
      <td>
      <p>Basically a big pig with a bit of an attitude.</p>
      </td>
      </tr>
      </table>
      <table bgcolor="#330000" cellspacing="0" width="100%" border="0">
      <tr>
      <td><img src="http://uo.stratics.com/hunters/movies/boar.gif" border="0" /></td>
      <td></td>
      <td><img src="http://uo.stratics.com/hunters/Pics/uo3d/boar_tile.jpg" border="0" data-pin-nopin="true" /></td>
      </tr>
      </table>
      <table cellpadding="1" cellspacing="0" width="100%" border="1">
      <tr>
      <td colspan="4"><a>Detailed Information</a></td>
      </tr>
      <tr>
      <td width="20%">Special Abilities:</td>
      <td colspan="3">None</td>
      </tr>
      <tr>
      <td>Loot:</td>
      <td colspan="3"><strong>Carved:</strong> 2 Raw Ribs</td>
      </tr>
      <tr>
      <td>Found At:</td>
      <td colspan="3">Farms, Forests</td>
      </tr>
      <tr>
      <td>Related To:</td>
      <td colspan="3"><a href="http://uo.stratics.com/database/view.php?db_content=hunters&amp;id=274">Pig</a></td>
      </tr>
      <tr>
      <td>First Seen:</td>
      <td colspan="3">Day One</td>
      </tr>
      <tr>
      <td>Damage:</td>
      <td colspan="3">3 - 6 HP, 100% Physical Damage</td>
      </tr>
      <tr>
      <td>Loyalty:</td>
      <td colspan="3">Not Given</td>
      </tr>
      <tr>
      <td width="20%">Fame:</td>
      <td width="30%">Level 1 (300)</td>
      <td width="20%">Karma:</td>
      <td width="30%">Level 0</td>
      </tr>
      <tr>
      <td>Magic Level:</td>
      <td>None</td>
      <td>Poison Level:</td>
      <td>None</td>
      </tr>
      <tr>
      <td>Slayer Weapon Vulnerability:</td>
      <td>None</td>
      <td>Ranged Attack:</td>
      <td>None</td>
      </tr>
      <tr>
      <td>Required Taming:</td>
      <td>29.1</td>
      <td>Speed:</td>
      <td>Medium</td>
      </tr>
      <tr>
      <td>Pack Instincts:</td>
      <td>None</td>
      <td>Auto Dispel:</td>
      <td>No</td>
      </tr>
      <tr>
      <td>Preferred Foods:</td>
      <td>Fruits and Vegetables</td>
      <td>Barding Difficulty:</td>
      <td>7.5</td>
      </tr>
      <tr>
      <td>Taming Notes:</td>
      <td>Requires 1 Control Slot.</td>
      <td>Barding Notes:</td>
      <td>&nbsp;</td>
      </tr>
      <tr>
      <td>Sounds:</td>
      <td>&nbsp;</td>
      <td>LBR/3D Sounds:</td>
      <td>&nbsp;</td>
      </tr>
      <tr>
      <td width="20%">Credits:</td>
      <td colspan="3">&nbsp;</td>
      </tr>
      </table>
      <table cellpadding="1" cellspacing="0" width="100%" border="1">
      <tbody>
      <tr>
      <td colspan="3"><a>Difficulty Ratings</a></td>
      </tr>
      <tr>
      <td width="15%">Class</td>
      <td width="10%">DR</td>
      <td width="75%">Comments</td>
      </tr>
      <tr>
      <td>Archer:</td>
      <td>3</td>
      <td>&nbsp;</td>
      </tr>
      <tr>
      <td>Bard:</td>
      <td>3</td>
      <td>&nbsp;</td>
      </tr>
      <tr>
      <td>Mage:</td>
      <td>3</td>
      <td>&nbsp;</td>
      </tr>
      <tr>
      <td>Tamer:</td>
      <td>3</td>
      <td>&nbsp;</td>
      </tr>
      <tr>
      <td>Warrior:</td>
      <td>3</td>
      <td>&nbsp;</td>
      </tr>
      </tbody>
      </table>
      <table cellpadding="1" cellspacing="0" width="100%" border="1">
      <tbody>
      <tr>
      <td colspan="9"><a>Stats</a></td>
      </tr>
      <tr>
      <td width="13%"><font size="1">11 readings</font></td>
      <td width="13%">Hit Points</td>
      <td width="13%">Stamina</td>
      <td width="13%">Mana</td>
      <td width="12%">STR</td>
      <td width="12%">DEX</td>
      <td width="12%">INT</td>
      </tr>
      <tr>
      <td>Minimum:</td>
      <td>15</td>
      <td>15</td>
      <td>-</td>
      <td>25</td>
      <td>15</td>
      <td>5</td>
      </tr>
      <tr>
      <td>Average:</td>
      <td>15</td>
      <td>15</td>
      <td>-</td>
      <td>25</td>
      <td>15</td>
      <td>5</td>
      </tr>
      <tr>
      <td>Maximum:</td>
      <td>15</td>
      <td>15</td>
      <td>-</td>
      <td>25</td>
      <td>15</td>
      <td>5</td>
      </tr>
      </tbody>
      </table>
      <table cellpadding="1" cellspacing="0" width="100%" border="1">
      <tbody>
      <tr>
      <td colspan="6">Resistances</td>
      </tr>
      <tr>
      <td width="13%"><font size="1">11 readings</font></td>
      <td width="13%">Physical</td>
      <td width="13%">Fire</td>
      <td width="13%">Cold</td>
      <td width="12%">Poison</td>
      <td width="12%">Energy</td>
      </tr>
      <tr>
      <td>Minimum:</td>
      <td>10</td>
      <td>5</td>
      <td>-</td>
      <td>5</td>
      <td>-</td>
      </tr>
      <tr>
      <td>Average:</td>
      <td>13</td>
      <td>8</td>
      <td>-</td>
      <td>8</td>
      <td>-</td>
      </tr>
      <tr>
      <td>Maximum:</td>
      <td>15</td>
      <td>10</td>
      <td>-</td>
      <td>10</td>
      <td>-</td>
      </tr>
      </tbody>
      </table>
      <table cellpadding="1" cellspacing="0" width="100%" border="1">
      <tbody>
      <tr>
      <td colspan="10">Skills</td>
      </tr>
      <tr>
      <td width="10%"><font size="1">11 readings</font></td>
      <td width="10%">Wrestling</td>
      <td width="10%">Tactics</td>
      <td width="10%">Magic Resistance</td>
      <td width="10%">Anatomy</td>
      <td width="10%">Poisoning</td>
      <td width="10%">Healing</td>
      <td width="10%">Magery</td>
      <td width="10%">Evaluating Intelligence</td>
      <td width="10%">Meditation</td>
      </tr>
      <tr>
      <td>Minimum:</td>
      <td>9.0</td>
      <td>9.0</td>
      <td>9.0</td>
      <td>0.0</td>
      <td>-</td>
      <td>-</td>
      <td>-</td>
      <td>-</td>
      <td>-</td>
      </tr>
      <tr>
      <td>Average:</td>
      <td>9.0</td>
      <td>9.0</td>
      <td>9.0</td>
      <td>0.0</td>
      <td>-</td>
      <td>-</td>
      <td>-</td>
      <td>-</td>
      <td>-</td>
      </tr>
      <tr>
      <td>Maximum:</td>
      <td>9.0</td>
      <td>9.0</td>
      <td>9.0</td>
      <td>0.0</td>
      <td>-</td>
      <td>-</td>
      <td>-</td>
      <td>-</td>
      <td>-</td>
      </tr>
      </tbody>
      </table>
      <table cellpadding="1" cellspacing="0" width="100%" border="1">
      <tbody>
      <tr>
      <td colspan="2"><a>Equipment Advisor</a> <img src="http://uo.stratics.com/images/advertising/plus_icon.gif" border="0" data-pin-nopin="true" /></td>
      </tr>
      <tr>
      <td>Best weapon material against this creature:</td>
      <td width="25%"><strong>Agapite<br /></strong></td>
      </tr>
      <tr>
      <td>Most important damage type against this creature:</td>
      <td><strong>Cold<br />Energy<br /></strong></td>
      </tr>
      <tr>
      <td>Most important elemental resistance against this creature:</td>
      <td><strong>Physical</strong></td>
      </tr>
      </tbody>
      </table>
      Reply With Quote Reply With Quote

    6. September 19, 2015 #6
      pegasus
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • Visit Homepage
      • View Articles
      pegasus is offline
      VaultWiki Team
      Join Date
      March 28, 2004
      Location
      New York, NY
      Posts
      2,959
      Blog Entries
      18
      Rep Power
      688
      New lines are converted to line breaks. In vBulletin there is a way to suppress this behavior, but the option is missing from our XenForo integration. I will log that as a bug.

      For now, you can wrap new-lines with COMMENT tags (or &lt;!-- {new line} --&gt if they are not intended as line breaks.
      - lead developer for VaultWiki
      Reply With Quote Reply With Quote

    7. September 20, 2015 #7
      bazaarocommunity
      • View Profile
      • View Forum Posts
      • View Blog Entries
      • View Articles
      bazaarocommunity is offline
      Junior Member
      Join Date
      June 15, 2015
      Posts
      28
      Rep Power
      134
      Quote Originally Posted by pegasus View Post
      New lines are converted to line breaks. In vBulletin there is a way to suppress this behavior, but the option is missing from our XenForo integration. I will log that as a bug.

      For now, you can wrap new-lines with COMMENT tags (or &lt;!-- {new line} --&gt if they are not intended as line breaks.
      Thanks man, I look forward to that new feature. I am migrating a lot of HTML content to the wiki and that would make the job WAY faster. It is all currently written in HTML in WordPress.
      Reply With Quote Reply With Quote

    Similar Threads

    1. Set automatically parsing
      By hollosch in forum VaultWiki Questions
      Replies: 3
      Last Post: January 11, 2016, 9:07 AM
    2. BBCode Parsing on forum threads
      By saya in forum VaultWiki Questions
      Replies: 7
      Last Post: December 19, 2015, 9:25 AM
    3. An Error with HTML Parsing and Need for BD Widget Framework Render
      By bazaarocommunity in forum Ideas & Suggestions
      Replies: 4
      Last Post: June 30, 2015, 9:40 AM
    4. Parsing CSS3 in DIV
      By tommythejoat in forum VaultWiki Questions
      Replies: 5
      Last Post: December 3, 2014, 7:56 PM
    5. Raw html
      By Jainic in forum Pre-Sales Questions
      Replies: 10
      Last Post: November 23, 2011, 7:41 PM

    Tags for this Thread

    bbcode, html, parse

    View Tag Cloud

    Bookmarks

    Bookmarks
    • Submit to Digg Digg
    • Submit to del.icio.us del.icio.us
    • Submit to StumbleUpon StumbleUpon
    • Submit to Google Google

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •  
    • BB code is On
    • Smilies are On
    • [IMG] code is Off
    • [VIDEO] code is
    • HTML code is Off

    Forum Rules

    • Contact Us
    • License Agreement
    • Privacy
    • Terms
    • Top
    All times are GMT -4. The time now is 1:19 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 © 2025 vBulletin Solutions Inc. All rights reserved.
    Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
    Copyright © 2008 - 2024 VaultWiki Team, Cracked Egg Studios, LLC.