PHP templates and strings?

Started by
2 comments, last by sathenzar 18 years, 7 months ago
Hey everyone, I was wondering what would be the best way to go about applying a users template to a website would be. For ex. let's say I have forums. If I want my users to be able to add their own template that maps out over the webpage. What would be the best way? Thanks in advance. [Edited by - sathenzar on September 12, 2005 10:23:46 PM]
Advertisement
If I'm not being specific enough, I mean like how to I take a template they specify and load it so it will still function? Like phpBB has template ability. How do I achieve that? Thanks in advance.
I would do something like this:

Design the site so that the appearance is completely controlled by CSS. Then to change the layout of your page you only need to tweak the stylesheet. Once you have that you can create a set of stylesheets. Add a 'User stylesheet' field to the table in your database that describes your user which holds which of your set of stylesheets the user has chosen to use. Finally, when you output the page, selectively link whichever stylesheet the user has chosen.
Thank you, I had thought of doing somthing to that effect.I didn't know the exact way of going about it. But thanks for your input. You just cleared the path on how I'm going to do this.

This topic is closed to new replies.

Advertisement