• There is an important update regarding account security and 2FA. Please click here for more information.
  • ❤️ It's that time of the year again - Happy Valentine's Day! Luvdisc is back to help spread the luv again. Interested in sending a message of appreciation to some special users on the site, and earning a brand-new badge in the process? Then click here for more information! ❤️
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.
  • Imgur has blocked certain regions from viewing any images uploaded to their site. If you use Imgur, please consider replacing any image links/embeds you may have on PokéCommunity so everyone can see your images. Click here to learn more.

Layout switching

scolari

spriter god (yes me)
  • 781
    Posts
    21
    Years
    Ok what i want to be able to do is have my default layout load but when people click on a special link the header and will change is there anyway to do this without make a whole new page?
     
    I believe Greg came up with a code for this a while back. But that's not much help now... x.x
    Maybe search through some script repositories? =/
     
    do you mean like give options for two seprate layouts? Kinda like PokeDen?
    (Oh my gosh! Plankton is screaming on the TV and his cousin can't read all because the fake secret ingredient of the Krabby Patty is plankton, has to go watch O.O)
     
    not 2 totally seperate layouts i just want the header image to change (so diff pokemon are there) even if there is a script so it shows a random header
     
    ok thanks i think i found a script with help of ppn steve anyway i will ask pdwooper since he is an affiliate of mine =) and a friend
     
    RoboMechaWobbuffet said:
    I believe Greg came up with a code for this a while back. But that's not much help now... x.x
    Maybe search through some script repositories? =/

    ...where's the code?

    I neeeeeeeed it
     
    I wrote a script to show a random image a while back (JavaScript), I think I can dig it out if you want it.

    You know what we should have here? A code snippets thread, where we can provide snippets for people to use XD. I wrote stuff like a random image code, a change-on-mouse-over-for-a-certain-amount-of-time thing, a Javascript slide show code for a site I did for a client over the summer, I'd be happy to hand them over (for example).
     
    it doesn't matter now i got a random code that works its in php check out my site if you wanna see what it does (hopefully you know where to look for my site link cough*down*cough)
     
    To have multiple layouts, just name them layout1.php, layout2.php, etc, and have a splash page.

    Then for the links, make them be <a href="?id=blah"> instead of <a href="index.php?id=blah">

    By not having the index.php there, it'll keep the same layout file

    EX:
    When you're on layout1.php and click <a href="?id=blah"> it'll take you to layout1.php?id=blah and on layout2.php it would take you to layout2.php?id=blah
     
    Greg, he just wanted a random header image - not different layouts per se. XD
     
    Back
    Top