Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2007-02-27 15:17:26

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

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

You would be my hero if you did. :)

Offline

#32 2007-03-12 07:44:19

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

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

Wait, could you not do this with if_different?

Offline

#33 2007-03-12 15:16:53

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

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

If you can I sure can’t figure it out. Doesn’t upm_article_file just output a list of all files attached to an article? I not really sure how if_different would be able to tell if the files are assigned to a different file category. Say I had 4 files in 3 different categories. How would I know which files are going to be placed where, if I wanted them in specific places by category?

If it is possible could you give me an example how this would work?

Offline

#34 2007-03-13 16:57:43

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

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

Well, for specific places it wouldn’t work. If you merely wanted them to be separated by category, it would.

You’d have the plugin tag sort by file category, then by however you want to sort each file. Then you’d use if_different within the file form.

I’m working in the category function, just thought if_different might serve in the interim.

Offline

#35 2007-03-13 17:13:08

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

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

Ah, I see. That is handy to know. Unfortunately if_different doesn’t work for me in this case.

Offline

#36 2007-03-22 20:28:10

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

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

Hey Mary, any progress on adding the category functionality? Thanks for the help.

Offline

#37 2007-03-31 04:10:33

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

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

v.0.3

Last edited by Mary (2013-01-24 17:22:19)

Offline

#38 2007-04-02 01:44:11

tinyfly
Member
From: Dallas, Texas
Registered: 2004-05-10
Posts: 462
Website

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

Awesome Mary! It works splendidly.

Offline

#39 2007-04-06 03:46:50

mwillse
Member
From: brooklyn, ny
Registered: 2006-06-26
Posts: 83
Website

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

Brilliant Mary! Such a helpful plugin.

A question for you:

1) In the plugin’s help file, it says “class to apply to the image”. I couldn’t figure it out. Where does this class get applied?

A question for the community and you:

2) I’m having trouble producing a clean unordered list because I’m using txp:if_different to add headers based on file category. I can use <br />‘s instead, but I’m hoping there’s another way. I can wrap each link in my file form with <li> as in this example:

<txp:if_different><h4><txp:file_download_category /></h4>
<txp:else /></txp:if_different>
<li><txp:file_download_link><txp:file_download_description /></txp:file_download_link> 
[<txp:file_download_size format="auto" decimals="0" />]</li>

And I can wrap the whole list with <ul> using Mary’s wraptag or around the tag like so: <ul><txp:upm_article_file_list /></ul>.

But then my headers get stuck in the list which isn’t semantically correct and will probably break in some browsers. So my question is… Can anyone think of a way to generate a clean list by category? Something like:

<h4>Category A</h4>
<ul>
 <li>link</li>
 <li>link</li>
</ul>
<h4>Category B</h4>
<ul>
 <li>link</li>
 <li>link</li>
</ul>

Thanks again everyone for all your work and help.

Offline

#40 2007-04-06 17:08:56

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

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

For the first question: either to the image itself or to the wraptag if it is supplied.

Offline

#41 2007-04-06 19:34:18

mwillse
Member
From: brooklyn, ny
Registered: 2006-06-26
Posts: 83
Website

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

I’m confused. What image? Can you associate an image or thumbnail with file download link? Or is this only if the file is an image rather than a pdf, doc, etc?

Offline

#42 2007-04-06 21:30:39

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

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

Ha ha! That’s a mistake – the word should be ‘file’ not ‘image’. I’ve got two plugins which act very similarly and have very similar documentation – one for images and this one for files. I must’ve spaced on which one I was working on/talking about. (Just smile and nod…)

Sorry for the confusion. I’ll correct the plugin’s doc ASAP.

Offline

#43 2007-04-08 18:20:49

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

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

v.0.3.1

Last edited by Mary (2013-01-24 17:22:30)

Offline

#44 2007-05-09 23:21:47

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 currently associate files with articles using upm_file, and then display all of them by simply putting <txp:upm_article_file_list form="files"> on the page. In the“files” form, I include a link to the file, the number of downloads, the size, and the file description.

Would it be possible for you to add these features to your plugin:
1) Allow files to be rated by visitors
2) Allow sorting file lists by their rating (as in <txp:upm_article_file_list form="files" sort="rating">).

These features would be extremely helpful for my site, and I think they would nicely complement your plugin. Mary, please help!

Last edited by aswihart (2007-05-09 23:23:01)

Offline

#45 2007-05-10 01:16:34

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

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

The kind of thing you’re asking for is possible but somewhat involved. I could do it, but it’d take time. I can’t state exactly how much, as it depends on how much free time I can get.

Offline

Board footer

Powered by FluxBB