Force text on all pages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • goatboy
    New Member
    • Sep 2009
    • 7

    Force text on all pages

    I'm running a home server and have set up a few accounts for some friends of mine. I have given them each ~user (I forgot the term) public_html directories.

    One thing I want to do is to force a SSI across all of their pages without having to manually add them. For example, I want something similar to:

    "<This page hosted on _____>" or "<Server downtime from _____ to _____>"

    as a banner on the top-left corner (or any other specified location) of each user's page. This is to ensure that if I want a message to be seen, it will be seen.

    Does anyone know of a way to do this?
  • goatboy
    New Member
    • Sep 2009
    • 7

    #2
    Self-bump. Google has been no help as of yet. The only thing I could think of would be to write a templating system in PHP, but I'm not quite that skilled yet and I am very stubborn about only using my own code. Here are my specs:

    PHP Version: 5.2.10-2ubuntu6.3
    Apache: 2.2.12 (Ubuntu)
    Kernel: 2.6.31-14-generic-pae
    I'll keep researching while I await a response.

    Comment

    • dgreenhouse
      Recognized Expert Contributor
      • May 2008
      • 250

      #3
      Look into the auto_prepend_fi le and auto_append_fil e directives for PHP.


      But be careful how you structure any pages on the site(s).
      I'd imagine session management will have to be handled in the auto_prepend_fi le.
      I never use them as they can cause you nightmares if you forget they're turned on.

      You'll obviously have to instruct your friends on the usage.

      Possibly you could house all the pages in an iFrame that's encapsulated by the prepend and append files. That way, you might avoid many of the nightmares I envisioned above.

      e.g.
      Code:
      ---> prepend file contents:
      <html>
      <head>{global site scripts and css here}</head>
      <body>
      <iframe id="something_really_really_unique">
      <--- end of prepend file
      
      [Your friend's files get loaded here...]
      
      ---> append file contents:
      </iframe>
      </body>
      </html>
      <--- end of append file
      Hope that helps.

      Comment

      Working...