|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
I've made a custom page where I authenticate and send the threads headers and footers.... But how can I do this WITHOUT the menu bar at all? I know those are sent from ubbt.inc.php.... but the process of how those get sent still baffles me. Is there a way to not send those for specific pages? Help is appreciated.
|
|
|
|
Joined: Mar 2002
Posts: 305
Enthusiast
|
Enthusiast
Joined: Mar 2002
Posts: 305 |
What are you using? I have a few pages coded that recognize the cookie and pull the stylesheet, but they don't have the menu. But I don't know if I did mine right.
[:"red"]Lisa[/]
|
|
|
|
Joined: Jun 2001
Posts: 3,273
That 70's Guy
|
That 70's Guy
Joined: Jun 2001
Posts: 3,273 |
I've wanted to do this a number of times and the only way I can see getting around it is to use a global variable to toggle it on or off. You would put a variable in your config.inc.php file with the value of 1 and then when you didn't want the navigation bar displayed you would set the value to 0 before calling the send_header function. In that function you would check the variable's value and decide if the navigation bar needs to be included into the display.
In your config.inc.php file add this:
$config['navbar'] = 1; // 1 = on, 0 = off.
In your ubbt.inc.php file change this:
if (!$debug) { include("$thispath/templates/$tempstyle/ubbt_unregisterednav.tmpl"); }
to this:
if (!$debug && $config['navbar']) { include("$thispath/templates/$tempstyle/ubbt_unregisterednav.tmpl"); }
Then find this:
if (!$debug) { include("$thispath/templates/$tempstyle/ubbt_registerednav.tmpl"); }
to this:
if (!$debug && $config['navbar']) { include("$thispath/templates/$tempstyle/ubbt_registerednav.tmpl"); }
Now before you call the send_header function set the navbar value to 0 so it doesn't get displayed:
$config['navbar'] = 0;
I think this will work. Haven't tried it but need to. Was one of them things I been meaning to look into just hadn't gotten around to it... lol
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
It's a glorified "newspal" sorta thing.... basically setting up some pages that can be edited (in threads) by a novice. It's probably not pretty... I'm new at this. LOL code:
$seaadvpath = "/home/mypaths/seaadventures"; include "{$seaadvpath}/main.inc.php";
// authenticate user $userob = new user; $user = $userob -> authenticate("");
$user = $userob -> authenticate("U_Username,U_Status"); list($Uusername,$Status) = $user;
$html = new html; $date = $html -> get_date(); $query = " SELECT B_Number,B_Posted,B_Subject,B_Body,B_Main,B_Board,B_File FROM {$config['tbprefix']}Posts WHERE B_Board = 'groupcruise' AND B_Number = B_Main AND B_Approved = 'yes' ORDER BY B_Posted DESC "; $sth = $dbh -> do_query($query); $html = new html; $pcount = 0; $pastdate = ""; while ( list($Number,$Posted,$Subject,$Body,$Main,$Keyword,$File) = $dbh -> fetch_array($sth)) { $pcount++; $output .= "edited all my output out of here to save space"; } $dbh -> finish_sth($sth);
// send the header $html = new html; $html -> send_header($config['title'],$Cat,0,$user); echo $output;
// send the footer $html -> send_footer();
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Oh I see.
So if I don't want it on just a few pages....
Would I be better off not to send the threads header.... but still authenticate like Lisa says she's got?
OR..... could you set that on/off variable on the page that I want to send....
in other words..... could I do your thing.... using a $navbar variable.....then define it as either 0 or 1 in each script????????? so that it would be on or off based on what script loads.. or would the ubbt.inc.php file not read a variable defined in the page that calls it. Probably not.
Hmmmmmmm......
|
|
|
|
Joined: Jun 2001
Posts: 3,273
That 70's Guy
|
That 70's Guy
Joined: Jun 2001
Posts: 3,273 |
I think if you follow the steps I outlined your code will not display the nav bar. \ It will still benifit from the rest of the send header function as far as adding the encoding and whatnot.
|
|
|
|
Joined: Jun 2001
Posts: 3,273
That 70's Guy
|
That 70's Guy
Joined: Jun 2001
Posts: 3,273 |
If you place that variable into the config.inc.php script it is always available to any .threads script and it is always in the "on" position so the navigation bar is displayed by default. When you call the send_header function from a page that you do not wish to have the nav bar displayed on you can toggle that variable "off" before calling the send_header function so it is not displayed.
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
|
|
|
|
Joined: Jun 2001
Posts: 3,273
That 70's Guy
|
That 70's Guy
Joined: Jun 2001
Posts: 3,273 |
hehehe thanks for testing it out. I'm going to be using this myself for IIP. I been wanting to place the nav bar links into the menu box as an option and not display the nav bar. This will do the trick quite nicely.
|
|
|
|
Joined: Mar 2002
Posts: 305
Enthusiast
|
Enthusiast
Joined: Mar 2002
Posts: 305 |
[]Thanks Lisa[/] For what, filling space until someone who knew the answer came along? You're welcome!
[:"red"]Lisa[/]
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
So kaspar asked a question in the templates forum.... he wanted to move the nav bar to a side bar sorta thing. I didn't know how to do it..... could he switch them off in the header...and call a custom template elsewhere in his site? I guess you've still got to figure out what nav bar... and if there's a PM link etc.... Guess I'm not ready to tackle that one after all. I'm still learning lots... but lots is starting to make sense too.
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
[]For what, filling space until someone who knew the answer came along?[/] I tried to do that for you earlier and broke your mod. LOL But trying to help earns points too.
|
|
|
|
Joined: Jun 2001
Posts: 3,273
That 70's Guy
|
That 70's Guy
Joined: Jun 2001
Posts: 3,273 |
kaspar could just use the table trick Allen used to place the .threads display inside another table. In the navigation template start a table: <table> <tr> <td> all nav links go here </td> <td> Then in the footer close the navigation table first before doing anything else. </td> </table> rest of footer here. This will throw the navigation menu into a table cell on the left hand side.
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Cool! You are a genius. I'll make sure he sees this. I was clueless to help him with that when he asked me. The nav menus (used to LOL) baffle me.
|
|
|
|
Joined: Jun 2001
Posts: 3,273
That 70's Guy
|
That 70's Guy
Joined: Jun 2001
Posts: 3,273 |
Glad I could help
|
|
|
|
Joined: Aug 2002
Posts: 45
User
|
User
Joined: Aug 2002
Posts: 45 |
Oooh! Cool, lemme try this out
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 69
Joined: January 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|