Reputation: 21629
I have two Joomla websites of related organisations: J1 and J2. How can I load the content and title of an article which is stored in J2 to show in J1?
I can access configuration.php of J2 and get its database connection details or type it myself.
Also this probably would have to be some kind of plug-in where one just type: {getExternalArticle=id} within the body of any content in J1.
Any suggestions for the best approach?
Upvotes: 0
Views: 491
Reputation: 4866
See this for reference: http://docs.joomla.org/Connecting_to_an_external_database
Creating a content plugin: http://docs.joomla.org/J1.5:Creating_a_content_plugin
This is specific to the old Joomla 1.5 and there are a few differences in 2.5 and the above is the use of JFields instead of JParameters in xml declaration and in the name of the events. You can see more details on this here: http://www.inmotionhosting.com/support/edu/joomla-25/create-plugin
This might be useful too: How to get article text by article ID in Joomla?
Upvotes: 2
Reputation: 9778
You might want considered writing a program (perhaps in PHP) that could run as a CRON job and with authorization credentials to access the MySQL TABLE(s) needed from the other site to pull in those Joomla articles and have it populate the website so it could be displayed properly. I am making an assumption that one website has updates and you want them display on the other website, so I would look as a method for one site to feed another.
Upvotes: 1