This is a discussion on "[SOLVED] Changing Colours" within the PHP Forum section. This forum, and the thread "[SOLVED] Changing Colours are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
[SOLVED] Changing Colours
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
[SOLVED] Changing Colours
Sorry if this is in the wrong area, but here goes with my Q!?
On my portfolio website, I have a certain colour scheme, but when doing making it, i went through loads of different colour schemes, and most were liked, so what I was wondering was, whats the code, so that someone can just pick the colour scheme they like and use it for the rest of the site! I dont no where to begin Thanks for any help Cracka
__________________
Check out my Portfolio cfdesignz.co.uk and my blog at blog.cfdesignz.co.uk
|
|
|
|
#2
|
||||
|
||||
|
Re: Changing Colours
I would just set up a .css file for each colour scheme and then use a script that stores the prefered scheme in either $_GET, $_SESSION or $_COOKIE to write the required file to the page.
If you have a database backend you could do the same thing with a DB query. I wrote a similar snippet for swagner in http://www.webforumz.com/php-forum/6...endly-page.htm Cheers
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
#3
|
|||
|
|||
|
Re: Changing Colours
Hi, thanks for your help, but I am complete beginner at php you see, so don't really have a clue what is being said in that link you sent me, sorry for being such a dumb***, could you try walk me through it a bit more please!
Thanks Cracka
__________________
Check out my Portfolio cfdesignz.co.uk and my blog at blog.cfdesignz.co.uk
|
|
#4
|
|||
|
|||
|
Re: Changing Colours
Can Anyone Help Me With This?
__________________
Check out my Portfolio cfdesignz.co.uk and my blog at blog.cfdesignz.co.uk
|
|
#5
|
|||
|
|||
|
Re: Changing Colours
do you have any code already?
Last Blog Entry: 10 Reasons Why My Laptop Is Better Than Your Girlfriend (Dec 15th, 2007)
|
|
#6
|
|||
|
|||
|
Re: Changing Colours
No, complete beginner, I know nothing really about php!
__________________
Check out my Portfolio cfdesignz.co.uk and my blog at blog.cfdesignz.co.uk
|
|
#7
|
|||
|
|||
|
Re: Changing Colours
HTML code?
Last Blog Entry: 10 Reasons Why My Laptop Is Better Than Your Girlfriend (Dec 15th, 2007)
|
|
#8
|
|||
|
|||
|
Re: Changing Colours
|
|
#9
|
||||
|
||||
|
Re: Changing Colours
Okay, say you have 4 styles of css you can use the below code.. Just replace your current <link etc.. with the PHP below, then add a form or link on your site that sends style=(1,2,3 or 4) to your pages.
eg. http://www.example.com/index.php?style=1 and for the rest of that session they will have that style. Cheers
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
#10
|
|||
|
|||
|
Re: Changing Colours
Hi Rakuli!
I have tried what you have suggested but it is still not working :S, and the link you sent me doesn't work, so that doesn't help me! Do i have to use .php extension, or can i stick with the html? Thanks Cracka
__________________
Check out my Portfolio cfdesignz.co.uk and my blog at blog.cfdesignz.co.uk
|
|
#11
|
||||
|
||||
|
Re: Changing Colours
Hi Cracka, the link is example.com and is used to actually show examples
You need to have .php extensions for this to work, .html will not work unless without some apache tricks.
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
#12
|
|||
|
|||
|
Re: Changing Colours
Ok, thanks, my bad :P
Well i will have a look see if that does anything, and i will get back to you! Thanks Cracka
__________________
Check out my Portfolio cfdesignz.co.uk and my blog at blog.cfdesignz.co.uk
|
|
#13
|
|||
|
|||
|
Re: Changing Colours
No, it is still not working
Here is a screenshot of what my webpage looks like using that code, hoping that would help! Thanks Cracka
__________________
Check out my Portfolio cfdesignz.co.uk and my blog at blog.cfdesignz.co.uk
|
|
#14
|
||||
|
||||
|
Re: Changing Colours
LOL can't say that helps at all.
Can you post the code in the way you have integrated it? say 10 lines before and after the PHP so see how you have dropped it in.. Cheers
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|
|
#15
|
|||
|
|||
|
Re: Changing Colours
Here is the code!:
Cracka
__________________
Check out my Portfolio cfdesignz.co.uk and my blog at blog.cfdesignz.co.uk
|
|
#16
|
||||
|
||||
|
Re: Changing Colours
To ask a couple of obvious questions, you're going to yoursite/index.php?style=1/2/3 or 4 and you have your stylesheets in the same directory as the page?
Last Blog Entry: The wannabe juggler's quest (Oct 27th, 2007)
|