[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4758: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3893)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4760: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3893)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4761: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3893)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3893)
phplist forums • View topic - [mod] View HTML Email in Browser

[mod] View HTML Email in Browser

3rd party code for phpList

Re: [mod] View HTML Email in Browser

Postby mrmckoy » 9:45am, Sat 11 Sep, 2010

Can anyone view the message in HTML or do they HAVE to be phplist users?
My Casting Call Site: My Casting Call Newslist:
mrmckoy
PL Master
 
Posts: 169
Joined: 7:10am, Sat 24 Nov, 2007
Location: Atlanta, GA

Re: [mod] View HTML Email in Browser

Postby xannonite » 5:06pm, Sat 11 Sep, 2010

xannonite
PL Nut
 
Posts: 36
Joined: 4:50pm, Tue 24 Feb, 2009

Re: [mod] View HTML Email in Browser

Postby trucmuche2005 » 10:05am, Sun 26 Dec, 2010

Hello !

I tried your mod and It seems to works properly ! Great ! Thank you for your good job !! :-)

When the static version is saved in the DB, it is saved WITH the link to the online version, and so the link is still displayed when we view the online version. Would it be possible to get this link off the online static version ??

Thank you very much for your help !!

Trucmuche
trucmuche2005
PL Nut
 
Posts: 18
Joined: 11:04am, Thu 25 Nov, 2010

Re: [mod] View HTML Email in Browser

Postby xannonite » 9:37pm, Sun 26 Dec, 2010

xannonite
PL Nut
 
Posts: 36
Joined: 4:50pm, Tue 24 Feb, 2009

Re: [mod] View HTML Email in Browser

Postby trucmuche2005 » 10:42am, Mon 27 Dec, 2010

trucmuche2005
PL Nut
 
Posts: 18
Joined: 11:04am, Thu 25 Nov, 2010

Re: [mod] View HTML Email in Browser

Postby xannonite » 8:52pm, Mon 27 Dec, 2010

As I said, using regex to remove the link is an option. However, the expression you are using will only work for a link formatted as you've specified. The solution may work perfectly for you, but not everyone will write their code the same way. Also, [VIEWMESSAGEURL] should have already been replaced by the time the message is written to the database, so searching for that tag shouldn't work. You would need to copy the contents of the $htmlmessage variable before the custom tag is replaced.

Personally I feel that using regex to modify HTML is too messy. If I were to integrate a solution into the mod, I would rather use something cleaner that will work for everyone. In this case I think it is better for users to work out their own methods.
xannonite
PL Nut
 
Posts: 36
Joined: 4:50pm, Tue 24 Feb, 2009

Re: [mod] View HTML Email in Browser

Postby trucmuche2005 » 11:09am, Mon 10 Jan, 2011

Of course I agree with you, xannonite ! I would also prefer a solution that works for everyone ! But... Which one ?
I'm not PHP programmer, I only know some basic techniques... I would like to help...

Someone told me about this :
It seems to be perfectly suited to this... Would it be possible to use it in PHPList to remove the link ??

I understand in your message that the line in sendemaillib.php I suggested to modify is not the correct one because the [VIEWMESSAGEURL] tag has already been replaced.
Where does this substitution is made in the php code ? I didn't found out the instruction which causes the tag is substituted. Could you tell me ?
Maybe if I know this I could imagine a solution...

Thanks for your help !

Best wishes for 2011 ! :-)

Trucmuche
trucmuche2005
PL Nut
 
Posts: 18
Joined: 11:04am, Thu 25 Nov, 2010

Re: [mod] View HTML Email in Browser

Postby xannonite » 8:18pm, Mon 10 Jan, 2011

jQuery uses JavaScript, and anything involving JavaScript should be implemented by the user in the HTML itself. That `remove` function essentially provides a short-hand way of doing what I already described using an ID or class in your HTML. However, you would need to add an additional <script> element to include the necessary jQuery framework, which seems rather unnecessary for a simple e-mail.

If you open your modded sendemaillib.php and search for VIEWMESSAGEURL, you will see a whole section where various tags are replaced using preg_replace() and eregi_replace(). That is where the link is inserted. If you want the link to be removed while still maintaining all the other tag replacements, then you will need to make a copy of $htmlmessage before all those tags are replaced, then duplicate all of those preg_replace/eregi_replace lines minus the VIEWMESSAGEURL lines. Alternatively you could clean it up by using an array for the tags and a loop. Either way the script is going to be doing twice the work just to remove the link, and it would have to be updated every time the list of tags was changed - including changes from other mods. All-in-all it's not a good solution.
xannonite
PL Nut
 
Posts: 36
Joined: 4:50pm, Tue 24 Feb, 2009

Re: [mod] View HTML Email in Browser

Postby trucmuche2005 » 6:06pm, Tue 25 Jan, 2011

trucmuche2005
PL Nut
 
Posts: 18
Joined: 11:04am, Thu 25 Nov, 2010

Re: [mod] View HTML Email in Browser

Postby xannonite » 12:46am, Wed 26 Jan, 2011

It should not matter who views the message. When a user clicks the link in their e-mail, it is the same as someone clicking the link in Facebook or anywhere else. If a blank page is displayed, then you should check your PHP log for errors. It could be that you didn't copy/paste the link properly. You might also need to delete your cookies.

p.s. Keep in mind that if you post a link for others to click on, the contents of the message will be personalized for the person who originally received the link. You might want to create a separate e-mail account specifically for public links so that you don't inadvertently expose a list member's name or other info.
xannonite
PL Nut
 
Posts: 36
Joined: 4:50pm, Tue 24 Feb, 2009

Re: [mod] View HTML Email in Browser

Postby locomot1f » 9:35pm, Thu 24 Feb, 2011

I'm having trouble with this script. I've downloaded the lastest - 1.2.2 version.

My problem is with the unique ID column. and possibly the messageid column

On first attempts, my messageid starts with 142 for the first entry.

the uniqueid column does not get populated. i've looked at other entries involving this, but nothing seems to point me in the correct direction.

I have tried plugging in the [USERID] placeholder in my message, and it does show up. I know that you stated that something is removing this before it gets to your script... but I have no idea what it could be... any advice would be greatly appreciated!

i'm using PHPList v.2.10.12

thanks in advance
locomot1f
phpLister
 
Posts: 7
Joined: 9:32pm, Thu 11 Mar, 2010

Re: [mod] View HTML Email in Browser

Postby xannonite » 12:04am, Fri 25 Feb, 2011

xannonite
PL Nut
 
Posts: 36
Joined: 4:50pm, Tue 24 Feb, 2009

Re: [mod] View HTML Email in Browser

Postby bhup18 » 3:11pm, Fri 25 Feb, 2011

using latest mod 1.2.2

Bug?

If you use [VIEWMESSAGEURL] tag more than once in the message, the link may not be replaced correctly or just with "http://" .

Discovered this by accident.
bhup18
phpLister
 
Posts: 11
Joined: 8:26pm, Wed 15 Dec, 2010

Re: [mod] View HTML Email in Browser

Postby locomot1f » 7:38pm, Fri 25 Feb, 2011

locomot1f
phpLister
 
Posts: 7
Joined: 9:32pm, Thu 11 Mar, 2010

Re: [mod] View HTML Email in Browser

Postby xannonite » 8:27pm, Fri 25 Feb, 2011

xannonite
PL Nut
 
Posts: 36
Joined: 4:50pm, Tue 24 Feb, 2009

PreviousNext

Return to Contributions: Plug-ins, Add-ons, Mods

Who is online

Users browsing this forum: No registered users and 2 guests