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

Board footer

Powered by FluxBB