Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
Joined: Jun 2002
Posts: 670
I am going to need some help with this. I hope what I need isn't too complicated. To start, I'm modeling it after this type of page I saw on JC's site:
JC's Page

Notice how the Threads navigation bars (ubbt_(un)registerednav.tmpl and ubbt_footer.tmpl) are absent? That's how I need mine. His also uses the forums header and footers in the includes folder. I've figured out how to do that. What I need now is to make it so the page I'm writing calls the Threads stylesheet, either the default or the one the user has specified in their profile.

The way I have this so far, I know that it will at the very least update dynamically when I edit the headers and footers from the threads admin area. The last thing I need is for this to call the threads stylesheet as well as the users language preference. I'm guessing that any language strings I write would need to go into the generic.php language file.

Please take a look at what I've got so far and let me know how I can take care of the language and stylesheet issue. Thanks!

EDIT:
Here's the link to what I have so far:
My test page
Attachments
115210-index.txt (0 Bytes, 61 downloads)

Last edited by donJulio; 06/14/2004 3:45 PM.
Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
An easy way to "shut off" the menu bar on pages as needed....

I don't have files in front of me - so I'll speak generally - and that'll probably get you going in the right direction.

IN ubbt.inc.php - where it includes the ubbt_registerednav.tmpl file

Add an if clause around it, like this:

if (!$config['menubar']) {
// include the template here
}

Basically that says if there's no value for $config['menubar'] then print the menu. Since that variable doesn't exist in the config file - it'll always print.

Then on the page where you DON'T want the menu to appear - add this above the send_header function.

$config['menubar'] = 1;


This defines it as "1" BEFORE the header is sent. Since $config is a global variable, the send_header() function will "see it" and when it gets to that "if" statement you added, now there will be a value, and it won't include the nav bar template.

(This is similar to how we shut the sidebar off on certain pages).

You shoudl be able to apply that to each nav bar, and to the footer template.

Hope that helps!

Joined: Aug 2000
Posts: 1,290
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,290
I used css to remove em...

<style type="text/css">
.main-index {
display: none;
}
</style>

Easy peasy.. Surprised it hasn't been copied yet..lol


- Custom Web Development
http://www.JCSWebDev.com
Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
Joined: Jun 2002
Posts: 670
I'll give that suggestion a whirl. It might be easier to modify the existing generic threads page mod, adding that line,
$config['menubar'] = 1;
and then just edit the html tags so that the content isn't in a table cell, but rather on the page itself, on top of whatever background color is called in the stylesheet.

Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
Joined: Jun 2002
Posts: 670
[]J.C. said:
I used css to remove em...

<style type="text/css">
.main-index {
display: none;
}
</style>

Easy peasy.. Surprised it hasn't been copied yet..lol [/]
I certainly feel smart now

Wait, how does using display:none remove the menubar from only that page (and a couple others), but not in the forums? I mean, if it's just one template, wouldn't the menu bar not appear in all pages?

Last edited by donJulio; 06/14/2004 11:31 PM.
Sponsored Links
Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
Joined: Jun 2002
Posts: 670
I hope you don't mind that I peeked at your source to see how you did this. This is the part that interests me:
[] <span class="main-index">

<table width="100%" align="center" cellpadding="1" cellspacing="1" class="tablesurround">
<tr>
<td>
<table cellpadding="2" cellspacing="1" width="100%" class="tableborders">
<tr>
<td align="left" valign="middle" class="menubar">
Welcome donJulio.
[<a href =" http://www.ubbdesign.com/forums/logout.php?Cat=" >Logout</a>]
·

<a href=" http://www.ubbdesign.com/forums/login.php?Cat=&myhome=1">Profile</a>
</td>
<td align="center" class="menubar">

<a href =" http://www.ubbdesign.com/forums/findex.php/Cat/" >Entrance</a>
·
<a href =" http://www.ubbdesign.com/forums/categories.php/Cat/" >Forums</a>
·
<a href =" http://www.ubbdesign.com/forums/search.php?Cat=">Search</a>
·

<a href =" http://www.ubbdesign.com/forums/online.php?Cat=">Online</a>
·
<a href =" http://www.ubbdesign.com/forums/faq.php?Cat=">FAQ</a>
·
<a href="http://www.ubbdesign.com/forums/dosearch.php?Cat=&Forum=All_Forums&Words=&daterange=1&newertype=d&newerval=1&Limit=25&topic=1&fromsearch=1">
Active Topics
</a>

·
<a href =" http://www.ubbdesign.com/forums/calendar.php?Cat=">Calendar</a>
·

<a href="http://www.ubbdesign.com/forums/chat.php?Cat=" >Chatroom</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<br />
</span><style type="text/css">
.main-index {
display: none;
}
</style> [/]

Clearly the style tag at the end is all important, as well as the span tag that contains all the html for the menu bar. What I'm confused on is that if you added that span tag to your ubbt_registerednav.tmpl, then the menu bar wouldn't appear on any page at all.

Does your page call a different ubbt_registerednav.tmpl type file?

Joined: Aug 2000
Posts: 1,290
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,290
The style tag is added only to relevant templates, i.e. there is a threads template for each page of my site (except the PP Pro section, obviously).


- Custom Web Development
http://www.JCSWebDev.com
Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
Joined: Jun 2002
Posts: 670
Thanks Josh! I've followed your suggestion about editing the ubbt.inc.php file and it worked. I've applied your suggestion t eliminate both registered and unregistered nav bars as well as the footer:
http://www.laondalatina.com/foros/generic.php

Last edited by donJulio; 06/21/2004 4:10 PM.
Joined: Aug 2000
Posts: 1,290
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,290
Glad you got it figured, I've been under the weather, and haven't been by here.


- Custom Web Development
http://www.JCSWebDev.com
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
Plus you've been mad at me.

DonJulio - I've been on vacation - glad you got it figured out.

Sponsored Links
Joined: Aug 2000
Posts: 1,290
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,290
If I stayed away from here cause I was mad at you, I'd never be here..


- Custom Web Development
http://www.JCSWebDev.com
Joined: Jun 2002
Posts: 670
Code Monkey
Code Monkey
Offline
Joined: Jun 2002
Posts: 670
[]J.C. said:
If I stayed away from here cause I was mad at you, I'd never be here.. [/]

Joined: Aug 2000
Posts: 1,290
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,290
Just Josh and I being ab-normal.. move along nothing to see...


- Custom Web Development
http://www.JCSWebDev.com
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
LOL
Speak for yourself.

Joined: Sep 2003
Posts: 803
Coder
Coder
Offline
Joined: Sep 2003
Posts: 803
darn, I gues I can forget the "bet on whats next" forum I was thinking of....


(jk)

Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
If he's always mad at me - he certainly tries to call and email me alot.

Joined: Apr 2002
Posts: 474
Enthusiast
Enthusiast
Offline
Joined: Apr 2002
Posts: 474
Thanks this came in handy this week.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Gizmo
Gizmo
Portland, OR, USA
Posts: 5,833
Joined: January 2000
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)