SitePoint Sponsor

User Tag List

Results 1 to 12 of 12
  1. #1
    Evil Genius MilchstrabeStern's Avatar
    Join Date
    Nov 2003
    Location
    Arizona
    Posts
    1,131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Finding and Replacing Problems

    Yes, another problem....

    Dreamweaver's "Find and Replace" function works.... but not this time...

    See I have these footer and header codes (as some of you already know) that I want to select in over 1500 documents and replace with simple php code. Well When I search for these header, or fooder code selections, it only finds the one that I copied and pasted it from. THEY ARE ALL IDENTICAL!!! I've tried copying from different documents (which the code should be the same) and it only finds that one. I have ignore whitespaces selected too, so that cant be the problem. I took two pieces of the same code, from 2 different documents, put them side by side, compared every line, and it all matches up. Yet when I go to "Find All" It only comes up with 1 of them.

    What is going on?!??!?

    Here is the code Im searching for:
    Code:
       <?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Mountain Pointe Lionhears Marchingband</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <style type="text/css">
    html, body {height:100%}
    body {
     padding:0;
     margin:0;
     background:black;
     color: #fff;
    }
    #outer{
     height:100%;
     min-height:100%;
     width:460px;
     margin-left:156px;
     margin-right:156px;
     background:#000000;
     border-left:2px solid #FFFFFF;
     border-right:2px solid #FFFFFF;
     margin-bottom:-52px;
     color: #fff;
    }
     
    html>body #outer{height:auto;} /*for mozilla as IE treats height as min-height anyway*/
    #header{
     position:absolute;
     top:0;
     left:0;
     width:100%;
     height:140px;
     background-image: url(neylayout/images/overlapbg.jpg);
     background-repeat: repeat;
     border-top:1px solid #ffffff;
     border-bottom:2px solid #ffffff;
     overflow:hidden;
     color: #000000;
     text-align:left;
    }
    #header .text {
     font-size: small;
     font-weight: bold;
     color: #FFFFFF;
     background-color: #FF0000;
     float: right;
     width: 400px;
     text-align: right;
    }
    #header .text2 {
     font-size: medium;
     font-weight: bold;
     color: #FFFFFF;
     background-color: #FF0000;
     float: left;
     width: 200px;
    }
    
    #left {
     position:relative;/*ie needs this to show float */
     width:159px;
     float:left;
     margin-left:-158px;/*must be 1px less than width otherwise won't push footer down */
    }
    #left p {padding-left:0px;padding-right:3px}
    #right p {padding-left:3px;padding-right:0px}
    #right {
     position:relative;
     width:156px;
     float:right;
     margin-right:-155px;
     color: #FFF;
    }
    #footer {
     width:100%;
     clear:both;
     height:50px;
     border-top:2px solid #FFFFFF;
     border-bottom:1px solid #FFFFFF;
     background-color: #000000;
     color: #FFFFFF;
     text-align:center;
     position:relative;
    }
    * html #footer {/*only ie gets this style*/
     \height:52px;/* for ie5 */
     he\ight:50px;/* for ie6 */
    }
    #clearheader{height:140px;}/*needed to make room for header*/
    #clearfooter{clear:both;height:40px;}/*needed to make room for footer*/
    div,p  {margin-top:0}/*clear top margin for mozilla*/
    * html #centrecontent {height:1%;margin-bottom:12px}/* combat IE's 3 pixel jog */
    #left ul, #right ul {
     margin: 0px;
     padding: 0px;
    }
    #left ul li, #right ul li {padding-left:0px}
    #right ul{margin-left:0px}
    #left li, #right li {
     background-image: ;
     background-repeat: no-repeat;
     background-position: center center;
     height: 314px;
     width: 106px;
     list-style-type: none;
     margin-top:0px;
    }
    h2 {
     font-size: 140%;
     color: #FFFFFF;
     background-color: #FF0000;
     background-image: url(logobg.jpg);
     background-repeat: repeat;
     font-weight: bold;
     font-variant: small-caps;
     margin: 0 auto;
    }
    html>body h2 {text-align:center}
    #right img {margin-left:4px;}
    #centrecontent {position:relative;}/*stacking context for image*/
    /* nav menu */
    #navcontainer
    {
    margin: 0px 0 0 0;
    padding: 0;
    height: 18px;
    position:relative;
    }
    #navcontainer ul
    {
    border: 0;
    margin: 0;
    padding: 0;
    list-style-type: none;
    text-align: center;
    }
    #navcontainer ul li
    {
    display: block;
    float: left;
    text-align: center;
    padding: 0;
    margin: 0;
    }
    #navcontainer ul li a
    {
    background: #2F394B;
    width: 78px;
    height: 18px;
    border-top: 0px solid #f5d7b4;
    border-left: 0px solid #f5d7b4;
    border-bottom: 0px solid #f5d7b4;
    border-right: none;
    padding: 0;
    margin: 0 0 10px 0;
    color: #ffffff;
    text-decoration: none;
    display: block;
    text-align: center;
    font: normal 10px/18px "Lucida Grande", "Lucida Sans Unicode", verdana, lucida, sans-serif;
    }
    #navcontainer ul li a:hover
    {
    color: #2F394B;
    background: #ffffff;
    }
    #navcontainer a:active
    {
    background: #333333;
    color: #fff;
    }
    #navcontainer li#active a
    {
    background: #333333;
    border: 0px solid #c60;
    color: #fff;
    }
    </style>
    </head>
    <body link="#FFFFFF" vlink="#CCCCCC" alink="#FFFFFF">
    <div id="outer"> 
      <div id="clearheader"></div>
      <!-- to clear header -->
      
      
    <div id="left"> 
      <p><img src="neylayout/images/newlayout2_03.jpg" width="156" height="314"></p>
    </div>
      
      
    <div id="right"> 
      <p></p>
    </div>
      <div id="centrecontent"> 
        <!--centre content goes here -->
    Remember, with all the other documents, when I originally created them, I just pasted that in there, so I dont see why it wouldnt find them all.
    ]

  2. #2
    With More ! for your $ maxor's Avatar
    Join Date
    Feb 2004
    Location
    Scottsdale, Arizona
    Posts
    909
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Are you using linux/unix? *crosses fingers for possible sed use*

  3. #3
    Evil Genius MilchstrabeStern's Avatar
    Join Date
    Nov 2003
    Location
    Arizona
    Posts
    1,131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Linux as my OS? No, Windows XP
    ]

  4. #4
    With More ! for your $ maxor's Avatar
    Join Date
    Feb 2004
    Location
    Scottsdale, Arizona
    Posts
    909
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well it seems like you're not going to be able to do a massive find and replace on 1500 files with dreamweaver. Maybe that feature exists, but I would guess that it doesn't.

    There is a chance that you may be editing each of these 1500 files by hand.

  5. #5
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try doing it on only like 10 files first - then we'll know if it's the qty of files that's the issue
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  6. #6
    Evil Genius MilchstrabeStern's Avatar
    Join Date
    Nov 2003
    Location
    Arizona
    Posts
    1,131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nope. I tried it on 7 files, doesnt come up with anything. When i do it on all of them it DOES go through all of them, just doesnt find a match, im so confused.
    ]

  7. #7
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,653
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Milch,

    Dreamweaver's find and replace offers a window in the upper left corner wherein you must select "Selected Text," "Current Document," "Open Documents," "Folder ...," "Selected Files in Site" and "Entire Current Local Site" for the source to be searched. It sounds like you've got either "Selected Text" or "Current Document" selected.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  8. #8
    Evil Genius MilchstrabeStern's Avatar
    Join Date
    Nov 2003
    Location
    Arizona
    Posts
    1,131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    nope i selected the folder, it goes through all the documents, i check the bottom it finds about 1700 of them, and then searches them all, but comes up with nothing.
    ]

  9. #9
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,653
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by MilchstrabeStern
    nope i selected the folder, it goes through all the documents, i check the bottom it finds about 1700 of them, and then searches them all, but comes up with nothing.
    Check the Search: Source Code (I sometimes miss that one) and Ignore Whitespace below, too?

    edit: I sometimes have problems like this, too, when I'm SURE that all the code is identical. I discover to my chagrin that it is NOT when I open another document and select the "identical code" and do the search and replace using that instead. Give that a try, too.

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator

  10. #10
    Evil Genius MilchstrabeStern's Avatar
    Join Date
    Nov 2003
    Location
    Arizona
    Posts
    1,131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have tried it with other documents, even though all the code should be identical. Whats really odd is my image galleries. See, my image galleries were created in a seperate program, and i just had it insert the header and footer code around it. But if there was more then one page needed for a gallery it created, 2 or 3. So that code in all 3 of these documents HAS to be identical! And it is, it does work with all my galleries. All my image and video galleries will be found. So I can do that with all my galleries, which makes up a good amount of the images. I think I can do the rest by hand. Thanks anyways guys!
    ]

  11. #11
    Evil Genius MilchstrabeStern's Avatar
    Join Date
    Nov 2003
    Location
    Arizona
    Posts
    1,131
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    oh one more thing, im not going to change all the pages made for individual iamges since they dont have a header or footer. There just a seperate black page with the image and next back and home features. But if the Image gallery pages (the ones that have all the images) are remade for php, still saved as .htm though, will the image links go to the images? For example, I added that Mime Type, and it works, if I have changed all the header and footer code into php. But if I click on one of the links where I havent done that yet. It comes up with a "Parse error on line 1" or something...Would it do that with each image page?
    ]

  12. #12
    Certified Ethical Hacker silver trophybronze trophy dklynn's Avatar
    Join Date
    Feb 2002
    Location
    Auckland
    Posts
    14,653
    Mentioned
    19 Post(s)
    Tagged
    3 Thread(s)
    Milch,

    Sorry, I don't understand what you're saying is happening.

    Typically, your generated "overview" page will have the links to the "image" pages which have their own links back to the "overview" page and other "image" pages. Renaming the "overview" page (overview.html => overview.php) should NOT affect the interior links to the "image" (HTML) pages (which should NOT be renamed). Once you do a global change on the "overview.html" => "overview.php" so the "Home Page" links in the "image" pages is correct, no problem.

    Regards,

    DK
    David K. Lynn - Data Koncepts is a long-time WebHostingBuzz (US/UK)
    Client and (unpaid) WHB Ambassador
    mod_rewrite Tutorial Article (setup, config, test & write
    mod_rewrite regex w/sample code) and Code Generator


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
  •