Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

mailto function additions

 
Post new topic   Reply to topic    Smarty Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
SordidWarrior
Smarty Rookie


Joined: 03 Sep 2004
Posts: 6
Location: Paris, France

PostPosted: Fri Sep 03, 2004 1:13 am    Post subject: mailto function additions Reply with quote

For my web site 2nd version (currently being developped, not on line), I came to add a few things to the basic mailto function. I don't know if it may be usefull to some people, but anyway:

First, I have added a new way to hide e-mail from bots. What I do is to do an href on a php scrip that does a redirect on mailto. The e-mail addresses are sent (with some modification) to the second page, which decodes the link.

so, I added a new 'encode' option (redirect), and a few optional variables to indicate the email page.

here's a simplified html code of what it does:
Code:

e-mail link:
<a target="_blank" href="email.php?a=§&m=address§domain.com">send e-mail!</a>

email.php:
<?php header('Location: mailto:'.str_replace($_REQUEST['a'], '@', $_REQUEST['m']) ); ?>


Second, I added a parameter to open popup (popup function). This option only makes use of popup if specifically set.

I don't know if there would be any interest for anybody, and if the plugin might be proposed somewhere...
_________________
Vincent Vandemeulebrouck
Coding expert, smarty newbie
http://www.leguerriersorde.com/
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Plugins All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP