Peter,

Thanks! I figured out the workaround, but didn't have a way of doing bulk changes. Great to have a fallback if webserve.ca takes too long to come to its senses. There are probably thousands of wiki pages by now that have the http:// string included.

Much appreciated.

...in fact I hadn't looked at your tool before, and it certainly looks like it would be useful as a general system management tool.

Thanks again.

- Henrik

Peter & Melodye Bowers wrote:
So suddenly none of my websites can post external links (with the string "http://"; anywhere in the page), and hundreds if not thousands of pages that have this protocol embedded are suddenly uneditable.

Obviously this is a hosting problem and they should fix it, but a workaround
is possible if the (http:)//www.example.com syntax works.  This WikiSh
script would replace all occurrences of http:// with (http:)// in all pages
in the group Test.

sed -i 's/http:\/\//(http:)\/\//' (grep -l 'http:\/\/' Test.*)

(This would be put directly into the control panel)

Presumably you could do the same with *.*, but you may want to test it out a
bit at a time.  You can do a single file or 2 or 3 like this:

sed -i 's/http:\/\//(http:)\/\//' (grep -l 'http:\/\/' Test.Page1
Test.Page2)

If you want to do several groups at a time you could do this:

sed -i 's/http:\/\//(http:)\/\//' (grep -l 'http:\/\/' GroupA.* GroupB.*)

If you want to see which files are going to be changed ahead of time you
could do this:

grep -l 'http:\/\/' Test.Page1 Test.Page2

Hopefully that gives enough examples to get things started in the right
direction.  Obviously a search/replace on potentially every page in the
entire site is a *big* deal and whether that's the right move for you is
your decision.  I'm just giving you a way to do it if it works for you...

(As usual the most recent version of WikiSh.php is necessary -- I discovered
some inconsistencies in the way I was handling escaped slashes with
search/replace and so that is fixed only in version 2008-03-23.)

-Peter


--

Henrik Bechmann
www.bechmann.ca
Webmaster, www.dufferinpark.ca

_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users

Reply via email to