PhotoPost Photo Gallery Sales PhotoPost Sales Toll Free Phone Number
Mon-Fri 9am-4pm EST
  PhotoPost Photo Sharing Photo Gallery    Visualize community tm
| | | | | | | | |

Go Back   PhotoPost Community > PhotoPost Support > PhotoPost Pro Support Forums > Photopost Pro How Do I...?

Photopost Pro How Do I...? Wondering how to do things in PhotoPost?

Closed Thread
 
LinkBack Thread Tools Rate Thread Display Modes
Old March 11th, 2005, 05:24 AM   #1 (permalink)
Member
Verified Customer
 
Join Date: Dec 2004
Location: Osaka
Posts: 158
Want to upgrade to v5, but is there an easy way to edit vb post links?

This new version looks great, however in my forums, lots of posts link to the MEDIUM sized thumbnails. I know the fullsize image filename is not changed, so thats OK, but with the medium now moved to a seperate dir, obviously a load of these posts will now have dead links.

Has anyone yet written a script that loops through all the posts (long winded i know!) and modifies the link so it will point to the new image?

Many thanks,

Ben
benFF is offline  
Old March 11th, 2005, 10:17 AM   #2 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,660
Nope there is no such thing I know of.

Basically the file structure has changed like this

/data/500/somepic-med.jpg

/data/500/medium/somepic.jpg

There is no easy way to do this

I know of a mass body replacement in mysql where you could replace -med with nothing so it would get the picture format right but since the categories are all different you would need to also issue the same mass replacement for each cat to change say

/data/500/ to /data/500/medium/

PLEASE NOTE YOU DO THIS AT YOUR OWN RISK AS THIS IS POWERFUL QUERY

EXAMPLES BELOW make sure to add your table prefix but here is an example of both query types

UPDATE post SET pagetext = REPLACE(pagetext, '-med','')

UPDATE post SET pagetext = REPLACE(pagetext, '/data/500/','/data/500/medium/')
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now  
Old March 11th, 2005, 08:12 PM   #3 (permalink)
Member
Verified Customer
 
Join Date: Dec 2004
Location: Osaka
Posts: 158
The problem would occur if a medium image AND a normal image were linked in... hmm.... you could probably safely assume however that people wouldn't mix them... i'll look into this, as i would really like to change it..
benFF is offline  
Old March 11th, 2005, 08:32 PM   #4 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,660
Well the above would check the pagetext field for -med and remove it and the next one would say adjust your urls to look for the medium directory so the images again display.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now  
Old March 12th, 2005, 07:09 AM   #5 (permalink)
Member
Verified Customer
 
Join Date: Dec 2004
Location: Osaka
Posts: 158
Yes I get that But if in the pagetext there was a link to the fullsized image, this would also get modified to read /medium/.

I think the safest idea will be to create a huge loop that goes through each post, looking for the /data/XXXX/XXX-med.jpg and renaming that. Will probably take sometime, but will make sure nothing mucks up!

You can't do regular expressions in mySQL can you?
benFF is offline  
Old March 12th, 2005, 07:11 AM   #6 (permalink)
Member
Verified Customer
 
Join Date: Dec 2004
Location: Osaka
Posts: 158
Hmm... unless an easier way:

UPDATE post SET pagetext = REPLACE(pagetext, '/data/500/','/data/500/medium/') WHERE pagetext LIKE '%-med.jpg%'

UPDATE post SET pagetext = REPLACE(pagetext, '-med.jpg','.jpg')

That should stop all the normals getting hit...
benFF is offline  
Old March 12th, 2005, 08:48 AM   #7 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,660
You dont have to do that just adjust as such

UPDATE post SET pagetext = REPLACE(pagetext, '-med.','.')

You wanna get things on one pass and above is probally the easiest since you want to get all png gif and jpg in one pass. I doubt your going to match anything in a post like -med. that would need to be replaced

Then the second one will adjust the url path
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now  
Old March 12th, 2005, 11:36 AM   #8 (permalink)
Member
Verified Customer
 
Join Date: Dec 2004
Location: Osaka
Posts: 158
No what I mean is, if someone has linked to a NON medium image, that will also get picked up by the second SQL statement and changed to be in the medium directory, which would obviously then be a broken link...
benFF is offline  
Old January 18th, 2006, 08:25 PM   #9 (permalink)
Member
Verified Customer
 
Join Date: Apr 2002
Location: Wittmann, AZ
Posts: 96
It would be nice if PhotoPost created a script to fix this problem. Earlier versions of PhotoPost gave users the ability to copy the URL of their photos so they could link to them in message board threads and elsewhere. Since I didn't do anything to screw their links up besides upgrading the software I think it should be PhotoPost's responsibilty to make this work.

Over the years I have encouraged my members to join our paying usergroup so that they could post their photos in our PhotoPost Gallery and not have to worry about busted links when they create technical articles. Now with the upgrade I caused that very problem and feel pretty darn bad about it.

You guys are the pros selling commercial software. The upgrade should never have broken those links...
ab7fh is offline  
Old January 18th, 2006, 09:19 PM   #10 (permalink)
Member
Verified Customer
 
Join Date: Apr 2002
Location: Wittmann, AZ
Posts: 96
Thank goodness for Linux gurus... Thank's Tom!

1.) Turn on mod_rewrite in the engine.

2.) Place this rewrite rule in your configuration and presto! problem is solved.

Code:
Content visible to verified customers only.

Last edited by ab7fh; January 18th, 2006 at 09:22 PM.
ab7fh is offline  
Old January 18th, 2006, 09:53 PM   #11 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,660
Quote:
Originally Posted by ab7fh
You guys are the pros selling commercial software. The upgrade should never have broken those links...
Just remember though that you can post links to images on other places in your site or in a forum we can only support our program and ensure it works from our files. File structures change as software progresses. This is a common thing.

A decision was made to in the best interest of the software to do two things. Remove the userid being written onto the files and in order to prevent directories issues with larger sites to place the medium and thumbs in there own directories. The number of files in a directory is a set number so on larger sites you can run into issues so we rectified this.

You can use mod rewrite as you have found out but the permanent way to fix this is posted above in this thread and it nothing we could technicall write a script with especially when it does not deal with our product's database or files. When I converted my forum from ubbthreads to vbulletin I had to run similar commands to change my forum directory name and script names.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now  
Old January 18th, 2006, 10:30 PM   #12 (permalink)
Member
Verified Customer
 
Join Date: Apr 2002
Location: Wittmann, AZ
Posts: 96
UBB Code[..img..]http://www.explorerforum.com/data/2/medium/71fenders2.jpg[../img..]

That's straight out of your program... PhotoPost created the code for users to be able to link to photos in the PhotoPost Gallery. The "UBB Code" box is not a hack, it's "out of the box"... Being so you should not have made a change that would alter the links that your "UBB Code" box produced.

If I switched to another "brand" of Photo Gallery software like you did by switching from UBB to Vb I would expect problems. However, I didn't switch brands, I just "upgraded"...
ab7fh is offline  
Old January 18th, 2006, 10:47 PM   #13 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,660
Right we are talking about suggested links that you can place elsewhere outside the photopost program. However as I tried to explain a decision was made that is in the best interest of our product.

When it comes down to it that is the deciding factor. We can not control what does on outside our program. We must do what is in the best interest of our software for all of our customers benefit.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now  
Old January 21st, 2006, 02:17 AM   #14 (permalink)
Member
Verified Customer
 
Join Date: Jun 2002
Location: Great Lakes
Posts: 280
Quote:
Originally Posted by Chuck S
When it comes down to it that is the deciding factor. We can not control what goes on outside our program. We must do what is in the best interest of our software for all of our customers benefit.
With the modrewrite rule above I don't think this is a major problem, but I do feel I should put my two cents in based on this quote.

I don't know for sure, but I would think a lot of your customers do use photopost (as a web application) integrated with other software and applications. As such, no matter how great the change is in theory, if it makes the overall customers website break over and over, it wont be such a great application to use. So if there are ways to maintain "legacy" functionallity that will make photopost all the better over time.

For example, if Nikon or Canon came out with the best new $5k DLSR camera body but changed the lens mount for a better "in theory" design making it only work with one new lens, it wouldn't sell nearly as well as bodies that work with all the standard mount lenses that people have built up over time.

Anyway, photopost is great software. But in my opinion, it's ability to integrate into websites is a big part of what makes it so great, and that should never be forgotten.
boatdesign is offline  
Old January 21st, 2006, 07:50 AM   #15 (permalink)
Photopost Developer
Verified Customer
 
Chuck S's Avatar
 
Join Date: Jun 2002
Location: Abingdon,MD
Posts: 71,660
Understand completely what your say from that viewpoint I had to correct all my links on my install with the mysql commands above It was a very hard and thought out decision as I noted. A directory has a set number of files it can contain. This is a fact and can not be changed so we had to weight out what is best for the program.
__________________
Photopost Developer and Support Engineer

Please do not PM me for support or sales questions. Thank you for your understanding.
Chuck S is online now  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Time / Edit / Post CaddisNJF Photopost Pro Bug Reports 2 June 30th, 2005 12:58 PM
After Upgrade to 1.0.1 New Image thumbnail links stopped working. BOWZONE Installs and Upgrade - vBulletin 3.0.X 4 June 24th, 2005 10:52 AM
edit photo/post comment not working markatfishbrain Photopost Pro Installation & Upgrades 5 June 15th, 2005 08:57 AM
Edit links in menubar and elsewhere w/ _top? ppostuser Photopost Pro How Do I...? 14 February 18th, 2005 12:37 PM


All times are GMT -5. The time now is 01:03 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0