1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Can this be done?

Discussion in 'HTML & Website Design' started by General Grant, Jan 15, 2005.

  1. #1
    Is there a software or script that will insert whatever you want in hundreds of webpages without having to manually edit them all?
     
    General Grant, Jan 15, 2005 IP
  2. elklabone

    elklabone Peon

    Messages:
    242
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Pages on the same site, or pages on different domains?
     
    elklabone, Jan 15, 2005 IP
  3. J.D.

    J.D. Peon

    Messages:
    1,198
    Likes Received:
    65
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Use sed (stream editor). It's a command line tool that comes with all flavors of Linux and you can find one for Windows. sed can insert text after a certain pattern, as well as it can delete and modify pattern-matching text.

    J.D.
     
    J.D., Jan 15, 2005 IP
  4. General Grant

    General Grant Well-Known Member

    Messages:
    318
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    160
    #4
    Pages are on the same site, but I'm too damn lazy to edit 500+ pages for one line of code.
     
    General Grant, Jan 15, 2005 IP
  5. elklabone

    elklabone Peon

    Messages:
    242
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Sounds like SED id your best bet. While you're changing it, you might as well take out the ending HTML tags </body></html> or whatever and replace it with a common PHP footer file that you can edit in the future:

    <? include "footer.php"; ?> - Where the footer file contains the end of your HTML docs.

    Good luck.

    --Mark
     
    elklabone, Jan 16, 2005 IP
  6. phrozen_ra

    phrozen_ra Peon

    Messages:
    147
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Unless you tell Apache or whatever you are using to treat HTML files as PHP files.... that won't work
     
    phrozen_ra, Jan 16, 2005 IP
  7. mopacfan

    mopacfan Peon

    Messages:
    3,273
    Likes Received:
    164
    Best Answers:
    0
    Trophy Points:
    0
    #7
    What I find so interesting is that most everyone here automatically assumes that the webserver is linux and apache with php without any hesitation. I would think that from the number of posts about asp, asp.net and cold fusion for the coop, that such a myopic generalization would not be so rampant.
     
    mopacfan, Jan 16, 2005 IP
  8. phrozen_ra

    phrozen_ra Peon

    Messages:
    147
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #8
    no... i'm on Windows, IIS, PHP, MySQL... but i would definately not go with ASP or JSP...
     
    phrozen_ra, Jan 16, 2005 IP
  9. elklabone

    elklabone Peon

    Messages:
    242
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #9
    PHP runs on Windows, also. Most hosting account come with PHP...

    Sorry if I was a little vague, yeah you'd have to have .php files or force .htm files to go through PHP, I'm sure you could do the same thing with ASP or JSP also, but I'm only familiar with php... my point was to create a way to change your footer again in the future if you need to.

    --Mark
     
    elklabone, Jan 16, 2005 IP
  10. EdenView

    EdenView Peon

    Messages:
    305
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #10
    EditPad is a great win based product for editing in bulk.

    The "lite" version is free, and on download.com.
     
    EdenView, Jan 21, 2005 IP
  11. wendydettmer

    wendydettmer Peon

    Messages:
    1,462
    Likes Received:
    70
    Best Answers:
    0
    Trophy Points:
    0
    #11
    wouldn't SSI's work without using PHP to change the header/footer's? it's what i've always done.
     
    wendydettmer, Jan 23, 2005 IP
  12. john_loch

    john_loch Rodent Slayer

    Messages:
    1,294
    Likes Received:
    66
    Best Answers:
    0
    Trophy Points:
    138
    #12
    Yes Server Side Includes will work regardless of server.

    It would be the best option so far.. :)
     
    john_loch, Jan 23, 2005 IP
  13. my3cents

    my3cents Peon

    Messages:
    332
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #13
    There are a number of free-ware text search and replace programs out there. Work over multiple files/directories. Search on Google or Downloads.com.
     
    my3cents, Jan 24, 2005 IP