1. REGISTRATION REQUIREMENTS:

    Register with your xenforo.com Username then start a conversation at xenforo.com w/Bob and provide the following:
    1. Your XenForo License Validation Token
    2. The Domain Name associated with the License
    NOTE: Your account will be validated once ALL requirements are verified/met. Thank you for your patience.

Help with Parsehtml BB Code

Discussion in 'Showcase Support' started by ibenick, Dec 15, 2012.

  1. ibenick

    ibenick Member Showcase

    Hi Bob,

    I use Luke Foreman's Parse HTML BB Code and I made the mods per your instructions in this thread to make it work with Showcase:

    http://xenforo.com/community/threads/showcase-paid.40597/page-2#post-441227

    It works fine except when embedding an iframe, specifically a google map. The problem only occurs when I embed it between parsehtml tags on a Showcase page. It works fine if I put the HTML into the template for one of those pages and it works great with the BB Code inside threads. But when I do it inside a Showcase Item, it zooms the map all the way out and moves to the bottom right. Really strange...

    I know this isn't anything wrong with your software, and you're probably not all that stoked about helping make this work. But it's a critical part of us being able to use Showcase. Can you think of anything I can do to fix this? If I can't embed maps, I'm toast.

    Here is an example of map embed code I'm using:

    HTML:
    <iframe width="800" height="900" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://maps.google.com/maps/ms?msa=0&amp;msid=214533597045798101523.0004c667ce21163213829&amp;ie=UTF8&amp;t=p&amp;ll=40.808352,-110.745277&amp;spn=0.233875,0.274315&amp;z=12&amp;output=embed"></iframe>
    Or a more simple version, still references a google map but I use something called Gmap to serve up different map tiles. Either method works great between [parsehtml] tags in threads.

    HTML:
    <iframe width="800" height="600" src="http://www.mappingsupport.com/p/gmap4.php?q=mymap,214533597045798101523.0004aa8375b4722996a9b&z=12&t=t1"></iframe></small>
     
  2. Bob

    Bob Developer Staff Member

    Not sure. The parsing of HTML is all handled through Lukes addon. Those changes applied are in the "view" which is the last step prior to rendering. Maybe you could inbox luke to take a look at it for you. Could be CSS or JS stripping something. Could be that I need to add something more to the addon that isn't handled via core XF. I didn't write it, I don't use it, its not a core xenforo function, so I don't have an answer for ya.
     
  3. ibenick

    ibenick Member Showcase

    I think this might actually be something to do with Showcase, not the parsehtml BB Code.

    When I just place the HTML right in the showcase_item template, the maps render fine in the first tab, but in any other tab, it goes wonky. Regardless of whether the full HTML is in the template or if I'm using the parsehtml code.

    For example, this map code:
    Code:
    <iframe width="800" height="600" src="http://www.mappingsupport.com/p/gmap4.php?q=mymap,214533597045798101523.0004aa8375b4722996a9b"></iframe> 
    Renders properly, like this, on the main tab:
    Screen Shot 2012-12-23 at 9.34.46 AM.png

    And this is how it renders on the others, zoomed way out and down to the bottom right. It looks like it's somehow stripped out the upper left navigation tool as well. I figure something must be conflicting with it that only runs on the optional tabs. Any ideas?
    Screen Shot 2012-12-23 at 9.35.07 AM.png
     
  4. ibenick

    ibenick Member Showcase

    Not sure if this helps, but refreshing the page occasionally makes the map load correct, although the nav controls stay missing. It seems like it loads right about 1 in 5 times.
     
  5. Bob

    Bob Developer Staff Member

    Showcase does not do any BBCode parsing or rendering. There are 2 things involved, Core XenForo and Lukes addon. There is no additional custom code involved. The standard message parsing is 100% core xenforo, there is no added special showcase code.

    Placing HTML directly into a template bypasses any programming code parsing like BBCode parsing, so of course its going to render regardless of core settings or addons. Putting HTML into TinyMCE editor with core xenforo, it will STRIP the HTML. Using Lukes addon, it will override core xf and actually parse it (tab 1 is processed the same as tab 2, tab 3, tab 4, tab 5 as its just 5 'message' fields that are processed via a loop. The output is the same for all 5 message bodies.

    The only thing I can think of would be the core XenForo TAB javascript that is somehow effecting a zoom setting. Could be an issue caused by the use of iframes within a tab and external CSS/JS not being picked up (which would cause the zoom issue). AFIK, the tab js is core jquery and its an older version with many known (and fixed) conflicts.

    I am thinking about getting rid of the js Tabs anyway in the next version and doing a page reload per tab (similar to the Resource Manager and how I do it in the Downloads Manager addon of mine).

    My guess is that its some CSS/JS conflict between the Maps stuff and the Tabs JS.
     
  6. ibenick

    ibenick Member Showcase

    I've figured out the only time I get it to load properly is if I click on that second tab with the map in it while the page is still loading. If I do that, it loads properly every time. If I let the page load, it won't work. Any rough timeframe on when you would be getting rid of the JS tabs in Showcase? Or is there some other workaround you can think of?
     
  7. Bob

    Bob Developer Staff Member

    Its either a conflict with xenforo.js or jQuery itself. "Tabs" is registered in xenforo.js which is a wrapper for jQuery Tools Tabs System. Its not uncommon to have conflicting stuff like this and all you need to do is go to jquery bugs forum and see for yourself lol XF is using an older version of jQuery, which also does't help matters when you are trying to use something from google that is using the most current jquery version.

    It won't be until mid Jan at the earliest (just a guess).

    Only thing I could suggest is adding a custom field and having it display between the Tabs and the comments.
     
  1. This site uses cookies to help personalise content, 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.