Banner

Sponsor

Login


Welcome Back!
Guest
Guest

Register

Lost your password?

73 users online



Letting Users Choose How To Skin A Site

Letting Users Choose How To Skin A Site

Currently viewing this thread: 1 (0 members and 1 guests)


Page 1 out of 2
ramos

ramos

Skater From Flower Mound YAY
Status: Offline!

Letting Users Choose Colors For A Site

Hey, its me again, ironically with more questions about skinning a site. I've got the basic skinning part down, thats really simple now, and setting cookies shouldn't be to hard with this one, though I probably will need help with it later. Onto my question:
I'm redesigning my site, and of course I want it to be skinnable. This time I leaned towards just colored tables, to make a less graphically intense website and also make it more versitile and viewable in more resolutions and more browsers. Now on a site I used to go to they had the same thing as me, colored tables and a skinnable site. They had pre-made themes to pick from but they also had it where the user could input colors into a form, submit it and their choices would show up. I know you'd use cookies to store the choices, and could echo the colors out into that tag, but I'm baffeled on how I'd retrieve those colors and how I'd set the cookie to save them and how the user would go about picking the colors(how the form would have to act for it to work). If anybody could help me I would greatly appriciate it!
Thanks in advance!
-Alex

___________________

Useless Skaters

RaiseUp.net

Alex-Ramos.net

Last edited by ramos, January 7th, 2004 03:46 AM (Edited 1 times)

BigToach

BigToach

Neversidian
Status: Offline!

just use css and have different stylesheets. red, orange, yellow, green, blue, indigo, violet. ROYGBIV Tongue (it was the only thing i learned in elementary so i figure i had to get it out)

___________________

Neverside Development Director
PHP Snippets
BigToach.com - IT WORKS, TOACHY!

ramos

ramos

Skater From Flower Mound YAY
Status: Offline!

thats not what I have the problem with. I know how to skin a site, thats simple. I need help having users input colors into a form and having them save those colors.
-alex

___________________

Useless Skaters

RaiseUp.net

Alex-Ramos.net

BigToach

BigToach

Neversidian
Status: Offline!

use a db or tect files. you could also just create a css file for each user i guess too and set that file as a cookie.

___________________

Neverside Development Director
PHP Snippets
BigToach.com - IT WORKS, TOACHY!

Spoono

Spoono

Neverside Newbie
Status: Offline!

hey

On Spoono, to save flavors for specific people, we just cookie up a number between 0-7. then when you come to the site, if it's 1, then you load the first one, and so on

___________________

- -- --- ---- ------ ------ -------
Akash Goel
Webmaster
www.spoono.com
www.tutorialforums.com
- -- --- ---- ------ ------ -------

ramos

ramos

Skater From Flower Mound YAY
Status: Offline!

well I've only got about 5 or 6 different things they pick colors for, would I be able to save that all in a cookie?
If that would work can anybody make, or tell me what to use to make a script that would pick them and set them to a cookie. I think thats what I was trying to say before. Also, I have all my values being echo'd out if that makes a difference.
Thanks!
-Alex

___________________

Useless Skaters

RaiseUp.net

Alex-Ramos.net

Last edited by ramos, January 7th, 2004 04:00 AM (Edited 1 times)

ramos

ramos

Skater From Flower Mound YAY
Status: Offline!

Ok, I've made an image to show you what I mean. For every number I have on there, I want the visitor to be able to pick what color goes there. Under the <font> tags I have PHP echo out the selection, for instance:

PHP:


<font color="<?php echo"$fontcolor"?>"> Blah Blah Blah </font>


http://www.useless-skaters.com/otherpics/help.gif
I want the choices they input into a form to be saved into a cookie and echoed out on the page so they see my site JUST how they want it. I hope this better explains what I mean.
-Alex

___________________

Useless Skaters

RaiseUp.net

Alex-Ramos.net

Last edited by ramos, January 8th, 2004 12:28 AM (Edited 1 times)

its1am

its1am

Ugh... Leave this blank for now
Status: Offline!

This is a sidenote but they removed a color from the rainbow, im pretty sure it was indigo

___________________

...

ramos

ramos

Skater From Flower Mound YAY
Status: Offline!

Ok, I've tried a few of my own ways and I've almost gotten it to work. All I needed to do was select the colors with a form, and make them go to a page that will set a cookie with all the info in them. Here's my first problem: I set the cookie and have all the input boxes named ex. - "bgcolor". If I want the cookie to set as the color they picked what should I put under "here":

PHP:


<?php setcookie('bgcolor''here' time() =3600*365); ?>

Onto my second delamia:

PHP:


<?php 
if ($theme==""){
$bgcolor "333333";
$headcolor "555555";
$fontcolor "FF9900";
$link "FF9900";
$vlink "FF9900";
$alink "AAAAAA";
$bordercolor "FF9900";
}
elseif (
$theme=="1"){
$bgcolor $_COOKIE['bgcolor'];
$headcolor $_COOKIE['headcolor'];
$fontcolor $_COOKIE['fontcolor'];
$link $_COOKIE['link'];
$vlink $_COOKIE['vlink'];
$alink $_COOKIE['alink'];
$bordercolor $_COOKIE['bordercolor'];
}
?>


I know that is EXTREMELY wrong, just using it till I find out how to do this.
How do I make it so that the visitors chosen color shows up when they come but there is also a coexisting default theme without using the '?theme' variable in the address?

If any part of this doesn't make sense to you but you think you can help me please do! I would really appriciate it! I think you guys understand what I was talking about before, I really want to get this done soon, I've been working the last week on it and it doesn't seem too complicated. Thanks!
-Alex

___________________

Useless Skaters

RaiseUp.net

Alex-Ramos.net

BigToach

BigToach

Neversidian
Status: Offline!

first question
use $_POST['bgcolor'] instead of 'here'
second question doesnt make sense for the most part.
imho youre going about it the wrong way. here is a simple way of doing stuff

PHP:

<?php

if(!isset($_COOKIE['theme'])){ // if the cookie isnt set use the default
        
$theme['bgcolor'] = '#000000';
        
$theme['text'] = '#FFFFFF';
        
//etc
}else{ // if it is set, use the users theme
        
$theme userialize($_COOKIE['theme']);  // unserialize the cookie value to get all the data
}

?>


and to set the cookie do like this

PHP:

<?php

setcookie
('theme',serialize($_POST),time()+60*60*24*7); // serialize the data to use just one cookie with all data

?>


then just send a post to the page with the id's being like bgcolor and text etc, that way it will remember them all and all can be different.

___________________

Neverside Development Director
PHP Snippets
BigToach.com - IT WORKS, TOACHY!

Page 1 out of 2
Quick Jump:

Main Navigation


Site & Graphic Design by Aeon Tan
Developed by Jeremie Pelletier & Scott Roach


NeverAPI generated this page in 0.0106 seconds.