Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2010-09-03 08:18:44

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 580

Share data between two Textpattern Installations

In my job at a school I maintain two sites:

1. An externally hosted website for parents (using APACHE)
2. An internally hosted Intranet for pupils and staff (using IIS)

Although the sites use different layouts and contain different information they also share a lot of the same data such as calendars and event listings.

Is there anyway this information can be shared between the two without having to enter it twice? I did think about mocking pages up on the website for the Intranet but it could cause issues if a member of staff logs into the Intranet remotely (having to reenter log-in details etc). I could possibly use an iframe but that could potentially become messy if the content exceeds its width, height.

Offline

#2 2010-09-03 12:45:22

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,254
Website GitHub Mastodon Twitter

Re: Share data between two Textpattern Installations

You can use rah_external_output in the ‘external’ site and add

<txp:php> include($DOCUMENT_ROOT . "http://yourexternalsite/?rah_external_output=template1"); </txp:php> in the Intranet one.

Caveat. The content will not be searchable. Solution: use a search facility for the two installs.

Sample: www.neme.org (fetches info from 2 other txp installs and a punbb forum)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2010-09-03 14:22:49

Algaris
Member
From: England
Registered: 2006-01-27
Posts: 580

Re: Share data between two Textpattern Installations

Thank you colak, that’s very interesting (and rather exciting, the TXP community never ceases to amaze me).

So in affect if I wanted to output a smd_calendar from the website to the intranet I can just assign the code as a snipit / template and then ‘include’ it in the section I want.

Last edited by Algaris (2010-09-03 14:38:52)

Offline

#4 2010-09-03 19:17:55

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,254
Website GitHub Mastodon Twitter

Re: Share data between two Textpattern Installations

Algaris wrote:

So in affect if I wanted to output a smd_calendar from the website to the intranet I can just assign the code as a snipit / template and then ‘include’ it in the section I want.

yep:)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

Board footer

Powered by FluxBB