Hi,
First up, I am unfamiliar with PHP at any level.
I use a javascript & CSS menu that extracts it's data from Act_section_tree.js. The problem is Actinic generates links that end with &NOLOGIN=1 which is interpreted differently by IE & FF. (IE works fine, FF reads it as consecutive ampersand and displays a login page).
So I've tried adding a small bit of PHP to the end of my layouts that opens Act_section_tree.js and replaces all instances of & with &.
My attempt at PHP (don't laugh too much - I know it is convoluted)
If I save this as a .php file and upload it to the acatalog directory it works. It rewrites Act_section_tree.js successfully.
If I paste it into the various layouts in Actinic it doesn't work. My questions are:
1> Could this work? I'm not sure how I make the PHP run and rewrite the file right before it is uploaded.
2> I was using echo to output the results to screen but couldn't get Actininc to display the correct results because I couldn't get it to take the $first & $second variables literally. Actinic highlights them as HTML in the code view so $first = & instead of &. Is there some special escape character to do this?
3> Lastly, am I wasting my time and is there a better/easier way to generate FF friendly links in the Act_section_tree.js file?
Thanks in advance,
First up, I am unfamiliar with PHP at any level.
I use a javascript & CSS menu that extracts it's data from Act_section_tree.js. The problem is Actinic generates links that end with &NOLOGIN=1 which is interpreted differently by IE & FF. (IE works fine, FF reads it as consecutive ampersand and displays a login page).
So I've tried adding a small bit of PHP to the end of my layouts that opens Act_section_tree.js and replaces all instances of & with &.
My attempt at PHP (don't laugh too much - I know it is convoluted)
PHP Code:
<?php
$first = '&';
$second = '&';
$myFile = "Act_section_tree.js";
$fr = fopen($myFile, 'r');
$data = fread($fr, filesize($myFile));
$filtered = str_replace($first, $second, $data);
fclose($fr);
$fw = fopen($myFile, 'w');
fwrite($fw, $filtered);
fclose($fw);
?>
If I paste it into the various layouts in Actinic it doesn't work. My questions are:
1> Could this work? I'm not sure how I make the PHP run and rewrite the file right before it is uploaded.
2> I was using echo to output the results to screen but couldn't get Actininc to display the correct results because I couldn't get it to take the $first & $second variables literally. Actinic highlights them as HTML in the code view so $first = & instead of &. Is there some special escape character to do this?
3> Lastly, am I wasting my time and is there a better/easier way to generate FF friendly links in the Act_section_tree.js file?
Thanks in advance,
Comment