HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Nice one!
I bet a lot of admins will love you for that!
I think there is one place that should be changed though:
public function Gdn_Dispatcher_BeforeDispatch_Handler($Sender) { require_once 'plugins/EmailTemplate/class.email.php'; }
To my understanding this will load your class on every page, which is not necessary. I'm sorry I don't know a better way either, but I would try to
a) drop that function completely and simply hope the framework uses your class instead of the Vanilla class or
b) ask hgtonight or x00 who usually know about factory magic or whatever is needed for that
1
Comments
[edit]
... or you might be absolutely right in your choice...
http://vanillaforums.org/discussion/comment/206848#Comment_206848
[/edit]
... and I have to correct myself once again! http://vanillaforums.org/discussion/comment/217676/#Comment_217676
, I'm going to remove that unnecesary method , thx for the info
This is AWESOME
Anyone know offhand how to add some line breaks into the actual message part? I.e., in the image below, it would be nice to see
Testy Testerton sent you a message:
test3
Follow the link below to check it out:
link here
I can't test. but
you could try "\n"
or
PHP_EOL
or
not sure which will work in the context of the code. At least one of the the three should work.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Yeah, the problem is that I can't edit that part of the message within the text boxes the plugin provides - i.e., the line breaks that normally get inserted by the system seem to be disappearing or something. Guess I'll have to look in the plugin code to see what's going on there.
I haven't tried the plugin. but those messages are usually tied to defintions and you can change the definition
see the faq question regarding changing wording.
http://vanillaforums.org/discussion/28420/faq/p1
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
you would put what you want in this definition presumably, and you could trying the options suggested above in this definition. Unless the tags etc are stripped.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Thanks YAP, but looks like it's not the definitions. It appears as though the plugin's mailer class (specifically, the 'Message()' function) is either not escaping enough stuff, or too much stuff, or a little of both. I'll include 2 emails source views in case @guillermofr wants them for debugging; I'm not sure I'll get time to look at the code much more today.
Screencap of my template info attached. I'm sending a message that says 'test 9'.
Message source with plugin enabled:
Message source without plugin enabled:
use the code tags when posting code or error messages. they are in the paragraph symbol on buttonbar
it's been adjusted. I'll leave the image in case it helps someone else in the future.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
although it may not be the definitions in this case.
its always a good idea to test if the definition is being looked at.
So I usually test with "xx" easier to see if it is indeed reading definition. vs. tags or special characters.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
Are you saying that you can't use html in the email ?
See if you have this in your config.php
$Configuration['Garden']['Email']['MimeType']= 'text/html';
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
@AaronWebstey - you might want to remove or obfuscate some sensitive e-mail addresses, etc and names in your comment above to protect from s p a m
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@vrijvlinder Thanks! I did not have that in there. Tried it, did not help I think it was actually sending HTML email. In fact, it's actually sending HTML and plain text versions, as opposed to the core mailer which just sends text/plain.
@peregrine thanks - I've removed my email addresses. Duh. Also, I have updated the locale file and yep, it's not getting looked at (I made it "have a Starkeriffic day" instead of "have a great day"). Hm, I'll have to see where that's coming from. Grep to the rescue!
simplest way.
you need to put definitions in conf/locale.php and delete the ini files in your cache. -
then click a page on your forum
then you can also look at the contents of
cache/locale_map.ini
if your locale file is not listed you are not reading it !
so if the cache/locale_map.ini
so if it does not have a line with conf/locale.php"
that is your problem - the file is not being read.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
@peregrine tried adding locale.php, no dice. Still old string coming through. However, I noticed that there was a var called
$Definition['EmailStoryNotification']
Added that to conf/locale.php with the BR tags (and my updated 'have a starkeriffic day'), and voila!!
Problem solved. TYAP (there should probably be a 'TYAP' reaction button).
As long as it stands for "Thank You Awesome People"....
❌ ✊ ♥. ¸. ••. ¸♥¸. ••. ¸♥ ✊ ❌
@vrijvlinder yeah of course, I guess there are a few of you out there who deserve their own button TYAV!
sorry, gave you wrong definition. believe it or not I came back online after I realized I probably gave you wrong definition. i gave you the confirmation one.
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.