Anyone good with PHP?

Discussion in 'General Off-Topic Chat' started by Bitbyte, Oct 21, 2008.

Oct 21, 2008

Anyone good with PHP? by Bitbyte at 12:12 AM (1,426 Views / 0 Likes) 10 replies

  1. Bitbyte
    OP

    Member Bitbyte GBAtemp Advanced Fan

    Joined:
    Dec 20, 2003
    Messages:
    985
    Location:
    ._________.
    Country:
    Belgium
    Basically, I have a page with a button. If a user clicks on that button, a timer has to start and after about XX seconds, a pop-up has to be shown, making it so that the user can't click on the website anymore, so, with just the pop-up focused. After another XX seconds, the pop-up will have to vanish.

    Really hope someone can help me out with this, it shouldn't be that hard, but I don't know the first thing about PHP [​IMG]
     
  2. djtaz

    Member djtaz PM's Full - Wadder Me

    Joined:
    Sep 21, 2008
    Messages:
    2,997
    Country:
    Ireland

    You wont be able to do that with PHP - you will need javascript and flash id think.
    most popups are blocked these days so its harder to get around them.
     
  3. chuckstudios

    Member chuckstudios Putting the pro in procrastination

    Joined:
    Jul 19, 2006
    Messages:
    896
    Location:
    North Carolina, USA
    Country:
    United States
    You'd either need Flash or some crazy-ass z-index'ing Javascript to do this. Not PHP.
     
  4. Bitbyte
    OP

    Member Bitbyte GBAtemp Advanced Fan

    Joined:
    Dec 20, 2003
    Messages:
    985
    Location:
    ._________.
    Country:
    Belgium
    Yeah, been playing around with Javascript for a while, but I can't get it to stay focused though (so you can't click on the site unless you click on the pop-up).
     
  5. FAST6191

    Reporter FAST6191 Techromancer

    pip
    Joined:
    Nov 21, 2005
    Messages:
    21,738
    Country:
    United Kingdom
    The question then is how secure do you want it to be (obviously not a trivial bypass) but what about someone with adblock/noscript or someone with firebug/greasemonkey who knows how to use it?

    Why not go steal look at something from one of those hosting sites or a mirror site, they often redirects with a timer which would suit your needs quite well from what you say.

    As for specifics I can not really help you though, web coding is not my thing.
     
  6. chuckstudios

    Member chuckstudios Putting the pro in procrastination

    Joined:
    Jul 19, 2006
    Messages:
    896
    Location:
    North Carolina, USA
    Country:
    United States
    If I remember I'll whip up some JS for this around 10ish. In fact, I'll leave this tab open to remind myself.
     
  7. aerowalk

    Member aerowalk GBAtemp Regular

    Joined:
    May 22, 2006
    Messages:
    124
    Country:
    Australia
    you can use javascript greybox to popup other page (make sure to disable the greybox close button)
    then after x seconds, using body onload, set timeout the auto close function (refer to the api)

    you need a bit knowledge of javascript though
    http://orangoo.com/labs/GreyBox/
     
  8. Bitbyte
    OP

    Member Bitbyte GBAtemp Advanced Fan

    Joined:
    Dec 20, 2003
    Messages:
    985
    Location:
    ._________.
    Country:
    Belgium
    Alright, thanks a lot for all the input thus far. I'll definitely look into GreyBox, that looks great [​IMG]
     
  9. chuckstudios

    Member chuckstudios Putting the pro in procrastination

    Joined:
    Jul 19, 2006
    Messages:
    896
    Location:
    North Carolina, USA
    Country:
    United States
    Yeah, use GreyBox. It's better than anything I would have made.
     
  10. Bitbyte
    OP

    Member Bitbyte GBAtemp Advanced Fan

    Joined:
    Dec 20, 2003
    Messages:
    985
    Location:
    ._________.
    Country:
    Belgium
    Hmmm, I got GreyBox installed but I can't make the close icon disappear..

    *edit, Okay, I tried with the other method, I really did. But it didn't work. If someone's interested in making this, I will make it worth their while. Just PM me to get a site where you see such a script live. I just need to make something like that.
     
  11. aerowalk

    Member aerowalk GBAtemp Regular

    Joined:
    May 22, 2006
    Messages:
    124
    Country:
    Australia
    comment out this line in gb_scripts.js

    Code:
    // AJS.ACN(_57,btn);
     

Share This Page