![]() |
Email, MSN and Yahoo adresses as GD Images
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 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 Code:
$userinfo[msn] Code:
<img src="email.php?user=$userinfo[msn]" border="0"> Code:
$userinfo[yahoo] Code:
<img src="email.php?user=$userinfo[yahoo]" border="0"> you will find the following: Code:
The email address for $destusername is <a href="mailto:$email">$email</a> Code:
The email address for $destusername is <a href="mailto:$email"><img src="email.php?user=$email" border="0"></a> |
Quote:
|
Was trying to do this a while back
Good job :) You can probably apply this to any email address posted as well by amending the functions_bbcode.php in your includes folder. |
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. |
Very nice Kirby.
|
Quote:
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 :) I'd call the image something like this, PHP Code:
|
Quote:
Quote:
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. |
Quote:
Quote:
Quote:
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). |
All times are GMT. The time now is 08:39 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|