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

Anyone good with PHP? Need help

Discussion in 'Other Languages' started by spectrejoe, May 4, 2014.

  1. spectrejoe

    spectrejoe Supreme Member

    Joined:
    Sep 25, 2013
    Messages:
    1,425
    Likes Received:
    222
    Could use some help with something, Need to add a "onclick" feature from content lockers from CPAGRIP to a wordpress plugin written in php where people gotta click like to see the content and i want to make it so that the content locker will also popup when they press like.

    I can pay a bit I guess
     
  2. I Make Dollars

    I Make Dollars BANNED BANNED

    Joined:
    May 4, 2014
    Messages:
    175
    Likes Received:
    91
    You want javascript for this, not php.
     
  3. spectrejoe

    spectrejoe Supreme Member

    Joined:
    Sep 25, 2013
    Messages:
    1,425
    Likes Received:
    222
    well idk if you can add a java script to a php file since I only know basic programming (still learning) .

    But if someone could do it, it would be amazing
     
  4. bartosimpsonio

    bartosimpsonio Jr. VIP Jr. VIP Premium Member

    Joined:
    Mar 21, 2013
    Messages:
    8,832
    Likes Received:
    7,447
    Occupation:
    ZLinky2Buy SEO Services
    Location:
    ⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩⇩
    Home Page:
    Just open the PHP file in any text editor and add the onclick javascript where the html shows up right now. There's no PHP in that area of the code just HTML
     
  5. spectrejoe

    spectrejoe Supreme Member

    Joined:
    Sep 25, 2013
    Messages:
    1,425
    Likes Received:
    222
    couldn't find that area though, that's the problem
     
  6. auxiliarus

    auxiliarus Regular Member

    Joined:
    Aug 4, 2013
    Messages:
    466
    Likes Received:
    232
    Location:
    Russian Federation.
    You can insert HTML/Javascript right after the PHP-end tag.
     
  7. spectrejoe

    spectrejoe Supreme Member

    Joined:
    Sep 25, 2013
    Messages:
    1,425
    Likes Received:
    222
    there's loads of files though idk in which one to insert it into...

    and to make the like locker show up I just need to use a tag called [to_like] so there's no php in the actual post
     
  8. BassTrackerBoats

    BassTrackerBoats Moderator Staff Member Moderator Jr. VIP

    Joined:
    Mar 10, 2010
    Messages:
    12,733
    Likes Received:
    21,945
    Occupation:
    I don't actually have a job
    Location:
    It's an Algo, of course it can be gamed.
    Home Page:
    I have an old script laying around on a computer at my other home. I'll see if I can access it and find it tomorrow when I go to work and if so, I'll PM it to you.

    It's easy enough even a moron like me can set it up.
     
  9. spectrejoe

    spectrejoe Supreme Member

    Joined:
    Sep 25, 2013
    Messages:
    1,425
    Likes Received:
    222
    Thanks so much for all the help this past week :D
     
  10. royserpa

    royserpa Jr. VIP Jr. VIP Premium Member

    Joined:
    Sep 28, 2011
    Messages:
    4,641
    Likes Received:
    3,491
    Gender:
    Male
    Occupation:
    Negative Options aka Rebills!
    Location:
    Royserpa
    Home Page:
    Bro i will check that php shortcode file to see if i can find the line there, maybe i missed a spot there. Will pm you here or on skype after i recheck it.
     
  11. BassTrackerBoats

    BassTrackerBoats Moderator Staff Member Moderator Jr. VIP

    Joined:
    Mar 10, 2010
    Messages:
    12,733
    Likes Received:
    21,945
    Occupation:
    I don't actually have a job
    Location:
    It's an Algo, of course it can be gamed.
    Home Page:
    Here is the script. Put it anywhere on your site after you customize it... I had it set for 3 different offers but you can change that.

    <script type="text/javascript">

    var Delay = 100;//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><div id="gatewayDimmer">
    </div>
    <style>

    body
    {
    background-image:
    background-repeat:repeat;
    height:100%;
    margin:0;
    }

    #mainContent
    {
    background-color:black;
    margin-left:auto;
    margin-right:auto;
    margin-top:30px;
    width:700px;
    border:3px solid #A52A2A ;
    text-align:center;
    }

    #gatewaydiv
    {
    background-image:url();
    background-repeat:no-repeat;
    width:500px;
    height:300px;
    padding:20px;
    position:absolute;
    display:none;
    background-color:#000000;
    border:solid 4px gray;
    text-align:center;
    font-family:arial;
    }

    #gatewaydiv h1
    {
    font-size:35px;
    color:red;
    }

    #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>
    <div id="gatewaydiv">
    <ul id="OfferList">
    <h1>Get a Loan Today!</h1>
    <span id="gatewayMessage"><b>Fast Easy Approval Loans!</b></span>
    <br /><br />

    <li><h3><a href="http://affiliate.offerhere" class="offerlink" target="blank">Click to See </a></li>
    <li><h3><a href="http://affiliate.offerhere" class="offerlink" target="blank">Click Here for </a></li>
    <li><h3><a href="http://affiliate.offerhere" class="offerlink" target="blank">Click Here to Search</a></li>
    </ul>
    <br /><br />
    After completing an offer. Please come back to the site and see what else we can offer you!<br />


    </div>
     
  12. I Make Dollars

    I Make Dollars BANNED BANNED

    Joined:
    May 4, 2014
    Messages:
    175
    Likes Received:
    91
    Dude just hire someone. Jesus.
     
  13. spectrejoe

    spectrejoe Supreme Member

    Joined:
    Sep 25, 2013
    Messages:
    1,425
    Likes Received:
    222
    Hmm tried it but its not exactly what I needed, I can make the widget show up if they click a link or a button but what I need it to do is when they especifically click on the like button not anywhere else because after they like all the content will be unlocked and they can read freely
     
  14. spectrejoe

    spectrejoe Supreme Member

    Joined:
    Sep 25, 2013
    Messages:
    1,425
    Likes Received:
    222
    Already said I could pay but no one seems interested.
     
  15. joegarbett

    joegarbett Newbie

    Joined:
    Dec 16, 2014
    Messages:
    29
    Likes Received:
    4
    Change
    Code:
    [COLOR=#FFFFCC]$('.offerlink').click(function()[/COLOR]
    [COLOR=#FFFFCC]{
    To

    Code:
    [/COLOR][COLOR=#FFFFCC]$(document).on("click", '.offerlink', function() {
    [/COLOR]Then the onclick will still work in the DOM changes (ie, html gets replaced ;)).
     
  16. softnwords

    softnwords Newbie

    Joined:
    Sep 16, 2011
    Messages:
    5
    Likes Received:
    0
    Home Page:
    I think Java wont help you out for browser events are dependable for each browsers.So Ajax is the best choice for this deal. Load a portion of content on page load initially and use ajax for loading the rest of content once reader clicks like on the page.