Current location: Hot Scripts Forums » Programming Languages » PHP » skinned websites


skinned websites

Reply
  #1 (permalink)  
Old 06-08-03, 09:07 AM
russell_writer russell_writer is offline
Newbie Coder
 
Join Date: Jun 2003
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
skinned websites

Hi looking for script (php/perl) that will lets vistors alter the look fo your site (i.e skins) so they could choose from a rnage of different colour schemes etc.

anyideas

cheers

From

Russell


p.s

new site looks good.
Reply With Quote
  #2 (permalink)  
Old 06-08-03, 10:06 AM
Chris Boulton Chris Boulton is offline
Wannabe Coder
 
Join Date: Jun 2003
Location: Sydney, Australia
Posts: 208
Thanks: 0
Thanked 0 Times in 0 Posts
Here is a quick little style system i designed a while ago..
(please note this runs off external CSS style sheets)

Instructions for installation.
  1. Download style.txt attached to this post, rename it to style.php.
  2. Open the script up and edit the following configuration options:
    $defstyle The file name of the default style CSS
    $defname The display name of the default style CSS
    $stylefile The file in which the list of styles is stored (doesnt really need to be edited).
    $styledir The directory in which the css files are in
  3. Create $stylefile (style.ini by default) and fill it with your styles..example below:
    Code:
    Yellow|||yellow.css
    Green|||green.css
  4. On each of the pages you want the style system to come into effect you have to have:
    PHP Code:
    
    include "./style.php"
  5. In your layout/templates whatever you are using you will need to add $css (or <?=$css?> in the CSS tag. eg
    PHP Code:
    
    <link rel="stylesheet" type="text/css" href="<?=$css?>">
    
  6. Where you want the list of styles to appear you will need to add <?=$stylelist?> on the page.
  7. Upload all the files and it should work

Please note this is a 1am job..any problems post back here
Attached Files
File Type: txt style.txt (1.6 KB, 317 views)
__________________
Chris Boulton
SurfiOnline!
MyBulletinBoard
Reply With Quote
  #3 (permalink)  
Old 06-08-03, 10:12 AM
ChristGuy ChristGuy is offline
Operations Support Develo
 
Join Date: Jun 2003
Location: Rivonia, South Africa
Posts: 111
Thanks: 0
Thanked 0 Times in 0 Posts
Greetingz....

The code I use is as follows...

PHP Code:

function ProcessFile($aFileName)

  {
    global 
$Title$PageGen$Day$Time$NumQueries;

    
$TheFile Implode(""file($_SERVER['DOCUMENT_ROOT'] . "/themes/" $SESSION['Theme'] . "/" $aFileName));
    
$TheFile addslashes($TheFile);
    
$TheFile "\$R_File=\"" $TheFile "\";";
  
    Eval(
$TheFile);
  
    print 
$R_File;
  } 
I've got different directories under themes each with html files in them.... (header.htm, footer.htm...)

Then in my "Theme" Files I use $variables In the HTML code.

Also you would then use sessions to get the users Theme Preference...

Might be to much for what you need but the above has worked for me...

Enjoy...
__________________
Till We Meet Again...
Clifford W. Hansen
Aspivia (Pty) Ltd

"We Have Seen Strange Things Today!" Luke 5:26
Reply With Quote
  #4 (permalink)  
Old 06-08-03, 02:49 PM
russell_writer russell_writer is offline
Newbie Coder
 
Join Date: Jun 2003
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
cheers will try these ideas out.
Reply With Quote
  #5 (permalink)  
Old 06-09-03, 12:04 PM
daynah's Avatar
daynah daynah is offline
Newbie Coder
 
Join Date: Jun 2003
Location: CA, USA
Posts: 69
Thanks: 0
Thanked 0 Times in 0 Posts
You can try out this script if you don't want to write one on your own. http://twelve-reasons.org/scripts/themes/
__________________
PHP Princess.net | Daynah.net
Reply With Quote
  #6 (permalink)  
Old 06-10-03, 02:36 AM
DuEy's Avatar
DuEy DuEy is offline
PHP is my life.
 
Join Date: Jun 2003
Location: New Zealand
Posts: 44
Thanks: 0
Thanked 0 Times in 0 Posts
Check out http://smarty.php.net very nice templating engine
__________________
-Duey
server: irc.chatchannel.org
channel: #hotscripts
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
SEO Expert Available nakulgoyal Job Offers & Assistance 2 08-14-04 12:38 PM
Any CMS that can build websites jolly General HotScripts Site Discussion 3 06-24-03 04:26 PM
Electronic Music related websites Stefan Traffic Exchange 0 06-13-03 07:26 AM


All times are GMT -5. The time now is 04:36 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.