developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Ticket #931: function.nospam.php

File function.nospam.php, 689 bytes (added by foxmask, 12 years ago)
Line 
1<?php
2/**
3* @package     jelix
4* @subpackage  jtpl_plugin
5* @author    FoxMaSk
6* @copyright 2008 FoxMaSk
7* @link      http://forge.jelix.org/projects/havefnubb
8* @licence  http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public Licence, see LICENCE file
9*/
10
11function jtpl_function_html_nospam($tpl, $email,$path)
12{
13        global $gJConfig;
14        $imagePath = $gJConfig->urlengine['basePath'].'themes/'.$gJConfig->theme.'/'.$path;     
15        list( $mail , $domain ) = split('@',$email);
16        $string = $mail.'<img src="'.$imagePath.'at2.gif" alt="at"/>';
17        $domNospam = preg_replace('/\./','<img src="'.$imagePath.'dot.gif" alt="dot"/>',$domain);
18        $string .= $domNospam;
19        echo $string;   
20}