Pods 1.7.6 - New File Uploader Information

0

The new file column works a little differently. Any file you upload via Pods will also appear in the WP Media Manager.

{@file} is now {@file.guid}

File columns are now similar to PICK columns. A file column is a relationship to items in the wp_posts table (with post_type = "attachment").

So in other words, "guid" is the column in the wp_posts table that stores the file URL.

{@file.guid} = The URL (if one file), or an array of URLs (if more than one)

{@file.post_title} = The title of the file, or an array of titles (if more than one)

Images uploaded are NOT currently (but will be soon) resized to the WP sizes of: "thumbnail", "medium", or "large"

FOR UPGRADED USERS: You will notice that all of your previous "file" coltype columns have been migrated to a "txt" column to maintain the integrity of your previous data. You cannot simply change your column's coltype to "file", and must run a migration script to migrate your old files into the new file relationship. We will be working on a script that aims to make this easy for you, and will provide it here on this topic.

asked Mar 2 '10 at 5:55

sc0ttkclark

2936

add comment
enter at least 15 characters

25 Answers

1

Sorry it took so long gang! 1.9.2 will introduce the new auto-upgrade for the old file types pre 1.7.6 to migrate existing uploads into the new storage. Previously, file coltypes were changed to txt and you lost the ability to upload on those fields, now you will maintain the ability to upload if the file URLs stored in the file column exist on the current site / uploads folder -- otherwise it will change your file coltype for that field to txt.

I'm also going to link to the upgrade script if you want to perform this on your own. Download the ZIP file, and run the PHP script (be sure to upload and run it from the root of your WP site). Also be sure to change the configuration of the file located at the top to migrate specific fields.

answered Aug 22 '10 at 5:46

sc0ttkclark

2936

PLEASE NOTE: You should only run this upgrade script on fields that are 'txt' that were from a previous upgrade to a version above 1.7.6, otherwise Pods 1.9.2 will automatically upgrade your file fields for you (if you were upgrading from a version before 1.7.6). You can download the Upgrade Script here: http://podscms.org/wp-content/uploads/2010/08/pods-upgrade-files.zip Edit the file configuration at the top to select which fields to upgrade. – sc0ttkclark Aug 22 '10 at 6:35
add comment
enter at least 15 characters
0

the auto resize option is nice, but i would rather have one copy of the file in the library, then use the timthumb script to render thumbnails on the fly. What are you thoughts on integrating this into the pods environment?

http://www.darrenhoyt.com/2008/04/02/timthumb-php-script-released/ http://code.google.com/p/timthumb/

answered Oct 28 '09 at 6:58

Rhys L. Bartels-Waller

35

add comment
enter at least 15 characters
0

This seems cool - Doing something like this would also make the file uploader a lot more scalable. Multiple thumbnails could then be created and image quality would not be lost. It would take up more space on the server but, I think would be worth it.

answered Oct 29 '09 at 10:49

chriscarvache

73

add comment
enter at least 15 characters
0

Hi there! I know you guys are working hard on a file migration script, but I have a couple of problems- 1, I already tried to convert the converted text column into a doc column, and 2, I have a broken Pods installation on a production site that I need to fix today.

All I really need to do is understand how the pods_rel database works- I noticed that when I converted my text field over to a doc, all of my file associations remained intact in the wp_posts table, they're just not linked via the pod relationships table.

I don't quite understand the pod_rel table, because "pod_id" doesn't actually correspond to any actual pod IDs in my database. So I'm kind of at a loss.

If you could get back to me at the email in my profile, that would just be wonderful. If you can't, no problem; I'll be working on this all day today whether I hear from you or not.

answered Oct 29 '09 at 2:39

beatpanda

1

add comment
enter at least 15 characters
0

Hmmm. Tricky. I was calling images from a multiple pick, using a helper. I can call them using the {@logo.guid} shortcode, but in the helper, I had this:

<img class="sponsor" src="'.$val['logo'].'">

So... any idea what this needs to become? Would be mega helpful.

answered Oct 29 '09 at 2:51

coeurmechante

28

add comment
enter at least 15 characters
0

i have a similar problem like beatpanda and already converted the columns... hope that i get the changes worked in my template within the next days and i hope you document the changes and usage of the new code not only with shortcodes, but also with 'real' php.

two facts i really 'hate' about this change: i have tried to read about this, before updating, but there was nothing like a documentation in front. the other thing is, that i now have to upload everything into wp-uploads-folder and i would really like to keep stuff that i upload for blogging purpose and stuff i use for my portfolio seperated. i use the portfolio-folder as a permanently updated backup copy and therefore it has to be named and ordered exactly like on my raid... hope you see a chance to make this possible (again)!

thanks!

ps. please try to document your changes at the same moment you offer the update. thanks for listening to my request!

answered Nov 2 '09 at 5:44

kaiiser

-129

add comment
enter at least 15 characters
0

Just wondering if the script Scott referred to is on the near horizon?? Cheers N.

answered Nov 8 '09 at 8:44

nmac

1

add comment
enter at least 15 characters
0

@nmac - I'm still working on this script, I'm hoping to have it ready by the time 1.7.8 is released in the next couple of weeks. WordCamp NYC has my tied down this week.

answered Nov 9 '09 at 7:23

sc0ttkclark

2936

add comment
enter at least 15 characters
0

Hi,

I have a similar problem to some others.

I'd like to keep the PODs file upload separate to the Media Library. I am using a POD to create a Document Library. Hence the POD stores the file meta and I don't want to clutter up the Media Library with documents that (in my case) conceptually don't belong there!

So is there any way to specify the file upload directory? Is there any way to upload without adding the file as an attachment?

I'd just like to upload the file to a specified directory and select it.

Thanks. (Great plugin by the way).

answered Nov 9 '09 at 1:57

keg444

1

add comment
enter at least 15 characters
0

@keg444 - Sorry, but the file column/uploader only works with WP attachments. The advantage is that if a file gets removed from the Media Library, it'll automatically get removed from your Pod items too (auto-cleanup).

It's possible to add a custom uploader as an Input Helper. An example would be to create a "text" column, add an Input Helper for it (which includes a custom-built uploader), then copy the file URL to the text field when the upload finishes.

answered Nov 9 '09 at 3:22

logikal16

249

add comment
enter at least 15 characters
0

Okay thanks for the tip.

answered Nov 9 '09 at 5:41

keg444

1

add comment
enter at least 15 characters
0

@Scott: Due to the facts, that, on the one hand, a lot of people have the need to keep wp-media and custom-media separeted and, on the other hand, this was possible until pods 1.7.5, it would make sense to bring the "old" system back (too).

Q: Would it be possible to add the 1.7.5 uploader back and run both systems as different pod-types? Would prefer to see it back in ... let´s say 1.7.8 :)

answered Nov 10 '09 at 11:59

kaiiser

-129

add comment
enter at least 15 characters
0

I have about 200 documents that are no longer available. The link path information was not saved in the upgrade. Anyone else had this problem? Is there anyway to recover?

answered Nov 12 '09 at 1:13

Mike Van Winkle

219

add comment
enter at least 15 characters
0

What's interesting is that an image field that was also using the filetree picker saved the path information, but the 'file' field was converted to NULLs.

answered Nov 12 '09 at 1:25

Mike Van Winkle

219

add comment
enter at least 15 characters
0

@mpvanwinkle - The migration script (should have) converted all old file columns to txt columns... so the URLs would still be preserved. Did you happen to try converting those txt columns back to file columns?

answered Nov 12 '09 at 1:34

logikal16

249

add comment
enter at least 15 characters
0

Actually, yes, I think I did try a few days ago. Is that what did it? Blast!

answered Nov 12 '09 at 1:47

Mike Van Winkle

219

add comment
enter at least 15 characters
0

Yeah, that did it. Totally my fault for not documenting this better before-the-fact.

The good news is that all your files are still in the Media Library -- none of the files got deleted. The other good news is that the "Browse Server" feature will be re-added in 1.7.8, so you can select existing files from the Media Library.

The bad news is that you'll have to re-associate the files that belong to each Pod item.

The other alternative would be to downgrade to 1.7.5 (http://downloads.wordpress.org/plugin/pods.1.7.5.zip) and then restore a database backup.

answered Nov 12 '09 at 1:59

logikal16

249

add comment
enter at least 15 characters
0

LOL! Oh well, that's life in web dev I suppose. Yeah, I'm looking at my options right now. I actually have a dev install that has 95% of the database, I'm going to try and restore from there.

Thanks guys.

I this weren't such a fabulous plugin, I might be angry. But it's worth every minute, even the mistakes. Cheers.

answered Nov 12 '09 at 2:12

Mike Van Winkle

219

add comment
enter at least 15 characters
0

ok. i´m still stuck with 1.7.6 - does the update to 1.7.8 mean, that i can chose not only from the media library (uploads folder), but from my custom folders (again)?

answered Nov 16 '09 at 8:49

kaiiser

-129

add comment
enter at least 15 characters
0

I'm new to pods (hacking away for about a week) but I'm having a (possibly) related problem with this change.

I have a POD "whatever" with a relation field "name_of_field" to another pod "whatever_2" which has some files fields.

When I do a:

$Test = $Record->get_field('name_of_field');

I get every field except the Files from "whatever_2".

Is this related with this change? And if so ... Is there a hack around this? :)

thanks in advance.

[btw ... GREAT PLUGIN! love it! :) ]

answered Nov 16 '09 at 2:46

dbarradas

1

add comment
enter at least 15 characters
0

Never mind my previous post. I already found a way! :)

answered Nov 17 '09 at 9:32

dbarradas

1

add comment
enter at least 15 characters
0

I guess I'm disappointed that the file upload field no longer makes thumbnails. That means I need to find some kind of thumbnail tool. On doubleabody.com the thumbnail feature in the last Pods was used for building that site.

However, I like how the remove feature is available. Would be nice to see a preview hyperlink or something as well, but okay.

Another quirk is what happens when I have 300 images, or perhaps more when thumbnailing is turned on (by some other feature), and I go to choose a file from the Browse Server feature? I mean, it could make a rather long list for my client to go through. At least when it was split out by year and then month one could sort of remember when the file was there. And remember -- sometimes clients will have cameras that emit a filename of GGY2323.JPG and you have like no clue what the contents are. This means that using the search field won't help you.

answered Nov 26 '09 at 2:41

volomike

33

add comment
enter at least 15 characters
0

You may also want to look at JCrop integration because that's another concern -- I often have clients who don't understand resizing and cropping tools in various software packages, and they need something easy where they upload an image, select an area and choose Crop, and then type in a size to resize. Then, they can click Revert to go back if that didn't look right. Once they are certain it looks right, they can click Commit and it stores that changed file.

answered Nov 26 '09 at 2:43

volomike

33

add comment
enter at least 15 characters
0

There's a lot that WordPress 2.9 promises to do, one of those things is some image editing :-)

If that works well, we're going to look into integrating those same scripts within ours. I also second the hyperlink (clicking name of file opens new window) idea for files both in the List (browse) and in the Selected (for a field).

WP Downsizing will also be done in the future on images uploaded through Pods as well, we're working on tightening up any remaining bugs before we jump into enhancements and new features. We're close to 1.8.x so that will be pretty soon.

answered Nov 26 '09 at 11:38

sc0ttkclark

2936

add comment
enter at least 15 characters
0

Did the migration script referenced in the original post ever make it to light? I'm looking to upgrade an old site and was hoping to use the migration script to ease the process.

answered Mar 2 '10 at 5:55

neilius

1

add comment
enter at least 15 characters