vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Automatic email adress re-formatting to prevent harvesting (https://vborg.vbsupport.ru/showthread.php?t=148399)

Dismounted 06-09-2007 11:05 AM

I have told him what he needs. You say I don't know how? Let me prove you wrong.
1/ Admin CP > Plugins & Products > Add New Plugin
2/ Hook Location: postbit_display_complete
3/ PHP Code:
PHP Code:

$post['message'] = preg_replace('/(<a href="mailto:)(.*)@(.*)(["]{1})/i'"$2 AT $3"$post['message']; 


Dave Hawley 06-10-2007 12:40 AM

No, I asked if you know how. That's what this (?) funny little character means :)

There ya go tobias_t, you just need to know how to ask :)

HMBeaty 06-10-2007 12:59 AM

Hahaha, that's awesome. Just gotta ask the right question I suppose ;)

Dismounted 06-10-2007 02:44 AM

Quote:

Originally Posted by Dave Hawley (Post 1265139)
No, I asked if you know how. That's what this (?) funny little character means :)

There ya go tobias_t, you just need to know how to ask :)

To me, you sounded like you were accusing me of not knowing how to code. I could've just told you to look at my profile to see all the URL rewriting hacks I've done....

Dave Hawley 06-10-2007 03:02 AM

No, not all. I have no idea what you are capable of. However, you do seem to assume those asking questions have the same capabilities as you. Which would beg the question of why they would ask in the 1st place ;)

tobias_t 06-11-2007 07:52 AM

Quote:

Originally Posted by Dismounted (Post 1264717)
I have told him what he needs. You say I don't know how? Let me prove you wrong.
1/ Admin CP > Plugins & Products > Add New Plugin
2/ Hook Location: postbit_display_complete
3/ PHP Code:
PHP Code:

$post['message'] = preg_replace('/(<a href="mailto:)(.*)@(.*)(["]{1})/i'"$2 AT $3"$post['message']; 


Thanks! Doesn't look like something I could ever have come up with myself, so your help is much appreciated :D

I don't yet get it to work though -

On our test server, installing this hack gives me this message on showthread:

Parse error: syntax error, unexpected ';' in /srv/www/htdocs/forum/includes/class_postbit.php(296) : eval()'d code on line 1

On our live server, it does no changes to email addresses at all.

Both installations are 3.6.6. Any ideas?

Dismounted 06-11-2007 11:06 AM

PHP Code:

$post['message'] = preg_replace('/(<a href="mailto:)(.*)@(.*)(["]{1})/i'"$2 AT $3"$post['message']); 


tobias_t 06-11-2007 12:08 PM

Quote:

Originally Posted by Dismounted (Post 1266159)
PHP Code:

$post['message'] = preg_replace('/(<a href="mailto:)(.*)@(.*)(["]{1})/i'"$2 AT $3"$post['message']); 


This works much better, but it doesn't yet work work 100%. For name@domain.com, it gives the output:

name AT domain.com>name@domain.com

kennethsia 06-11-2007 12:40 PM

:p cool a mod in the making ^^ go dismounted!

Dismounted 06-12-2007 09:43 AM

PHP Code:

$post['message'] = preg_replace('/(<a href="mailto:)(.*)@(.*)(">(.*)</a>)/i'"$2 AT $3"$post['message']); 

To you coders, you are not allowed to use this code in your own hacks because I'm making one out of this :p.


All times are GMT. The time now is 06:24 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.01147 seconds
  • Memory Usage 1,747KB
  • 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
  • (5)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete