SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Zealot Kamran's Avatar
    Join Date
    Sep 2000
    Location
    UK
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    My site is quite big, plus quite a few other sites link to some of my pages. What I would like is to place some code on the all the pages - for updates, instead of me updating all the pages manually.

    So basically all I would have to do is change it in one place, which will then change it on all the pages with the code.

    Not sure if I made myself clear enough...a bit like the SitePoint Tipfeed.

    Thanks

    Kam

  2. #2
    SitePoint Zealot honging's Avatar
    Join Date
    Jan 2001
    Location
    Chapel Hill, NC
    Posts
    160
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You may want to look into server side includes (SSI). Your host *should* support it. Although you should look up how this is done (i dont have a good resource handy), it works similiar to this:

    you input this code into your html file:

    <!--#include virtual="/filename.extension"-->

    When someone views your html file with that coding in it, the server will loadup filename.extension.

    Does this makes sense? Maybe someone else can explain it... I'm so very tired right now

  3. #3
    Freelance Web Designer KeithMcL's Avatar
    Join Date
    Oct 1999
    Location
    Dublin, Ireland
    Posts
    1,125
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes, server side includes are a good idea for making updating of your sites pages easier.

    If you are able to run Perl, ASP, PHP or Java you might want to look into a content management system (CMS) and a database-driven site.

    Here is an excellent tutorial on using PHP and MySQL to drive your database driven site.

    To look at some Perl CMS scripts, click here.

    For PHP CMS scripts, click here.

  4. #4
    One website at a time mmj's Avatar
    Join Date
    Feb 2001
    Location
    Melbourne Australia
    Posts
    6,282
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    SSI is a good place to start, and it made especially for your purpose.

    Just a note: a lot of the time you'll need to give your page a .shtml extension for the server to recognise the SSI.
    [mmj] My magic jigsaw
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    The Bit Depth Blog Twitter Contact me
    Neon Javascript Framework Jokes Android stuff

  5. #5
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Kamran...

    Here is thread with some good answers about SSI:

    http://www.sitepointforums.com/showt...threadid=21038
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  6. #6
    SitePoint Zealot Kamran's Avatar
    Join Date
    Sep 2000
    Location
    UK
    Posts
    143
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    Thx for the help.

    Some of my pages already end with .shtml, because of my newsboard.

    I've tried the SSI idea out and it works! - just one thing - how can I edit the colour/size of the writing?

  7. #7
    SitePoint Enthusiast S.K's Avatar
    Join Date
    Mar 2001
    Location
    Chennai,India
    Posts
    72
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I read an article on how to "Create a Database-Driven Site In 30 Minutes!" using SSI written by Corbbmacc O'Connor at Sitepoint but met with problems of not getting the customised error file as intended. I made a posting in this forum but unfortunately could not get any responce. You can view the posting here:
    http://www.sitepointforums.com/showt...threadid=20235
    I contacted the author of the article who was gracious enough to admit that many have told him about the problem and that he is going to take the article down.
    Any help coming..!
    TIA.
    Regards
    S.K
    CyberBrahma
    ~~~~~~~~~~~
    Ignorance is Bliss!

  8. #8
    SitePoint Addict Brian Asselin's Avatar
    Join Date
    Oct 2000
    Location
    New hampshire
    Posts
    202
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use PHP includes in various parts of my page that I change a lot, then I just change the include locally, and upload it, and the change takes effect on all of the pages. pretty much the same thing as the SSI, except it uses PHP.

    like this:

    <?php require '/home/dir/public_html/file.inc'; ?>

  9. #9
    SitePoint Wizard silver trophy TheOriginalH's Avatar
    Join Date
    Aug 2000
    Location
    Thailand
    Posts
    4,811
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    how can I edit the colour/size of the writing? [/B]
    Use external css. And make sure all includes are tagged correctly.

    Then any colour or size changes to the entire site can be made from one file.

    H
    ~The Artist Latterly Known as Crazy Hamster~
    922ee590a26bd62eb9b33cf2877a00df
    Currently delving into Django, GIT & CentOS


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •