Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
How do you dare, minimal design?
Mary is helping you, and she is one of the most helper users in this forum.
Well, I’m not here to initiate a flame-war but to help as Mary does.
minimal, have you checked that the plug-in is activated after upgrading to v.0.2? Remember that plug-ins get deactivated after upgrading.
Offline
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
I actually got it working before 0.2 became available. I’m probably not using it exactly as Mary had intended, but so far it’s working. :) In the interest of filling my own request, here’s how I’m using it.
The site: B-Sides For X-Mas
Each article has a custom field called MP3 that has file’s TxP ID number. At first I had the entire download url (e.g. http://sportbucket.com/blog/file_download/25), but that obviously caused some problems. You just need the number (e.g. 25).
I made no changes to the page templates whatsoever. I’m using the normal <txp:article /> tag, like this:
<txp:article form="xmasmp3" />
So <txp:article /> is using a form called xmasmp3. I won’t paste the whole form here, but here’s a relevant chunk:
<h3><a href="<txp:upm_article_file_list form="files_real-url" />" title="Download this song"><txp:title /></a></h3>
The form xmasmp3 is calling Mary’s <txp:upm_article_file_list /> to get info about the associated file, using a form called files_real-url, which looks like this:
http://sportbucket.com/blog/files/<txp:file_download_name />
Since TxP’s built-in <txp:file_download_name /> gives us the filename, and all files are in the same ~/files/ folder, this form gives us the “real url” of the article’s aossicated file.
Why did I want to do this? Podcasting. I wanted a way to associate a file (mp3) with an article, and automatically output that file’s “real” url, not the TxP download link. For my purposes, a couple of dilemmas remain. First, if a filename has spaces in it, there’s no way to output those into a proper link. For example, there’s no way to get a file called [EDIT: Um, just make sure your filenames don’t have spaces. Workaround! :)] My Podcast.mp3 to output as My%20Podcast.mp3. Not sure how I’ll get out of that.The second podcasting dilemma is a way to get a custom field into the XML feed for the article, but I think I’m closer to solving that one. [EDIT: Solved. Contact me (tim{at}sportbucket{dot}com) if you need help with this.]
So anyway, that’s how I’m using upm_file. Thanks for the plugin, Mary!
Last edited by timjcoulter (2006-12-11 19:02:24)
Offline
#18 2006-12-07 02:48:36
- minimal design
- Member
- Registered: 2006-10-15
- Posts: 38
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
maniqui wrote:
How do you dare, minimal design?
You seriously think the post I’m was commenting on was helpful? It certainly didn’t help me… the person to whom it was addressed. I think when you really want to help people, you should actually write sentences… explain things… If you don’t have time and/or the desire to do so, that’s totally fine, I can understand that… and that’s all I said in my post. Was it so daring? ok… sorry…
I did activate the plugin, if I didn’t, using the custom tag would have spit out an error. It’s all good… I’ll look for an alternate solution for what I’m trying to do. Thanks.
Last edited by minimal design (2006-12-07 02:51:10)
Offline
#19 2006-12-07 04:23:30
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
Wow.
You learn something new every day: it’s unreasonable to ask people to read.
Last edited by Mary (2006-12-07 04:25:19)
Offline
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
Mary is still my personal best friend for releasing upm_file. The site went live and I’ve had a very good response – and a big part of that is because it’s now so easy to associate files to articles… (I’d send you some of my salary – if I was that generous!) – Thanks and keep up the good work!
Offline
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
Mary, thank you for all your great plugins, this one looks like it will be awesome — I used upm_file packets before and it was a “site saver”.
I’m now trying to use upm_file and have followed Tim’s method above, however, I get the following error when using it:
Fatal error: Call to undefined function: parse_form() in /home/www/websitenamegoeshere/textpattern/lib/txplib_misc.php(512) : eval()’d code on line 90
I’ve double checked that the plugin is turned on and that the appropriate custom field was assigned. I also tried it on a couple of different TXP 4.04 driven sites and got the same error. Any suggestions? If you want more details (diagnostics, etc..) I’d be happy to email them to you, and/or give you access to view the site (which is currently under production).
Thanks!
Terry
Last edited by vibe9 (2006-12-22 02:27:58)
Once in a while you can get shown the light, in the strangest of places if you look at it right.
-Grateful Dead
Offline
#22 2006-12-22 03:48:05
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
Sorry, I did something stupid. Try grabbing the latest version now available.
Offline
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
Awesome. Thanks so much Mary! You rule :-)
Once in a while you can get shown the light, in the strangest of places if you look at it right.
-Grateful Dead
Offline
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
I am missing some information on how to use this plugin. I read through the documentation but I have no idea what I am supposed to do to accomplish this:
It requires you to use one of your custom fields to hold the file list.
You can take a look at my site if you like, which is currently not using upm_file. Basically I want to associate song files with the articles they are on, as I already have done using txp:file_download_list and unique categories for each article.
I need to start using your plugin because I want to have a list of most downloaded videos and songs (separately), but the txp:file_download_list will only accept single categories, so I cannot make an all-inclusive top song downloads list since I have three song categories, one for each album.
Don’t be fooled to think I got it working by my site when you see the Top 5 Songs list, right now it is only showing the songs from one album (one category). Once I have the plugin setup and files associated with articles, I can change the file categories to be more general (ie. movies, music), and then be able to make my all-inclusive Top Movie / Song lists.
I’m all for brevity, but you might consider adding some more specific instructions for use of this plugin. Thanks for any help!
Andrew
Last edited by aswihart (2007-01-18 20:32:15)
Offline
#25 2007-01-19 09:33:30
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
From the plugin help:
It requires you to use one of your custom fields to hold the file list… pick one to be used, then update the plugin’s preference to point to it.
- Got a custom field created?
- See the tab “extensions” and under it “upm_file”?
- Go to your write tab. You’ve got a file picker link that works with the custom field you created.
Offline
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
OK, now the file picker is adding the file id’s to the article’s custom field. Before, it was not doing this, I think I had to rename the custom field to something other than “custom1,” or somehow I missed that before.
Thanks a lot Mary, the plugin is working great and its something I really needed!
Offline
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
Is there any file size limit built into the plug in Mary? I’m repeatedly trying to upload a 4/5 mb file and it won’t do it. And if its not the plug in I suspect the server, which means is there anything I need to check and/or modify in the plug in so it will work?
- the server’s fine for every other txp function, and for using an ftp client.
Offline
#28 2007-02-26 18:22:52
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
Is there any file size limit built into the plug in…
No.
You need to increase the file upload size (advanced options), and you may need to increase the limit within PHP itself (which you may or may not be able to do with your host).
Offline
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
I may be thinking of this wrong and this may be possible already but here it goes. I would like it if upm_article_file_list could take the category attribute. Here is an example of my article form to help explain why I would like this:
<tr>
<th scope="row"><txp:title /></th>
<td><txp:custom_field name="Job_Number" /></td>
<td><txp:body /></td>
<td class="currency"><span>$</span> <txp:custom_field name="Estimate_M" /></td>
<td><txp:upm_article_file_list break="" form="planHolders_file" category="plan-holders" /></td>
<td><txp:upm_article_file_list break="" form="bid_file" category="bid-tab" /></td>
</tr>
Notice the two different category attributes, that I would like to see possible, using your tag. This would allow me to associate multiple files from different categories with an article in the “Write” tab. Then allow me to output those article files into two different columns in the html.
Is this already possible another way or could it be added to the current plugin?
Thanks Mary.
Last edited by tinyfly (2007-02-26 21:17:53)
Refresh Dallas and other Refreshing Cities.
Offline
#30 2007-02-27 02:58:41
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
Yeah, that isn’t currently possible, I don’t think. I could add it, though.
Offline