Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » upm_file_packets

#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

#86 2006-01-24 21:32:46

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

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

#88 2006-01-25 12:47:52

andreas
Member
Registered: 2004-02-28
Posts: 453
Website

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

#90 2006-02-09 06:56:11

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

Re: upm_file_packets

mary is no longer maintaining this plugin – a copy of the last release is available here from upm-plugins archive

Offline

#91 2006-04-07 04:27:26

maniqui
Member
From: Buenos Aires, Argentina
Registered: 2004-10-10
Posts: 3,070
Website

Re: upm_file_packets

What a wonderful plug-in… thanks Mary for this one…

I have “combined” it with the bas_emff and I’m very happy (combined= they share the same custom field… aaaah… I love TXP so much).

Now, I have a question.
In the pop-up windows, there are two links to the file. The first, under the “File name” column. The second, under the “Attach” column.
I attach the files with that link (the one with the nice clip).

But does the other one have any functionality?
If I look at the source code of the link, it has some scripting: onclick="return warnEditFile(8);" but if I click in the link, nothing seems to happen.

And a second and more important question:

¿does this plug-in also allow me to link files in the body of the article? (similar to upm_img_popper, that let’s add images to the body of the article).

If not, I ask: which is the “best” way to link uploaded files in the body of an article? hard-coding the link?!
But we are in 21 century!!!

thanks in advance.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#92 2006-04-11 02:38:23

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

Re: upm_file_packets

v.0.3

But does the other one have any functionality?

It should direct you to edit that file.

…does this plug-in also allow me to link files in the body of the article?

Yes and no. That is the purpose of the built-in file tags, which includes file_download_list. However, Alex and I recently discovered a problem with file_download_list. It will be fixed in an upcoming release, but, I would advise not using this particular built-in tag for large lists until it is, in fact, fixed. Therefore, in v.0.3, I’ve temporarily provided the tag upm_file_download_list, which is a fixed but otherwise identical version of file_download_list. As soon as the built-in tag is fixed, the plugin’s version will be disappearing.

Offline

#93 2006-04-21 21:48:21

lee
Member
From: Normandy, France
Registered: 2004-06-17
Posts: 831

Re: upm_file_packets

Thanks for this plugin Mary.

Offline

#94 2006-04-25 14:31:08

csandberg
Plugin Author
From: Sweden
Registered: 2006-01-07
Posts: 40
Website

Re: upm_file_packets

This is very useful for me. Thank you very much!

Offline

#95 2006-06-06 00:49:52

semanio
Member
Registered: 2005-10-18
Posts: 20

Re: upm_file_packets

Mary,

FYI I just found a bug with the upm_file_download_list function. I kept banging my head as to why when I used this tag as you recommended the filesize would fail to display. After looking around at a few other plugins I saw that you had a few things missing.
<br />*First Change*<br />
———————————————————————————
<code>
global $thisfile;
</code>
TO
<code>
global $txpcfg,$file_base_path,$thisfile;
</code>

<br />*Next Change*<br />
———————————————————————————
<code>
if (file_exists($filepath)) {
</code>
TO
<code>
if (file_exists(build_file_path($file_base_path,$filename)) ) {
</code>
———————————————————————————
<br />
With those two minor changes the filesize and other information now display as they should. Just figured I would pass the information along.

Let me know if what I modified was incorrect.

Thanks,
Nate

Offline

#96 2006-06-06 20:27:52

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

Re: upm_file_packets

Only $file_base_path is missing; $txpcfg is unneeded. Your second change is redundant; look at the line above it. Making $file_base_path global should resolve the problem. Thanks for letting me know.

v.0.3.1

Offline

  1. Index
  2. » Archives
  3. » upm_file_packets

Board footer

Powered by FluxBB