Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 8 of 8
  1. #1
    Senior Member krystof's Avatar
    Join Date
    Jul 2005
    Posts
    155
    Member #
    10668
    Liked
    6 times
    When I first started building websites--of course the first thing I noticed was, it was ridiculous to repeat and edit the same links margin manually on every page.

    I asked my web host for the solution. He recommended SSI. It works fine so I never looked back. But...

    --I seldom see other sites with Shtml pages.
    --I never find SSI discussed or accounted for in web design forums and software.
    --A local student learning Dreamweaver told me that this program "seems to" edit all links on all pages from a single change.(?)

    I am not a professional, so it is not feasible for me to buy Dreamweaver or other $200+ products. And I know that many others are like me.

    aranoid: However, I have to wonder... HOW is everybody else maintaining their links margins? WHY is SSI not more common? Is there a better way? Am I stuck on something backward and unhealthy? :smoker:

  2.  

  3. #2
    Senior Member Fallout's Avatar
    Join Date
    Aug 2003
    Location
    Richmond, Virginia
    Posts
    543
    Member #
    2748
    PHP is the most common language of choice for includes at the moment, but its mostly a personal preference.

  4. #3
    Senior Member krystof's Avatar
    Join Date
    Jul 2005
    Posts
    155
    Member #
    10668
    Liked
    6 times
    Thank you Fallout!

    I hardly know what PHP is--and I do not care to learn another "language." So I guess I'm stuck with SSI, which does not require knowing anything except HTML. And hopefully, just as well...

  5. #4
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Well, PHP as a language is quite powerful, but for includes it's not much more complex than SSI, which is an addendum onto HTML anyway:
    PHP Code:
    <?php include( 'file.html' ); ?>
    will do the trick. There are variants to include, of course. Using `require' will make it so that the page will bail out with an error if the file isn't found or some other error occurs while including it (`include' will only output a warning). require_once and include_once do the same things as their other counterparts, except if the file has already been included, it isn't included again.

    The _once functions are mostly useful when using it to include other PHP files, which can sometimes contain function declarations that can only be included once without error. The point is, PHP isn't terribly complex to use if you're just including pages. The advantage is that, if you feel like going further, you can.

  6. #5
    Senior Member krystof's Avatar
    Join Date
    Jul 2005
    Posts
    155
    Member #
    10668
    Liked
    6 times
    Thank you, Shadowfiend.

    Well...so far as I know...

    Disadvantages to SSI:
    --must give special ".Shtml" name to pages. (Annoying but minor. And I just read that PhP has the same limitation--pages must be named .php.)
    --You can not view the complete result from your desktop. (The "server" is needed for the "server side." Is this the same with PhP???)

    Advantages to SSI:
    --Can easily add "date last modified."
    --Can easily add "rotating banners" and "rotating text" so the visitor sees a slightly different page each time.

    Is there any of the above features that PhP includes do NOT have?
    Is there any immediate EXTRA advantage that PhP DOES have?

    I.e.---I know that PhP is a great language. PhP can build entire software programs. But what concerns me at this time is:

    If my pages get named .SHTML now, this will be difficult to change later. Is there any reason that I might seriously regret that I did not name them .PhP...?

    Shadowfiend, Fallout, or anyone... can you briefly clarify this for me? Thank you!

  7. #6
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Quote Originally Posted by krystof
    --SNIP--
    --must give special ".Shtml" name to pages. (Annoying but minor. And I just read that PhP has the same limitation--pages must be named .php.)
    Yes, this is true, to a certain extent. In fact, you can set up the webserver (or, Apache, anyway) to process any HTML file as PHP; the issue is that then you add the overhead of running PHP EVERY time you want a page, including when the overhead is not necessary. This convention is used simply to avoid such unnecessary overhead, and I do not believe it is a necessary one.

    Quote Originally Posted by krystof
    --You can not view the complete result from your desktop. (The "server" is needed for the "server side." Is this the same with PhP???)
    Yes, this is definitely the same. However, you can run PHP locally along with a webserver -- the same is true of SSI. The setup can sometimes be rough, but is generally at least somewhat straightforward.

    Quote Originally Posted by krystof
    Advantages to SSI:
    --Can easily add "date last modified."
    That shouldn't be particularly difficult in PHP, either, as you should be able to use a short (maybe one- to two-line) script to get the last modified date of the file the script is on and output it.*

    Quote Originally Posted by krystof
    --Can easily add "rotating banners" and "rotating text" so the visitor sees a slightly different page each time.
    Also not particularly difficult with PHP, if a little more involved. I'd estimate two lines for this one, too; one to get a random number and one to output the tag, and even that can be compressed to one line. This does mean that you need to name your files a certain way (e.g., `banner1.jpg', `banner2.jpg', `banner3.jpg', etc)

    Quote Originally Posted by krystof
    Is there any of the above features that PhP includes do NOT have?
    As I pointed out above, not really.

    Quote Originally Posted by krystof
    Is there any immediate EXTRA advantage that PhP DOES have?
    As I said in my earlier post, again, no immediate advantage, no. It's when you want to expand a little that it can get reaaally useful.


    Quote Originally Posted by krystof
    I.e.---I know that PhP is a great language. PhP can build entire software programs. But what concerns me at this time is:

    If my pages get named .SHTML now, this will be difficult to change later. Is there any reason that I might seriously regret that I did not name them .PhP...?
    It depends on what you want to do later :-)

  8. #7
    Senior Member krystof's Avatar
    Join Date
    Jul 2005
    Posts
    155
    Member #
    10668
    Liked
    6 times
    Thank you Shadowfiend! That makes it pretty clear.

    I am writing a tutorial for people who want to follow my footsteps and learn the minimum to get a site running. I will suggest that people who are serious about web design should skip SSI and go to PHP. But for those (like me) who just want the minimum--I am reassured to hear that SSI is good enough.

    Also--I am sure you know this, but just for reference. I came across an article explaining FrontPage includes. These work with normal .htm files. However, this ties you in to FrontPage and FrontPage extensions. Also, it is recommended to change to PHP or SSI for large sites. So evidently, FrontPage includes are not as efficient.

    (Then of course there are frames, iframes, and the new "object" reference. These are not "server side" and must be processed and downloaded inefficiently by the browser, similar to a .jpg image. So--as most webmasters know--these options have their occasional uses, but using them for links margins is long outmoded.)

  9. #8
    Senior Member
    Join Date
    Jun 2005
    Location
    Atlanta, GA
    Posts
    4,146
    Member #
    10263
    Liked
    1 times
    Frames and iframes aren't bad so much because they're inefficient -- they aren't, really, too much more inefficient. They just have other issues, such as search engines indexing the page inside the frame, so you end up following a link to a page without the links frame. Also, back/forward moving through history with frames is not necessary intuitive and often frustrating.


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 06:00 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com