investigation for a invisible link

mobaobao

Registered Member
Joined
Feb 25, 2009
Messages
78
Reaction score
12
Hi mate, this is my story:

While I was studying some websites, I discovered a site seems using some 'blackhat' method to make the link invisible but I could not figure out how they can do this. So, I bring it here to see any people to help me for doing some investigation. The URL is hxxp://www.bradleycentersports.com. In the source code, you can find a div tag with id='fbb' and all the links & anchor text within this div tag get invisible. I've looked its CSS files but didn't find any 'fbb' footprint. I'm really curious about how they can do this. Please note that this site have PR5. Thanks.
 
I made this reply in another thread recently. They're probably doing something similar to this. I didn't bother to check it. but if you download the styles.css for that page you'll see the parameters they used for that div. If you use any of these examples you can also move the internal styles from the head to an external styles.css page like they do on that website.

OK the other day when I suggested using dropdown boxes or using divs I didn't actually have time to look up actual examples. I just looked up something a little while ago that needed to use hidden divs also. Since I brought up the idea earlier in this thread I thought I'd come back here and post the type of code I was talking about.
Code:
<html>
<head>
<title>Use a div to include hidden text</title>

<style type="text/css">
#HiddenDiv
{
visibility:hidden;
}
</style>

</head>
<body>
<p>There is a hidden div on this page with more text.  You need to view the page source to see it.<p>
<div id="HiddenDiv">
<h1>Title for our Hidden Text</h1>
<p>Your Hidden Text Goes Here</p>
<p>We are so slick we made a hidden div layer</p>
</div>

</body>
</html>
Hiding text in this manner will probably be considered the same as if you tried using white text on a white background, 0 pixel size or any other tricks for hiding text. It wouldn't be difficult for the crawlers to determine there isn't any way for a visitor to view the hidden text.

It would be better if you include a way for the visitors to actually see the text if they want. This type of div has many legitimate uses so, if you do that then the crawler might see it as legitimate text for your page.
Code:
<html>
<head>
<title>Show Hide text in div</title>

<script type="text/javascript">
<!--
function ShowHide(id, visibility) {
    obj = document.getElementsByTagName("div");
    obj[id].style.visibility = visibility;
}
//-->
</script>

<style type="text/css">
<!--
#HiddenDiv
{
visibility:hidden;
width:200px;
height:200px;
position:absolute;
left:200px;
top:50px;
background-color: #FFFFFF;
border:1px solid #000000;
}
-->
</style>

</head>
<body>

<div id="HiddenDiv">
<h1>Title for our Hidden Text</h1>
<p>Your Hidden Text Goes Here</p>
<p>We are so slick we made a hidden div layer</p>
</div>

--------------------
<p>Use the following hrefs if you want to have Turn On and Turn Off links</p>
<p>
<a href="javascript:ShowHide('HiddenDiv','visible')">show text</a> |
<a href="javascript:ShowHide('HiddenDiv','hidden')">hide text</a>
</p>
--------------------
<p>Use the following href if you prefer it to show on mouse over instead</p>
<p>
<a href="javascript:ShowHide('HiddenDiv','visible')"
      onmouseover="ShowHide('HiddenDiv','visible')"
      onmouseout="ShowHide('HiddenDiv','hidden')">
      Show Text Link
</a>
</p>
--------------------
</body>
</html>
That code will let you include links to turn the text box on, links to turn the text box off. links that will turn the box on and off on mouseover.

If you would rather just have a single link that will turn the text box on or off each time it's clicked you can use this code instead.
Code:
<html>
<head>
<title>Toggle HiddenText in div</title>

<script type="text/javascript">
<!--
function ToggleText(id) {
    obj = document.getElementsByTagName("div");
    if (obj[id].style.visibility == 'visible'){
   obj[id].style.visibility = 'hidden';
   }
   else {
   obj[id].style.visibility = 'visible';
   }
} 
//-->
</script>

<style type="text/css">
<!--
#HiddenDiv1
{
visibility:hidden;
width:200px;
height:200px;
position:absolute;
left:200px;
top:50px;
background-color: #FFFFFF;
border:1px solid #000000;
}

#HiddenDiv2
{
visibility:hidden;
width:200px;
height:200px;
position:absolute;
left:400px;
top:50px;
background-color: #FFFFFF;
border:1px solid #000000;
}
-->
</style>

</head>
<body>

<div id="HiddenDiv1">
<h1>Block 1 Title</h1>
<p>Here is one block of hidden text.</p>
</div>

<div id="HiddenDiv2">
<h1>Block 2 Title</h1>
<p>Here is another block of hidden text.</p>
</div>

<p>This web page has hidden divs</p>
<p>Click the links to toggle the hidden text</p>
<p><a href="javascript:ToggleText('HiddenDiv1')">Hidden Block 1</a></p>
<p><a href="javascript:ToggleText('HiddenDiv2')">Hidden Block 2</a></p>

</body>
</html>
Just change the parameters for the divs if you want a bigger or smaller box or to change the location, colors, etc. Each one of these is a complete html page, so if you want to see how the links actually work to show the hidden text box just copy them into notepad and save as html files, then load the page. This is really pretty simple pages so most html coders probably already know how, but for those who don't it might help some. :cool2:

@mrxinbollywood - I hope this helps out a little for what you were thinking about.

I don't know how well the text in hidden divs will work for SEO of your page, but I'm pretty sure these ideas would work better than using a 0 font size or similar trick to hide the text.

The cool thing about using the divs is that you can use h1 tags and other formatting to make the hidden text even better, and you can add as much text as you want. You can actually put a huge amount of content on a small page with this method. It's also great for photo sites because you can just use the photos as the anchors and use the text box for the photo descriptions.

You can probably figure out other uses for these type of text boxes also. I would recommend that if you use this kind of text box you change the div id to something besides HiddenDiv. I just used that to make it obvious for these examples. :smokin:

edit -
I just read your post again and see that you already looked in the css. So the code is probably in the script RennielFernandez pointed out.
 
Last edited:
There's a script tag that loads script from the twittericonfactory site.

EDIT: The script tag is right after the div you mention.
 
Last edited:
The offending code is

Code:
<SCRIPT TYPE="text/javascript">var icnid="2562";var icnwd='100';//101207</SCRIPT>

Although I havn't got a clue why yet.

Edit: above post explains it.
 
Last edited:
The offending code is

Code:
<SCRIPT TYPE="text/javascript">var icnid="2562";var icnwd='100';//101207</SCRIPT>

Although I havn't got a clue why yet.

Edit: above post explains it.

The first script that you quoted is what makes the twitter basketball bird show up in the sites header. It's the next script after that one that's affecting the div.
Code:
<script src="http://twittericonfactory.com/t/"></script>
a document.getElementById('fbb') function is included in it so I'm sure it has to do with this script.

I'm just not sure exactly why it's not showing anything though. It looks like the html and that script should make somekind of facebook link show up next to the twitter one. I'm not sure why it has the effect of hiding the div completely instead.
 
The first script that you quoted is what makes the twitter basketball bird show up in the sites header. It's the next script after that one that's affecting the div.
Code:
<script src="http://twittericonfactory.com/t/"></script>
a document.getElementById('fbb') function is included in it so I'm sure it has to do with this script.

I'm just not sure exactly why it's not showing anything though. It looks like the html and that script should make somekind of facebook link show up next to the twitter one. I'm not sure why it has the effect of hiding the div completely instead.

I've just extracted the code and test it, but no invisible:

Code:
<a id="icnlnk" href="http://twitter.com/bcproshop"></a>
<script type="text/javascript">var icnid="2562";var icnwd='100';//101207</script>
<div id='fbb'>
    <a href='http://www.test.org'>test1</a>
    <a href="http://test.net">test2</a>
</div>
<script src="http://twittericonfactory.com/t/"></script></td>
Grey, how can I trace the 'fbb' function?
 
I've just extracted the code and test it, but no invisible:
That's pretty close, but if you just copy that code into an html file on your pc it won't work. If you upload it to your server and load it from online then it does work.

OK I sorted this out for you a little bit. It's just a cut and paste script to display a twitter icon from the twittericonfactory website for a custom twitter button on a webpage. It's kind of like how people used to get myspace codes from third party websites.

The hidden links aren't something intentionally done by that website owner. If you go to the twittericonfactory website and select one of their icons for a twitter button on your website, they insert a couple of links into the code they give you.

Here is the code that's making that div not show up.
Code:
<a id="icnlnk" href="http://twitter.com/idname"></a>
<script type="text/javascript">var icnid="2562";
var icnwd='';//110101</script><div id='fbb'>
<a href='website1url'>anchortext1</a>
<a href='website2url'>anchortext2</a></div>
<script src="http://twittericonfactory.com/t/"></script>

This is the code in that script src file.
Code:
if(document.getElementById('icnlnk'))
{r=Math.floor(Math.random()*101);
u="http://twittericonfactory.com";f=document.getElementById('fbb');
i=document.getElementById('icnlnk');if(f){var c=new Image();
c.src=u+'/icon/'+icnid+'/1/';c.setAttribute("border","0");
c.style.width=icnwd;c.style.height="auto";i.appendChild(c);f.innerHTML='';
f.id='fbb'+r;i.id='icnlnk'+r;}
else{i.href=u;i.innerHTML="Icon display code is incomplete. Click to re-install.";
i.id='icnlnk'+r;}}

You could modify this to eliminate the twittericonfactory stuff, and to use an icon from your own site fairly easily. Change the icnlink href to whatever you want. create an image with the same icnid on your website and then change the u="URL" in the script to your the same website. I played with it a little bit so I know you can do that, you just have to play with it a bit to get it to work.

If twittericonfactory is using it then it's probably used by other similar third party sites. Since it's being used on that scale as a spam link method I would imagine google will probably figure that out soon if it hasn't already.

I can't say if this would be better or if it would be best to just try the hidden div method I gave earlier in the thread.
 
Last edited:
Wow, Gery you are genius! Do u think it is worth trying this method, as well as your hidden div method?
 
Wow, Gery you are genius! Do u think it is worth trying this method, as well as your hidden div method?

Like I said it would be pretty easy modify the code to eliminate everything that isn't totally necessary and to work totally from your own site.

I think it would be easier to make the hidden div method look more legit since you can have links that will actually display the hidden text. It can be made to seem it's done for the visitors instead of the crawlers.

But I really have no idea if one way would work better than another for SEO though. You just gotta make your own decision for that. :cool2:

Hope that helps. ~ Wolf
 
dont post other peoples websites idiot

@mobaobao - mangoman has a point. You're not supposed to 'out' other peoples websites. You should edit your first post to xxx out the guys website url. It isn't needed anymore anyway cause you have the code section you wanted.

@mangoman - You could have explained that better without calling anyone an idiot. I'm assuming you were just talking about the website in the OP's first post. I hope you didn't jump in here to call me an idiot.

I'm not really worried about outing the twittericonfactory site though. If they want to work that method that's up to them, but if they decide to do things like that then they need to expect they'll be pointed out. I'm sure they can survive me pointing that out. In case anyone from bhw tries using them it's best that they know to double check the code they get.
 
Back
Top