Change / Remove Topic Colors Script doesn't work
4 posters
Page 1 of 1
Change / Remove Topic Colors Script doesn't work
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- New Member
- Posts : 11
Reputation : 1
Language : GER, EN
Re: Change / Remove Topic Colors Script doesn't work
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.
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
Re: Change / Remove Topic Colors Script doesn't work
Most of the tutorials we have and the ones by Ange Tuteur were made before ModernBB and AwesoneBB versions were released.
Lost Founder's Password |Forum's Utilities |Report a Forum |General Rules |FAQ |Tricks & Tips
You need one post to send a PM.
You need one post to send a PM.
When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.
Re: Change / Remove Topic Colors Script doesn't work
I see, thank you.
Is there a way how I can disable my scripts without deleting them all?
Best regards,
Leyjenah
Is there a way how I can disable my scripts without deleting them all?
Best regards,
Leyjenah
Leyjenah- New Member
- Posts : 11
Reputation : 1
Language : GER, EN
Re: Change / Remove Topic Colors Script doesn't work
Ahh, thanks a lot.
Okay, so I found the evil doer.
It's this script:
As far as I remember it's an "official" code... Could you help me fix it, so both scripts can work?
Best regards,
Leyjenah
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- New Member
- Posts : 11
Reputation : 1
Language : GER, EN
Re: Change / Remove Topic Colors Script doesn't work
You can simply remove that script because it doesn't work
Stylesheets are no longer hosted !
- Code:
<link rel="stylesheet" type="text/css" href="https://arc-of-tides.forumieren.com/">
- 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 !
Re: Change / Remove Topic Colors Script doesn't work
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
I'll just leave it disabled for now. I'm currently not using it anyway.
Thanks so much guys.
Best regards,
Leyjenah
Leyjenah- New Member
- Posts : 11
Reputation : 1
Language : GER, EN
Re: Change / Remove Topic Colors Script doesn't work
Problem solved & topic archived.
|
Similar topics
» Add or remove topic title colors
» chatbox java doesnt work
» FMChat - auto login doesnt work
» search doesnt work?
» Ajax script seems not to work anymore
» chatbox java doesnt work
» FMChat - auto login doesnt work
» search doesnt work?
» Ajax script seems not to work anymore
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum