Forums / General Questions / Two websites from the same database.

Two websites from the same database.

Locked

Started by bigjoed on 12 Sep 2007, 4:57 PM · Views: 1,835

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
12 Sep 2007, 4:57 PM
#1
bigjoed avatar

bigjoed

Zen Follower

Join Date:
Apr 2006
Location:
Fort Bragg, North Carolina
Posts:
152
Plugin Contributions:
0

Two websites from the same database.

I'm building a website on my server before I publish it. I have two flash (.swf) files that I'm using on my template. My intention is to give my visitors the option to go to either my regular website or my flash website. I'm using the exact same files on two different folders. On the second folder, I changed the tpl_main_page and the tpl_header files to therefore not use the .swf files and deleted the admin folder. I then changed the configure.php file to reflect the same database but the different folder.

What I would like to do is to have a sidebox in which to add a link that will redirect the visitor to the other folder. For example, on the regular site, I'd like to add an option to send to the flash site and viceversa. My problem is that I don't want two different links, one for the regular site and one for the flash site on the same site.

I probably need some type of code that will recognize wich folder the visitor is in, in order to not show a link to that same folder. If anybody can help me with this I will be extremely grateful.

Thanks

12 Sep 2007, 6:10 PM
#2
gjh42 avatar

gjh42

Black Belt

Join Date:
Jul 2005
Location:
Upstate NY
Posts:
21,874
Plugin Contributions:
8

Re: Two websites from the same database.

I think you're going overboard and making it more complicated than it needs to be.

If the difference between the sites is the flash, you could collect an input from the customer, save it to a global variable, and show either the flash or the alternate static content based on that variable.

13 Sep 2007, 8:31 AM
#3
bigjoed avatar

bigjoed

Zen Follower

Join Date:
Apr 2006
Location:
Fort Bragg, North Carolina
Posts:
152
Plugin Contributions:
0

Re: Two websites from the same database.

Thanks for your reply. Could you be more specific? I'm not very familiar with php. I can work with the basics, installing add ons and making some changes here and there but what you just explained it is out of my league.

Thanks for your time.

13 Sep 2007, 1:10 PM
#4
yellow1912 avatar

yellow1912

Totally Zenned

Join Date:
Oct 2006
Posts:
5,422
Plugin Contributions:
0

Re: Two websites from the same database.

I'm against Flash since:

  1. It's slow.
  2. It's not available on many computers.
  3. Search engine can not read it.

You can have all Flash effects by using gif image + javascript. Now if you still want to use Flash, you can do what gjh42 suggested:

  1. You can check if Flash is available on the customer's, or you can ask them if they want to.
  2. You save that choice to cookie or session
  3. Then, for example, you have 2 versions of the banner, you can check like this:
    if($_SESSION['use_flash'])
    // do something
    else
    // do something

I no longer provide installation support on forum for all my modules. However, if there are real bugs with the modules please feel free to contact me

14 Sep 2007, 5:44 AM
#5
bigjoed avatar

bigjoed

Zen Follower

Join Date:
Apr 2006
Location:
Fort Bragg, North Carolina
Posts:
152
Plugin Contributions:
0

Re: Two websites from the same database.

Thanks, I'll work on this.

14 Sep 2007, 2:04 PM
#6
bigjoed avatar

bigjoed

Zen Follower

Join Date:
Apr 2006
Location:
Fort Bragg, North Carolina
Posts:
152
Plugin Contributions:
0

Re: Two websites from the same database.

Again, I want to thank you for your reply. I think I can figure out step three from your instructions. Can you help me and give me a little more information about steps 1 & 2.

Thanks