Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#76 2008-10-01 11:07:16
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
Did you associate one or more file id (using a custom field defined under “extensions ->upm_file”) to your article?
Offline
#77 2008-10-01 13:09:47
- fangonk
- Member
- Registered: 2007-07-12
- Posts: 44
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
Yup. I used the file id.
Offline
#78 2008-10-01 13:54:38
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
Sorry fangonk I always used a code similar to yours and never had problems.
One last thing: are you sure you set the right custom field name under “extensions ->upm_file”?
If it is not the case I’m sorry I can’t help you further.
Offline
#79 2008-10-01 17:36:42
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
You’ve used an incorrect tag name. Try:
<li>Download: <txp:upm_article_file_list form="fileLink" /></li>
Offline
#80 2008-10-01 21:57:30
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
Oops, I missed it, Mary is right.
Offline
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
i tried reading through this thread and nothing is sinking in.
i’m trying to attach pdfs to articles.
in my article form i have:
<txp:body />
<txp:upm_file_article />
i created a custom field called “pdf”. in my article i have set the pdf custom field to be “1” because that’s the file ID of the first pdf uploaded in the files tab. in the extensions tab i set upm to be pdf.
Offline
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
mrtunes,
what do you have in your “files” form? (upm_file uses a form named “files” by default)
Offline
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
Sorry, I’m wrong (and you too ;) )
txp:upm_file_article is just a replacement for txp:article.
Yau may want to use txp:upm_article_file_list on your article form (under txp:body)
Offline
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
maniqui wrote:
Sorry, I’m wrong (and you too ;) )
Yau may want to usetxp:upm_article_file_liston your article form (undertxp:body)
yyeahh! thanks that worked. and then i used the form “files” to kill off any unwanted data. i swear one day i have to compile all the stuff i get out of these threads into a big long document hehe
Offline
#85 2009-01-11 00:13:31
- mrjysta
- Member
- Registered: 2008-09-22
- Posts: 89
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
Hi, I have the plug-in working with a custom field and will be adding 2 different files (1 pdf and 1 mpegVideo) each with a different category. My problem is I’m not sure how to apply a different class to each? (using the if/else tags or file_category eg:
<ul class=“pfile_links”>
<li><a class=“cv” href =”#”>Download CV</a></li>
<li><a class=“showreel” href =”#”>Download Showreel</a></li>
</ul>
Can I use something like:
<txp:if_upm_article_file_list category=“cvs”><txp:upm_article_file_list class=“cv” wraptag=“a” break=“li” /><txp:else/>…
OR
<txp:upm_article_file_list file_category=“cvs” limit=“1” class=“cv” wraptag=“a” break=“li” />
<txp:upm_article_file_list file_category=“showreel” limit=“1” class=“showreel” wraptag=“a” break=“li” />
prob a newbie question but this is the first time I have played with download lists and this plug-in/
Thanks
Offline
#86 2009-01-11 20:13:06
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
Off the top of my head:
<txp:upm_article_file_list sort="category asc" form="files" wraptag="ul" class="pfile_links" break="li" />
“files” form:
<a class="<txp:file_download_category />" href="<txp:file_download_link />" Download <txp:file_download_category title="1" /></a>
Last edited by Mary (2009-01-11 20:14:33)
Offline
#87 2009-01-11 20:27:49
- mrjysta
- Member
- Registered: 2008-09-22
- Posts: 89
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
Ah! – Brilliant, thanks Mary!
Offline
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
Does this work with 4.0.8?
I have installed the plugin, chosen my custom field, but there is no file picker in the write tab.
And replacing ‘txp:article’ with ‘upm_file_article’ results in a blank.
Offline
#89 2009-01-28 18:56:19
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
Don’t know, haven’t tested it. Could likely be it needs updating, since the two recent updates made changes to articles.
Offline
#90 2009-01-29 09:02:32
- redbot
- Plugin Author
- Registered: 2006-02-14
- Posts: 1,410
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
amordecosmos wrote:
Does this work with 4.0.8?
I have installed the plugin, chosen my custom field, but there is no file picker in the write tab.
And replacing ‘txp:article’ with ‘upm_file_article’ results in a blank.
Seems to work ok for me. Keep in mind though, that I’m using only the “upm_article_file_list” tag.
Regarding the file picker you should install another plugin upm_file_popper.
Offline