4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 change css
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
lukewalker
Junior WebHelper
Junior WebHelper


Joined: 15 Feb 2002
Posts: 1
Location: Braunschweig, Germany

PostPosted: Fri Feb 15, 2002 6:30 pm (22 years, 2 months ago) Reply with QuoteBack to Top

Morning everybody, oh the sun is shining Cool ,
I have a problem with a webpage. I have two designs and have asked over 20 people, which I should take. But 50% want the first and the others want the 2nd Design. So I search for a possibility to let the user interactively change his favorite design.
How can I realize this ?
Thanx for helping
LukeWalker
The Moon

________________________________
Here could be your advertisment
OfflineView User's ProfileFind all posts by lukewalkerSend Personal MessageSend emailVisit Poster's WebsiteICQ Number
Ben
Senior WebHelper
Senior WebHelper


Joined: 08 Jan 2002
Posts: 431
Location: Liverpool - UK

PostPosted: Fri Feb 15, 2002 9:03 pm (22 years, 2 months ago) Reply with QuoteBack to Top

It is possible but probably isnt all that easy to implement...

It's something I'v been thinking about doing too, but havent got around to having a fiddle yet Sad

________________________________
Ben Scott

Red and White Kop
OfflineView User's ProfileFind all posts by BenSend Personal MessageSend emailVisit Poster's Website
WebSketcher
WebHelper
WebHelper


Joined: 14 Jan 2002
Posts: 95
Location: Canada

PostPosted: Sat Feb 16, 2002 4:26 am (22 years, 2 months ago) Reply with QuoteBack to Top

Check this free Perl script :

Quote:
http://www.hotscripts.com/Detailed/2616.html


Check here for PHP scripts :

Quote:
http://www.devthreads.com/core/Languages/PHP/Scripts/Content_Management/more2.shtml
OfflineView User's ProfileFind all posts by WebSketcherSend Personal MessageSend email
Ben
Senior WebHelper
Senior WebHelper


Joined: 08 Jan 2002
Posts: 431
Location: Liverpool - UK

PostPosted: Sat Feb 16, 2002 2:26 pm (22 years, 2 months ago) Reply with QuoteBack to Top

Quality, I was gonna have a go at writing my own but these work perfectly Smile

Cheers

________________________________
Ben Scott

Red and White Kop
OfflineView User's ProfileFind all posts by BenSend Personal MessageSend emailVisit Poster's Website
WebSketcher
WebHelper
WebHelper


Joined: 14 Jan 2002
Posts: 95
Location: Canada

PostPosted: Tue Feb 19, 2002 6:14 pm (22 years, 2 months ago) Reply with QuoteBack to Top

great Ben Wink Very Happy
OfflineView User's ProfileFind all posts by WebSketcherSend Personal MessageSend email
[[[blazing-ice]]]
Junior WebHelper
Junior WebHelper


Joined: 22 Feb 2002
Posts: 3
Location: Singapore

PostPosted: Fri Feb 22, 2002 4:50 pm (22 years, 1 month ago) Reply with QuoteBack to Top

I have 2 possible solutions for your problem. Both of them require the knowledge of PHP.

First solution:

This is the more "flexible" way, but it requires extensive PHP and Sql integration.

The method:

Let's say you have a starting page where you allow the user to choose their preferred design, and load the chosen design when the user clicks "Enter site" or something like that.

You would have 2 folders, each folder contain either one of your designs, and you would use PHP to retrieve all, or most of the information within the site from the Sql database, so it saves you a lot of trouble updating 2 designs when you just have one thing to update.

However, it requires extensive use of PHP and you would need to spend some time writing the scripts out yourself.

Pros:


    - Very customizable site designs (the designs can be widely different)
    - Fast updating of content


Cons:


    - Need to write many scripts for each of your designs, to load your data from the database and show it on the screen.


Second solution:

The second solution assumes that all, or most, of your page display information (for example locations of <div> tags, form field styles) are stored in a separate CSS file.

The method:

You will have only ONE basic website coding, but more than one CSS files (from which you can load and extract all your display information for the page from), as well a start page where the user selects which design he wants.

When the user clicks enter, the resulting URL will be slightly different at the end depending on the design he has chosen. For example,

If he has chosen design 1, the URL may look like this:
http://somedomain.com/somefile.php?design=d1

Or if he has chosen design 2, the URL may look like this:
http://somedomain.com/somefile.php?design=d2

In other words, the page variables (or whatever you call it) will have different values. The above URLs pertain only to the GET method. The page variables will not be seen if you use the POST method.

So it's all easy now. Instead of your normal <link....> tag which you use to load your CSS file:

Code:
<link rel='stylesheet' href='d1.css'>


..You will now have this coding instead:

Code:
<link rel='stylesheet' href='<?php echo $design; ?>.css'>


So this example assumes that you have 2 files, d1.css and d2.css, where you store two different sets of colour/page display information and therefore you have two different designs/colour schemes. The design will load according to the user's preference.

-----------------------

So those are my two solutions to your problem posted. Hope that this post I made will help you.

You can e-mail me at mak@a-cro.net to ask for further help.

________________________________
The ice continues to blaze.
And thus, life goes on.
OfflineView User's ProfileFind all posts by [[[blazing-ice]]]Send Personal MessageSend emailVisit Poster's WebsiteMSN Messenger
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot edit your posts in this forum.
You cannot delete your posts in this forum.
You cannot vote in polls in this forum.


Page generation time: 0.20584 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme