Notifications
Clear all

Paid Addons Support Forum Only

Please note, that here we only support Paid Addons issues and questions.

gVectors Support staff works from 6am to 6pm (GMT+0)

All questions related to wpForo and wpDiscuz free plugins should be asked in the corresponding plugin support forum:

 

wpDiscuz Support Forum wpForo Support Forum

Is there no "text" html editor for editing the email notifications?


Arien Freymuth
Posts: 7
Customer
Topic starter
(@arien-freymuth)
Member
Joined: 2 months ago

Hi,

I was looking to throw some nice html/css design into the Private Messages email notification, but the edit box for the addon doesn't show an ability to switch between "Visual" and "Text" as it does with the regular email notifications. Is there a reason for this or a switch I can enable somewhere? 

I want to create a standardized email notification template for all email types, but I'm running into an issue because of this missing feature.

 The normal options:

email edit switch

Private messages:

private messages template

Please let me know if I'm unable to make css/html edits to the Private Message email notification.

Thanks!

6 Replies
Astghik
Posts: 4787
Admin
(@astghik)
Support Team
Joined: 3 years ago

@arien-freymuth,

We'll add this in the next version. If you need to get it resolved ASAp, please follow the steps below:

  1. Open the options.php file in the  wp-content/plugins/wpforo-private-messages/includes/ folder
  2. Go to line 5
  3. Replace $wpe_args array with the following one:
    $wpe_args = array(
    'teeny' => false,
    'media_buttons' => true,
    'textarea_rows' => 8,
    'tinymce' => array('wpautop' => false),
    'quicktags' => array('buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close'),
    'default_editor' => 'tinymce',
    'textarea_name' => 'wpforopm_options[new_pm_notification_email_message]'
    );

How it looks currently:

image

How it should look after you make the changes:

image

The changes will be included in the next version of the addon. 

Reply
5 Replies
Arien Freymuth
Customer
(@arien-freymuth)
Joined: 2 months ago

Member
Posts: 7

@astghik

 

Hi Astghik,
Applying the code your provided works, however, all of my styling and design get's stripped out when I hit "update" to save it. This doesn't happen to the normal email templates, just the Private Messages add-on. 

Is there any way I can fix this or am I stuck waiting for the next version?

Edit: I actually just checked and it looks like even in the normal email editor, I can't use tables to organize the shortcode information at all. 

Reply
Astghik
Admin
(@astghik)
Joined: 3 years ago

Support Team
Posts: 4787

@arien-freymuth,

Please navigate to Dashboard > Forums > Settings > Features Tab and disable the "Enable Options Cache" option.

Reply
Arien Freymuth
Customer
(@arien-freymuth)
Joined: 2 months ago

Member
Posts: 7

@astghik

Hi, Astghik. I flipped off that switch, but it turns the code is still stripped. Table html is replaced with paragraph tags.

Is ther any plan to enable <table><tr><td> tags in the editor? 

It makes sense to me to enable the forum owner to extend branding capability to the notifications, but as it stands, we are basically limited to <p> tags

Reply
Astghik
Admin
(@astghik)
Joined: 3 years ago

Support Team
Posts: 4787

@arien-freymuth,

If there are some tags that are not allowed you should use the hook code. Below is provided with an example of the <img> tag. The same you should add for the <table><tr><td> tag

add_filter('wpforo_kses_allowed_html_email', 'custom_wpforo_kses_allowed_html_email');
function custom_wpforo_kses_allowed_html_email($allowed_html){
if( !wpfkey($allowed_html, 'img') ) $allowed_html['img'] = array();
if( !wpfkey($allowed_html['img'], 'style') ) $allowed_html['img']['style'] = array();
if( !wpfkey($allowed_html['img'], 'src') ) $allowed_html['img']['src'] = array();
if( !wpfkey($allowed_html['img'], 'width') ) $allowed_html['img']['width'] = array();
if( !wpfkey($allowed_html['img'], 'height') ) $allowed_html['img']['height'] = array();
if( !wpfkey($allowed_html['img'], 'alt') ) $allowed_html['img']['alt'] = array();
return $allowed_html;
}

How to Easily Add Custom Code in WordPress (without Breaking Your Site)

Reply
Arien Freymuth
Customer
(@arien-freymuth)
Joined: 2 months ago

Member
Posts: 7

@astghik

Thanks Astghik!
Our last plugin update overwrote the earlier code you provided that let us customize the Add-on html notification. It looks like it wasn't included in the update. Will that be in the next one then?

Reply
Share:
Scroll to top