|
Joined: Oct 2001
Posts: 139
Journeyman
|
Journeyman
Joined: Oct 2001
Posts: 139 |
Hello, newbie here. I was just wondering if it is possible to have all the other pages on your web site be controlled by the styles that users select in ther preferences. I recently installed Threads and would like to have my site's main home page and several other ancillary pages be changeable according to which stylesheet the user has selected. As it is now, only my forum pages are controlled by the stylesheets, but I'd like to have the rest of my site controlled the same way. I'm guessing it is possible, but is there a good tutorial? Or where would you suggest I begin to learn how to do this? Thanks, Basil British Car Forum
|
|
|
|
Joined: Jun 2002
Posts: 670
Code Monkey
|
Code Monkey
Joined: Jun 2002
Posts: 670 |
1. You would first have to make sure your cookies were site-wide (that can be done from your Threads config file). 2. You would need to familiarize yourself with the different stylesheet classes used in Threads. Then start using those stylesheet classes in the rest of your pages. 3. You would need to find the code in the header that links the stylesheet based on the cookie and copy it into the header of your pages. I have no idea where to find that in Threads. Another suggestion is to use the Generic Threads Page mod. Your pages will look like part of threads, but you can add whatever content you want, concentrating just on the HTML. I even think those generic pages can be used outside the Threads directory. I hope that helps.
Last edited by donJulio; 05/20/2004 6:18 PM.
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
Good report dJ, that's how we do it here and how quite a few other sites do it, using the generic threads page. You can also use them outside the threads directory The newer versions of photopost and reviewpost and even classifiedadspost (or whatever the name is ) also integrates very nicely with threads
|
|
|
|
Joined: Oct 2001
Posts: 139
Journeyman
|
Journeyman
Joined: Oct 2001
Posts: 139 |
Thanks guys, I'll give it a try. Will it work with 6.4.2? The thread you linked to seeme dto suggest it was for Threads up to 6.3? Cheers, Basil www.britishcarforum.com
|
|
|
|
Joined: Mar 2000
Posts: 21,079 Likes: 3
I type Like navaho
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
I use it on a site running the 6.5 beta, so there shouldn't be any problem. Just make sure to set the $threadspath correctly
|
|
|
|
Joined: Jun 2002
Posts: 670
Code Monkey
|
Code Monkey
Joined: Jun 2002
Posts: 670 |
Part of the reason the Generic Threads page mod is so useful is that you don't have to do #3 on the list that I made earlier. I wouldn't even know where to begin looking for that information. There is a project that I am thinking about starting and I would need something similar to the Generic Threads page mod. I like the mod, but the one thing that I don't like (insofar as this project is concerned, otherwise I love it ) is the presence of the threads navigation bars on the top and bottom; ubbt_(un)registerednav.tmpl & ubbt_footer.tmpl. Can a Generic threads page w/o those two navigation bars be created easily enough?
|
|
|
|
Joined: Feb 2001
Posts: 2,268
Junior Member
|
Junior Member
Joined: Feb 2001
Posts: 2,268 |
The following script is how I do it on my site. First you need this to kick it off: <?<br />// Require the library<br /> require ("ubbthreads/main.inc.php");<br />// ---------------------<br />// Send the page to them<br /><br /> $html = new html;<br /> $html -> send_header("Oops!",$Cat,0,$user);<br /><br />// ---------------------<br />// Grab the tablewrapper<br /> list($tbopen,$tbclose) = $html -> table_wrapper(); Note: The path for the main.inc.php file is important and will change depending on where the main.inc.php file is located with respect to the file(s) you create. Now add what you want on the page in the middle, like this script from my custom 404 page: echo <<<template<br /><br />$tbopen<br /><tr><br /><td class="tdheader"><center>Oops!</center></td><br /></tr><br /><tr><br /><td class="lighttable"><br /><p>You've requested a page that no longer (or never did ;) exist at Da LAN Tech. Please choose your destination from the menu above. Recently we moved all of our articles to <a href="http://www.dalantech.com/ubbthreads/ubbthreads.php">Da Forum</a>, so you may have reached this page from a link at Google since they have links to our old web site.</p><br /><br /><p>If you'd like to report the bad page just send an email to the <a href="http://www.dalantech.com/ubbthreads/contactus.php?Cat=">Webmaster</a> and let the slacker know that he has a broken link!</p><br /></td><br /></tr><br />$tbclose<br /><br />template; Then finish the page like this: <br /> $html -> send_footer();<br />?> Your custom page will look and feel just like your forum; same faonts, graphics, etc. Here is the error page and compare it to my forum -they both have the same format
|
|
|
|
Joined: Jun 2002
Posts: 670
Code Monkey
|
Code Monkey
Joined: Jun 2002
Posts: 670 |
I'll probably do something like that. But what I need is to have the new pages I create look like the forums, but without the top and bottom navigation bars, so that way they look the same, but won't be part of the forums. But if there isn't a way to remove those nav bars, that's fine. I'll do it with them.
|
|
|
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: 1,157
Joined: July 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|