Forum Moderators: open

Message Too Old, No Replies

Is that a javascript issue and how to solve it?

         

abrodski

5:53 pm on Apr 20, 2010 (gmt 0)

10+ Year Member



Hello!

Before anything I should apologize if I'm posting it in a wrong place, because I'm not sure myself...From what I've read, it has something to do with Java, but maybe I'm wrong...
I'm relatively new to Joomla and I have a web site URL REMOVED
I use template md_globalbiz. There's a button in a top right corner to switch general site's variant to a darker one (maybe it has something to do with javascript?)... Though I posted the instruction on a site as of how to change that, I don't think that many people would read it. What I want is to make a default variant of the site the darker one. I think its better...
Any ideas?

P.S. I use Joomla 1.5.11 and that template works in a legacy mode.

[edited by: Fotiman at 8:30 pm (utc) on Apr 20, 2010]
[edit reason] No URLs please. See TOS [webmasterworld.com] [/edit]

Fotiman

8:29 pm on Apr 20, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If you look in the md_stylechanger.js file, you will see this function:


function setUserOptions(){
if(!prefsLoaded){
cookie = readCookie("fontSize");
currentFontSize = cookie ? cookie : defaultFontSize;
setFontSize(currentFontSize);
cookie = readCookie("pageColor");
currentStyle = cookie ? cookie : "White";
setColor(currentStyle);
prefsLoaded = true;
}
}


If you can modify that to default to "Black" instead, that should solve the problem. Note, I'm not familiar with that template, so it's possible that this value might be configurable via some admin UI (in which case your change would just get overwritten). It looks as though currentStyle is set at the top of that file to "Black", so in this function you could just do this:

currentStyle = cookie ? cookie : currentStyle;

And then whatever was set in the variable at the top of that file would become the default.

abrodski

4:32 pm on Apr 21, 2010 (gmt 0)

10+ Year Member



Thank you so much! It worked for me!