Honesty Rocks! truth rules.

Template Chooser?

HOME      >>       Programming

alex1985

Hi, do you know any tutorials that is somehow is dedicated to creating kind of templates for your web-site?!Let's say when a user goes to his or her profile there will a button which is called "Choose Template", for instance, after that the templates of your web-site stored on your server, will become active. This is the first point.The second thing, how can I make the templates generally? With respect to font, alignments, buttons, other graphics or even hide some buttons or functions of the web-site?


kobra500

Well I would assume the PHP include funtion has something to do with it which I suppose would change the look of the site whilst keeping the text the same. I don't know of any tutorials but you will probably find some here [HERE]


alex1985

Thanks, but not really useful!!! I need only the good and trusted tutorials that I can rely on them and follow to expand my knowledge of PHP language.


Live-Dimension

This is an interesting prospect, and I played with it for quite some time. In the end, I realised that most people won't stay long enough to change themes so it wouldn't matter so much.

There's a few ways to do it. I went and made a page, then put php include tags everywhere. For example,

<?php include ("pages/news.php"); ?><?php include ("pages/home.php"); ?>
These contained the raw data for the pages. Using variables in the url, I was able to change theme and page according to what the user wanted.

gogoily

Well, lots of forum codes got this function, you can read their PHP codes to figure out.


alex1985

Its not really the right one!!! Any more replies?


rvalkass

Hi, do you know any tutorials that is somehow is dedicated to creating kind of templates for your web-site?!

There are loads of ways to make a template for your site, depending on what sort of template you are looking for. You can go from a simple HTML/CSS page with PHP just used to add dynamic content, to a full-blown template engine, such as Smarty or the one included in the Zend Framework. Or, you can go for something between the two, sort of writing your own mini template engine specifically for your site. Until you know which you want to do, it is very hard to recommend tutorials.

Let's say when a user goes to his or her profile there will a button which is called "Choose Template", for instance, after that the templates of your web-site stored on your server, will become active. This is the first point.

Store in the database a list of themes, along with the information that allows you to load each one (the path to a CSS file for example). Then, along with your user data, store the user's preference for a theme. Then, in your template, look up what theme the user wants, and load the relevant files.

The second thing, how can I make the templates generally? With respect to font, alignments, buttons, other graphics or even hide some buttons or functions of the web-site?

Font, alignment, images and all page layout factors are controlled by CSS.
Hiding buttons and features would use PHP and some sort of permissions system to determine who has access to which parts of the site.

alex1985

Wait, many templates are actually based on CCS. Do you know anything about this issue?


alex1985

Any thoughts so far?


rvalkass

Wait, many templates are actually based on CCS. Do you know anything about this issue?

I presume you mean CSS? CSS stands for Cascading Style Sheets, and they determine the look and position of HTML elements on screen. Such things as colour, width, height, fonts, etc. I suggest you search for some CSS tutorials to learn how CSS works, and makes your templates much easier to work with.

alex1985

I want to have a basic look at creating templates for your web-site, some sort of tutorials?! You see I always do ask only interesting points!!!


FruitRocks

I use Adobe FireWorks when I make my website's templates. It is fast and easy to do, because it doesn't take that long to learn. It isn't exactly free (about $300-500) but Adobe offers a 30 day trial on their website. Once finished making the template I put it in Microsoft Expression Web to code it and add functionality to it so it is more than just a JPEG.


Quatrux

Seems this topic is in a PHP category and the topic is about template chooser? So I guess I can add a bit about this issue, even though it might be off topic :DCreating a template choose with PHP can be made in several ways, the easiest would be to have a folder named templates, and in that folder to have different folders for template names, like default, ocean blue, red minimalistic and etc. In those folder there might be standard template files with html, header, footer, menu, sidebar, content, error pages and maybe even images.From a DB, or a cookie, you can get a value which the user has selected, and include the template which is selected. The template system which will create the html from your files is a different story.Personally, for my templating system, I'm using output_buffering, ob_start() function, because it's easy to manipulate the template using it by replacing required keywords with the needed data, especially if your templates/cms is multi-language. :)for example, you can put in template files: {title},{description} and your CMS could replace it with data from DB with the required value on the selected language. :(


SharedMan

What templete site do you recomand whit good working templates for jomla or apache ? i realy need some gaming templates or some tutorial how to make some own personal tutorials , tnx in advance for the help


beijaflor

thanks you fo the hints


roysmith27

Well i does not have tutorial for creating the Template,if you have looking for downloading the free templates than i can suggest some webiste like:"http://forums.xisto.com/no_longer_exists/; and "https://www.dart-creations.com/;.