php forum
php mysql forum
php mysql smarty
 
Topic Options
#280555 - 10/08/04 11:09 AM change posted image urls
drkknght Offline
Kahuna

Registered: 11/09/00
Posts: 1249
Loc: rob's pad -- where it takes sk...
all over my forum, there are posts with various images on my server. all of them are at the same url, like this:<br /><br />http://www.robkamphausen.com/image/place/image1.jpg<br />http://www.robkamphausen.com/image/place/image2.jpg<br />http://www.robkamphausen.com/image/place/image3.jpg<br /><br />if i wanted to move all of those images, is there any command i can enter that will automatically change the url of the posts? like, something that will universally change all references of:<br />http://www.robkamphausen.com/image/place/<br /><br />to:<br />http://www.robkamphausen.com/image/place/boards/<br /><br />?
_________________________
professional discussion killer
due to intelligence limitations, i do not offer support.
my site ~ my boards

Top
#280556 - 10/08/04 11:13 AM Re: change posted image urls [Re: ]
Medar Offline
Junior Member

Registered: 03/19/00
Posts: 571
Is the URL of the images in the content of the posts itself?

Top
#280557 - 10/08/04 11:22 AM Re: change posted image urls [Re: ]
Anno Offline
Code Monkey

Registered: 05/23/01
Posts: 562
Loc: Austria
UPDATE w3t_Posts SET B_Body = REPLACE(B_Body, 'robkamphausen.com/image/place/','robkamphausen.com/image/place/boards/');

Top
#280558 - 10/08/04 12:04 PM Re: change posted image urls [Re: Intel -*RW*-]
drkknght Offline
Kahuna

Registered: 11/09/00
Posts: 1249
Loc: rob's pad -- where it takes sk...
[]Medar said: <br />Is the URL of the images in the content of the posts itself? [/] <br /> <br />naw, its not the actual URL. its a posted image, so it'll look like this: <br /> <br />
Code:
 <br />hey check out this new image!!! <br />[image]http://www.robkamphausen.com/image/place/image3.jpg[/image] <br />
_________________________
professional discussion killer
due to intelligence limitations, i do not offer support.
my site ~ my boards

Top
#280559 - 10/08/04 12:18 PM Re: change posted image urls [Re: domain123]
drkknght Offline
Kahuna

Registered: 11/09/00
Posts: 1249
Loc: rob's pad -- where it takes sk...
[]Anno said:<br />UPDATE w3t_Posts SET B_Body = REPLACE(B_Body, 'robkamphausen.com/image/place/','robkamphausen.com/image/place/boards/'); [/]<br /><br />so this'll actually change the image URL? (NOT just a hyper link?)
_________________________
professional discussion killer
due to intelligence limitations, i do not offer support.
my site ~ my boards

Top
#280560 - 10/08/04 12:29 PM Re: change posted image urls [Re: ]
Medar Offline
Junior Member

Registered: 03/19/00
Posts: 571
What Anno said <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /><br /><br />That will change every instance in your B_Body (Post Content field) of:<br /><br />robkamphausen.com/image/place/<br /><br />Into:<br /><br />robkamphausen.com/image/place/boards/<br /><br />Test a single post first, make sure it is what you are wanting to do. Add a:<br /><br />WHERE B_Number=xxxxx;<br /><br />on the end to test a single post.

Top
#280561 - 10/08/04 12:39 PM Re: change posted image urls [Re: Intel -*RW*-]
drkknght Offline
Kahuna

Registered: 11/09/00
Posts: 1249
Loc: rob's pad -- where it takes sk...
awesome!<br /><br />i'll play around with this tonight -- that should definitely help me organize stuff on my server a lot more efficiently.<br /><br />thanks guys!
_________________________
professional discussion killer
due to intelligence limitations, i do not offer support.
my site ~ my boards

Top
#280562 - 10/08/04 01:26 PM Re: change posted image urls [Re: Intel -*RW*-]
Anno Offline
Code Monkey

Registered: 05/23/01
Posts: 562
Loc: Austria
>Test a single post first, make sure it is what you are wanting to do.<br />Ah, yes, good advice.<br />And for an additional measure, make sure you have a recent database backup.

Top
#280563 - 11/08/04 10:24 AM Re: change posted image urls [Re: domain123]
drkknght Offline
Kahuna

Registered: 11/09/00
Posts: 1249
Loc: rob's pad -- where it takes sk...
btw, i've used this a few times and it works GREAT!!!<br /><br />thanks <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
professional discussion killer
due to intelligence limitations, i do not offer support.
my site ~ my boards

Top


Moderator:  Gizmo 
Who's Online
0 registered (), 31 Guests and 16 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Forum 'Trader Ratings'.
by blaaskaak
11/20/08 08:27 AM
Problems reading a lot of old posts here
by Ruben Rocha
11/18/08 04:33 PM
PhotoPost BB Code Popup
by Iann128
11/15/08 01:24 PM
Customization needed
by Gizmo
11/12/08 12:28 PM
Team UBBDev Rides Again!
by AllenAyres
11/11/08 02:16 PM
Active Topics.
by AllenAyres
11/11/08 02:13 PM
Looking for a simple upload script
by AllenAyres
11/11/08 02:12 PM
New Mods
Forum 'Trader Ratings'.
by McLemore
11/19/08 02:14 PM
[7.4] Keep log of custom title changes
by blaaskaak
10/27/08 07:51 AM
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Newest Members
Begbie, cenk, MATTO, DougMMcts, tim Anderson
13361 Registered Users
Top Posters
AllenAyres 25448
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks