Ok here's the problem... I have some ads that cause the story editor not to work sometimes. The ads are contained in the HEAD section of the header. I was wondering if for the ADMIN areas of the geeklog site if I could make geeklog call an alternative header template file (sans advertisements)?
I know I saw something like this done with the advanced story editor header code in the CVS version, but I'm not going to try to play with the CVS code...
[QUOTE BY= orfilms] Ok here's the problem... I have some ads that cause the story editor not to work sometimes. The ads are contained in the HEAD section of the header. I was wondering if for the ADMIN areas of the geeklog site if I could make geeklog call an alternative header template file (sans advertisements)?
I know I saw something like this done with the advanced story editor header code in the CVS version, but I'm not going to try to play with the CVS code...[/QUOTE]
You can actually use PHP in your header.thtml file.
Here is something I just adapted from my site that should work.
<?php
$clicked = "http://";
$clicked .= $_SERVER['HTTP_HOST'];
$clicked .= $_SERVER['REQUEST_URI'];
$siteurl = $_CONF['site_url']."/";
$address = array('admin');
if (!empty( $address )){
foreach ($address as $val){
if (eregi($val, $clicked)) {
$showad = 'false';
}else if($showad != 'false') {
$showad = 'true';
}
}
If ($showad == 'true'){
echo 'your ad code here';
}
?>
It's a bit more complex then you really need, but I wrote it super fast. If you didn't want to show the ads on other pages just add something unique about the url for that page to the $address array. For instance if you didn't want the ad to show on the admin section and the forums you would put $address = array('admin', 'forum');
Good luck and just as an fyi I just tested the code above very shortly but I adapted it from something that has been working flawlessly for quite awhile now. Not 100% sure but I believe I got the original code, which I edited quite a bit, from a theme by machinari.
I know a way to actually show an alternate header like you actually asked for, but it is a bit more complicated, and I am not about to go into that until I have a few more cups of coffee.
Good Luck!
That may work but my ad code has a lot of the ' character in it, how ould I accomidate that?
[QUOTE BY= orfilms] That may work but my ad code has a lot of the ' character in it, how ould I accomidate that?[/QUOTE]
Put a backslash in front of each one in your code.