Add classic E-Mail Replacement Tags

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
Florian
Posts: 119
Joined: Wed 19. Nov 2003, 16:50
Location: Hamburg
Contact:

Add classic E-Mail Replacement Tags

Post by Florian »

Hello!

I've needed a "classic" Mail Link for a footer (webmaster link).
So I add some lines to the ./include/inc_front/front.func.inc.php.
If you need this mailsupport, too, add the lines listed below to the front.func.inc.php from line 823 on:

Code: Select all

	//this pharses out an E-Mail Link without subject
	$search[23]		= '/\[MAIL (.*?)\](.*?)\[\/MAIL\]/';
	$replace[23]	= '<a href="mailto:$1">$2</a>';
	
	// this tags out a Mailaddress with an predifined subject
	$search[24]		= '/\[MAILSUB (.*?) (.*?)\](.*?)\[\/MAILSUB\]/';
	$replace[24]	= '<a href="mailto:$1?subject=$2">$3</a>';

The use of the Tags is the following:
[MAIL mail@address.tld]Link[/MAIL] add's a normal Link to the document
[MAILSUB mail@address.tld predefinedsubject]Link[/MAILSUB] add's a maillink to the document with a predefinied subject.


Cheers,
Florian.
Post Reply