Pattaya, I have the same question.
The "simple" directions to implement this are confusing me.
The instruction says to download the .js file and put it in the templates folder.
Did that.
Then, it says in p5, "Replace ____1____ with the location in your template folder where you saved the .js file"
well... there IS no location in that folder where I put the .js file.
I just put it IN the folder, as directed.
The locaton IS the root of the folder, per the directions.
So I look at the code around ____1____ and it is this:
Ok, can someone tell me what "location inside the template folder" is supposed to replace the "___1___"?
I've tried to replace ___1___ with rhuk_solarflare_ii, with rhuk_solarflare_ii/, with rhuk_solarflare_ii/md_stylechanger.js, and with md_stylechanger.js. None of the above work. The buttons are there, but clicking them doesn't change anything.
Thnks for your time,
cra2
update! - 11/1/06.-------------------------
I looked closely and it turns out that the script IS working. It's changing the footer (copyright notice) at the bottom of the pages. It's not changing the content though. So, I think one of you must be right in that the solarflare style sheet is overriding this script with explicit font sizes.
Given that the solarflare style sheet is a pre-installed default template, I'm frustrated that you guys would create a stickied solution to resizing font that doesn't happen to work (as directed) with the installed template.
At least from what I'm seeing, further instructions need to be added to the sticky'd faq walking someone thru modification of the style sheet font sizes.
Also, the sticky should be edited because it's not clear, as I mentioned above, about what to put in field ___1____.
It says to put a "location" in. But in fact, what's working (for me) is the name of the javascript file we were told to download.
If the name of the file is the value for ____1____, then I don't see why the instructions ask for a location (vs. a filename).
And I don't really see why that field can't just be pre-filled with the filename.
You've said "take THIS file" and put it in "THIS location". If the people do so, then field ___1___ is simply the name of that .js file and could've already been filled in to avoid the whole confusion. No?
--------------------------------------
pattaya wrote:
Hi there,
This is content of the .js file I'm not sure I understand what you mean by the following instruction...what file and in what location is it reffering to?
p 5: Do all of the following:
Replace ____1____ with the location in your template folder where you saved the .js file
Replace ____2____ with the name of your A+ image
Replace ____3____ with the name of your A- image
Replace ____4____ with the name of your Reset image
Code:
var prefsLoaded = false;
var defaultFontSize = 76;
var currentFontSize = defaultFontSize;
function revertStyles(){
currentFontSize = defaultFontSize;
changeFontSize(0);
}
function toggleColors(){
if(currentStyle == "White"){
setColor("Black");
}else{
setColor("White");
}
}
function changeFontSize(sizeDifference){
currentFontSize = parseInt(currentFontSize) + parseInt(sizeDifference * 5);
if(currentFontSize > 100){
currentFontSize = 100;
}else if(currentFontSize < 60){
currentFontSize = 60;
}
setFontSize(currentFontSize);
};
function setFontSize(fontSize){
var stObj = (document.getElementById) ? document.getElementById('content_area') : document.all('content_area');
document.body.style.fontSize = fontSize + '%';
//alert (document.body.style.fontSize);
};
function createCookie(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else expires = "";
document.cookie = name+"="+value+expires+"; path=/";
};
function readCookie(name) {
var nameEQ = name + "=";
var ca = document.cookie.split(';');
for(var i=0;i < ca.length;i++) {
var c = ca[i];
while (c.charAt(0)==' ') c = c.substring(1,c.length);
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
}
return null;
};
window.onload = setUserOptions;
function setUserOptions(){
if(!prefsLoaded){
cookie = readCookie("fontSize");
currentFontSize = cookie ? cookie : defaultFontSize;
setFontSize(currentFontSize);
prefsLoaded = true;
}
}
window.onunload = saveSettings;
function saveSettings()
{
createCookie("fontSize", currentFontSize, 365);
}