Jump to content

Archived

This topic is now archived and is closed to further replies.

bobleny

Making a PHP forum and I'm not sure how to make the template?

Recommended Posts

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!

Share this post


Link to post
Share on other sites
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....

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
[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?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.