Html question.. Kinda hard, think you can answer it? =)
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Html question.. Kinda hard, think you can answer it? =)

  1. #1
    Member
    Join Date
    Mar 2002
    Posts
    31

    Talking Html question.. Kinda hard, think you can answer it? =)

    Hello, I have a question (as the subject line indicates ^_^ ).. It's hard to explain so I'll use examples... Let's say you have a website with about 200 pages. Now you have the website up and running and everything is fine until one day you decide to add another Link to the website. Would you have to manually go through all 200 or so pages or is their an easier way. This is without of course using frames. Any answer (including any webpage based language, php/cgi/asp/ etc etc etc) will be fine. Thanks!
    ~Apollovega~
    \"I will control my Destiny Terenica...I\'m not afraid.\"

  2. #2
    Member
    Join Date
    Jun 2003
    Posts
    71
    Hmmm.....you have the same links on every page? I usually only do that on my home page(But I'm a lazy ass). If you do, then(as far as I am aware) you will have to go through and manually add that link to every page.
    I believe with PHP you can make a side bar that actually acts like a different page(or frame or whatever), to the side and is always there no matter where on the website it is. Unfortunately I haven't learned PHP yet.
    However, I believe that if you change your website to include this method, then you will have to redo every page anyway.
    The best advice I can give you is "cut and paste".
    Sorry, I couldn't be more help.
    OWW
    \"The feeling of losing your mind is a terrible thing. But once it\'s gone, you\'re fine.\"
    Carrie Fisher

  3. #3
    Senior Member
    Join Date
    Oct 2001
    Posts
    385
    I think you might be able to do it with a perl script, but beyond that I couldn't help you. Google for it and you may find something.
    Preliminary operational tests were inconclusive (the dang thing blew up)

    \"Ask not what the kernel can do for you, ask what you can do for the kernel!\"

  4. #4
    Junior Member
    Join Date
    Mar 2003
    Posts
    14
    Im having that same problem right now.....I just copy and paste the part i editted to every page....otherwise you could use a frameset...

  5. #5
    Senior Member
    Join Date
    Mar 2003
    Posts
    117
    This can be done by using server side includes. Its great for anytype of thing that should be on many pages and is updated alot.

    Read up on SSI, google is your friend.
    .sig - There never was a .sig?
    I own a Schneider EuroPC with MS-Dos 3.3 and it works.

  6. #6
    Member
    Join Date
    Mar 2002
    Posts
    31
    It looks extremely difficult (SSI). Was hoping for something a lil more easier, but thanks for all your help =) As always, more suggestions are always a good thing. Thanks a lot guys!
    ~Apollovega~
    \"I will control my Destiny Terenica...I\'m not afraid.\"

  7. #7
    Senior Member
    Join Date
    Jun 2002
    Posts
    174
    If you want to save yourself a bunch of time in the future, you could use a combination of PHP and MySQL. I made a website where when you wanted to add a page with a link on the side of every page, you went to a script, entered the content of the page (with HTML tags for paragraphs, bolding, etc.) and the name of the page, clicked submit, and it stored everything in the database. Then you create a PHP page that loads different content depending on the query string that is passed along when you click the sidelink.
    The whole thing only took me a week or so, after I had the general layout figured out.
    PHP/MySQL is VERY easy to learn if you have any experience in pretty much ANY kind of programming (Perl experience helps).

    Good luck.
    I\'m back.

  8. #8
    Senior Member
    Join Date
    Jan 2002
    Posts
    1,207
    You can even(!) use PHP Without MySQL

    If you're only doing includes, it will work fine.

    SSI will work too, except you can do more with PHP - so you should be looking ahead, not back (SSI was amongst the first server-side web technologies)

    Alternatively, there's always search and replace.

    Or you could write your own header /footer adding program. It could be in a DOS bat file or Unix shell script, it's so simple. That way you can keep your files flat and still have headers/footers on them.

  9. #9
    Member
    Join Date
    Mar 2002
    Posts
    31
    I thought MySQL was just like a program that let's you view/create php files? I never knew it was an actual language.. Just proves how much I know about the subject, heh.
    Btw, embro1001, what was your website ?
    Thanks!
    P.s, What do you mean Dos bat files? Like I Know what they are and all, but how could you make it change the webpage and such?
    ~Apollovega~
    \"I will control my Destiny Terenica...I\'m not afraid.\"

  10. #10
    Senior Member
    Join Date
    Jan 2002
    Posts
    1,207
    What you can do, is edit your web pages in a partially-complete format, for example make bits of pages. Suppose you had 3 pages

    index.html page2.html page3.html

    Then instead, you edit

    index.part page2.part page3.part

    and make a batch file which does

    copy includes\header.html + index.part + includes\footer.html index.html
    copy includes\header.html + page2.part + includes\footer.html page2.html
    copy includes\header.html + page3.part + includes\footer.html page3.html

    Then it will create the HTML files from your .part files automatically.

    When you want to test how your site will look, just run the batch file.

    Then when it's all working, upload to your web server, but of course don't put the .part files, the include files or the batch file up there.

    If you're a bit cleverer, you can use a foreach loop in a batch file to accompish the above with less code (I'm not exactly sure how).

    Or you can use a program written in just about any other language to do the same thing.

Posting Permissions

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