Welcome, Guest. Please login or register.
Did you miss your activation email?
February 12, 2012, 05:55:38 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
149667 Posts in 21100 Topics by 7538 Members
Latest Member: ionline
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: shared database  (Read 898 times)
styrbaek

Offline Offline

Posts: 8


« on: December 30, 2007, 08:05:17 AM »

Is it possible to share a database with multiple websites.
Example:
I would like to have the same event in the events calender on 3 websites
Logged
ruebenwurzel
WebsiteBaker Org e.V.

Offline Offline

Posts: 7663



WWW
« Reply #1 on: December 30, 2007, 08:41:54 AM »

Hello,

you cannot use one event calendar on three different WB installations, cause the database connects are for every WB installation are different.

Possible solutions:
1. Try using wrapper to wrap the event calender from one page in the other pages.
2. Try using a code section. Open their first a new database connection to the WB Database where eventcalendar is installed, then use a adapted code from view.php of event calendar to get the infos from the event calendar database, then close the opened database connection and reopen the database connection from your current page. This way you only have one Event-Calendar, where you can add events and in your case two other pages where only this events are displayed. This is just theoretical, for the coding part you have to look yourself and i'm not shure if it really works.

Matthias
Logged
marathoner

Offline Offline

Posts: 495


« Reply #2 on: December 31, 2007, 07:26:49 PM »

I have two different sites that use the same data for calendar. I used a blend of both approaches that ruebenwurzel mentioned.

I maintain the calendar on site A and display it there in two different formats (calendar view and list view). Then I created a hidden page on with a code section on site A to extract the information in a list view but slightly different way and then use an inline wrapper on site B to display it there. Here are the links if you want to check out the event calendar's on both.
Site A: www.secondsoletotal sports.com
Site B: www.columbusroadrun ners.org
Logged
styrbaek

Offline Offline

Posts: 8


« Reply #3 on: January 02, 2008, 07:49:39 AM »

Thanks.
I have the calendar running on a side made in asp, and use the wrappermodule to show it on mit WB sites, but I don't want the iframe.
I have never used the inlinewrapper, but it looks like the solution i am looking fore.

Hope you understand my bad english embarassed

Logged
marathoner

Offline Offline

Posts: 495


« Reply #4 on: January 02, 2008, 02:09:18 PM »

Yes, I use an inline wrapper.

The other that you might want to do is simply write a function that extracts your calendar data and then call that function from a code section. This allows it to be reusable in other pages, too.
Logged
kweitzel
Forum administrator
*****
Offline Offline

Posts: 6820


WWW
« Reply #5 on: January 02, 2008, 06:51:37 PM »

For that last option you could adapt the anynews snippet ... at the end it is not very complicated if all installations are in the same database but with different table prefixes.

cheers

Klaus
Logged

WebsiteBaker Org e.V. - for WebsiteBaker

Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!