Hi Don,
Obviously the Freetag plugin was causing that initial "Error redirect", so I have uninstalled it and will worry about tags later.
Also, I notice that even when the full URL is not provided to the Java Scripts under different conditions, the scripts still work.
I am ahead of where I was last week through the very much appreciated assistance from onli, but the very last hump we have to get over has us both scratching our heads.
Up to the point of doing this, everything was working fine except I needed to bring my main menu into the blog page with Smarty so that I could then put custom header code above it.
So we put the following extra few lines into the Clean-Blog config.inc.php file to bring my php menu in as a Smarty variable.
Code: Select all
ob_start();
include('/home/mysite/public_html/global/includes/menu-bar.php');
$menuNeil = ob_get_contents();
ob_end_clean();
$serendipity['smarty']->assign('menuNeil', $menuNeil);
}
We then put the tag {$menuNeil} into the entries.tpl file.
That worked great on the blog pages. My menu worked fine and I could then put a Smarty tag above that to bring in my custom header code.
Everything was perfect, until I tried to open the backend Admin. When I did, it was trying to open my blog main menu. Why - the two code additions were in the Clean-Blog files, not the backend 2k11??? Anyway, it crashed entry to the backend.
So because the above blog menu only relates to the front end Clean-Blog, we have tried to tell s9y to only assign the menu to the Smarty variable $menuNeil if it is the front end being opened, not the backend. That is why I am looking for the if statement. Either if we are opening the front end blog, run the code to create the $menuNeil variable, or if we are opening the backend, don't run the code.
But this is where it gets
really weird.
The above code by itself brings the menu into the front end and crash's the back end.
I add your suggestion of...
Code: Select all
if ($serendipity['GET']['adminModule'] == 'templates' || $serendipity['POST']['adminModule'] == 'templates') {
... above the code and put a closing curly-brace at the bottom and I can get into the backend without problems - except it crashes when I try to enter the "Themes" menu.
The front end blog Menu does not render. - I think I can understand that because from my limited knowledge it looks like we are saying that if we are in the back end, run the code. So if the backend is bringing the code in without the IF statement and crashing before the log in screen, how come with an if statement saying to bring it in causes it not to crash except for at the theme menu?
So to try to tell s9y to only bring the code in if it is
not the back end, I tried;
Code: Select all
if ($serendipity['GET']['adminModule'] !== 'templates' || $serendipity['POST']['adminModule'] !== 'templates') {
Great! Doing this now brings my front end menu into my blog. But the back end crashes again before log-in again.
NOTE: All these back end crashes are being caused by it trying to bring in my front end menu even though it apparently has no instruction to do so. From what I can figure out, the above code is only populating the $menuNeil variable - not telling it to be displayed.
It is only in the entries.tpl that we are using the {$menuNeil} tag. I am totally lost why the back end want's anything to do with it.
So mate, any help you can give me to get the back end to totally ignore my menu and for the front end to pick it up, would be greatly appreciated.
Cheers,
- Neil