| |||||||||||
| |||||||||||
Setting your colour theme through PHP
Although we usually think of PHP as a server side language concerned with databases and the driving of applications, it's also of great use in controlling the use's look and feel ... indeed, I've just written a number of examples of how PHP can be used to select a set of colours (themes) for the user. Here's the sort of code that you might find in the PHP page.
<?php if ($_REQUEST[colset] == 1) { ?>The use of a themed approach rather than providing controls over individual attributes means that the page provider can select appropriate combinations and allow the user to quickly and easily switch between the - the opposite alternative of providing controls on a per-attribute basis may give far greater flexibility, but it also gives rise to a system that it's longwinded for the user to change, and a system in which the user can, potentilly, hit on a totally inappropriate combination. See - source code and code demonstration Our new course module also includes a step by step guide to generating separate style sheets through PHP - ideal for a shared-style web site, and vital if you're concerned with flexible coding to meet the UK's DDA (Disability Discrimination Act) Update - I've added a complete example into the new course module that combines PHP, style themes, cookies and a pulldown menu to change the themes. See here for the source code and here to run the code (written 2006-12-17 16:10:16) Associated topics are indexed under H118 - Generating CSS through PHPW704 - Web and Intranet - Cascading style sheets - putting it all together
Some other Articles
One Thousand Posts and still going strongCascading and the buses The year of the exploding projector Most recent file in a directory - PHP Setting your colour theme through PHP Ruby's case - no break Training on Cascading Style Sheets Positioning with Cascading Style Sheets Enthusiastic, but .... Adding a member to a Hash in Ruby 1633 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33 at 50 posts per pageThis is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price. Link to Ezine home page (for reading). Link to Blogging home page (to add comments). |
| ||||||||||
PH: 01144 1225 708225 • FAX: 01144 1225 707126 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho | |||||||||||