PHP CODE HELP
Moderator: General Moderators
PHP CODE HELP
Hello All ,
I need codes in php wherein a user can customize the web page as per his requirements. Specifically , I have my website with a lot of colour ranges . I want that the user should be able to select the colour he wants and save it .
Thanks
I need codes in php wherein a user can customize the web page as per his requirements. Specifically , I have my website with a lot of colour ranges . I want that the user should be able to select the colour he wants and save it .
Thanks
Last edited by mystic on Wed Nov 18, 2009 12:34 pm, edited 1 time in total.
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Re: PHP CODE HELP
You want to make use of POST requests or JavaScript to set the user's selection, and make use of either a database or cookies to save the user's selection.
POST requests + database = PHP.
POST requests + cookies = PHP.
JavaScript selection + cookies = JavaScript.
JavaScript selection + database = AJAX.
Database is useful for saving the preferences of logged in users. Cookies are good for the current session, and can be effective for future sessions.
POST requests + database = PHP.
POST requests + cookies = PHP.
JavaScript selection + cookies = JavaScript.
JavaScript selection + database = AJAX.
Database is useful for saving the preferences of logged in users. Cookies are good for the current session, and can be effective for future sessions.
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Re: PHP CODE HELP
Thanks for your reply guys .I need the codes for the same : POST+DATABASE= PHP
THANKS !
THANKS !
Re: PHP CODE HELP
I have about 5 boxes on my webpage which offers colour customization for the user . I need php codes wherein the user can select the colour of his choice for each box and save it accordingly .
Example code :
<ul id="columnx" class="column">
<li id='boxes-rt' class="box color-red">
<div class="widget-head">
<h3>mystic</h3>
</div>
<div class="content">
<script>
Thanks
Example code :
<ul id="columnx" class="column">
<li id='boxes-rt' class="box color-red">
<div class="widget-head">
<h3>mystic</h3>
</div>
<div class="content">
<script>
Thanks
- Jonah Bron
- DevNet Master
- Posts: 2764
- Joined: Thu Mar 15, 2007 6:28 pm
- Location: Redding, California
Either have the user enter the hex RGB values (e.g. #F011AA) or create/use a javascript color picker that calculates it for them.
http://www.google.com/search?btnG=1&pws ... lor+picker
http://www.google.com/search?btnG=1&pws ... lor+picker
Re: PHP CODE HELP
Thanks for your reply Jonah . Can you suggest me some more ways seeing my code ..I have widgets with colours already defined on them ..The user just has to select and customize it ... . the ones you have listed dont seem to work for me ..
Thanks
Thanks
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Re: PHP CODE HELP
Or instead of making the color selection JavaScript, just make it a link. Have that link set the user's preference and reload the page with the current styling. In order to do this, you need commonality between your scripts (like a common included script, or a global object) that looks for the color selection (which could be sent via the query string) and changes the display in accordance to the selection.
Re: PHP CODE HELP
How do I do that ? I have no idea ...Can you post the code for the same
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Re: PHP CODE HELP
Nope. Get started first, and then we'll help you.
Re: PHP CODE HELP
Well the link works for me ...I got my other pages working using links ...but this doesn't complete my requirement ...I have the widgets and I want users to customize those widgets ..How do I do that ..How can I save the user's customization ?
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Re: PHP CODE HELP
If you are using 3rd party widgets, I think that their documentation would be more helpful to you than general concepts, as you don't seem to be understanding them. o.O
Re: PHP CODE HELP
I m not using 3 rd party widgets.... I just want to know how can a user when he logs on to my webpage can customize the webpage as per his preferences . To be very precise what I need . Example : In gmail we are able to select a theme as per our choice . Some webpages offer customization like select your own colours for widgets , own colour for back ground ...I nedd exactly this .. Please help .
It will be appreciated .
Thanks
It will be appreciated .
Thanks
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Re: PHP CODE HELP
Are you doing pre-made themes that you define, or allowing users to define their own color schemes? If you are using pre-made themes, give them a simple selection of URLs that apply the theme and ask them to confirm their selection (or not... up to you). If you are allowing them to select their own colors, determine how you want to group your colors (i.e., text as one group, borders as another), and then give them a form to choose the colors. Upon submission, save those settings and generate their CSS dynamically.