Recent Topics

1 Sep 27, 2007 23:35    

My b2evolution Version: 1.10.x

When email notifications of a new post get sent, they contain html tags (even if they are sent to text-only mail clients). Is there any way to make the email notifications be text-only?

thanks,
--andrew

2 Sep 28, 2007 00:27

Or...better...can I have B2Evo send a notification that a post has occurred, but not put in the contents? This way, subscribers would have to go to the blog to see the reply.

--a

3 Sep 28, 2007 05:44

One way people get around this is to use the <!More> Tag.

The More Tag sometimes gets on the way of Technorati - especially if your tags are at the end of the post and the RSS feed won't read them.

You should consider using feedburner, and have your subsribers go to Feedburner to subscribe. This way you can keep track of subscriptions. It is much better.

See my site for a quick sample
http://www.theChristianAlert.org/blog

Edgar.

4 Oct 07, 2007 20:30

Thanks Edgar. I will look into Feedburner.

In the meantime, I added a bit of a hack to strip out all of the html tags before sending it to the email. This seems to work just fine.

Send me an email or reply to this if you want me to explain the hack. It's quite simple, really.

5 Oct 08, 2007 11:37

I'm interested in this hack. Could you provide the instructions here in this thread? Thanks a lot!

6 Oct 12, 2007 09:18

Concerning Feedburner: Why using an external service when you can use b2evo? Feedburner might use ads in their notifications later. What about privacy? It looks more professional if you can provide a service yourself

7 Oct 12, 2007 16:40

nomad wrote:

I'm interested in this hack. Could you provide the instructions here in this thread? Thanks a lot!

Sorry nomad...forgot to put this up.

Here is the way I did it. There are many ways.

  1. Download an html parser library. I used phphtmlparser available here:

  2. http://sourceforge.net/projects/phphtmlparser/
  3. Install it somewhere in your web server. I put it in my root directory.

  4. For formatting notifications of posts, you need to make 2 changes to blogs/inc/MODEL/items/_item.class.php

  5. First, at the top of the file, near the other "require_once" command, around line 43, add this:

  6.   require_once dirname(__FILE__).'/../../../../phphtmlparser/html2text.inc';
  7. Next, around line 3051, BEFORE this line:

  8. $cache_by_locale[$notify_locale]['message'] =
    add these lines:
    $html2Text = new Html2Text ($this->get('content'), 65);
    $text = $html2Text->convert();
  9. Finally, around line 3073, remove this line:

  10. .$this->get('content')."\n\n"
    and replace it with this line:
    .$text."\n\n"
    [/list:o] To get this to work for comment notification, go to blogs/inc/MODEL/comments/_comment.class.php and add essentially the same code. Hope this helps!


Form is loading...