Advertisement:

Author Topic: Email Template Editor  (Read 34788 times)

Offline marielle

  • Newbie
  • *
  • Posts: 8
Re: Email Template Editor
« Reply #40 on: July 26, 2011, 07:22:43 AM »
This is great! Now all I need is a PM template creator.
As a workaround we're using the warning system for that purpose (with 0 warning points for a non-warning). Not ideal, but it does the trick.

Offline treehugger

  • Jr. Member
  • **
  • Posts: 249
  • Gender: Female
Re: Email Template Editor
« Reply #41 on: August 08, 2011, 01:43:56 PM »
Am tidying my Admin.php file by manually adding mod changes to it and I need to make the following change:

Code: [Select]
Find: [Select]
'profile' => array($txt['custom_profile_shorttitle'], 'enabled' => in_array('cp', $context['admin_features'])),
),
),
Add After: [Select]

// Labradoodle-360; Email Template Editor
'emailtemplates' => array(
'label' => $txt['email_template_editor'],
'file' => 'EmailTemplateEditor.php',
'function' => 'ModifyEmailTemplates',
'icon' => 'application_view_tile.png',
),
// End Labradoodle-360; Email Template Editor

I assume that means drop the email editor code in BEFORE   'profile' => array etc. which would give me

Code: [Select]
),
'featuresettings' => array(
'label' => $txt['modSettings_title'],
'file' => 'ManageSettings.php',
'function' => 'ModifyFeatureSettings',
'icon' => 'features.gif',
'subsections' => array(
'basic' => array($txt['mods_cat_features']),
'layout' => array($txt['mods_cat_layout']),
'karma' => array($txt['karma'], 'enabled' => in_array('k', $context['admin_features'])),
'sig' => array($txt['signature_settings_short']),
// Labradoodle-360; Email Template Editor
'emailtemplates' => array(
'label' => $txt['email_template_editor'],
'file' => 'EmailTemplateEditor.php',
'function' => 'ModifyEmailTemplates',
'icon' => 'application_view_tile.png',
),
// End Labradoodle-360; Email Template Editor
'profile' => array($txt['custom_profile_shorttitle'], 'enabled' => in_array('cp', $context['admin_features'])),
),
),
'securitysettings' => array(
'label' => $txt['admin_security_moderation'],
'file' => 'ManageSettings.php',
'function' => 'ModifySecuritySettings',
'icon' => 'security.gif',
'subsections' => array(
'general' => array($txt['mods_cat_security_general']),
'spam' => array($txt['antispam_title']),
'moderation' => array($txt['moderation_settings_short'], 'enabled' => substr($modSettings['warning_settings'], 0, 1) == 1),
),
),

Is that really right, or should it go in AFTER  'profile' => array etc. please?

Online Labradoodle-360

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,985
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: Email Template Editor
« Reply #42 on: August 08, 2011, 02:38:07 PM »
You add
Code: [Select]
// Labradoodle-360; Email Template Editor
'emailtemplates' => array(
'label' => $txt['email_template_editor'],
'file' => 'EmailTemplateEditor.php',
'function' => 'ModifyEmailTemplates',
'icon' => 'application_view_tile.png',
),
// End Labradoodle-360; Email Template Editor
Right after
Code: [Select]
'profile' => array($txt['custom_profile_shorttitle'], 'enabled' => in_array('cp', $context['admin_features'])),
),
),
Sorry for the confusion, hope this helps!
Former SMF Developer
My Modifications

Offline treehugger

  • Jr. Member
  • **
  • Posts: 249
  • Gender: Female
Re: Email Template Editor
« Reply #43 on: August 08, 2011, 02:48:27 PM »
Thank you for your quick reply Labradoodle -360. :)

I confuse easily and some mod writers say Before means After and other say After means After and guessing by deciding whether something 'looks' right doesn't always work - not for me anyway. ;D

Online Labradoodle-360

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,985
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: Email Template Editor
« Reply #44 on: August 08, 2011, 02:53:28 PM »
Not a problem treehugger.

And actually, if you follow the parser it's always "after" if it says "after" and same for before, the confusion is with the actual XML as it's reverse, search for "1" and add "2" BEFORE 1.

Enjoy!
Former SMF Developer
My Modifications

Offline treehugger

  • Jr. Member
  • **
  • Posts: 249
  • Gender: Female
Re: Email Template Editor
« Reply #45 on: August 08, 2011, 03:54:48 PM »
 :-[ :-[ :-[ It's taken me about three years to finally train myself to remember that Before means After -  :'( no wonder my mods are causing havoc!!

Online Labradoodle-360

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,985
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: Email Template Editor
« Reply #46 on: August 08, 2011, 03:55:37 PM »
Sorry to hear that, it does get quite confusing sometimes. But just remember the XML is backwards of what it sounds like, and the package parser parses it correctly.
Former SMF Developer
My Modifications

Offline dddphoto

  • Semi-Newbie
  • *
  • Posts: 11
Re: Email Template Editor
« Reply #47 on: October 10, 2011, 09:23:24 AM »
When will this be able to work on ver 2.0.1?

Online Labradoodle-360

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,985
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: Email Template Editor
« Reply #48 on: October 10, 2011, 02:34:19 PM »
This should definitely work with 2.0.1 out of the box...using version emulate.
Former SMF Developer
My Modifications

Offline dddphoto

  • Semi-Newbie
  • *
  • Posts: 11
Re: Email Template Editor
« Reply #49 on: October 10, 2011, 06:18:03 PM »
The auto loader won't work and when I go to parse the manual download instructions it says that it isn't compatible with this version. Not sure what you mean by version emulate.

Offline supercar1000

  • Newbie
  • *
  • Posts: 4
Re: Email Template Editor
« Reply #50 on: November 23, 2011, 03:50:32 AM »
Are you planning to include the HTML feature? Would be very useful...

Online Labradoodle-360

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,985
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: Email Template Editor
« Reply #51 on: November 23, 2011, 09:58:12 AM »
Possibly, the HTML formatting allowed in emails is limited, and it'd be tough to control.
Former SMF Developer
My Modifications

Offline BaghdadGhost

  • Jr. Member
  • **
  • Posts: 386
  • Gender: Male
Re: Email Template Editor
« Reply #52 on: January 12, 2012, 05:37:15 AM »
Hi all,

I am on smf 2.0.2 now

after emulating and installing without errors. when trying to access the set up option of this mod I get this error


Fatal error: Cannot redeclare template_add() (previously declared in /Themes/default/AutoRespond.template.php:18) in /Themes/default/EmailTemplateEditor.template.php on line 188

its not urgent but any help appreciated.



Online Labradoodle-360

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,985
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: Email Template Editor
« Reply #53 on: January 12, 2012, 11:24:07 AM »
Open ./Sources/EmailTemplateEditor.php
Code: (Find) [Select]
$context['sub_template'] = 'add';
Code: (Replace) [Select]
$context['sub_template'] = 'ete_add';
Open ./Themes/default/EmailTemplateEditor.template.php
Code: (Find) [Select]
function template_add()
Code: (Replace) [Select]
function template_ete_add()Try that.
Former SMF Developer
My Modifications

Offline BaghdadGhost

  • Jr. Member
  • **
  • Posts: 386
  • Gender: Male
Re: Email Template Editor
« Reply #54 on: January 12, 2012, 11:34:36 AM »
thank you so much for the fast respond. that fixed the issue.

actually I forgot to mention earlier that I had it installed on my test forum (no mods installed) and all went well. but this forum was installed 2.0.2 right away unlike my active forum which was 2.0.1 then patched to 2.0.2

I even thought that it could be another mod installed and causing the conflict, therefore I uninstalled PM new members, yet did not fix the problem earlier. which made me wondering what is the real cause of it?

I mentioned the above to other members and mod author

thanks again

Online Labradoodle-360

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,985
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: Email Template Editor
« Reply #55 on: January 12, 2012, 11:39:32 AM »
The modification "AutoRespond" conflicts with Email Template Editor, apparently :)

Why? Because both of our modifications have "template_add"'s, which is dumb, function names should NOT be that generic. Whenever I get around to updating this modification, the problem will definitely be solved.
Former SMF Developer
My Modifications

Offline BaghdadGhost

  • Jr. Member
  • **
  • Posts: 386
  • Gender: Male
Re: Email Template Editor
« Reply #56 on: January 12, 2012, 11:41:56 AM »
aha never thought of this one which I have installed.

many thanks again

Online Labradoodle-360

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,985
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: Email Template Editor
« Reply #57 on: January 12, 2012, 11:56:00 AM »
Not a problem. :) Hope you enjoy it! I'll have to release an update soon...I was just looking at it yesterday and gosh is it OLD ;)
Former SMF Developer
My Modifications

Offline Dersim62

  • Semi-Newbie
  • *
  • Posts: 11
Re: Email Template Editor
« Reply #58 on: January 18, 2012, 09:19:47 AM »
I love it! Thank you a lot!

But one thing it doesnt work! I can not put a picture, like a logo, in the editor. I thing that the html is set off.
Please can you tell me how to fix it? Just a normal picture in the header of the Editor (For example a welcome email).

Online Labradoodle-360

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 11,985
  • Gender: Male
    • matthew.kerle on Facebook
    • @matthew_kerle on Twitter
Re: Email Template Editor
« Reply #59 on: January 18, 2012, 11:04:20 AM »
You are not able to put any HTML in the emails, unfortunately.
Former SMF Developer
My Modifications