corn
06-14-2005, 10:00 PM
First of all, I'm not sure if this is a hack or a template mod.
so, if its placed wrong, please advise.
this is my first 'hack', so be nice ;)
My forum members were complaining about the load of spam they received after the emailaddresses were publicly viewable.
We wouldn't use the secure mail function, because the users wanted to see eachothers mail addresses.
Installation:
Create a file called email.php.
It must contain the following lines of code:
<?php
header("Content-type: image/png");
########## Email, MSN and Yahoo adresses as GD Images ############
########## Made by Corn for vb.org ##########
$im = imagecreatefrompng("email.png");
$color = imagecolorallocate($im, 0, 0, 0);
$px = (imagesx($im) - 7.5 * strlen($user)) / 2;
imagestring($im, 4, $px, 1, $user, $color);
imagepng($im);
imagedestroy($im);
?>
or use the one attached.
in the attached .zip, you can find a email.png file.
put the files in your forum root dir.
Go to the AdminCP and open the MEMBERINFO template, and search for $userinfo[msn]
replace that with
<img src="email.php?user=$userinfo[msn]" border="0">
also in the MEMBERINFO template, search for
$userinfo[yahoo]
replace that with
<img src="email.php?user=$userinfo[yahoo]" border="0">
Go to the Phrase manager, and search for showemail variable.
you will find the following:
The email address for $destusername is <a href="mailto:$email">$email</a>
replace with:
The email address for $destusername is <a href="mailto:$email"><img src="email.php?user=$email" border="0"></a>
thats all :)
so, if its placed wrong, please advise.
this is my first 'hack', so be nice ;)
My forum members were complaining about the load of spam they received after the emailaddresses were publicly viewable.
We wouldn't use the secure mail function, because the users wanted to see eachothers mail addresses.
Installation:
Create a file called email.php.
It must contain the following lines of code:
<?php
header("Content-type: image/png");
########## Email, MSN and Yahoo adresses as GD Images ############
########## Made by Corn for vb.org ##########
$im = imagecreatefrompng("email.png");
$color = imagecolorallocate($im, 0, 0, 0);
$px = (imagesx($im) - 7.5 * strlen($user)) / 2;
imagestring($im, 4, $px, 1, $user, $color);
imagepng($im);
imagedestroy($im);
?>
or use the one attached.
in the attached .zip, you can find a email.png file.
put the files in your forum root dir.
Go to the AdminCP and open the MEMBERINFO template, and search for $userinfo[msn]
replace that with
<img src="email.php?user=$userinfo[msn]" border="0">
also in the MEMBERINFO template, search for
$userinfo[yahoo]
replace that with
<img src="email.php?user=$userinfo[yahoo]" border="0">
Go to the Phrase manager, and search for showemail variable.
you will find the following:
The email address for $destusername is <a href="mailto:$email">$email</a>
replace with:
The email address for $destusername is <a href="mailto:$email"><img src="email.php?user=$email" border="0"></a>
thats all :)