Sharing articles across multiple Joomla! sites

458 views
Skip to first unread message

Merak

unread,
Jul 13, 2012, 3:00:03 PM7/13/12
to joomla-de...@googlegroups.com
What should I do to share articles from a same category across multiple, separate Joomla! websites but host on the same DataBase (different tablepréfix)?
I want to be able to write articles of a category on one site and allow my other site to display all the articles of this category (to avoid duplicates). 


Ps: There is too many articles to call them one by one into many different modules. (Most content is different but there is some that is the same.)

Merak

unread,
Jul 13, 2012, 3:02:29 PM7/13/12
to joomla-de...@googlegroups.com
I tried to modify a native joomla module that do the trick using the internal tables, by changing the  $com_path = 
but i am getting a Fatal error.
Native code: $com_path = JPATH_SITE.'/components/com_content/'; 
My try : $com_path = '/homez.420/kmxsiksf/rsc/components/com_content/helpers/route.php';

Lemings

unread,
Jul 13, 2012, 4:15:18 PM7/13/12
to joomla-de...@googlegroups.com
Why do not You try using one of these and modiffy according Your needs?

http://extensions.joomla.org/extensions/core-enhancements/multiple-sites

For hosting multiple sites in one db You need to modify table prefix on fly, because normally table names in queries are written like #__table_name, where #_ is replaced with prefix defined in configuration.php

Table prefix is set in database object constructor and after #__ is replaced with actual prefix. To get something from table with different prefix You need to override something in database object. So I advice to look for existing solutions.

Merak

unread,
Jul 15, 2012, 10:13:11 AM7/15/12
to joomla-de...@googlegroups.com
Hi!
Thanks your great reply!

I did spend some time before posting trying to find out about these extensions. 2 of them would fit but one seems to be free but is not, the second need to reinstall both website : not an option.

I am not a programmer (at all!) but I do not understand why can't we modify a native joomla module articles_category to search in external table. There should be a path problem since through Jumy module I can call single article one by one with php code (what I need is all articles of several categorie about 100 articles...)

Any idea how to modify the native module articles_category ? Do you know how to modify its path ? (you can see my try above)


Have a good day!

Sorry for the delay of reply, I did post it before but i lost everything (bug).

elin

unread,
Jul 15, 2012, 12:53:05 PM7/15/12
to joomla-de...@googlegroups.com
The articles modules are designed to work with com_content and #__content not with any other table.  It would certainly be possible to create a custom solution for your situation but it might not be worth the effort, it has to be up to you.

You might want to start following the multisite work group discussion on the CMS mailing list.

Elin 

Merak

unread,
Jul 17, 2012, 12:34:01 PM7/17/12
to joomla-de...@googlegroups.com
Hi Elin!

Thank you so much for your reply!

You gave me the first piece of information, I was looking for that one since a while! So I ll follow the "multisite work group discussion" . And as I really stick to the idea I ll try to investigate about these com_content and #__content function. (extensions doesn't fit to what I need)
I still do not understand why would it be so complicate to change the path. Would it require to change more than 5 lines of the native code?

Thanks a lot, have a good day!

Giom
Reply all
Reply to author
Forward
0 new messages