Results 1 to 10 of 10

Thread: forum post display problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Senior Member Ancient Order's Avatar
    Join Date
    Aug 2015
    Location
    Paris, Fr.
    Posts
    256

    Default forum post display problem

    Recently i seem to have display problems with the "code" bbcode i guess. I'm with IE11:




    but some of them seem to work though:



    those examples are taken from this thread:

    https://www.x-null.net/forums/thread...6350#post36350
    Last edited by Ancient Order; October 30th, 2019 at 04:49 AM.

  2. #2

    Default

    That is problably a problem with the browser compatibility.

    On firefox works fine.

  3. #3
    Purple Developer Purple Elephant1au's Avatar
    Join Date
    Feb 2012
    Location
    Australia
    Posts
    1,269

    Default

    I'm with IE11
    You answered your own question. :P

    Purple's Playground
    OBJ :
    103.29.85.127:12203
    xfire: purpleelephant1au
    email: purpleelephant1au@gmail.com
    skydrive: PurpleElephantSkydrive




  4. #4
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    Those pics are tiny and I can't really see anything, but sometimes the page doesn't load properly for me; I just refresh it and then it comes up fine. I think it might be the way browsers cache data. Not sure if your issue is the same as the one I'm speaking of though.

  5. #5
    Senior Member Ancient Order's Avatar
    Join Date
    Aug 2015
    Location
    Paris, Fr.
    Posts
    256

    Default

    James, click the pic to enlarge it :P Actually that's very stange, if i select the empty part, it displays like that, under IE11:



    If i open the forum with Chrome it displays like that:



    If i click on the link in my 1st post under IE11 i get that:


  6. #6

    Default

    That's weird, when I test the new xcode with IE11 here https://eduzappa18.github.io/xNULL-xcode/ it works (not at 100%, but works), but in the forums doesn't
    It must be some incompatibility with vBulletin.


    No idea why you prefer to use IE over any other browser.
    IE is outdated, insecure and slow AF
    Spoiler: IE




    Probably this bug is caused because IE11 only have partial or no support at all on newest javascript features.
    And by newest I mean stuff that are almost 6 years old.
    IE doesn't even support async functions (Promises)!!

    https://caniuse.com/#search=Promises
    https://caniuse.com/#feat=mdn-javasc...tements_for_of
    https://caniuse.com/#search=const
    https://caniuse.com/#search=let
    https://caniuse.com/#feat=mdn-javasc...tements_for_of
    https://caniuse.com/#feat=mdn-api_parentnode_append


    Anyways, I'll take a look to it

  7. #7

    Default

    @James, when you can, please replace the code inside "xcode-switch.js" with the one I posted below
    with this, the xcode shuld work at 100% on IE11

    @Ancient, after James updates the code, clear your cache and test it again.

    Spoiler: code


    if (!localStorage.getItem("xcode_theme")) {
    localStorage.setItem("xcode_theme", "light");
    }

    var light_theme = document.querySelector("#light_theme");
    var dark_theme = document.querySelector("#dark_theme");
    light_theme.disabled = true;
    dark_theme.disabled = true;

    document.addEventListener("DOMContentLoaded", function() {
    var blocks = document.querySelectorAll("pre.line-numbers");
    var wrapper, div, input, label;
    for (var i = 0; i < blocks.length; i++) {
    wrapper = document.createElement("div");
    wrapper.setAttribute("class", "xcode_container");

    div = document.createElement("div");
    div.setAttribute("class", "input-container");
    div.setAttribute("title", "Toggle Color Theme");

    input = document.createElement("input");
    input.setAttribute("id", "darkTheme");
    input.setAttribute("class", "xcode_switch");
    input.setAttribute("type", "checkbox");
    input.addEventListener("change", themeSwitch, false);

    label = document.createElement("label");
    label.setAttribute("class", "xcode_switch");
    label.setAttribute("for", "darkTheme");

    blocks[i].parentNode.insertBefore(wrapper, blocks[i]);
    div.appendChild(input);
    div.appendChild(label);
    wrapper.appendChild(blocks[i]);
    wrapper.appendChild(div);
    }

    if (localStorage.getItem("xcode_theme") == "dark") {
    toggleSwitch(true);
    toggleTheme("dark");
    } else if (localStorage.getItem("xcode_theme") == "light") {
    toggleSwitch(false);
    toggleTheme("light");
    }

    function themeSwitch() {
    if (this.checked) {
    toggleSwitch(true);
    toggleTheme("dark");
    localStorage.setItem("xcode_theme", "dark");
    } else {
    toggleSwitch(false);
    toggleTheme("light");
    localStorage.setItem("xcode_theme", "light");
    }
    }

    function toggleTheme(theme) {
    if (theme == "light") {
    light_theme.disabled = false;
    dark_theme.disabled = true;
    }
    if (theme == "dark") {
    dark_theme.disabled = false;
    light_theme.disabled = true;
    }
    }

    function toggleSwitch(value) {
    var inputs = document.querySelectorAll("input.xcode_switch");
    for (var i = 0; i < inputs.length; i++) {
    inputs[i].checked = value;
    }
    }
    });


  8. #8
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    Updated.
    @Ancient, When I click on the image, it still displays small. and when I try to click to make it bigger it doesn't do anything.
    Here is what I see:
    xnull.jpg

  9. #9

    Default

    Even after James updated the code, the problem still persisted... (It was 100% working when I tested it in my local server)

    So, after some googling, (stackoverflow...) I found that the real cause of this issue is the "X-UA-Compatible" tag in vBulletin
    What it does is to force IE users to render the site in IE9 mode (this was the latest IE release at the time vBulletin 4 was released)
    You can see this in the emulation tab in IE11
    Spoiler: IE Sucks


    @James
    This tag can be safely deleted to fix the issue

    To delete it, go to:
    Admin Panel > Styles & Templates > Style Manager > Default Style: Edit Templates > headinclude > Customize

    search for:
    Code:
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    and delete it.

    After deleting it, IE browsers will render the the forum as is supposed to be.

  10. #10
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,180

    Default

    Done!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •