| Author |
Post |
|
|
#1 Fri Mar 16, 2007 10:46 am
|
|
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. »
|
|
|
#2 Fri Mar 16, 2007 1:00 pm
|
|
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>';
|
|
|
#3 Fri Mar 16, 2007 8:27 pm
|
|
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?
|
|
|
#4 Fri Mar 16, 2007 8:35 pm
|
|
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. 
|