SitePoint Sponsor

User Tag List

Results 1 to 22 of 22

Thread: No 1 Knows???

  1. #1
    SitePoint Evangelist
    Join Date
    Oct 2001
    Location
    Texas
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    No 1 Knows???

    I have asked a number of people about this... and no one knew how to do it.

    Problem: I have a header file and footer file and shtml pages use a SSI inlcude call to get them. In the Footer file i need to put a last modified script in it.

    Does anyone know how to do this show it says the last modified date of the shtml file and not the header and footer??

    Thanks

  2. #2
    SitePoint Enthusiast RogueJedi's Avatar
    Join Date
    Oct 2001
    Location
    Texas
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Put these SSI directives into your footer file, assuming the footer is in the same directory as the main document:
    Code:
    <!-- #config timefmt="%A, %B %d, %Y at %I:%M:%S %p " -->
    <p>This document was last modified on <!-- #flastmod file="ssitest.shtml" --></p>
    I got this information from doing a search at www.google.com for "server-side includes".
    Rob Nolan
    Do or do not, there is no try.

  3. #3
    SitePoint Evangelist
    Join Date
    Oct 2001
    Location
    Texas
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the problem is that the flastmod call will show the last modified of the specific file... how do you make it general so the footer SSI call works when included on all my pages...

  4. #4
    SitePoint Enthusiast RogueJedi's Avatar
    Join Date
    Oct 2001
    Location
    Texas
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok, I understand now. I don't think that's possible using either scripting or SSIs. I haven't used FrontPage in 3 years or so, but IIRC it had a component you could install on pages that would write the time and date to the page everytime you saved it.

    You may need to see if your editor has something similar.
    Rob Nolan
    Do or do not, there is no try.

  5. #5
    SitePoint Evangelist
    Join Date
    Oct 2001
    Location
    Texas
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Front page uses webbot's which when inserted into the footer file didn't even appear when loaded in browser so i think i might just give up on it...

  6. #6
    Prolific Blogger silver trophy Technosailor's Avatar
    Join Date
    Jun 2001
    Location
    Before These Crowded Streets
    Posts
    9,446
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The FrontPage webbots are basically the same thing as SSI, only they are in a Microsoft proprietary form. There's ways to edit this, but I suggest just hardcoding ssi functions that will be usable in any browser and/or WYSIWYG editor...you know, in case you decide to do something wise like ditch Frontpage.

    Sketch
    Aaron Brazell
    Technosailor



  7. #7
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,123
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Erm... There's some JS for this... Let me go have a lookey, see if I can find it.
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  8. #8
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,123
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  9. #9
    SitePoint Evangelist
    Join Date
    Oct 2001
    Location
    Texas
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i am not getting how this could be fitted to my purposes? any ideas?

  10. #10
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,123
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    You wanted a "last edited". That's what the page does (view source).
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  11. #11
    SitePoint Evangelist
    Join Date
    Oct 2001
    Location
    Texas
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    so if i paste that code into the footer file it would work on all the pages that call on it?

  12. #12
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,123
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Should do
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  13. #13
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    But keep in mind that saying "this page was edited yesterday" when it actually wasn't is sort of dishonest.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  14. #14
    SitePoint Evangelist
    Join Date
    Oct 2001
    Location
    Texas
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    creole i dont understand what you mean...

    i will try it and let you know if it works or not!!!


    Thanks a lot

  15. #15
    SitePoint Evangelist
    Join Date
    Oct 2001
    Location
    Texas
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    *problem*

    i copied and pasted your code into my footer file and when all the pages call on it via ssi it gets today's date. I dont know if that is 'todays date' or the date i last updated the footer file which is today?

    That is the same problem i have been having with all my scripts....

  16. #16
    SitePoint Evangelist
    Join Date
    Oct 2001
    Location
    Texas
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    should i paste the code into my main shtml page and put the document.write code in the footer?

  17. #17
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,123
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Here's the scoop... If you modify the file... Then view it? The last modified will be when you last modified it...
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  18. #18
    SitePoint Evangelist
    Join Date
    Oct 2001
    Location
    Texas
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    maybe we're not on the same page...

    I put the script in the Footer file... even though i modified that, i want it to show when i last modified the main page that called the footer file... so all the pages should have different dates on them...

    do you understand what i'm trying to do?

  19. #19
    SitePoint Wizard silver trophy Jeremy W.'s Avatar
    Join Date
    Jun 2001
    Location
    Toronto, Canada
    Posts
    9,123
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Yeah, so take it out of the footer and place it on each individual page (as an external javascript file).
    SVP Marketing, SoCast SRM
    Personal blog: Strategerize
    Twitter: @jeremywright

  20. #20
    SitePoint Enthusiast RogueJedi's Avatar
    Join Date
    Oct 2001
    Location
    Texas
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Is it possible to use ASP or PHP to dymanically include an SSI?
    If so, then Wbmstr84 could use one of those to dymanically write the <!-- #flastmod file="[page].shtml" --> statement. That is if his host allows PHP or ASP access.
    Rob Nolan
    Do or do not, there is no try.

  21. #21
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Both PHP and ASP have include functions that you could use in place of SSI. Additionally they both have date functions that would allow him to write the date to the page that way.

    So if he had either one of those, he wouldn't really need SSI.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  22. #22
    SitePoint Evangelist
    Join Date
    Oct 2001
    Location
    Texas
    Posts
    598
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well i just relaunched my site to use Shtml and thus am reluctant to switch...


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
  •