How to embed Com_content into other components

Your code modifications and patches you want to share with others.
Locked
kooroach
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sat May 22, 2010 11:45 pm

How to embed Com_content into other components

Post by kooroach » Wed Sep 15, 2010 7:40 am

I was wondering if anyone could help me with this: I have an event booking system installed on my joomla 1.5, and I want to have a new article, automatically generated, for each event created in the back-on. In other word, I want a new article to be generated each time I create a new event and use that article for the description, etc. Does anyone know how to call that function in com_content, or is there any other way to just add a new row into the article table?

Any help would be highly appreciated...

User avatar
ooffick
Joomla! Master
Joomla! Master
Posts: 11403
Joined: Thu Jul 17, 2008 3:10 pm
Location: Ireland
Contact:

Re: How to embed Com_content into other components

Post by ooffick » Wed Sep 15, 2010 9:13 am

Hi,

Depending on the booking system you might be able to use a plugin to listen to the trigger when a new event is created. In that way you could then create a new article in the plugin.

Olaf
Olaf Offick - Global Moderator
learnskills.org

kooroach
Joomla! Apprentice
Joomla! Apprentice
Posts: 6
Joined: Sat May 22, 2010 11:45 pm

Re: How to embed Com_content into other components

Post by kooroach » Wed Sep 15, 2010 2:43 pm

Hi Olaf,

Thanks for your reply. Actually, I use "Event Booking" component. Would you please explain it a bit more how to trigger the plugin to create a new article ... and also do you know of any plugin that do this ?

Thanks,
Kourosh

User avatar
ooffick
Joomla! Master
Joomla! Master
Posts: 11403
Joined: Thu Jul 17, 2008 3:10 pm
Location: Ireland
Contact:

Re: How to embed Com_content into other components

Post by ooffick » Sun Sep 19, 2010 2:46 pm

To learn how to create a plugin you can learn here:
http://developer.joomla.org/tutorials/1 ... lugin.html

To learn how to trigger this plugin, see this tutorial (in case it is not directly supported by that booking component):
http://docs.joomla.org/Supporting_plugi ... _component

To create the article, you will need to insert an entry into the jos_content table.

Olaf
Olaf Offick - Global Moderator
learnskills.org


Locked

Return to “Core Hacks and Patches”