I have decided that I am going to chage to the look of the standard nav menu at the top (Home, your accout, download, etc). I have found a very nice DHTML nav menu that I would love to put in its place.
The big problem that I have is that the menu system needs to be placed in the head tag but in the header.html file from the theme there is no head tag.
Joined: Aug 30, 2005 Posts: 3186 Location: near Albany NY
Posted:
Mon Sep 04, 2006 3:16 pm
Just be aware that:
1. if you modify header.php in the root then you are going to affect all themes unless you conditionally include the nav thing when the one theme you are modifying is the selected theme. No big deal if you only use one theme but it could be messy if you provide a range of themes for users to select from.
2. you'll probably have to modify header.html (where it exists cause it's not in all themes) and theme.php to take out the current navbar. If you support 10 themes you'll have to make the modifications 10 times. It can get messy.
3. if you upgrade your distribution you'll have to save off your modifications and interleave them with the themes from the upgraded distribution.
Alternatively, I suppose you could clone a current theme and modify it under a different name.
Not trying to discourage you but these are things that you will face.
I just use one theme and don't allow theme switching.
I have tried to make the changes but with no luck. I am using transmenu but if anyone has a good nav menu that doesn't have to be loaded from the headed, please let me know.
Joined: Aug 30, 2005 Posts: 3186 Location: near Albany NY
Posted:
Mon Sep 04, 2006 6:36 pm
In your Nuke Root directory the program header.php puts in the opening and closing head tags. In between it puts in the doctype and loads javascript files and includes any custom header files you may have and then it calls the themeheader function which is in the theme.php file of whatever theme you are using.
The themeheader function loads anything that is going into a header (but not between the head tags) and then uses the header.html to output this. Your standard navbar is in there.
If what you want to load has go between the head tags then I guess you'll have to put it in header.php. But if it takes care of the navbar then you'll have to eliminate that section from the themeheader function. Without seeing the code you are considering using I can't say any more than that. And if you are going to start hacking the standard Nuke code it behooves you to figure out where it should go yourself or else you'll never be able to support it.
OK, so I have place the code <scr~pt type="text/javascript" language="JavaScript1.2" src="stmenu.js"></scr~pt> outside the the php code in header.php in the nuke root.
The below code is what I need to replace the standard code in the header.html. I have also inceded the header.html code below. I have tried to paste the code myself but when I do the standard nav goes away but the new nav does not show up
Joined: Aug 28, 2003 Posts: 6373 Location: Vsetin, Czech Republic
Posted:
Tue Sep 05, 2006 2:21 am
If you are using the sothink dhtml menu creator, when creating the menu use the 'incude files' option. I cretaed a directory called 'menu' in my nuke root to hold all the files, then you only need to call one file in your footer.html - and it makes mainenace or changing our menu options oh so much easier.
Here is the code I last used so you can see how I did it.
As you can see, I kept the original menu in there just in case the users browser couldnt cope with the dhtml menu but the dhtml menu is actually displayed immediately under the original one.
Joined: Aug 28, 2003 Posts: 6373 Location: Vsetin, Czech Republic
Posted:
Tue Sep 05, 2006 7:47 am
When the software generates the code for you to use, it should offer several options of how that code is used, if you select the 'include files' option this will keep all the files required together in a directory of your choice so you only need to link to the files in your themes header.html like I have in my example.
If that option is not seen then perhaps it is only available in the full version software.
I understand about the included file option as I do use it. I place the file in the nuke root in a folder called "js". But like I said in my last post, what file do you place in the footer and why is your code from the sothink software so different from mine?
Joined: Aug 28, 2003 Posts: 6373 Location: Vsetin, Czech Republic
Posted:
Tue Sep 05, 2006 9:22 am
You don't need to place any code in the footer (unless you want the menu to appear in the footer ?? ).
The code to intialise the menu should be in header.html
I see from my code I was actually using two menus, you only need to insert
but I included the whole header.html file code so you could see where I had inserted it (within a centered table) but your header.html file will of course be different.
View next topic View previous topic
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum