Notifications
Clear all

Helping adding text to alerts emails...

11 Posts
3 Users
0 Reactions
1,796 Views
(@fanficnation)
Posts: 33
Eminent Member
Topic starter
 

URL to your eFiction: http://www.fanficnation.net/index.php
Version of eFiction: 3.5.1
Have you bridged eFiction, if so with what?: no
Version of PHP: 3.2.4
Version of MySQL: 5.1.42
Have you searched for your problem: yes
If so, what terms did you try: I used the search feature.
State the nature of your problem: The site co-owner is the main person for the hosting service and she receives emails from the host. Today she received an email saying our site(s) were temporarily shut down because of spam emails. She was told to call a number. After doing so, she learned that the spam email was just an email that is sent to members when a story is updated. They suggest we turn that feature off, or include the option to turn it off in the email. I have already turned the alert system off, but I really don't want to keep that way. Can someone help me or tell me where I need to go into the coding to add something about shutting off the alert if they wish to do so. I know that it is a box they members can check in their preferences, but I would really like to be able to add it into the email template, so that we can keep alerts on. Please help.
Do you have a test account for us? guest/guest


 
Posted : 01/02/2010 10:05 pm
(@lyndsie)
Posts: 1263
Member Moderator
 

The text of the emails is in languages/en.php. They are in a couple different spots, so it depends on which ones you mean. Look around line 164 for review notifications. 369 for review response. 230 & 255 for author/story updates.

This happened to me, at a site with over 10,000 members. I did a MySQL query to turn off notifications for everyone. That way if they really wanted them, they had to turn them back on.


 
Posted : 02/02/2010 12:06 am
(@fanficnation)
Posts: 33
Eminent Member
Topic starter
 

The text of the emails is in languages/en.php. They are in a couple different spots, so it depends on which ones you mean. Look around line 164 for review notifications. 369 for review response. 230 & 255 for author/story updates.

This happened to me, at a site with over 10,000 members. I did a MySQL query to turn off notifications for everyone. That way if they really wanted them, they had to turn them back on.

Do you think it is possible for me to post the different sets of the code that needs to have the text added and ask for you help at adding the text, as to not mess up the coding?


 
Posted : 02/02/2010 10:26 pm
(@lyndsie)
Posts: 1263
Member Moderator
 

If you want to, but it's really easy. The language files are meant to be modified (for translation and such). So here's a random line out of en.php.


define ("_ADDAUTHOR2FAVES", "Add Author to Favorites");

You only want to change the part in the second set of quotes.


define ("_ADDAUTHOR2FAVES", "Add Author to Favourites");

(I added a u to "favorites" to make it British-style.)

Keep in mind that if you use " or ' you have to escape it by putting a in front of it. Otherwise the script will think you're ending the quotes around the string prematurely. Example.


define ("_ADDAUTHOR2FAVES", "Add "Author" to Favorites");

 
Posted : 02/02/2010 11:09 pm
(@fanficnation)
Posts: 33
Eminent Member
Topic starter
 

Please don't think I am stupid or anything, but that is all "hogwash" to me. I don't usually edit coding except for the parts I know how to do and were told how to do and what not to do.

I need to add something like  "If you wish to not receive alerts via emails ... "


 
Posted : 02/02/2010 11:31 pm
(@lyndsie)
Posts: 1263
Member Moderator
 

It's never too late to learn. ; )  Some (or all?) of the messages already have something like that. Here's the one for new reviews (line 164 of languages/en.php):


define ("_REVEMAIL2", "Hello,
  You have received a new review at $sitename.rn You can view your new review at <a href="'$url/reviews.php?%1$s'>$url/reviews.php?%1$s</a>."
If you no longer wish to receive e-mails such as this, please go to your accountrn
on $sitename, and edit your profile.");

If you don't like the wording, you can modify it. Just make sure to keep everything outside the double quotes intact. I understand being nervous, so tell you what. I'll post the lines of code for the rest of them, and you can reply back and modify them. Then I'll look it over and make sure everything looks okay before you make it a live change.

line 230 (favorite author update)


define ("_AUTHORALERTNOTE", "One of your favorite authors at $sitename has posted a new story.<br><br>%1$s "._BY." %2$s<br><br>%3$s<br><br><a href=""$url/viewstory.php?sid=%4$d">$url/viewstory.php?sid=%4$d</a>");"

Add a notice after the </a> but before the "

line 255 (favorite story update)


define ("_STORYALERTNOTE", "%1$s by %2$s, one of your favorite stories at $sitename, has been updated.<br><br><a href=""$url/viewstory.php?sid=%3$d&amp;chapter=%4$d">$url/viewstory.php?sid=%3$d&amp;chapter=%4$d</a>nn");"

Add stuff after the nn but before the "

line 369 (author has responded to review)


define ("_RESPONSETEXT", "{penname} has responded to your review.rnrnYou can see the response at <a href=""".$url."/reviews.php?reviewid={review}">".$url."/reviews.php?reviewid={review}</a>");"

Same deal; after the </a> but before the "


 
Posted : 03/02/2010 10:07 am
(@fanficnation)
Posts: 33
Eminent Member
Topic starter
 

Thanks so much. I actually like the wording that the file gives you for the new review. Just wish it would have kept it with the others. So I'm going to copy and paste it with the lines posted previously and you'll be able to tell me that I did it right LOL.

(Thanks in advance and afterwards!)

define ("_AUTHORALERTNOTE", "One of your favorite authors at $sitename has posted a new story.<br><br>%1$s "._BY." %2$s<br><br>%3$s<br><br><a href=""$url/viewstory.php?sid=%4$d">$url/viewstory.php?sid=%4$d</a>If" you no longer wish to receive e-mails such as this, please go to your accountrn
on $sitename, and edit your profile.");
define ("_STORYALERTNOTE", "%1$s by %2$s, one of your favorite stories at $sitename, has been updated.<br><br><a href=""$url/viewstory.php?sid=%3$d&amp;chapter=%4$d">$url/viewstory.php?sid=%3$d&amp;chapter=%4$d</a>nnIf" you no longer wish to receive e-mails such as this, please go to your accountrn
on $sitename, and edit your profile.");
define ("_RESPONSETEXT", "{penname} has responded to your review.rnrnYou can see the response at <a href=""".$url."/reviews.php?reviewid={review}">".$url."/reviews.php?reviewid={review}</a>If" you no longer wish to receive e-mails such as this, please go to your accountrn
on $sitename, and edit your profile.");

 
Posted : 03/02/2010 9:34 pm
(@tammy)
Posts: 2577
Member Moderator
 

This is a good idea.  It'll be implemented in the next version and in the SVN later tonight.


 
Posted : 03/02/2010 10:16 pm
(@fanficnation)
Posts: 33
Eminent Member
Topic starter
 

This is a good idea.  It'll be implemented in the next version and in the SVN later tonight.

Thank you.

I have never thought or paid much attention before until our host sent an email saying they believe we were sending spam messages. When my co-owner called the host, they read off one of the "one of your favorites has been updated" emails. It was odd to us, but we figured it was something we could get help with.


 
Posted : 03/02/2010 10:23 pm
(@lyndsie)
Posts: 1263
Member Moderator
 

Looks good. Just one small thing. You'll probably want to add a space between the copied in part and what comes before it. Elsewise the link and the following text will run together.


 
Posted : 04/02/2010 12:59 am
(@fanficnation)
Posts: 33
Eminent Member
Topic starter
 

Looks good. Just one small thing. You'll probably want to add a space between the copied in part and what comes before it. Elsewise the link and the following text will run together.

Alright.

Thanks so much for your help! I really appreciate it.  πŸ˜€


 
Posted : 04/02/2010 1:04 am
Share: