Change / Remove Topic Colors Script doesn't work Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
4 posters

    Change / Remove Topic Colors Script doesn't work

    Leyjenah
    Leyjenah
    New Member


    Posts : 11
    Reputation : 1
    Language : GER, EN

    Solved Change / Remove Topic Colors Script doesn't work

    Post by Leyjenah June 2nd 2020, 3:31 pm

    Technical Details


    Forum version : #ModernBB
    Position : Founder
    Concerned browser(s) : Google Chrome
    Screenshot of problem : https://gyazo.com/806c751c27df7f580e6341eae189d560
    Who the problem concerns : All members
    When the problem appeared : When the script did not what it was intended to do
    Forum link : https://runeterra.forumotion.com/

    Description of problem

    Hello!
    I used a code from Ange Tuteur (https://fmdesign.forumotion.com/t331-add-more-topic-title-colors), however both scripts don't seem to work.
    First I thought the class might have changed but that is not the case. Even in ModernBB it's still "topic_color" so I can't find the reason why it's not getting executed.

    Thank you for your help!

    Best regards,
    Leyjenah
    Neptune-
    Neptune-
    Forumember


    Female Posts : 496
    Reputation : 104
    Language : French (10), English (8), CSS (5), HTML (4), Javascript (4)
    Location : Scotland, UK

    Solved Re: Change / Remove Topic Colors Script doesn't work

    Post by Neptune- June 2nd 2020, 4:28 pm

    Hello,


    Just checked on a modernBB forum and it works fine.

    You should check by disabling all other javascripts. If it works, enable again your js one by one and test to find which script is guilty.


    Last edited by Neptune- on June 2nd 2020, 8:27 pm; edited 1 time in total
    SLGray
    SLGray
    Administrator
    Administrator


    Male Posts : 51554
    Reputation : 3523
    Language : English
    Location : United States

    Solved Re: Change / Remove Topic Colors Script doesn't work

    Post by SLGray June 2nd 2020, 8:10 pm

    Most of the tutorials we have and the ones by Ange Tuteur were made before ModernBB and AwesoneBB versions were released.



    Change / Remove Topic Colors Script doesn't work Slgray10

    When your topic has been solved, ensure you mark the topic solved.
    Never post your email in public.
    Leyjenah
    Leyjenah
    New Member


    Posts : 11
    Reputation : 1
    Language : GER, EN

    Solved Re: Change / Remove Topic Colors Script doesn't work

    Post by Leyjenah June 4th 2020, 1:39 pm

    I see, thank you.
    Is there a way how I can disable my scripts without deleting them all?

    Best regards,
    Leyjenah
    Neptune-
    Neptune-
    Forumember


    Female Posts : 496
    Reputation : 104
    Language : French (10), English (8), CSS (5), HTML (4), Javascript (4)
    Location : Scotland, UK

    Solved Re: Change / Remove Topic Colors Script doesn't work

    Post by Neptune- June 4th 2020, 2:01 pm

    Edit them and uncheck all checkboxes !
    Leyjenah
    Leyjenah
    New Member


    Posts : 11
    Reputation : 1
    Language : GER, EN

    Solved Re: Change / Remove Topic Colors Script doesn't work

    Post by Leyjenah June 4th 2020, 2:20 pm

    Ahh, thanks a lot.
    Okay, so I found the evil doer.

    It's this script:

    Code:
    var type = getCookie('Vorlage1');
            var wahl = document.getElementById('wahl');
            wahl.innerHTML ='<select onchange="changeskin(this.options[this.selectedIndex].value);window.location.reload();"><option> Choose your Style! </option><option value="wert1"> Arc of Tides </option><option value="wert2"> Up in Smoke </option><option value="wert3"> Electrify Me </option></select>';
           
            if (type == 'wert1')
            {
              document.write('<link rel="stylesheet" type="text/css" href="https://arc-of-tides.forumieren.com/">');
            }
            else if (type == 'wert2')
            {
              document.write('<link rel="stylesheet" type="text/css" href="http://spetools.de/css/1754.css" />');
            }
            else if (type == 'wert3')
            {
              document.write('<link rel="stylesheet" type="text/css" href="http://spetools.de/css/1755.css" />');
            }
           
            function changeskin(change) {
              var scheme = change;
              var name = 'Vorlage1';
              var pathname = location.pathname;
              //var myDomain = pathname.substring(0,pathname.lastIndexOf('/')) +'/';
              var ExpDate = new Date ();
              ExpDate.setTime(ExpDate.getTime() + (180 * 24 * 3600 * 1000));
              setCookie(name,scheme,ExpDate,'/');
            }
            function getCookie(name){
              var cname = name + "=";
              var dc = document.cookie;
              if (dc.length > 0) {
                  begin = dc.indexOf(cname);
                  if (begin != -1) {
                    begin += cname.length;
                    end = dc.indexOf(";", begin);
                    if (end == -1) end = dc.length;
                    return unescape(dc.substring(begin, end));
                  }
              }
              return null;
            }
            function setCookie(name, value, expires, path, domain, secure) {
              document.cookie = name + "=" + escape(value) +
              ((expires == null) ? "" : "; expires=" + expires.toGMTString()) +
              ((path == null) ? "" : "; path=" + path) +
              ((domain == null) ? "" : "; domain=" + domain) +
              ((secure == null) ? "" : "; secure");
            }

    As far as I remember it's an "official" code... Could you help me fix it, so both scripts can work?

    Best regards,
    Leyjenah
    Neptune-
    Neptune-
    Forumember


    Female Posts : 496
    Reputation : 104
    Language : French (10), English (8), CSS (5), HTML (4), Javascript (4)
    Location : Scotland, UK

    Solved Re: Change / Remove Topic Colors Script doesn't work

    Post by Neptune- June 4th 2020, 3:16 pm

    You can simply remove that script because it doesn't work

    Code:
    <link rel="stylesheet" type="text/css" href="https://arc-of-tides.forumieren.com/">
    If you want to load a stylesheet, you need a .css file

    Code:
    <link rel="stylesheet" type="text/css" href="http://spetools.de/css/1754.css" />
    ...
    <link rel="stylesheet" type="text/css" href="http://spetools.de/css/1755.css" />

    Stylesheets are no longer hosted !
    Leyjenah
    Leyjenah
    New Member


    Posts : 11
    Reputation : 1
    Language : GER, EN

    Solved Re: Change / Remove Topic Colors Script doesn't work

    Post by Leyjenah June 4th 2020, 10:23 pm

    I haven't updated the links yet. I used this on another forum where it works just fine the way it is... So the code is okay?

    I'll just leave it disabled for now. I'm currently not using it anyway.

    Thanks so much guys.

    Best regards,
    Leyjenah
    Ape
    Ape
    Administrator
    Administrator


    Male Posts : 19432
    Reputation : 2010
    Language : fluent in dork / mumbojumbo & English haha

    Solved Re: Change / Remove Topic Colors Script doesn't work

    Post by Ape June 5th 2020, 1:52 am

    Problem solved & topic archived.
    Please read our forum rules: ESF General Rules



    Change / Remove Topic Colors Script doesn't work Left1212Change / Remove Topic Colors Script doesn't work Center11Change / Remove Topic Colors Script doesn't work Right112
    Change / Remove Topic Colors Script doesn't work Ape_b110
    Change / Remove Topic Colors Script doesn't work Ape1010