Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#76 2005-11-21 12:08:12
- nardo
- Member

- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: upm_file_packets
what am I doing wrong? getting no result whatsoever from the below…
txp 4.0.2 hosted on textdrive
- plugin 0.2.5 -> active in plugins list
- packet custom field is “article-files” – same as in prefs
- in my article form (it’s the right one!) I have
<txp:upm_article_file_list form="files" /> - form “files” exists with the following tags:
<ul class="files-list">
<li><txp:file_download_link><txp:file_download_name /></txp:file_download_link>
<span class="filesize"><txp:file_download_size format="mb" decimals="1" /></span></li>
<li class="filedesc"><txp:file_download_description /></li></ul>
when I substitute <txp:file_download_list /> for upm plugin tag, I get a list of files
yours, perplexed
Last edited by nardo (2005-11-21 12:12:12)
Offline
#77 2005-11-21 19:43:33
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: upm_file_packets
Hmm, that’s odd. If you replace the entire form with “Hi nardo”, what do you get back?
Offline
#78 2005-11-21 21:18:07
- nardo
- Member

- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: upm_file_packets
nothing, Mary – I’ll recheck everything tonight, I must be doing something dopey
Offline
#79 2005-11-22 00:14:09
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: upm_file_packets
Nope, it was my bad. It should work now.
v.0.2.6
Offline
#80 2005-11-22 00:54:01
- nardo
- Member

- From: tuvalahiti
- Registered: 2004-04-22
- Posts: 743
Re: upm_file_packets
many thanks mary – the files are appearing, I am removing sackcloth & ashes
but getting an error msg at the top of each screen of the site now:
eg “select custom_1 from `textpattern` where `ID` = ‘2’ limit 1”
- even when Production Status (in site prefs) is set to “Live”
EDIT: mary’s done fixed it
Last edited by nardo (2005-11-22 03:31:17)
Offline
#81 2005-11-22 01:59:19
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: upm_file_packets
Whoopsie… Try once more (updated the file, but not the plugin version number).
Offline
Re: upm_file_packets
Anyone have this working in 4.0.3? If so, do you have a copy of the plugin? I tried to compile it myself, from the source which mary left here but I am still getting the division by zero error.
Refresh Dallas and other Refreshing Cities.
Offline
#83 2006-01-24 19:26:57
- Thirteen
- Member
- Registered: 2006-01-09
- Posts: 40
Re: upm_file_packets
I asked a similar question in the “How do I..” forum several days ago but received no replies- and now it’s just occurred to me that I’m using upm_file_packets to attach files to my articles so it might be more specific to a plugin help.
upm_file_packets allows multiple file attachments…and my question is, how do I get these multiple files to link? Does each of the file have to be in a separate custom category? And if so…how would I go about counting downloads separately for these separate files within an article? I’m tearing my hair out trying to figure this out- if anyone can help me out at all or point me in the right direction, I’d so greatly appreciate it. Thank you!
Offline
Re: upm_file_packets
I use this code in my article form:
<code>
<ul class=“dloadlist”>
<txp:upm_article_file_list />
</ul></code>
The plugin uses the default “file” form to output the file links. In this form, I have the following:
<code>
<li class=”<txp:file_download_category />”><txp:file_download_link>
<txp:file_download_name /> (<txp:file_download_size format=“auto” decimals=“1” />)
</txp:file_download_link></li></code>
I assign each file a category to display different icons based on it (see class attribute in the li element) but that’s not necessar.
Hope this helps.
Last edited by andreas (2006-01-24 19:46:03)
Offline
#85 2006-01-24 21:21:49
- Thirteen
- Member
- Registered: 2006-01-09
- Posts: 40
Re: upm_file_packets
Forgive me if I’m missing something- but that still only list one file right? If so…then that’s not what I’m looking to do as I already got that working for me. What I meant was to attach more than one file per article and to make those links. Basically, I run a site that offers quite a bit of file downloads. On some sections, I need to have two (maybe even more?) files per article. So what I’m trying to figure out is how I can make it so that links to both files show up and to also count the downloads for them. So far, I only know how to make it work for one file attachment- but I figured there must be a way for more because the plugin does allow multiple attachments after all.
Thank you very much for helping me though- I really appreciate it. I haven’t been getting much answers for anything I ask around the board so I’m happy someone responded.
Offline
Re: upm_file_packets
but that still only list one file right?
No, if you enter more than one file to the custom field associated with the plugin, it will repeat the part contained in the file form. You can see it in action in this example page of mine.
For me, the plugin produces disctinct download links that are individually counted.
Last edited by andreas (2006-01-24 21:33:45)
Offline
#87 2006-01-25 09:53:55
- Thirteen
- Member
- Registered: 2006-01-09
- Posts: 40
Re: upm_file_packets
Ah, I probably should post how I need to have it set up- because my case might be a tad different- either that or my brain is working especially slow and I just can’t wrap my thoughts around it. :\ For example, there’s a section on my site that will offer Photoshop brushes for download in either image zips or abr files…so my set up would be like this:
Picture Preview of Brush Set
Download abr Link #1 (download count) | Download zip Link #2 (download count)
Post Date
File Size of each file if possible.
I have this working no problem for 1 file attachment and I have the output list codes inside a form. The problem I have for 2 or more file attachments is that the whole thing repeats- which isn’t what I want because then it displays the same picture preview again and then it ends up looking like two separate articles when I’m just listing the list of downloads. I hope I’m making sense. The ideal way would be some kind of an if statement that says if there’s more than 1 file attachment, display it this way and if there’s only 1, then display it that way, etc. But I don’t know if that’s possible. :\
Thank you so much for taking the time to help me out!
Last edited by Thirteen (2006-01-25 09:57:05)
Offline
Re: upm_file_packets
What if you take the preview picture out of the file form and put it into the article form (just like I didn’t include the ul element in the file form because I only want it once).
Offline
#89 2006-01-26 11:41:27
- Thirteen
- Member
- Registered: 2006-01-09
- Posts: 40
Re: upm_file_packets
It still doesn’t work right- though I’m guessing that it has to do with the way I have things set up. I’m going to have to do a bit more thinking and fiddling with this…but your suggestions have given me a clearer direction and some ideas on where to begin solving my problem. Thank you!
Offline
Re: upm_file_packets
mary is no longer maintaining this plugin – a copy of the last release is available here from upm-plugins archive
Refresh Dallas and other Refreshing Cities.
Offline