| [ PHPXref.com ] | [ Generated: Sun Jul 20 16:35:25 2008 ] | [ bBlog 0.7.6 ] |
| [ Index ] [ Variables ] [ Functions ] [ Classes ] [ Constants ] [ Statistics ] | ||
[Summary view] [Print] [Text view]
1 <?php 2 // function.header.php 3 // 4 // Written by Tobias Schlottke 5 // 6 /* 7 ** bBlog Weblog http://www.bblog.com/ 8 ** Copyright (C) 2003 Eaden McKee <email@eadz.co.nz> 9 ** 10 ** This program is free software; you can redistribute it and/or modify 11 ** it under the terms of the GNU General Public License as published by 12 ** the Free Software Foundation; either version 2 of the License, or 13 ** (at your option) any later version. 14 ** 15 ** This program is distributed in the hope that it will be useful, 16 ** but WITHOUT ANY WARRANTY; without even the implied warranty of 17 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 ** GNU General Public License for more details. 19 ** 20 ** You should have received a copy of the GNU General Public License 21 ** along with this program; if not, write to the Free Software 22 ** Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 23 */ 24 function identify_function_email () { 25 $help = 'usage: <br/> 26 {email email=\'somone@example.com\' name=\'john doe\'} <br/> 27 or just<br/> 28 {email email=\'somone@example.com\'} <br/>'; 29 30 return array ( 31 'name' =>'email', 32 'type' =>'function', 33 'nicename' =>'Email', 34 'description' =>'encodes email addresses to get rid of spam bots', 35 'authors' =>'Tobias Schlottke <tschlottke@virtualminds.de>', 36 'licence' =>'GPL', 37 'help' => $help 38 ); 39 } 40 function smarty_function_email($params, &$bBlog) { 41 42 extract($params); 43 if(!$name) $name = str_replace("."," dot ",str_replace("@"," at ",$email)); 44 $email = preg_replace("/\"/","\\\"",$email); 45 $old = "document.write('<a href=\"mailto:$email\">$name</a>')"; 46 47 $output = ""; 48 for ($i=0; $i < strlen($old); $i++) { 49 $output = $output . '%' . bin2hex(substr($old,$i,1)); 50 } 51 52 echo "<script language=\"JavaScript\" type=\"text/javascript\">eval(unescape('".$output."'))</script>"; 53 } 54
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| [ Powered by PHPXref - Served by Debian GNU/Linux ] |