1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Content Locker but with ads instead of offer or links

Discussion in 'White Hat SEO' started by bigvito21, Aug 2, 2011.

  1. bigvito21

    bigvito21 BANNED BANNED

    Joined:
    Jun 17, 2011
    Messages:
    272
    Likes Received:
    8
    I tried to edit I code I seen on here yesterday but when I clicked on the ad, it didn't disappear. Does anyone knows how to do this or knows what I'm trying to do?
     
  2. jkrillah

    jkrillah Junior Member

    Joined:
    Mar 25, 2010
    Messages:
    191
    Likes Received:
    140
    Location:
    Canary Islands, Atlantic Ocean
    which content locker are you using? theres several?
     
  3. Reefer

    Reefer Junior Member

    Joined:
    Jan 3, 2010
    Messages:
    194
    Likes Received:
    71
    Occupation:
    BALLIN
    Location:
    no lie
    this can be done with css and javascript. lightbox overlay, then onclick open new page + close lightbox
     
  4. bigvito21

    bigvito21 BANNED BANNED

    Joined:
    Jun 17, 2011
    Messages:
    272
    Likes Received:
    8
    I'm trying to create something similar to a content looker but with an ad instead of offers and links. I want my visitors clicking on an ad before viewing my site.
     
  5. jason2009

    jason2009 Senior Member

    Joined:
    Apr 23, 2010
    Messages:
    1,005
    Likes Received:
    206
    Occupation:
    Student
    Location:
    Earth
    Which content locker you are using,paid or free.At first post your content locker code so anyone can help you.
     
  6. Deviant991

    Deviant991 Registered Member

    Joined:
    Jun 12, 2011
    Messages:
    51
    Likes Received:
    7
    You need a javascript (for this example jquery) function for this like:

    $('#idofthepopup').click(function(){

    $(this).fadeOut();

    });
     
  7. bigvito21

    bigvito21 BANNED BANNED

    Joined:
    Jun 17, 2011
    Messages:
    272
    Likes Received:
    8
    Well I can't post any links or codes on here yet cause I haven't been on here that long. I'll just pm people that would like to help me and Thanks. Anymore more suggestion or advice?
     
  8. gergo2007

    gergo2007 Jr. VIP Jr. VIP Premium Member

    Joined:
    Nov 2, 2010
    Messages:
    805
    Likes Received:
    213
    Wow, i'm really interested in this, actually i was thinking yesterday about a content locker just like this. lol :D
    If someone can to this for me, i offer some micro niche keywords in exchange for this:D
     
  9. JackSparrow

    JackSparrow Supreme Member

    Joined:
    Mar 24, 2007
    Messages:
    1,469
    Likes Received:
    2,054
    Occupation:
    Semi-Employed Pirate
    Location:
    search 4 blackhatsparrow
    Home Page:
    You need a script like this:

    Code:
    <header> 
     
    <script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js" type="text/javascript"></script> 
    <script type="text/javascript"> 
     
    	var Delay = 120;//Seconds after them clicking the link, the gateway vanishes. 
    	
    	function setupgateway()
    	{
    		var Left = $(window).width() /2;
    		Left = Left - $('#gatewaydiv').width()/2;
    		
    		var Top = $(window).height() /2;
    		Top = Top - $('#gatewaydiv').height()/2;
    		
    		$('#gatewaydiv').css('top', Top+'px').css('left', Left+'px').css('display', 'inline');
    		$('#gatewayDimmer').width($('html').width());
    		$('#gatewayDimmer').height($('html').height());
    		$('#gatewayDimmer').css('display','block');
    	}
    	
    	function removegateway()
    	{
    		$('#gatewaydiv').css('display', 'none');
    		$('#gatewayDimmer').css('display','none');
    	}
    	
    	$(document).ready(function()
    	{
    		$('.offerlink').click(function()
    		{
    			setTimeout('removegateway()', Delay*1000);
    		});
    		
    		setupgateway();
    	});
    </script> 
     
    <style> 
     
    	body
    	{
    		
    		background-repeat:repeat;
    		height:100%;
    		margin:0;
    	}
     
    	#mainContent
    	{
    		background-color:white;
    		margin-left:auto;
    		margin-right:auto;
    		margin-top:30px;
    		width:700px;
    		border:3px solid #CDCDCD;
    		text-align:center;
    	}
     
    	#gatewaydiv
    	{
    		background-image:url("");
    		background-repeat:no-repeat;
    		width:500px;
    		height:300px;
    		padding:20px;
    		position:absolute;
    		display:none;
    		background-color:#FFFFFF;
    		border:solid 4px gray;
    		text-align:center;
    		font-family:arial;
    	}
     
    	#gatewaydiv h1
    	{
    		font-size:35px;
    		color:#cc0000;
    	}
     
    	#gatewayMessage
    	{
    		font-size:18px;
    	}
    	
    	.offerlink
    	{
    		color:red;
    		font-weight:bold;
    	}
    	
    	#OfferList
    	{
    		margin:0;
    		padding:0;
    	}
    	
    	#OfferList
    	{
    		list-style:none;
    	}
     
    	#gatewayDimmer
    	{
    		background-color:#000000;
    		opacity:0.8;
    		display:none;
    		position:absolute;
    		top:0;
    	}
     
    	
    </style> 
     
    <script language="javascript"><!--
    document.myform.submit()
    //-->
    </script> 
     
    </header> 
     
    <body> 
     
     
    <div id="gatewayDimmer"> 
    </div> 
     
    <div id="gatewaydiv"> 
    	<ul id="OfferList"> 
    	[COLOR="Red"]Place banner code here[/COLOR]
    	</ul> 
    </div> 
     
    [COLOR="red"]The rest of your landing page html code goes here[/COLOR]
     
    </body>
    Very basic DIY content locker, but very effective.
     
    • Thanks Thanks x 1
  10. bigvito21

    bigvito21 BANNED BANNED

    Joined:
    Jun 17, 2011
    Messages:
    272
    Likes Received:
    8
    That is the one I had yesterday but I couldn't put my ads in it because it was still there after I click on it.
     
  11. JackSparrow

    JackSparrow Supreme Member

    Joined:
    Mar 24, 2007
    Messages:
    1,469
    Likes Received:
    2,054
    Occupation:
    Semi-Employed Pirate
    Location:
    search 4 blackhatsparrow
    Home Page:
    You should change this setting in the script to whatever time you want.

    var Delay = 120;//Seconds after them clicking the link, the gateway vanishes.

    So if you want the content locker to disappear immediately after someone clicks on your banner, then set it to var Delay=0.
     
  12. todor

    todor Regular Member

    Joined:
    Feb 7, 2011
    Messages:
    394
    Likes Received:
    218
    The OP is right, because of some reason the locker doesn't disappear when click on a link.

    This is a working code:

    Code:
    <html>
    <head> 
     
    <script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.min.js" type="text/javascript"></script>
    <script type="text/javascript">
     
    	var Delay = 0;//Seconds after them clicking the link, the gateway vanishes. 
     
    	function setupgateway()
    	{
    		var Left = $(window).width() /2;
    		Left = Left - $('#gatewaydiv').width()/2;
     
    		var Top = $(window).height() /2;
    		Top = Top - $('#gatewaydiv').height()/2;
     
    		$('#gatewaydiv').css('top', Top+'px').css('left', Left+'px').css('display', 'inline');
    		$('#gatewayDimmer').width($('html').width());
    		$('#gatewayDimmer').height($('html').height());
    		$('#gatewayDimmer').css('display','block');
    	}
     
    	function removegateway()
    	{
    		$('#gatewaydiv').css('display', 'none');
    		$('#gatewayDimmer').css('display','none');
    	}
     
    	$(document).ready(function()
    	{
    		$('.offerlink').click(function()
    		{
    			setTimeout('removegateway()', Delay*1000);
    		});
     
    		setupgateway();
    	});
    </script>
     
    <style>
     
    	body
    	{
    		background-image:url('http://i41.tinypic.com/29zvocy.jpg');
    		background-repeat:repeat;
    		height:100%;
    		margin:0;
    	}
     
    	#mainContent
    	{
    		background-color:white;
    		margin-left:auto;
    		margin-right:auto;
    		margin-top:30px;
    		width:700px;
    		border:3px solid #CDCDCD;
    		text-align:center;
    	}
     
    	#gatewaydiv
    	{
    		background-image:url("http://i41.tinypic.com/2znsvti.png");
    		background-repeat:no-repeat;
    		width:500px;
    		height:300px;
    		padding:20px;
    		position:absolute;
    		display:none;
    		background-color:#FFFFFF;
    		border:solid 4px gray;
    		text-align:center;
    		font-family:arial;
    	}
     
    	#gatewaydiv h1
    	{
    		font-size:35px;
    		color:#cc0000;
    	}
     
    	#gatewayMessage
    	{
    		font-size:18px;
    	}
     
    	.offerlink
    	{
    		color:red;
    		font-weight:bold;
    	}
     
    	#OfferList
    	{
    		margin:0;
    		padding:0;
    	}
     
    	#OfferList
    	{
    		list-style:none;
    	}
     
    	#gatewayDimmer
    	{
    		background-color:#000000;
    		opacity:0.8;
    		display:none;
    		position:absolute;
    		top:0;
    	}
    </style>
     
    <script language="javascript"><!--
    document.myform.submit()
    //-->
    </script> 
     
    </head> 
     
    <body> 
     
     
    <div id="gatewayDimmer">
    </div>
     
    <div id="gatewaydiv">
    	<ul id="OfferList">
    	<h1>Do an offer or DAI!</h1>
    	<span id="gatewayMessage">If you wish to see your friends alive. You will fill out an offer right now!</span>
    	<br /><br />
    	<li><a href="http://www.wachahost.com" class="offerlink" target="blank">Cheap Web Hosting</a></li>
    	<li><a href="http://www.yahoo.com" class="offerlink" target="blank">Yahoo</a></li>
    	<li><a href="http://www.google.com" class="offerlink" target="blank">Google</a></li>
    	</ul>
    	<br /><br />
    	After completing an offer. Please wait up to a minute for it to register.<br />
    	Thank you!
    </div>
     
    The rest of your landing page html code goes here
     
    </body>
    </html>
     
  13. bigvito21

    bigvito21 BANNED BANNED

    Joined:
    Jun 17, 2011
    Messages:
    272
    Likes Received:
    8
    I tried that code also but it still didn't work.
     
  14. bigvito21

    bigvito21 BANNED BANNED

    Joined:
    Jun 17, 2011
    Messages:
    272
    Likes Received:
    8
    Anymore help, I can use some
     
  15. bigvito21

    bigvito21 BANNED BANNED

    Joined:
    Jun 17, 2011
    Messages:
    272
    Likes Received:
    8
    I'm about to try to get this code working for my custom content locker.
     
  16. moolahman

    moolahman Newbie

    Joined:
    Jul 14, 2011
    Messages:
    15
    Likes Received:
    1
    This is interesting. Does it work for the OP yet?
     
  17. bigvito21

    bigvito21 BANNED BANNED

    Joined:
    Jun 17, 2011
    Messages:
    272
    Likes Received:
    8
    No, Using ads for op doesn't work because the ad is still their once its clicked.
     
  18. todor

    todor Regular Member

    Joined:
    Feb 7, 2011
    Messages:
    394
    Likes Received:
    218
    Strange... actually the first code doesn't work if you don't put class="offerlink" in your offer links. So, OP, make sure you put this class on every link offer... like this:
    <li><a href="http://yourCPAoffer.com" class="offerlink" target="blank">CPA Offer</a></li>

    OR

    if you change the name of the class, you have to put the same name in (if it's class make sure there is a dot in front, if it's id - put # in front):

    $(document).ready(function()
    {
    $('.offerlink').click(function()
    {
    setTimeout('removegateway()', Delay*1000);
    });

    setupgateway();
     
  19. JackSparrow

    JackSparrow Supreme Member

    Joined:
    Mar 24, 2007
    Messages:
    1,469
    Likes Received:
    2,054
    Occupation:
    Semi-Employed Pirate
    Location:
    search 4 blackhatsparrow
    Home Page:
    I've readjusted my content locker with a banner link, and once the banner is clicked the offer will open in a new window. And the content locker disappears from the original page. Feel free to inspect the code!

    Code:
    http://mediafirelinkage.leadhoster.com/GreenLantern/gateway.html
     
  20. SahL

    SahL Elite Member

    Joined:
    Jan 8, 2011
    Messages:
    1,594
    Likes Received:
    1,296
    Occupation:
    ★SEO expert and ★Sexpert
    Location:
    Bombay
    Home Page:
    Coool! It works!

    Please share the code. thank you :)