Hi,
It seems I am not going to solve my problems just by using Extra Fields and from what I read I need to write a K2 plugin. I am a php programmer so that is not a problem, but I need some documentation on how to set things up.
I have downloaded the K2 Plugin Example, but some things are still not clear. For example, the class definition. Is this the correct syntax?
Then I see the following functions / triggers:
I can't find any trigger names I can use when the user is submitting a front-end form. I need to do stuff like generating a title The item is for an event and contains a date and time and a description that might be empty. I need a generated title so it will give enough information for the admins when they check the list of items.
Also, the Publish Down date should be the event date + 7 days, the category is hidden (set in the menu item to add an event).
I want control of those basic joomla fields and not bother the user with that. I assume that is only possible in an OnSave event function. The plugin description mentions 6 events available for editing. But why can I not find any info on this?
Next, what is the DOM so I can access the item's properties, read extra fields from the database and save them in the item (or just on the screen) before editing its values and reading them back for writing into the database on Save?
Thanks!!
Jerry
It seems I am not going to solve my problems just by using Extra Fields and from what I read I need to write a K2 plugin. I am a php programmer so that is not a problem, but I need some documentation on how to set things up.
I have downloaded the K2 Plugin Example, but some things are still not clear. For example, the class definition. Is this the correct syntax?
class plgK2MyPluginName extends K2Plugin {
function plgK2MyPluginName( & $subject, $params) {
parent::__construct($subject, $params);
}
}Then I see the following functions / triggers:
onK2PrepareContent
onK2AfterDisplay
onK2BeforeDisplay
onK2AfterDisplayTitle
onK2BeforeDisplayContent
onK2AfterDisplayContent
onK2CategoryDisplay
onK2UserDisplayI can't find any trigger names I can use when the user is submitting a front-end form. I need to do stuff like generating a title The item is for an event and contains a date and time and a description that might be empty. I need a generated title so it will give enough information for the admins when they check the list of items.
Also, the Publish Down date should be the event date + 7 days, the category is hidden (set in the menu item to add an event).
I want control of those basic joomla fields and not bother the user with that. I assume that is only possible in an OnSave event function. The plugin description mentions 6 events available for editing. But why can I not find any info on this?
Next, what is the DOM so I can access the item's properties, read extra fields from the database and save them in the item (or just on the screen) before editing its values and reading them back for writing into the database on Save?
Thanks!!
Jerry