|
Joined: Apr 2002
Posts: 102
Journeyman
|
Journeyman
Joined: Apr 2002
Posts: 102 |
This would probably be quite a lot of work to create, but I would love to see users be able to select which template set they would like to use... i.e. the default ones, or Bookie's Blam templates. Any ideas, thoughts? 
|
|
|
|
Joined: Jun 2001
Posts: 3,273
That 70's Guy
|
That 70's Guy
Joined: Jun 2001
Posts: 3,273 |
I'll put together the modification I had to do this and post it. It's not as indepth as it should be to make things easy to manage but it's a start. I know there's been a lot of input on how this needs to be handled and what to consider. Should each template set have specific style sheets? Should each template set have specific images/image directory? Should each template set have specific includes? (headers/footers/javascript) It's these to areas that make the templates more difficult to set up as user selectable. Well actually not so much that but the fact that there needs to be many changes to keep online management from the admin area working in them areas. The key to switching templates is this variable: $tempstyle = "default"; This is located in your ubbt.inc.php file towards the top. Some more thoughts... The config.inc.php file sets the locations of the images and style sheets. <br /> // Absolute Url containing the images <br /> $config['images'] = "/images"; <br /> <br /> // Full URL to the images folder. Necessary for users that want their email <br /> // in HTML format. <br /> $config['imageurl'] = "http://www.somedomain.com/ubbthreads/images"; <br /> <br /> // Path to your images directory, needed for calculating image sizes <br /> $config['imagepath'] = "/home/ubbthreads/images"; <br /> <br /> // Url to your stylesheets directory <br /> $config['styledir'] = "http://www.somedomain.com/ubbthreads/stylesheets"; <br /> <br /> // Path to your stylesheets directory <br /> $config['stylepath'] = "/home/ubbthreads/stylesheets"; <br /> To make these template dependant we can tack the variable above onto the ends of specific configure variables as such: $config['images'] .= "/$tempstyle"; $config['imageurl'] .= "/$tempstyle"; $config['imagepath'] .= "/$tempstyle"; $config['styledir'] .= "/$tempstyle"; $config['stylepath'] .= "/$tempstyle"; Then create the related directories containing the stylesheets and images. This would probably be best done during the authentication call or in send_header. Once again though this throws a wrench into the cogs as far as online editing goes. The editors would need to display a list of directorys from which to choose and then display a list of files to be edited. The includes for header/footer/javascript can be manipulated in the send_header/send_footer functions by adding the $tempstyle directly. Ok... done rambling... will add more when I think of it...
Last edited by JustDave; 01/13/2003 10:53 AM.
|
|
|
|
Joined: Apr 2002
Posts: 102
Journeyman
|
Journeyman
Joined: Apr 2002
Posts: 102 |
I'm not really worried about the admin side, being able to add new templates all the time, etc. I don't mind if it take a little work to setup... > Should each template set have specific style sheets?It would be nice, so that you could have different color styles without having one template for each color. > Should each template set have specific images/image directory?Yes, there is already a mod ( https://www.ubbdev.com/threads/php/showflat.php?Cat=&Board=beta&Number=63767) for specific image directories for each stylesheet, and the directories are specified in the theme.inc.php in this format: <br />$theme['imagedir'] = "stylesheet1:/imagedirectory, <br /> infopop:/Infopopimages";<br /> You could use something similar. > Should each template set have specific includes? (headers/footers/javascript)That would be a good future improvement but I think for now it could use the default ones. Just put a warning on the mod that admin area editing of stylesheets, templates, etc could break things. I can't say I've ever used the admin area to edit the look of my site... It's all done in a text editor on my computer  </opinions>
|
|
|
|
Joined: Jun 2001
Posts: 3,273
That 70's Guy
|
That 70's Guy
Joined: Jun 2001
Posts: 3,273 |
The stylesheets themselves don't need specific image directories since the images used in them are hard coded. The templates on the other hand may need specific images used in their layout. That's where these changes would be needed:
$config['images'] .= "/$tempstyle"; $config['imageurl'] .= "/$tempstyle"; $config['imagepath'] .= "/$tempstyle";
Just modifying these configure variables dynamicly will allow template specific images. This could be done with the stylesheets as well during the call to auth if you wanted stylesheet specific image directories.
|
|
|
|
Joined: Jun 2001
Posts: 3,273
That 70's Guy
|
That 70's Guy
Joined: Jun 2001
Posts: 3,273 |
LoL it dawned on me where the stylesheet specific images would be handy. I was thinking of only the images used within the stylesheets. 
|
|
|
|
Joined: Feb 2001
Posts: 2,268
Junior Member
|
Junior Member
Joined: Feb 2001
Posts: 2,268 |
Hmmm... I currently have my site set up so that when a user changes their style sheet the graphics change, but the shape and style of the graphics are the same (just the color changes). I kinda see where what you are suggesting would be useful, but only if you are willing to settle for graphics that are created by someone else. After setting up seven different graphics sets for 10 style sheets I'm sure that I wouldn't want additional graphic sets per style sheet! 
|
|
|
|
Joined: Jun 2001
Posts: 3,273
That 70's Guy
|
That 70's Guy
Joined: Jun 2001
Posts: 3,273 |
LoL no doubt. Multiple templates would also need to work with any modifications to .threads that are added. There was some trouble here with that when I was trying them out. More templates = More work. LoL 
|
|
|
|
Joined: Feb 2001
Posts: 2,268
Junior Member
|
Junior Member
Joined: Feb 2001
Posts: 2,268 |
When I was setting up the table wrappers on my site I settled on a wrap around effect that was only 10 pixels "thick". My reasoning was that since every table was going to be wrapped in a graphic I didn't want the images to take up a lot of room. More pixels = more wasted space on the page per table. Right now I'm losing 20 pixels in every direction for each table that's being displayed.
What I could see myself doing is setting up different graphic wrappers, but stick to the same thickness so I don't have to change any of the scripting in the tbopen and tbclose templates.
Since path variables cannot be used in a CSS property I'd have to set up multiple style sheets that are exactly the same, with the exception of the graphic that's used for the table wrapper classes. So I could have "green day with graphic wrapper 1" and "green day with graphic wrapper 2" and so on.
The other problem, and we've discussed this before, is the table layout of the tbopen and tbclose templates. I'm using a 3 x 3 grid, but like you said, someone might want a 3 x 5 table structure for there graphics. Even sticking to 3 x 3 causes problems: I don't have my graphics aligned like Bookie did for his template set. So even if I cropped his graphics down so that they fit in my 10 pixel thick table cells it still wouldn't display correctly.
This may be one of those mods where all we can do is supply the basics and an example of how it's done...
|
|
|
|
Joined: Dec 2000
Posts: 1,471
Addict
|
Addict
Joined: Dec 2000
Posts: 1,471 |
[]Since path variables cannot be used in a CSS property [/]
You can create a php driven stylesheet and use the path variables in the stylesheet. Just rename .css to .php and insert small php snippets, where you need them.
|
|
|
|
Joined: Feb 2001
Posts: 2,268
Junior Member
|
Junior Member
Joined: Feb 2001
Posts: 2,268 |
What happens when you call that class from withing an html page? Is that technique CSS 2.0 compliant?
|
|
|
|
Joined: Jun 2001
Posts: 3,273
That 70's Guy
|
That 70's Guy
Joined: Jun 2001
Posts: 3,273 |
It should still validate as a file pulled in with a link. It should also work just as javascript does in a standard html page when created by php/cgi on the server from where it was pulled from.
|
|
|
|
Joined: Dec 2000
Posts: 1,471
Addict
|
Addict
Joined: Dec 2000
Posts: 1,471 |
Sure, it's fully compilant as long as the css file (ending must be php!) is parsed before it's send to the client's browser. Hereis an article about this topic. It shows the possiblities of the combination of php + css. This would be a good why to apply several skins + stylesheets for them in ubb.threads, i think.
|
|
|
|
Joined: Jun 2001
Posts: 3,273
That 70's Guy
|
That 70's Guy
Joined: Jun 2001
Posts: 3,273 |
Thanks for that link Astaran.  I have been playing with the idea of creating a tool to allow users to generate and store their own personal stylesheet and wasn't quite sure how to server it up via php. I know it's a matter of setting the proper header but just hadn't never done it for css.
|
|
|
|
Joined: Dec 2000
Posts: 1,471
Addict
|
Addict
Joined: Dec 2000
Posts: 1,471 |
The parsing into the css file should be easy, a user and newbie friendly GUI should be the harder part.  I'm not sure if i personal stylesheets are a good idea for unexperienced users. Most of them don't have any clue about "design" and probably a lot of them will send mails, cause they can't read anything... Black text on black background, you know... ;-) I implemented such a functionality into an cms, but even the customers/site owners werent't talented enough to use it probably. Personal stylesheets can mess up the corporate identity of the site/forum very easily, so many companies/bigger sites don't want to give the desing into the hands of their visitor. On the other hand, it would be a nice add-on for geeks. Maybe your generator can even be ported into the admin-area, since the editing features of the stylesheets aren't very comfortable at the moment.
|
|
|
|
Joined: Jun 2001
Posts: 3,273
That 70's Guy
|
That 70's Guy
Joined: Jun 2001
Posts: 3,273 |
I figured that since they are the only ones to see their design it wouldn't matter to anyone else. There will be a GUI preview of the various pages of .threads so they can see when they are making a big mistake.. LoL
The only thing I can see is that if the site is using multiple templates/images/table wrappers that a user customizable stylesheet probably wont be of any use.
|
|
|
|
Joined: Dec 2000
Posts: 1,471
Addict
|
Addict
Joined: Dec 2000
Posts: 1,471 |
[]The only thing I can see is that if the site is using multiple templates/images/table wrappers that a user customizable stylesheet probably wont be of any use.[/] You're probably right. I think most users will choose a style/template when the sign up and stick to it. They don't like big chances and want to have the interface, they are used to. It makes sence to me, to provide different template sets for unexperienced and advanced users. Some are minimalistic, others want to have 300 graemlins and 200 font colors right under the textbox. In my mind, it would be a bit too much, to provide them the ability to create their own stylesheets for each template set. I'm sure, some of them would like it, but the majority wouldn't even use it. On our boards, over 90% percent use de default style. In my opinion, maintaining all the templates/images/wrappers and styles makes (I prefer to call them template sets, since this covers all four aspects) .threads updates much more time intensive on the admin side. Ok, i think i'm getting a bit offtopic know, so i'd better stop.  I'd like to the that one in the admin panel, GUI preview sounds really nice.  But i don't think i would integrate it as an user option. That's my personal opinion, of course. 
|
|
|
|
Joined: Feb 2001
Posts: 2,268
Junior Member
|
Junior Member
Joined: Feb 2001
Posts: 2,268 |
Thanks for the info! 
|
|
|
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.
|
|
badfrog
somewhere on the coast of Maine
Posts: 94
Joined: March 2007
|
|
Forums63
Topics37,575
Posts293,932
Members13,824
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|