Version: 1.00, by corn
Developer Last Online: Jun 2012
Version: 3.0.7
Rating:
Released: 06-14-2005
Last Update: Never
Installs: 3
No support by the author.
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:
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
IMHO this does not make much sense, as the eMail address is still in the HTML and can be processed automatically by spammers.
If you really want to do this (which isn't worth it) you might want to use smth. like the attached script.
If you really want to do this (which isn't worth it) you might want to use smth. like the attached script.
I think obfuscating emails is really worth it, if that's what you meant?
And as always, great job with the code recommendations :up:
One issue, I think, that might be a problem with both versions is the image caching. As it's called email.png and browsers will often cache this, and one will end up sending emails to the wrong members
Erm ... for this to work you would need tohse image-userid.png files on your servers HD
The users browser never gets to see this email.png, however if you want to prevent caching (which should only be an issue when a user changes his eMail) you can add No-Cache Headers.
I meant that, but as said it's IMHO not worth it the processing overhead, aus you can simply turn off displaying eMails.
That won't work, as it would fail the original requirement
Quote:
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.
Quote:
Erm ... for this to work you would need tohse image-userid.png files on your servers HD
The users browser never gets to see this email.png, however if you want to prevent caching (which should only be an issue when a user changes his eMail) you can add No-Cache Headers.
What would be best, IMHO, and eliminate some of the overhead, is to be able to generate the image without calling a new php file.
Is this doable? Can it be done in a plugin through a hook? And be able to show the image on the fly?
This is the vB 3.0.x section, so there are no Plugins/Hooks
Well, doing this without creating the images on the fly means you must create them when the user enters/changes his emai/msn/yahoo - and store them somewhere for later retrival (either in the database or on disk).