Adblock breaks this site

how to get this to show up...

Discussion in 'Web Programming' started by iJonny, Oct 18, 2008.

  1. iJonny

    iJonny Active Member
    Banned

    Joined:
    Jul 25, 2007
    Posts:
    150
    Referrals:
    0
    Sythe Gold:
    0
    how to get this to show up...

    Its kind of hard to explain. for example:
    say if my website had the same layout for every page, and i had a box on the left hand side with like a poll in it. is there a way i could change the poll when ever i wanted without editing every single page on my site? cheers
     
  2. SuF

    SuF Legend
    Pirate Retired Global Moderator

    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary
    how to get this to show up...

    PHP or SSI would work.
     
  3. Supah Fly

    Supah Fly Active Member
    Banned

    Joined:
    Aug 22, 2007
    Posts:
    202
    Referrals:
    1
    Sythe Gold:
    0
    how to get this to show up...

    PHP:
    include('mypoll.php');
    Add that to where your poll would be on all of your pages.
     
  4. lumentec_dark

    lumentec_dark Member
    Banned

    Joined:
    Nov 9, 2008
    Posts:
    52
    Referrals:
    0
    Sythe Gold:
    0
    how to get this to show up...

    Or use:

    PHP:
    <?php require('mypoll.php'); ?>
    Which causes an error to occur and stops the page from loading if a poll doesn't exist.
    It's usually a good thing to stop a page from loading if it's missing components.
     
  5. Supah Fly

    Supah Fly Active Member
    Banned

    Joined:
    Aug 22, 2007
    Posts:
    202
    Referrals:
    1
    Sythe Gold:
    0
    how to get this to show up...

    it stops the page from processing if the file is not found. im pretty sure you could do

    PHP:
    function(params) OR die('OH NOES MAI FUNCTN DIDNT WORK');
     
  6. lumentec_dark

    lumentec_dark Member
    Banned

    Joined:
    Nov 9, 2008
    Posts:
    52
    Referrals:
    0
    Sythe Gold:
    0
    how to get this to show up...

    Ignoring your sarcasm, that's exactly what I said.
     
  7. Nullware

    Nullware Guru

    Joined:
    Jan 30, 2007
    Posts:
    1,761
    Referrals:
    4
    Sythe Gold:
    0
    how to get this to show up...

    Or just load the poll question and answers from a text file. Easiest updating from your point of view with only a minor hit on performance.
     
< Do anyone know how.. | Adding a proxy saerch engine to youre site >


 
 
Adblock breaks this site