vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Show Thread Enhancements - Email address masking / obfuscation - Protect your users from spam! (https://vborg.vbsupport.ru/showthread.php?t=79402)

buro9 04-04-2005 10:00 PM

Email address masking / obfuscation - Protect your users from spam!
 
No longer supported by the author.

yoyoyoyo 04-05-2005 12:03 PM

thanks!

jugo 04-05-2005 12:16 PM

Very VERY useful...Thanks.

Boofo 04-05-2005 01:04 PM

Can you please make a txt file so others can download it and have it for when they upgrade their vBulletin? ;)

buro9 04-05-2005 01:14 PM

Quote:

Originally Posted by Boofo
Can you please make a txt file so others can download it and have it for when they upgrade their vBulletin? ;)

Done :)

Do you really do that btw? Re-install all hacks from scratch using text files? Doesn't that take a long while?

All I do is make sure that I mark any hacks I do with this:
// HACK : START : HACK_NAME
// HACK : END : HACK_NAME

And when it comes to upgrading I search for a list of files that include the whole word HACK in upper case... then I DIFF the old and new files and copy over just the things in HACK blocks... the DIFF engine puts them in the right place :)

Much easier, and doesn't require me to re-install anything.

Takes about 20 minutes to do the whole thing, and I have a VERY heaviliy hacked forum :)

buro9 04-05-2005 01:15 PM

It also helps me strip out unwanted hacks as I just search for the HACK_NAME.

Oh, and if hacks required a change to an existing line, I leave the original there but commented out just in case I do want to rollback :)

Polo 04-05-2005 02:27 PM

my users will feel safer now :) thanks for sharing

Zachariah 04-05-2005 03:02 PM

/me installs

buro9 04-11-2005 03:01 PM

Just thinking... do people want variances on the pattern it shows?

So instead of just re-formatting as:
test (at) example (dot) com

It might also do things like:
moc . elpmaxe @ tset < backwards

Or:
test@AUDENexample.com < minus poet

j_86 04-11-2005 03:03 PM

I'd like a modification that turns e-mails into images displaying the image, and makes the image a mailto: link - possible?

In the meantime, this hack is great!

buro9 04-11-2005 03:08 PM

Erm... please clarify.

Basically an image created by GD library instead of text. But the mailto: still there?

Could do that :) If that is what you want.

j_86 04-11-2005 03:22 PM

I think there are many possibilities for this good idea :)

I suppose it could be done with or without the mailto - but spiders that search for the mailto: will render that one pointless. Unless, however, no mailto is used - OR - for every symbol used in the address, it is replaced with its ASCII value, which in HTML is in it's raw ASCII format, but when clicked/mouse overed it renders without any javascript..

HTML Code:

<a href="mailto:jimpsed@hellp.com">jimpsed@hellp.com</a>
once converted to ascii;

Code:

<a href="mailto:jimpsed@hellp.com">jimpsed@hellp.com</a>
[EDIT] - it seems the ascii characters are being pre-processed before being entered into the database/being displayed. It works if you code this and then display it from a HTML web page though - try the attatched file. The source, you see the raw ascii characters. When viewed in a browser, all the characters are rendered.

This "solution", however, is only good if the spiders are only going through the HTML of a web page - I do not know, though.

ChrisLM2001 04-14-2005 11:03 PM

Buro,

Does this hack conflict with other JS? Inserted the code into the functions_bbcodeparse.php (and saved it ;) ), but when testing it nothing shows up, just a blank post. :( Remove the code, email linking returns fine.

Tested it on a 3.0.7 modded style and the default (unmodded) style, to no avail.

Chris

buro9 04-15-2005 03:04 PM

Quote:

Originally Posted by ChrisLM2001
Buro,

Does this hack conflict with other JS? Inserted the code into the functions_bbcodeparse.php (and saved it ;) ), but when testing it nothing shows up, just a blank post. :( Remove the code, email linking returns fine.

Tested it on a 3.0.7 modded style and the default (unmodded) style, to no avail.

Chris

It shouldn't do... it merely unescape's and document.write's, neither of which would have any problems at all providing javascript is enabled.

However... if any prior JavaScript on a page has an error, then subsequent JavaScript may not execute.

So I would recommend you find what JavaScript you have that is causing errors and fix that :) You can turn on "Show an alert for each script error" within the Advanced options of IE's Internet Options... or in Firefox turn on the JavaScript console.

Once the thing that is causing the error is fixed, then this will work too :)

www.alfisti.net 10-20-2005 06:14 PM

this works also in 3.5
you only have to use /includes/class_bbcode.php (instead the functions_bbcodeparse.php).

thanks buro9 :)

buro9 10-25-2005 05:37 PM

Quote:

Originally Posted by www.alfisti.net
this works also in 3.5
you only have to use /includes/class_bbcode.php (instead the functions_bbcodeparse.php).

thanks buro9 :)

Yup, I'm using it again :) It's small, simple and does what I need it to.

Do people need me to re-publish this as a 3.5 hack to get the warm fuzzies about it?

www.alfisti.net 10-25-2005 05:41 PM

Quote:

Originally Posted by buro9
Yup, I'm using it again :) It's small, simple and does what I need it to.

Do people need me to re-publish this as a 3.5 hack to get the warm fuzzies about it?

you should post it in the 3.5 forum with the changes.
I didn?t do that because it is your mod.

jugo 10-25-2005 09:14 PM

<a href="https://vborg.vbsupport.ru/showthread.php?t=96195&highlight=email+address" target="_blank">https://vborg.vbsupport.ru/showt...=email+address</a>

My Version for vb3.5 - not necessarily email abfusbication (sp?) but it converts the email address into a link to PM the person who posted it.

fcherub 11-24-2005 04:40 PM

Hi, I installed, it works however when someone edits a post the email doesn't show up and this is what appears after saving:

a = unescape('%40');d = unescape('%2e');m = 'mailto:';document.write ... etc.

This happens every time somebody edits a post so I can't keep this unless there's a workaround ??
Thanks

zylstra 03-23-2006 11:18 PM

Good point fcherub. I ran into this bug also. I haven't had time to make a fix though. buro9, you up to the challenge?

DjTaz 04-02-2006 04:35 PM

Quote:

Originally Posted by JimpsEd
I'd like a modification that turns e-mails into images displaying the image, and makes the image a mailto: link - possible?

In the meantime, this hack is great!


I only spotted this and decided to take a look at it .....

1: Upload : emailimage.php (to FORUM ROOT) [ attached at bottom of ]
2: Upload : banner.png (to FORUMROOT/IMAGES) [attached at bottom of post ]
3 : Instead of the original code in functions_bbcodeparse.php use :

Code:

// HACK : START : MASK EMAIL
// return "<a href=\"mailto:$rightlink\">$text</a>";

//
// The following is based on code found at:
// http://hurring.com/code/php/email_protect/
//

//
// These are symbols that mean "@"
//
$ats  = array('!@!', '!\&\#64\;!', '!\(at\)!', '! at !');
//
// These are symbols that mean "."
//
$dots = array('!\.!', '!\&\#46\;!', '!\(o\)!', '!\(dot\)!', '! dot !');

//
// The HTML link, utilizing javascript to obfuscate "@" and "."
//
$link    = $rightlink;
$link_at  = "'+a+'";
$link_dot = "'+d+'";
$link    = preg_replace($ats, $link_at, $link);
$link    = preg_replace($dots, $link_dot, $link);

//
// The link text, which should be plain-text
//
$disp    = $text;
$disp_at  = '_at_';    // What should "@" be printed to?
$disp_dot = '_dot_';    // What should "." be printed as?
$disp    = preg_replace($ats, $disp_at, $disp);
$disp    = preg_replace($dots, $disp_dot, $disp);

//
// Return javascript code to print an email link
//
if ($link) {
        return "<script type='text/javascript'>a = unescape('%40');d = unescape('%2e');m = 'mailto:';document.write('<a href=\"'+m+'$link\" border=0><img src=emailimage.php?text=$disp border=0></a>');</script>";
        }
// HACK : END : MASK EMAIL


p.s. the only change is changing $disp near the bottom of the code to <img src=emailimage.php?text=$disp border=0> and change what @ and . should change to.

theres still an error with the editing function with this system - and users will have to enter the mail address again if they edit , but it seems to work ok.


All times are GMT. The time now is 03:17 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01158 seconds
  • Memory Usage 1,766KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)bbcode_html_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (21)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete