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

anyone know how to code blamads so the content locker appears on click????

Discussion in 'Black Hat SEO' started by m0nster, Aug 4, 2011.

  1. m0nster

    m0nster Senior Member

    Joined:
    Oct 20, 2010
    Messages:
    1,044
    Likes Received:
    1,003
    Occupation:
    Offline Marketing
    Location:
    USA
    if anyone has done this or can help me i'd appreciate it....I want to have blamads content locker appear on click instead of once they land on the site..my AM said i had to custom code it but it can be done =.= could be simple? any help would be greatly appreciated. <3
     
    • Thanks Thanks x 1
  2. baddrunk

    baddrunk Jr. VIP Jr. VIP Premium Member

    Joined:
    Jan 26, 2011
    Messages:
    118
    Likes Received:
    32
    i'd like to know this too. Can anyone help?

    having a hell of a time trying to figure this out or finding the answer.
     
  3. Grizzy

    Grizzy Senior Member

    Joined:
    Nov 11, 2008
    Messages:
    919
    Likes Received:
    999
    Real basic example. Pretty straight forward, just replace {AFFID} and {GATEWAYID} with your digits. You can take out the noscript tag if you wish.

    HTML:
    <html>
    <head>
    <title>test</title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> 
    <script src="https://blamads-assets.s3.amazonaws.com/assets/js/gwne.js" type="text/javascript"></script> 
    <noscript><meta http-equiv="refresh" content="0;url=https://an.blamads.com/no_js/{GATEWAYID}"/></noscript> 
    </head>
    <body>
    <a id="gateway" href="#">click here to activate gateway</a>
    <script type="text/javascript">
    $('#gateway').click(function() {
    	$.getScript('https://gateways.s3.amazonaws.com/gateway/aff_{AFFID}/g{GATEWAYID}/user_data.js');
    });
    </script>
    </body>
    </html>
     
    • Thanks Thanks x 1
  4. baddrunk

    baddrunk Jr. VIP Jr. VIP Premium Member

    Joined:
    Jan 26, 2011
    Messages:
    118
    Likes Received:
    32
    thanks grizz
    noob question though, i'm no good with code... i put the code in the actual post editor in WP dashboard. is this where i should put it or do i have to go into file manager and add it to an html file, etc?

    it seems to be locking out the whole post once you've clicked a link from the home page. What i'd like is for the locker to appear after an image on a post has been clicked.
     
  5. sockpuppet

    sockpuppet Junior Member

    Joined:
    Nov 7, 2011
    Messages:
    155
    Likes Received:
    145
    you could just bind the function to every a tag in your page
    HTML:
    <script type="text/javascript">
    $(function() { // document ready
      var handler = function() {
         $.getScript('....');
         $('a').unbind( 'click', handler ); 
         return false; // prevent default action
      }
      $('a').click( handler );
    });
    </script>
    
    i'm by far not a jquery expert, i don't know if this works.
    and this only works if your image is in a link tag, if its for some lightbox stuff, probably won't work.
    and another downside, the links don't work the user has to click again
     
    • Thanks Thanks x 1
  6. baddrunk

    baddrunk Jr. VIP Jr. VIP Premium Member

    Joined:
    Jan 26, 2011
    Messages:
    118
    Likes Received:
    32
    thanks sockpuppet, but again it's still locking the entire page.
    lol however, i'm so naive to this stuff, i may just be putting the code into the wrong place... where do i put this code?
     
  7. sockpuppet

    sockpuppet Junior Member

    Joined:
    Nov 7, 2011
    Messages:
    155
    Likes Received:
    145
    do you still have a srcipt tag for user_data.js?
    HTML:
    <script src=".../gateway/aff_{AFFID}/g{GATEWAYID}/user_data.js" type="text/javascript"></script>
    
    i assume that script triggers the locking. replace it with my code and put the url in getScript('url_here')
     
  8. Big_0n3

    Big_0n3 Senior Member

    Joined:
    Dec 2, 2009
    Messages:
    1,109
    Likes Received:
    85
    I also was looking for a script like this. THank you

     
  9. baddrunk

    baddrunk Jr. VIP Jr. VIP Premium Member

    Joined:
    Jan 26, 2011
    Messages:
    118
    Likes Received:
    32
    can someone tell me where i'm supposed to be putting the code?
    then i'll be able to tell whether or not your guys' suggestions are working.
    Thanks

     
  10. Grizzy

    Grizzy Senior Member

    Joined:
    Nov 11, 2008
    Messages:
    919
    Likes Received:
    999
    Since your using wp and only want to show it on individual posts it's a little more complicated. I think an easy way to do it would probably be to just edit your header.php file of your theme and add something like this right before the "</head>" tag
    Code:
    <?php if (is_single()) { ?>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> 
    <script src="https://blamads-assets.s3.amazonaws.com/assets/js/gwne.js" type="text/javascript"></script>
    <noscript><meta http-equiv="refresh" content="0;url=https://an.blamads.com/no_js/{AFFID}"/></noscript>
    <script type="text/javascript">
    $(document).ready(function() {
    	$("#loadGateway").click(function() {
    		$.getScript("https://gateways.s3.amazonaws.com/gateway/aff_{AFFID}/g{GATEWAYID}/user_data.js"); 
    	});
    });
    </script>;
    <?php } ?>
    
    If you see that jquery is already included in your header remove that line from the code above. You could also just put that above code in your single.php without the php condition (just script tags), but pretty sure that the noscript meta refresh needs to be in the <head>.


    Now you can use something like:
    Code:
    <img id="loadGateway" src="yourimage.jpg" style="cursor:pointer" />
    in your post (via your dashboard). The important part is the id="loadGateway". Make sure the image you use to activate the gateway onclick always has that same attribute. I haven't tested the above, but I don't see why that shouldn't work for you.

    note: That's just gonna activate the gateway onclick, it won't reveal any content or anything (that will require more code).
     
  11. Junkfood00

    Junkfood00 Elite Member

    Joined:
    Sep 13, 2011
    Messages:
    1,949
    Likes Received:
    1,336
    I've also been working on this and so far I accomplished making it onClick myself but I'm not sure how to redirect to a specified URL after an offer has been filled and the widget has been closed.

    There is some information about it here http://support.blamads.com/index.php?pg=kb.page&id=143 but I don't quite get it.
     
    • Thanks Thanks x 1
  12. m0nster

    m0nster Senior Member

    Joined:
    Oct 20, 2010
    Messages:
    1,044
    Likes Received:
    1,003
    Occupation:
    Offline Marketing
    Location:
    USA
    hm. no need anymore :p thanks for your time to post though junkfood00
     
  13. Junkfood00

    Junkfood00 Elite Member

    Joined:
    Sep 13, 2011
    Messages:
    1,949
    Likes Received:
    1,336
    Hehe I'm actually looking for help, I don't know how to do that, do you know how?