PDA

View Full Version : I need help modifying the nav bar guys.


Colon33
09-14-2002, 04:57 AM
I am trying to edit the NAV BAR for hosted subforums so it begins with THEIR forum name not the default forum home link. IE:

Gamer-pit > Hosted Forums > Black Ice

I want to change that too Just Start out with

Black Ice

When they are on there forum... anyway i can do this that im not seeing... i must be blind if there is.. lol

Xenon
09-14-2002, 10:18 AM
you have to edit function makenavbar ind admin/functions.php

Colon33
09-14-2002, 10:22 AM
Exactly which part? I only want to do it for specific Forums. Or is this not Possible?

Xenon
09-14-2002, 11:17 AM
this part:
eval("\$navbar = \"".gettemplate("navbar")."\";");

change it to:
if($idtype="forum" and $id!=xx) {
eval("\$navbar = \"".gettemplate("navbar")."\";");
} else {
eval("\$navbar = \"".gettemplate("subnavbar")."\";");
}

then copy template navbar to subnavbar and cut out the $bbtitle parts..

Colon33
09-14-2002, 11:21 AM
But wont this still display the category Before the final FORUM NAME?

GAmer-pit > Hosted Forums > Black Ice

changed to just

Black Ice

Xenon
09-14-2002, 11:29 AM
yes, that's the problem of the recursive function used for building the navbar..

You can also make it a bit more hardcoded:
if($idtype=="forum" and $id!=xx) {
eval("\$navbar = \"".gettemplate("navbar")."\";");
} else {
$foruminfo=getforuminfo($id);
eval("\$navbar = \"".gettemplate("subnavbar")."\";");
}
then use $foruminfo[title] in subnavbar instead of the buildet navbar

Chris M
09-14-2002, 11:46 AM
Xenon...

With your first code, to add more than one forum would be this code?

if($idtype="forum" and $id!=xx and $id!=yy) {
eval("\$navbar = \"".gettemplate("navbar")."\";");
} else {
eval("\$navbar = \"".gettemplate("subnavbar")."\";");
}
yy = the second forumid;)

Satan

Colon33
09-14-2002, 01:14 PM
Hmmm, Ill try this out guys' Thx. Ill see what it does. You guys are talking about forum ID there as xx and yy should i put the forum ID's in there?

Chris M
09-14-2002, 02:26 PM
If you want to use Xenon's code, xx stands for the forumid...

If you have more than one forum, yy would be the other forumid;)

Satan

Colon33
09-14-2002, 04:29 PM
Excuse me for being troublesome but does that mean i have to replace the xx
and yy or not? heh.

Xenon
09-14-2002, 06:35 PM
Satan yes this is the way to do ^^

@colon: it depends on how much forums you want to have the alternate navbar.
just one? replace the xx with the forumid
more add some and clauses to the if clause

Colon33
09-17-2002, 12:52 AM
Its only gonna be like 2 or 3. So i replace xx and yy and whatever other forums i want to add it to with the FORUM ID# of the forum correct?

Xenon
09-17-2002, 10:58 AM
correct

Colon33
09-20-2002, 04:36 PM
ok, i finally got around to adding this after my comp went to hell. Thx alot for helping me on this. I use the $foruminfo[title] but nothing appears. How can i get it to still display the same following subforums and thread information?

Xenon
09-20-2002, 11:16 PM
do you have the line $foruminfo=getforuminfo($id); before the eval code?
you should be able to use $foruminfo[title] then...

Colon33
09-22-2002, 04:18 PM
yup i added that code just like you said in the coding above. Still got nothing. Any ideas. I have added the code exactly like you said. Still wondering

Colon33
10-07-2002, 01:38 AM
bumping incase of possibility of fixing..