UseBB Community

The official board for UseBB help and discussion

UseBB Community » Help & Support » Hide mail-adress

Hide mail-adress

Moderators: Gaia.

Page: 1

Author Post
Member
Registered: Mar 2007
Posts: 27
The admin-mail-adress is puplic and open for spam.

I want to hide/encrypt this mail-adress via a little JavaScript:

<script language="JavaScript" type="text/javascript">
<!--
var c="34225:20165:17945:19425:19980:11840:19055:20535:18130:18685:19055:8510:18500:18685";
var ac=c.split(":");
var s="";
for(i=1;i<ac.length;++i){s+=String.fromCharCode(Number(ac[i])/Math.sqrt(Number(ac[0])));}
document.write("<a href='mailto:" + s + "?subject=IKGForum'>Admin kontaktieren</a>");
//-->
</script>


How can i include that script in page_head.php line 108?
« Last edit by Christiane on Fri Mar 16, 2007 10:50 am. »
Developer
Registered: Apr 2004
Posts: 2215
Location: Belgium
You should not use that JavaScript since it uses document.write() which does not actually work in XHTML 1.0.

UseBB 1.0.5 has a HTML entity decoder for e-mail addresses, you could change line 108 from
$link_bar[] = '<a href="mailto:'.$functions->get_config('admin_email').'">'.$lang['ContactAdmin'].'</a>';

to
$link_bar[] = '<a href="mailto:'.$functions->string_to_entities($functions->get_config('admin_email')).'">'.$lang['ContactAdmin'].'</a>';
_______________
--Dietrich (developer)
UseBB roadmap, dev mailing list & weblog
Member
Registered: Mar 2007
Posts: 27
I do not understand all effects in toto.

I've replaced the code. Now i cannot show/see source code any longer in my browser. Is that a result of that change?
But when i cannot edit, does robot further can scan the sites?
Developer
Registered: Apr 2004
Posts: 2215
Location: Belgium
The code only converts the e-mail address to HTML entities. If you cannot see the source code there must be something wrong with your browser. :)
_______________
--Dietrich (developer)
UseBB roadmap, dev mailing list & weblog

Page: 1

UseBB Community » Help & Support » Hide mail-adress

UseBB Community is powered by UseBB 1 Forum Software