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.

Change / Remove Topic Colors Script doesn't work

4 posters

Go down

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
Leyjenah
Leyjenah
New Member

Posts : 11
Reputation : 1
Language : GER, EN

Back to top Go down

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
Neptune-
Neptune-
Forumember

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

https://www.galaxie-series.net/

Back to top Go down

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.
SLGray
SLGray
Administrator
Administrator

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

https://forumsclub.com/gc/128-link-directory/

Back to top Go down

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
Leyjenah
Leyjenah
New Member

Posts : 11
Reputation : 1
Language : GER, EN

Back to top Go down

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 !
Neptune-
Neptune-
Forumember

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

https://www.galaxie-series.net/

Back to top Go down

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
Leyjenah
Leyjenah
New Member

Posts : 11
Reputation : 1
Language : GER, EN

Back to top Go down

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 !
Neptune-
Neptune-
Forumember

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

https://www.galaxie-series.net/

Back to top Go down

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
Leyjenah
Leyjenah
New Member

Posts : 11
Reputation : 1
Language : GER, EN

Back to top Go down

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
Ape
Ape
Administrator
Administrator

Male Posts : 19324
Reputation : 2005
Language : fluent in dork / mumbojumbo & English haha

http://chatworld.forumotion.co.uk/

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum