Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    New Coder
    Join Date
    Jun 2004
    Location
    michigan
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Update section of page

    Is there a way i can have a section of a web page updated by someone else without giveing them access to the whole page?

    I want the pastor to be able to put up a daily message in a box on the index page of the church's website but without giving him access to the site to update.

    Is there an easy way for him to do this?

    Thanks for the help.

  • #2
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,538
    Thanks
    8
    Thanked 1,093 Times in 1,084 Posts
    If your webhost allows SSI (Server Side Includes), that would be
    the easiest way. A special command line in your HTML gets replaced
    with whatever is in a text file (which would be your message).
    The extension on your web page would need to be changed to ".shtml"

    An alternative would be to use PHP scripting. Same idea as SSI, but
    the message is inserted with a PHP script.
    The extension on your web page would need to be changed to ".php"

    Find out if your webhost allows SSI, and let us know.

  • #3
    Regular Coder zro@rtv's Avatar
    Join Date
    Feb 2005
    Location
    on the network
    Posts
    433
    Thanks
    0
    Thanked 1 Time in 1 Post
    if your host has php you could use some tiny cms blog thing
    http://cutephp.com/
    or
    http://www.mylittlehomepage.net/my_little_weblog

    helps if people arent too comp savvy
    ._-zro
    zro@redtv
    zro.redtv.org

    "If HTML and the Web made all the online documents look like one huge book, RDF, schema, and inference languages will make all the data in the world look like one huge database"
    -Tim Berners-Lee, Weaving the Web, 1999

  • #4
    New Coder
    Join Date
    Jun 2004
    Location
    michigan
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thanks

    mlseim: My provider has not responded to me about the SSI so I still don't know.

    zro@rtv: I know they do not support PHP (it's on a MS server). Can this PHP be hosted somewhere else and the info be displayed on my page?

  • #5
    Regular Coder zro@rtv's Avatar
    Join Date
    Feb 2005
    Location
    on the network
    Posts
    433
    Thanks
    0
    Thanked 1 Time in 1 Post
    well figure out if they support any serverside action, as thatd be the best deal.

    At the VERY worst you could host something somewhere else, and use an iframe to display thre content.... but thats pretty sloppy.
    ._-zro
    zro@redtv
    zro.redtv.org

    "If HTML and the Web made all the online documents look like one huge book, RDF, schema, and inference languages will make all the data in the world look like one huge database"
    -Tim Berners-Lee, Weaving the Web, 1999

  • #6
    New Coder
    Join Date
    Jun 2004
    Location
    michigan
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    They DO allow SSI

    My hosting company just got back to me. Sorry for the delay.
    They do allow SSI.
    So what's next?

    And thanks again for the assist

  • #7
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,538
    Thanks
    8
    Thanked 1,093 Times in 1,084 Posts
    OK,

    The first thing to do is test it out ...

    Create a text file using Notepad ...
    Type your message, then save it as a file called: text1.txt

    Upload that file into the directory where your web page is located.

    Now, open up your web page and insert this line where you want
    your message to appear: <!--#include virtual="text1.txt"-->

    Now ... and this is important ... change the extension of your web page
    to .shtml

    Example: it's now called "index.html" change it to "index.shtml"

    (Any other pages that reference your .shtml web page should be edited
    to point to the new filename.)

    Display your web page and see if the message in "text1.txt" now shows
    up in the same place as your #include virtual line.

    That's what SSI does, it swaps the #include line with whatever is in
    the file you specify. You can see how powerful this can be. Your
    #include file can be anything, text, images, HTML.

    If this all works, let us know.

  • #8
    New Coder
    Join Date
    Jun 2004
    Location
    michigan
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Worked

    The SSI worked as promised. Thanks alot.

    Now is there a way I can get it so that text file can be uploaded or edited by someone without giving them access to the whole site or the shtml page it's in?

    What i'm hoping for here is for him to be able to write the text1.txt and put it on the site from his home.

    Any suggestions/ideas?

  • #9
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,538
    Thanks
    8
    Thanked 1,093 Times in 1,084 Posts
    Uploading the file from a web page using a password is where server-side
    languages come in. You mentioned that you can't use PHP ... but I am
    questioning that.

    Copy the code below into a text file (using Notepad).
    Save it as a file called "test.php".
    Upload the file into your main directory.
    Try viewing it and see what happens.

    Code:
    <?
    #test.php
    echo "This is a test <br>";
    echo "If you can see this, it's working. <br>";
    ?>
    Let us know the results.

  • #10
    New Coder
    Join Date
    Jun 2004
    Location
    michigan
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Didn't work

    I put the test.php file on the server just like the .txt file.
    I entered the address to it in the address bar (I assume you meant that when you said to view it) and it came back "page not found"

  • #11
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,538
    Thanks
    8
    Thanked 1,093 Times in 1,084 Posts
    darn ...

    Server side scripting is the only way to upload from
    a regular web page ...

    There is one other thought ... and that's using FTP.

    Someone else can't use PHP or Perl to upload to your
    webhost ... but they can use FTP.

    So, someone that uses PHP can load a script like this:
    http://www.zend.com/codex.php?id=527&single=1

    You would have to give them your Host/User/Password
    to put in their script. So, it should be someone you know.

    Your Pastor would go to the other guy's site and access
    a webpage he/she set-up. Pick the text file from his
    PC and enter a password. The PHP script uses FTP to
    access your webhost and upload the text file.

    That's the only solution I can come up with.

    I am curious myself ... so I might experiment with the link
    I gave you and see how well it works.

    Good Luck.

  • #12
    New Coder
    Join Date
    Jun 2004
    Location
    michigan
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    External Page display?

    Is it possible to use the SSI "<!--#include virtual="text1.txt"-->" to display another webpage in my page?

    I was thinking of setting up a site for him to have access to and using FrontPage to edit his part (since you can set FP to open a specific file every time) then publish it and it would be displayed in my page.

    This would allow him to update without giveing access to the entire site.

    Thoughts?

  • #13
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,538
    Thanks
    8
    Thanked 1,093 Times in 1,084 Posts
    Sure,

    You just add the path to the #include ...
    <!--#include virtual="./messages/text1.txt"-->

    Now the #include is a direct swap of whatever text is in the
    file with the <#include> line ... so if the other file happens
    to be a webpage with HTML, you can see what problems
    you might have.

    So, you could use an inline frame to display the other webpage
    inside your current page.

    Code:
    <html>
    <head><title>my main page</title></head>
    <body>
    This is my main page .... blah blah
    
    <iframe name='FRAME1' src='./messages/pastor_page.html' frameborder='0' scrolling='yes' width='500' height='600'></iframe>
    
    Back to my main page ... blah blah
    </body>
    </html>
    Your Pastor does whatever he wants with FrontPage and his HTML page
    goes into a sub-directory called "messages". You just pull the whole
    HTML webpage out and display it in an inline frame on your main page.

    I know, it gets confusing when you have to work around things ...

  • #14
    New Coder
    Join Date
    Jun 2004
    Location
    michigan
    Posts
    20
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thanks

    I think I kinda understand that. I'm going to give it a try. I'm also going to beg the host to support PHP there so I can do some of the other fancy stuff mentioned. It sounds cleaner.

  • #15
    Master Coder
    Join Date
    Jun 2003
    Location
    Cottage Grove, Minnesota
    Posts
    9,538
    Thanks
    8
    Thanked 1,093 Times in 1,084 Posts
    I can't believe your webhost doesn't support PHP!

    Especially if they support SSI.

    That seems really strange.

    You could switch to another webhost.
    Here's one that's only $24.95/year and supports everything,
    including a MySQL database.
    http://www.cleverdot.com


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

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