Theme output in SSI?

Started by TLM, December 26, 2003, 09:50:16 PM

Previous topic - Next topic

TLM

Could we have a function to report what theme the user chooses?  Thus allowing sites that would use SM as the center for there site with multiple themes, could change the way the site looks to them with what a variable would hold.

pulpitfire

i wouldn't be surprized if this would be "incredibly easy with the new template system".  maybe you could build your site into the forum, instead of the forum into your site.

Tyris

I'm sure theres a similar topic to this already.... answer seemed to be positive at least after a release or two and maybe with mods... (for non linked "boards" ie: web pages)...
Alternatively, there will no doubt be several CMS's that you can link in... I think [Unknown] is deving one... I got one in the proccess of being made... (tho havnt seen any SMf code yet... so still lots to do)

TLM

Im working on one myself thats custom.  I would like to let users chose what theme they want, and base it off the forum.

Tyris

only thing that I would imagine might be a problem, is that the SMF theme system uses mutliple files... tho I guess theres an overall file, and it wouldnt be too hard to construct the system around it... as far as knowing what theme to use, just pulling it from the database is fine :) atm I can do that no problems, and just use another copy of the template to load

Grudge

Well.. it would be incredible easy to add a little ssi function that could return a users theme option. Possibly a better one would be one that returns the theme directory. Then your site could stick theme specific images in directories with the different theme names (and css files too of course). Then you could use, say, a template header file on your site called template.php that looked like this:

<?php
$directory 
= /SSI.php?function=ssi_theme();
echo
'
   <html><head>..... <style link="' 
$directory '/style.css"</style></head><body class="body">
<img src="' 
$directory '" />
etc etc
?>



That's just pseudo really but you'd then just include that header file in all your pages and walla you'd have a site that changes depending on user theme choice. The only thing that needs to be coded is the theme function in SSI.php, which could probably be coded up in 10 mins..

EDIT: This is obviously a simple example, you could do so much more by including settings.php and accessing the database directly...
I'm only a half geek really...

Tyris

yeah, finding what theme is being used is no prob... just using the actual template system would get complicated I'd think... better to just have another replica themes folder with your template system files...

Grudge

Quote from: Tyris on December 27, 2003, 08:07:29 AM
yeah, finding what theme is being used is no prob... just using the actual template system would get complicated I'd think... better to just have another replica themes folder with your template system files...
My point exactly ;)
I'm only a half geek really...

[Unknown]

Grudge, not to burst your bubble... but, SSI.php already does this.  How do you think this site works?  It is all built using the template system.

Notice that the main site is always the Christmas theme no matter what theme you are using.... it already allows you to control the theme.

Quote from: pege on December 26, 2003, 10:34:59 PM
i wouldn't be surprized if this would be "incredibly easy with the new template system".  maybe you could build your site into the forum, instead of the forum into your site.

This sounds rather sarcastic.... is something the matter?

-[Unknown]

Grudge

Quote from: [Unknown] on December 27, 2003, 02:06:40 PM
Grudge, not to burst your bubble... but, SSI.php already does this.  How do you think this site works?  It is all built using the template system.

Heh... I'm more than happy for things to be more advanced that I thought they were ;)
I'm only a half geek really...

[Unknown]

Have you looked at SSI.php lately?  The theme stuff is at the top.

-[Unknown]

Grudge

Quote from: [Unknown] on December 27, 2003, 02:25:56 PM
Have you looked at SSI.php lately?  The theme stuff is at the top.

-[Unknown]
* Grudge goes to look

Ahhh... so it's not just the functions in the ssi_example page that you can use then

*feels stupid* :D
I'm only a half geek really...

[Unknown]

Quote from: Grudge on December 27, 2003, 02:28:42 PM
*feels stupid* :D

Nah, I wouldn't be surprised if Compuart hasn't noticed them yet... I added them in 2.5, though.

-[Unknown]

pulpitfire

Quote from: [Unknown] on December 27, 2003, 02:06:40 PM
...
Quote from: pege on December 26, 2003, 10:34:59 PM
i wouldn't be surprized if this would be "incredibly easy with the new template system".  maybe you could build your site into the forum, instead of the forum into your site.

This sounds rather sarcastic.... is something the matter?

-[Unknown]


actually, i thought that was the correct answer, and the best i could give until i know how SMF works.  i also thought a little sarcasm would be funny. :p

TLM

#14
Quote from: [Unknown] on December 27, 2003, 02:25:56 PM
Have you looked at SSI.php lately?  The theme stuff is at the top.

-[Unknown]

I am waiting like a lot of people for it to come out to the public, and my little sarcasm is, how can I look at the SSI.php :P, I might break down soon and purchase a the ability to get and use the charter member releases soon.

Advertisement: