Egnarts94 / JEM-Project

JEM - an Event Manager for Joomla
0 stars 2 forks source link

JEM in Joomla 3 with joomla's custom fields #86

Open jojo12 opened 4 years ago

jojo12 commented 4 years ago

Hi, I tried to implement joomla's custom fields into JEM. And I succeeded in some (first) way. :-) 1) For the backend I inserted in /helpers/helper.php in addSubmenu: ` if (JComponentHelper::isEnabled('com_fields') && JComponentHelper::getParams('com_jem')->get('custom_fieldsenable', '1')) { JHtmlSidebar::addEntry( JText::('JGLOBAL_FIELDS'), 'index.php?option=com_fields&context=com_jem.event', $vName == 'fields.fields' );

        JHtmlSidebar::addEntry(
            JText::_('JGLOBAL_FIELD_GROUPS'),
            'index.php?option=com_fields&view=groups&context=com_jem.event',
            $vName == 'fields.groups'
        );
    }`

2) Then I added in access.xml the code you find here and in the <section name="component"> <action name="core.edit.value" title="JACTION_EDITVALUE" description="JACTION_EDITVALUE_COMPONENT_DESC" />

3) in the config.xml I added: ` <fieldset name="integration" label="JGLOBAL_INTEGRATION_LABEL" description="COM_JEM_CONFIG_INTEGRATION_SETTINGS_DESC"

<field name="custom_fields_enable" type="radio" label="JGLOBAL_CUSTOM_FIELDS_ENABLE_LABEL" description="JGLOBAL_CUSTOM_FIELDS_ENABLE_DESC" default="0" class="btn-group btn-group-yesno"

`

With that I can enable/disable integration of joomla custom fields in JEM (in Options) In backend I see now in the submenu "Fields" and "Fieldgroups".

I created a new field and saved. Then I created a new event. Under the Description field there's a button "Fields". Clicking on it I can choose a (this) custom field in a modal window. When I look in Frontend, I see in the description content the content of my created custom field.

I tried with text, calendar. Will try with more.

jojo12 commented 4 years ago

It only works in event. I see the view.html.php of event has onContentPrepare. When I look into view.html.php of venue there's no onContentPrepare.

jojo12 commented 4 years ago

My question: If I proceed like described, I get a field-button to insert a field in the description, But "how to do" for the field tab above the description in the editevent-view?