bobleny Posted August 20, 2006 Share Posted August 20, 2006 I want to make templates for this forum but not sure how to do it. I was thinking like this...CSS will define most of it. It will dictate the text size, color, font, ect, ect. Thats a no brainier...Then, my problem is the PHP. I was thinking a PHP file that would contain a variety of links... For example. I could have the default theme have a photo of a space ship, whilst another theme may have a photo of a monkey. Then I could call up this file and withdraw the links for that template. Each template would be in its own file and then I could use PHP to automatic detect which theme they selected from cookies (which would be confirmed by the database to make sure the cookie is still there once they are logged in).This is just my thoughts... I don't believe this is the best way, maybe a way, but not the best way, and even then, this may not be possible...So my question? What do you recommend for making themes. I'm leaning to PHP mainly, after all, it is a PHP forum...(Edit):Maybe I typed it badly, let me clarify. I'm not looking for suggestions on what features to incorporate into the forum. Nor am I asking what your favorite forum themes are....I just want to know a good way, using PHP, XHTML, and CSS, to create a system for themes. For instance, I know PHPBB uses .tpl and .cfg files. Both of which I never herd of.So, I just want to know a good way, using PHP, XHTML, and CSS, to create a system for themes?I hope this makes things more clear.(/Edit)Thanks! Quote Link to comment Share on other sites More sharing options...
bobleny Posted August 21, 2006 Author Share Posted August 21, 2006 So no ideas? Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted August 21, 2006 Share Posted August 21, 2006 There are a million and one ways to do something - the fact you used the words 'could do' speaks volumes.If you are going to create a forum - make one that you would love to use - find the thing(s) you don't like about another forum and change it to you liking.... Quote Link to comment Share on other sites More sharing options...
bobleny Posted August 21, 2006 Author Share Posted August 21, 2006 Maybe I typed it badly, but you miss understood. I'm not looking for suggestions on what features to incorporate into the forum. Nor am I asking what your favorite forum themes are....I just want to know a good way, using PHP, XHTML, and CSS, to create a system for themes. For instance, I know PHPBB uses .tpl and .cfg files. Both of which I never herd of.So, I just want to know a good way, using PHP, XHTML, and CSS, to create a system for themes?I hope this makes things more clear.Is there is a PHP method of using files in a subfolder to change the look of the forum on change? Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted August 21, 2006 Share Posted August 21, 2006 without reading all that the only thing I will say is that I personally oudl simply skin teh site using css....Have just one script that generates the html and several themes that simply a set of css files to control the design. You can then just let the users slect which theme the want to use as default, set it as a session var and use it in the <link rel tag to pic the correct css file. Quote Link to comment Share on other sites More sharing options...
bobleny Posted August 21, 2006 Author Share Posted August 21, 2006 Hmm.... I might be able to do it all with just CSS.... Thanks Quote Link to comment Share on other sites More sharing options...
robos99 Posted August 21, 2006 Share Posted August 21, 2006 Without reading all of what you posted, you could still use a template based setup to "skin" the forums. Simply use a placeholder in your HTML template for where the CSS should go, i.e. %css%, and then use strreplace to replace the placeholder with your actual style sheet stored in the DB (or from a file). This would be the easiest way to do any type of templating system. Using php variables within templates gets rather complicated.Using this method you can let your users select from an assortment of themes, and just have the theme stored within their record in the user table. Have a themeid number correspond to the actual table row where the css is stored, don't store the css directly in the user table. Quote Link to comment Share on other sites More sharing options...
bobleny Posted August 21, 2006 Author Share Posted August 21, 2006 [quote author=robos99 link=topic=104914.msg419653#msg419653 date=1156192909]Without reading all of what you posted, you could still use a template based setup to "skin" the forums. Simply use a placeholder in your HTML template for where the CSS should go, i.e. %css%, and then use strreplace to replace the placeholder with your actual style sheet stored in the DB (or from a file). This would be the easiest way to do any type of templating system. Using php variables within templates gets rather complicated.Using this method you can let your users select from an assortment of themes, and just have the theme stored within their record in the user table. Have a themeid number correspond to the actual table row where the css is stored, don't store the css directly in the user table. [/quote]Hmm.... This interests me, Could you explain this a little more? Quote Link to comment Share on other sites More sharing options...
ToonMariner Posted August 21, 2006 Share Posted August 21, 2006 its exactly what i said but in 2000 words.... ;) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.