Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2006-12-06 04:14:00

minimal design
Member
Registered: 2006-10-15
Posts: 38

Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.

Just uploaded 0.2 and tried it out. The MySQL error message is gone, but no articles show up on section page and none of the file tags in single articles output any code at all either. I doesn’t throw any error either, so I don’t know how to trouble shoot what I’m doing wrong.

I second Tim Coulter, to anyone using this plugin successfully: I’d be curious to look at what the code + context looks like – Thanks!

Offline

#14 2006-12-06 04:30:42

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

Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.

…so I don’t know how to trouble shoot what I’m doing wrong.

Tag trace.

Offline

#15 2006-12-06 04:42:29

minimal design
Member
Registered: 2006-10-15
Posts: 38

Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.

Mary, If you don’t feel like helping, it’s ok not to post…

Offline

#16 2006-12-06 04:55:49

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

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.


La música ideas portará y siempre continuará

TXP Builders – finely-crafted code, design and txp

Offline

#17 2006-12-06 06:40:41

timjcoulter
New Member
From: Oregon, USA
Registered: 2005-03-19
Posts: 5
Website

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 My Podcast.mp3 to output as My%20Podcast.mp3. Not sure how I’ll get out of that. [EDIT: Um, just make sure your filenames don’t have spaces. Workaround! :)] 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

#20 2006-12-07 07:21:38

douglgm
Member
From: Bristol
Registered: 2006-08-23
Posts: 182
Website

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

#21 2006-12-22 00:07:18

vibe9
Member
From: North Vancouver, BC
Registered: 2005-01-18
Posts: 21
Website

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

#23 2006-12-22 03:54:39

vibe9
Member
From: North Vancouver, BC
Registered: 2005-01-18
Posts: 21
Website

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

#24 2007-01-18 19:25:12

aswihart
Member
From: Pittsburgh, PA
Registered: 2006-07-22
Posts: 345
Website

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

Board footer

Powered by FluxBB