SitePoint Sponsor

User Tag List

Results 1 to 18 of 18

Hybrid View

  1. #1
    SitePoint Zealot abwebs's Avatar
    Join Date
    Mar 2001
    Location
    Philadelphia, PA
    Posts
    130
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hello,
    question for you web masters/designers out there:
    I have a situation where I need to find and change a word in a site which is about 100 pages. Instead of going in to each HTML document and searching and replacing the word, is there an easier way? I sure hope so!

    Thanks,
    Suzanne

  2. #2
    SitePoint Wizard westmich's Avatar
    Join Date
    Mar 2000
    Location
    Muskegon, MI
    Posts
    2,328
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes and no

    This is usually preventative. You use server side includes or some other server-side technology to update data in multiple pages.

    If you hardcoded the word into each and every page then you will need to manually change it. If you're using an editor like Frontpage you mave a global search and replace.

    There may even be a tool written in Perl or some other language for going through and replacing certain words in a group of text files, but I don't know of one off-hand.
    Westmich
    Smart Web Solutions for Smart Clients
    http://www.mindscapecreative.com

  3. #3
    SitePoint Guru
    Join Date
    Jul 2000
    Location
    Long Island, NY
    Posts
    755
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I don't know about FP, but it might do that for you. Dreamweaver will, very easily, but if you don't already have it it's an expensive fix to the problem. Maybe there are some others that will do it as well. With DW you just define your site and search and replace. Over time it's worth the price of admission just for that.

  4. #4
    SitePoint Zealot abwebs's Avatar
    Join Date
    Mar 2001
    Location
    Philadelphia, PA
    Posts
    130
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm editing a site that someone else set up and it seems the words are "hardcoded" in the site pages. I use Textpad the ole fashioned way to edit. I have Frontpage, but don't use it. Any other ideas?

  5. #5
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    abwebs...a really easy way to fix this would be to download a full-featured text-editor such as EditPlus, Textpad or UltraEdit. Even if you don't buy it, it would save you loads of time while preventing you from making stupid errors.

    Open every file you want to change in the editor, then do a find and replace on all open files. Alternately if your editor supports searching through folders, then do that.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  6. #6
    SitePoint Zealot abwebs's Avatar
    Join Date
    Mar 2001
    Location
    Philadelphia, PA
    Posts
    130
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi creole,
    Thanks for responding. ARe you aware of how to use Textpad to do the search and replace function?

  7. #7
    SitePoint Zealot abwebs's Avatar
    Join Date
    Mar 2001
    Location
    Philadelphia, PA
    Posts
    130
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I learned something today in Texpad! How to use the search and replace. THanks for all who replied to my question

  8. #8
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    abwebs...yes I am...

    1) Open every file you wish to change (or search through)

    2) Select Search > Replace

    3) Type in the text that you want to search for, then type in the text that you want to take it's place. If you wish nothing to take it's place, then leave the bottom field blank.

    4) Select Replace in all open documents. Press Enter
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  9. #9
    SitePoint Wizard dominique's Avatar
    Join Date
    Dec 2000
    Location
    orbis terrarum
    Posts
    1,523
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    abwebs, 100 pages is quite a bit work for just one word. As psalzer said, Dreamweaver can search through all files at once and replace the word.

    As psalzer also said, it's a pretty pricey addition, but if this is the only time you'll need the search and replace you can always just download the trial version and do what you need done.

  10. #10
    SitePoint Guru
    Join Date
    Jul 2000
    Location
    Long Island, NY
    Posts
    755
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Site-wide search and replace might be my favorite feature in Dreamweaver..but..it will replace all instances of the word. If it's a word that's still going to be used here and there it's a problem.

  11. #11
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yes. I too use TextPad. No cumblesome opening of gettig dreamweaveer and using that feature. There are other editors, like textpad which support it too.
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein

  12. #12
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    for what it's worth...the best text editor known to mankind (and one that I can't use right now) is BB Edit.

    It is Mac only software.

    I'm not ashamed to say that I stay awake nights dreaming of it's power and ease of use...it's flexibility and it's ability to manipulate my streamlined code. I long for it's simplicity and the ability to change shortcuts for EVERY feature that is has built into its sleek, frame.........

    be right back...I need to go take a cold shower...


    but seriously, it is BAR NONE the best text editor that I have ever used. It has TONS of BUILT IN HTML shortcuts. It interacts with the file system in a way that I can only dream about.

    I would seriouly consider buying an entire Mac just to be able to use this program.
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  13. #13
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You're tempting me Creole..
    did they pay you/ lol
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein

  14. #14
    SitePoint Wizard Goof's Avatar
    Join Date
    Feb 2001
    Location
    Pittsburgh, PA
    Posts
    1,154
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally posted by creole
    It is Mac only software.
    I think I just found a problem with it...

    Goof
    Nathan Rutman
    A slightly offbeat creative.

  15. #15
    ********* Callithumpian silver trophy freakysid's Avatar
    Join Date
    Jun 2000
    Location
    Sydney, Australia
    Posts
    3,798
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I second creole's endorsement of BBEdit. Every web developer needs to get themself a powerful text editor to do powerful text manipulation such as the multi-file search/replace theme of this thread.

  16. #16
    SitePoint Enthusiast Laura Brandt's Avatar
    Join Date
    Mar 2001
    Posts
    25
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yup, I agree with Creole too. I'm currently using a Macintosh with DW Ultradev and BBEdit installed. BBEdit has the best search/replace function as well as other built-in tools such as HTML editor. BBEdit also color your codes, eg if you type php opening/closing tags, it will automatically color your code to blue, thus it is easier to identify the codes.

    When I use a PC, I always use TextPad since it has quite a good search and replace function too.

    You may want to check out other HTML editors such as Homesite which also has search/replace function.

    Hope this helps
    Aletia Hosting - Full-Featured, Superfast Web Hosting
    PHP4, MySQL, Perl/CGI, Multiple Domain Support and More.
    Plans Start From: 200MB + 10GB Transfer at $9.95/mth
    http://AletiaHosting.com - sales@aletia.net - AIM: AletiaCorp - ICQ: 111160011

  17. #17
    SitePoint Wizard creole's Avatar
    Join Date
    Oct 2000
    Location
    Nashvegas Baby!
    Posts
    7,845
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think the best editor that i have found for the PC would have to be EditPLUS...I use it at work and it is fantastic.

    Probably the closest I have seen to BBEdit on the PC..
    Adobe Certified Coldfusion MX 7 Developer
    Adobe Certified Advanced Coldfusion MX Developer
    My Blog (new) | My Family | My Freelance | My Recipes

  18. #18
    The Hiding One lynlimz's Avatar
    Join Date
    Jul 2000
    Location
    Singapore
    Posts
    2,103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    use creole?
    i currently use textpad for everything i do on the pc...
    practically everything..

    its always open for me. =)

    http://www.textpad.com
    "Imagination is more important than knowledge. Knowledge is limited. Imagination encircles the world."
    -- Albert Einstein


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
  •