Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#49 2007-06-23 08:49:29

iblastoff
Plugin Author
From: Toronto
Registered: 2006-06-11
Posts: 1,197
Website

Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.

i am enjoying this plugin thus far! one issue i have is that on a certain site im working on, i have several custom fields (for example, one for mp3’s, one for video). with upm_file, i’d like for the client to be able to choose which custom field the file (whether it be an mp3 or a video file) will be associated with. only being able to choose to add a file to a single custom field (without asking the client to manually type in the other filename/id himself) is somewhat limiting in my case. is there a way around this?

Last edited by iblastoff (2007-06-23 08:50:30)

Offline

#50 2007-06-24 01:52:27

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.

You can enter them all into one field, apply different categories to the file depending upon their type, and then separate them in your template via the tag’s category attribute.

There is not a way to use multiple custom fields.

Offline

#51 2007-07-24 18:37:48

aswihart
Member
From: Pittsburgh, PA
Registered: 2006-07-22
Posts: 345
Website

Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.

Mary,
I know you’re busy, but have you had any time to work on implementing the features I mentioned in post #44?

Offline

#52 2007-08-23 16:05:26

sisushka
Member
Registered: 2007-07-30
Posts: 14

Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.

Mary and other nice folks,

hopefully you can help me with following prob.
Well, when I substitute <txp:article /> in my page template with <txp:upm_file_article /> it doesn’t write out all the articles in the section. I know that tag <txp:upm_file_article /> should support attributes like category or section, and I need both articles with and without files to be ordered in one section according to the date of posting. However, it doesn’t work.

Sorry if my question’s too lame, but I’m new to these custom fields and even though it works quite well, I can’t do the thing mentioned above.

Thanks in advance.

Last edited by sisushka (2007-08-23 17:19:04)

Offline

#53 2007-08-24 08:50:27

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.

I know that tag <txp:upm_file_article /> should support attributes like category or section…

No it doesn’t, but upm_file_article_custom does. I think upm_file_article is the one you want to use, though.

…it doesn’t write out all the articles in the section…

Lemme guess: it lists 10 or less? Like the built-in article tag, there’s a default limit of 10 articles; you need to either increase that number to whatever you want (see the plugin’s documentation), or add the navigation links older and newer to your page.

Offline

#54 2007-10-09 01:58:14

kimguan
Member
Registered: 2004-12-30
Posts: 14

Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.

Mary, hello there. I used to use upm_file_packets. Now that I’ve changed over to upm_file, I notice that a “feature” has gone missing. I’m wondering if there is a way to bring this back? I’ve tried looking in the docs, etc, but maybe I’m missing something.

With upm_file, if I “manually” update an existing file with ftp, the file size on my site automatically changes to reflect the new size without any action on my part. E.g. if the original size is 30K, and I replace it with a file that is 50K via ftp, the change automatically registers in the output of the plugin.

However, with upm_file_packets, the output of the plugin remains the old size, i.e. 30K and not 50K.

Is there a way around this, because textpattern does not appear to have a way of “updating” files (unlike images)? Uploading an entirely new file and pointing the article to that file means I lose the download counts etc.

Thanks for any help.

Offline

#55 2007-10-15 02:20:04

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.

What value do you have for the preference (named something like) Send last mod header?

Offline

#56 2007-10-15 16:35:56

kimguan
Member
Registered: 2004-12-30
Posts: 14

Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.

Mary, “Send ‘Last-Modified’ header?” is set to “yes”. Hope that’s the preference you are referring to.

Last edited by kimguan (2007-10-15 16:36:14)

Offline

#57 2007-10-24 09:46:45

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.

Yep, that’s the one. That’d be the problem: I think when you update a file, the site doesn’t count as being updated. Try saving your prefs (without changing anything, just hit the save button again), that will.

Offline

#58 2007-12-24 03:03:41

mhulse
Plugin Author
From: Eugene Oregon
Registered: 2005-01-21
Posts: 200

Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.

Thanks for another great plugin! :)

Works perfectly.

Cheers,
Micky

Offline

#59 2008-01-22 18:31:37

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.

Minor update available

Last edited by Mary (2013-01-24 17:25:57)

Offline

#60 2008-01-30 02:51:53

kimguan
Member
Registered: 2004-12-30
Posts: 14

Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.

Solved the problem I was experiencing in post #55. It appears that with upm_file, you need to “modify” the file entry in the file tab before a change in the file size is noticed. Simply saving the file entry without any changes will do the trick.

With upm_file_packets this was not necessary. It simply seemed to supply the new file size without any intervention on my part.

Mary, any chance you could reintroduce the old behaviour? Or was that something to do with textpattern itself? Thanks.

Offline

Board footer

Powered by FluxBB