Notifications template

More
11 years 10 months ago #39231 by ggppdk
Replied by ggppdk on topic Notifications template
Hello,

it is possible to add a template-layout parameter for notifications that is similar to that found in relation field,

but now this is not available / implemented


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #39321 by brandonking
Replied by brandonking on topic Notifications template
I have changed some code to create "custom email notification" and works fine.

In com_flexicontent/model/parentclassitem.php:

I have added below codes in function sendNotificationEmails
Code:
if ( $params->get('custom_email_form') ) { $ce_title = $this->get('title'); $ce_view_link = JRoute::_( JURI::root(false).FlexicontentHelperRoute::getItemRoute($this->get('id'), $this->get('catid')) . $lang); $ce_edit_link = JRoute::_( JURI::root(false).'index.php?option=com_flexicontent&view='.FLEXI_ITEMVIEW.'&cid='.$this->get('catid').'&id='.$this->get('id').'&task=edit'); //subject if ( $params->get('body_title_notify_new') ) { $subject = $params->get('body_title_notify_new'); } //body if ( $params->get('body_text_notify_new') ) { $body = nl2br($params->get('body_text_notify_new')); $custom_email_search = array('[[ITEM_TITLE]]', '[[ITEM_LINK]]', '[[ITEM_EDIT_LINK]]'); $custom_email_replace = array($ce_title, $ce_view_link, $ce_edit_link); $body = str_replace($custom_email_search, $custom_email_replace, $body); } }

In config.xml:
I have added
Code:
<field name="custom_email_form" type="list" default="0" label="FLEXI_CUSTOM_EMAIL_FORM" description="FLEXI_CUSTOM_EMAIL_FORM_DESC" menu="hide"> <option value="0">FLEXI_NO</option> <option value="1">FLEXI_YES</option> </field> <field name="body_title_notify_new" type="text" default="" label="FLEXI_CUSTOM_EMAIL_TITLE" description="FLEXI_CUSTOM_EMAIL_TITLE_DESC" menu="hide" /> <field name="body_text_notify_new" type="textarea" rows="10" cols="40" default="" label="FLEXI_CUSTOM_EMAIL_BODY" description="FLEXI_CUSTOM_EMAIL_BODY_DESC" menu="hide" />

I know that they are not perfect codes but works fine.. :D
I really appreciate if you could modify and update.

Please Log in or Create an account to join the conversation.

More
11 years 10 months ago #39330 by ggppdk
Replied by ggppdk on topic Notifications template
Hello,

actually a more complete implementation is like the custom template parameter in relation field, ... which includes support for all needed replacements and also a replacements for "default behavior", so the code that will be used is similar to the way it was implemented in relation field

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
11 years 9 months ago #39383 by brandonking
Replied by brandonking on topic Notifications template
Hello,

I see that implementation in relation field would be more powerful and faster.

Suggestion:
1. Please consider creating separate tab for "custom notification template" in configuration.

2. Please consider adding "custom notification template" for notifying favored user.

3. Please consider adding params whether to send email in HTML format or Plain Text format.

Really appreciate, as always!!

Please Log in or Create an account to join the conversation.

More
11 years 9 months ago #39384 by ggppdk
Replied by ggppdk on topic Notifications template
Hello,

effectively,
-- what needs to be done is add a "template parameter" which will do replacements for all existing configuration options

-- this is rather small task,
but care must be taken that some data are not created without parameters being set so this must be changed too if adding this "template parameter"

-- but since, the content of notifications are configurable including a custom text, this can not be a priority for near future

see also:
About FLEXIcontent feature requests

Regards


-- Flexicontent is Free but involves a big effort on our part.
Like the our support? (for a bug-free FC, despite having a long list of functions) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing with a 5-star...

Please Log in or Create an account to join the conversation.

More
11 years 9 months ago #39386 by micker
Replied by micker on topic Notifications template
i think we can add more information in your article:
-a link to commercial forum part ;)

FLEXIcontent is Free but involves a very big effort on our part.
Like the our support? (for a bug-free FC, despite being huge extension) Like the features? Like the ongoing development and future commitment to FLEXIcontent?
-- Add your voice to the FLEXIcontent JED listing reviews. Thanks![/size]

Please Log in or Create an account to join the conversation.

Moderators: vistamediajoomlacornerggppdk
Time to create page: 0.323 seconds
Cookies user preferences
We use cookies to ensure you to get the best experience on our website. If you decline the use of cookies, this website may not function as expected.
Accept all
Decline all
Essential
These cookies are needed to make the website work correctly. You can not disable them.
Display
Accept
Analytics
Tools used to analyze the data to measure the effectiveness of a website and to understand how it works.
Google Analytics
Accept
Decline
Save