SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Zealot kosh's Avatar
    Join Date
    Aug 2000
    Location
    USA
    Posts
    122
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Examples of a default setting with exceptions?

    I need to create an interface with many regions & partners to choose from. If there are 100 regions and 100 partners, then any given region or partner will need to be changed 100 times to be comprehensive. For example, if a partner named CompanyX needs to have its settings revised, those changes will need to occur 100 times -- once for each region.

    The problem is that users may not wish to go through 100 regions to set up a partner. So what I need to do is set up a default. CompanyX would have one default setting that worked for all regions, and then they could specify any region that was an exception to the default.

    OK? So here's the question. Can anyone point me to an interface that currently uses the default/exceptions system? I need a couple examples of what such a GUI might look like.
    Outshine - geek blog & free phpBB mods
    Publisher Database - tools & forums for writers
    What Do Women Want? - dating advice for men, from women

  2. #2
    SitePoint Enthusiast
    Join Date
    Jul 2007
    Location
    USA
    Posts
    53
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello kosh,
    I am not 100% sure this will answer your question, but from my perspective, you would be best served through a template system, and I don't mean web templates from Template Monster. What I mean is you can have CompanyX enter their revised settings, and that data is stored once as a file. Then on each of the 100 regions, the data is called up from that single source.

    For example, in PHP I create an article page based on the author's last name, such as /home/user/public_html/articles/kosh.php. Then on my main page /home/user/public_html/index.php I make a call to bring up the article I want by using the author's last name as a PHP variable. I passed the variable in the URL. So on my index.php page (or any other page I wanted to insert this data) the PHP code looks like this:

    PHP Code:
    <?php 
    # GRAB THE VARIABLES FROM THE URL
    $name $_GET['name'];
    if (
    $name == 0)
    $name = default;
    ?>

    <html>
    <body>

    blah, blah, blah

    <?php include("/home/user/public_html/articles/$name.php"); ?>

    </body>
    </html>
    This is just one idea. Another is to use a database and make SQL queries to pull the data you want, customized for each of the 100 regions. There are similar methods to accomplish the same thing with ASP, Coldfusion, or another language of your choice.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •