Page 1 of 2 12 LastLast
Results 1 to 15 of 25
  1. #1
    New Lounger
    Join Date
    Nov 2004
    Location
    Fairbanks, Alaska, USA
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Mass page edits possible? (2003)

    I have approx. 6,500 pages in a folder that each contain a string representing a single anchor (not an actual anchor, just a character string URL) to an external page (http://domain.com/page.htm). I need to first convert the string into an anchor, and during the conversion specify a "_blank" value for the target attribute.

    For some reason I'm having a tough time getting my head around the FrontPage API, and I can't figure out whether such a thing is even possible to automate. Is it?

    TIA,
    Jeff

  2. #2
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mass page edits possible? (2003)

    i have faced the chore of doing large search and replaces and Frontpage gives you the option to do it in the page you are in or everywhere. a better option in some is to use ASP Express http://www.aspexress.com as this gives you the option to start in a particular folder and replace downward to all subdirectories in that folder -- this gives you more control. also, ASP Express generates a log file so you double-check any problems.

  3. #3
    New Lounger
    Join Date
    Nov 2004
    Location
    Fairbanks, Alaska, USA
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mass page edits possible? (2003)

    HI Steve, thanks for your reply.

    When you speak of large search and replaces, are you referring to doing so with VBA or by using the FrontPage UI?

    The former is what I'm trying to figure out how to do.

    Thanks,
    Jeff

  4. #4
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mass page edits possible? (2003)

    using FP is easy enough -- you get the option to replace on the current page or all pages in the website. my suggestion about using ASPExpress is mainly out of experience with doing large search-and-replaces and wanting to be able to target all the pages and sub-directories in a PART of the website, rather than the whole thing. ASPExpress is an application (a text editor/coding IDE) that you can use outside of FP to do your your stuff. you don't need to have FP running at all (it's best not to) -- just download ASPExpress and go to inetpub/wwwroot and open one of your files, do the search/replace, test it -- if it works, do search/replace everywhere you want to. Much more control than the FP UI and you don't have to fool with VBA.

  5. #5
    New Lounger
    Join Date
    Nov 2004
    Location
    Fairbanks, Alaska, USA
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mass page edits possible? (2003)

    I took a look at that ASPExpress, and it looks pretty slick. I'm gonna hafta get me one of those ;-)

    The reason I need to use VBA, though--I guess I didn't mention this earlier--is that the URL string in each page is different. IOW, I have to turn these:

    Page 1: http://domain.com/somepage.htm
    Page 2: http://domain.com/someotherpage.htm
    Page 3: http://domain.com/yetanotherpage.htm

    Into these:

    Page 1: http://domain.com/somepage.htm
    Page 2: http://domain.com/someotherpage.htm
    Page 3: http://domain.com/yetanotherpage.htm

    All the way up to ~6,500 pages.

    To do this, I have to write code to find the "http" in each page's text and parse from there to the end of the URL string, instantiate a new anchor object and fill its properties accordingly, and then replace the URL string with the markup of the anchor object.

    Pardon me for not telling the whole story earlier--my eyelid toothpicks were giving way and I was in a hurry to do something about it.

    Does FP have this sort of capability in its object model?

    Thanks,
    Jeff

  6. #6
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mass page edits possible? (2003)

    ok, well that makes a difference. hmmm.... if you're replace these instances everywhere on the pages then FP's search and replace can do it (use search and replace in HTML) but you'll have to do it for each different URL. ASPExpress is nice for targeting parts of a website (or group of folders). Another utility, TextPad, offers the use of RegularExpressions in search/replace, which is cool but a little beside the point perhaps.

    My instinct doign multiple search/replace is going to be faster than using VBA.... on thinking about VBA I wonder if FP has any concept of a 'line' on the html side so you can step thru each line to do a string query. probably it does, but i'm ass-u-me-ing.

    Basically, you can do it in FP using search/replace in HTML and just do it over again for each changed URL.

  7. #7
    New Lounger
    Join Date
    Nov 2004
    Location
    Fairbanks, Alaska, USA
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mass page edits possible? (2003)

    I must be missing something...

    I'm not seeing how S&R can find a string that it doesn't know about, insert an opening anchor tag and attributes before it, append itself onto itself, and then append the closing tag.

    If it were possible to know in advance what each URL string is, how long it is, etc., I can see it, but otherwise the S&R solution eludes me...

    Or do you have a secret trick up your sleeve? ;-)

  8. #8
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mass page edits possible? (2003)

    No *I* must be missing something! It looked to me like you're got PREEXISTING TEXT in your website for hyperlinks and you want to 'hyperlink' them for real by wrapping the necessary HMTL. in which case it's easy to do <font face="Georgia">Find "http://blah.com" --> Replace 'http://blah.com' </font face=georgia> for each one. If you DON'T have any preexisting text in the pages you want to put the hyperlink on, then you've got an entirely different problem!

    Do you have something these corresponding to where you want the hyperlinks on the pages or are you trying to go thru all these pages and insert something completely new?

  9. #9
    New Lounger
    Join Date
    Nov 2004
    Location
    Fairbanks, Alaska, USA
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mass page edits possible? (2003)

    Yes, I've got preexisting text--it's just that every one of them is different.

    I doubt if there's a single duplicate URL string (preexisting text that's not yet converted to actual markup) in the entire collection of pages.

  10. #10
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mass page edits possible? (2003)

    sounds you're going to have a fun weekend <img src=/S/evilgrin.gif border=0 alt=evilgrin width=15 height=15>

    VBA is starting to sound like a definite option at this point...

    sorry i can't think of anything better to tell ya!

  11. #11
    New Lounger
    Join Date
    Nov 2004
    Location
    Fairbanks, Alaska, USA
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mass page edits possible? (2003)

    Abandoned... again... !

    <lol>

    Hey Steve, you're OK :-)

  12. #12
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mass page edits possible? (2003)

    some things in the computer world have no easy solutions... I was interested in pointing out the usefulness of ASPExpress, which I have long enjoyed. the flexible search/replace feature has helped me a lot -- it just won't do much for you with 6500 DIFFERENT URLs to re-format! But hey you'll learn something which is always good...

    let me know what you end up with! A friend mine had a similar problem (if i recall correctly) and he paid this Unix dude $200 to write a simple script to update all his webpages. Maybe one day you can charge others for your painfully-gained knowledge...

  13. #13
    New Lounger
    Join Date
    Nov 2004
    Location
    Fairbanks, Alaska, USA
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mass page edits possible? (2003)

    > let me know what you end up with

    Actually I've decided to do it in FoxPro (Visual FoxPro, that is).

    I'll loop through each page's text, looking for the "http" of a URL string. When I find one I'll move one character at a time to the right, looking for a character that doesn't belong in a URL--such as a space, linefeed, etc. Now I've got the URL string contained in a variable--I'll build the anchor around it, inject it back into the page text, and keep on moving.

    I can write the code for this and have it done in about an hour or so.

    Hardly worth $200 ;-)

  14. #14
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mass page edits possible? (2003)

    sounds good. are you going to be able to open, edit, save on a page and go onto the next etc. till it's done?

  15. #15
    New Lounger
    Join Date
    Nov 2004
    Location
    Fairbanks, Alaska, USA
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mass page edits possible? (2003)

    Yep, no problem--FoxPro's pretty handy for that kind of stuff.

    Say, I really like that ASPExpress--I'm going to give it a spin when I get a chance. Thanks for the lead.

    Here's an interesting one I just came across: http://mono-project.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
  •