Email Digests

All new MODs released in our MOD Database will be announced in here. All support for released MODs needs to take place in here. No new MODs will be accepted into the MOD Database for phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.

Rating:

Excellent!
48
59%
Very Good
17
21%
Good
9
11%
Fair
2
2%
Poor
6
7%
 
Total votes: 82

User avatar
LHG
Registered User
Posts: 39
Joined: Sun Nov 09, 2003 5:37 am
Contact:

Re: Email Digests

Post by LHG » Sat Oct 04, 2008 9:16 pm

In the code you posted there is this line.

"Return-Path: " . $board_config['board_email'] . "

Could I change that to

"Return-Path: "bounce@mydomain.com "

How about spaces and periods? Do I need any?

User avatar
MarkDHamill
Registered User
Posts: 3431
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: Email Digests

Post by MarkDHamill » Sat Oct 04, 2008 9:31 pm

I think you would need a new statement delimited by a line feed. You'll have to test it and find out.
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

sbourdon
Registered User
Posts: 174
Joined: Sat Nov 13, 2004 6:29 pm

Re: Email Digests

Post by sbourdon » Fri Nov 07, 2008 1:11 pm

Hello Mark,

Since I've installed the HTML BBCode on my board, I would like to get rid of all code between the [html:xxx] and [/html:xxx] brackets for the TEXT Digests.

I don't understand the ereg_replace and preg_replace functions quite well, but by looking at existing code and using a trial and error method, I was able to come up with this:

Code: Select all

$post_text = trim( ereg_replace("[html:([a-zA-Z0-9])](.*?)[/html:([a-zA-Z0-9])]", "", $post_text ) );
Unfortunately, it does return an error message:

Code: Select all

ereg_replace() [function.ereg-replace]: REG_BADRPT in ...
Could you or someone else tell me what I should change in that line for it to work as expected?


Thank you very much for your help! :)

User avatar
MarkDHamill
Registered User
Posts: 3431
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: Email Digests

Post by MarkDHamill » Fri Nov 07, 2008 1:29 pm

Sylvain,

Do you allow HTML to be entered in posts instead of BBCode? I have not tried that test case. The text digest should strip out all HTML anyhow. First the generate_text_for_display function is called which converts everything into HTML. Later for text digests, strip_tags is called which should remove all HTML.

Can you provide a test case?

I am no pattern matching expert either, but if you ask the question in an appropriate forum I am sure someone will respond.
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

sbourdon
Registered User
Posts: 174
Joined: Sat Nov 13, 2004 6:29 pm

Re: Email Digests

Post by sbourdon » Fri Nov 07, 2008 1:44 pm

Thanks for your reply!

No, I do not allow HTML in posts; instead, I've installed the HTML BBCode, which adds a HTML BBCode button for admins and moderators.

The syntax is as follows:

Code: Select all

[html:xxx]All HTML code you want![/html:xxx]
where xxx is the BBCode ID (a string of numbers and letters).

What I want is to simply remove from emailed posts everything between the two [html] brackets... Would you know how I could achieve this?


Thanks again!

User avatar
MarkDHamill
Registered User
Posts: 3431
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: Email Digests

Post by MarkDHamill » Fri Nov 07, 2008 1:54 pm

Sylvain, check out this topic. It might provide a clue. If it does not post your question in this forum.

http://www.phpbb.com/community/viewtopi ... &t=1193005
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

sbourdon
Registered User
Posts: 174
Joined: Sat Nov 13, 2004 6:29 pm

Re: Email Digests

Post by sbourdon » Fri Nov 07, 2008 9:38 pm

Fixed using the following code:

Code: Select all

$post_text = preg_replace("#\[html:([a-zA-Z0-9]+)\](.*?)\[/html:([a-zA-Z0-9]+)\]#si", "". $lang['digest_html_text'] ."", $post_text);
Thanks Mark; hope this will help others! :mrgreen:

fuzioneer
Registered User
Posts: 28
Joined: Thu Jun 02, 2005 8:10 am

Re: Email Digests

Post by fuzioneer » Thu Nov 13, 2008 6:15 pm

I have installed this mod on a phpnuke derivative and all seems to work but i have hit a hurdle,

in the phpbb admin console I can click on Add Subscribers and Modify subscribers and these open ok but complain about no info being in the tables in the database which i expected, however if i click on the Configuration link it simply opens up the main forum admin within the frame on the right and not actually the digest config page

Any pointers would be much appreciated as i have spent soooo long trying to understand why this is so that my eyes have gone funny lol??

User avatar
MarkDHamill
Registered User
Posts: 3431
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: Email Digests

Post by MarkDHamill » Thu Nov 13, 2008 6:59 pm

Perhaps you skipped the SQL step in the instructions to add columns to the phpbb_users table and rows to the phpbb_config tables? Also, you need to refresh the cache. Make sure you read ALL the instructions.
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

fuzioneer
Registered User
Posts: 28
Joined: Thu Jun 02, 2005 8:10 am

Re: Email Digests

Post by fuzioneer » Thu Nov 13, 2008 7:14 pm

ok i have the add and modify pages working fine now :)

I had missed the sql statement to insert one line in the install file (I did the Mysql commands by hand via phpmyadmin)

But i still cannot access the configuration page, ?

User avatar
MarkDHamill
Registered User
Posts: 3431
Joined: Fri Aug 02, 2002 12:36 am
Location: Florence, MA USA
Contact:

Re: Email Digests

Post by MarkDHamill » Thu Nov 13, 2008 7:18 pm

Make sure you follow the DIY instructions at the bottom of the installation instructions.
Get the latest versions of my Digests and Smartfeed mods and extensions.
Need phpBB services or a phpBB consultant? I offer most phpBB services.

Post Reply

Return to “[2.0.x] MOD Database Releases”

Who is online

Users browsing this forum: No registered users and 6 guests