Textpattern CMS support forum

You are not logged in. Register | Login | Help

#11 2006-12-05 08:34:37

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’m somewhat confused how to use this plugin. Part of the problem is that I haven’t used TxP’s built-in file handling much, so I’m having trouble conceptualizing how to use it. If anyone has any examples of how they’re using this plugin, it would be much appreciated!

Offline

#12 2006-12-05 22:36:53

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

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

As I understand it, you’re supposed to replace the regular <txp:article /> w/ your customized <txp:upm_file_article /> in your page/form template right?

Correct.

You found a bug – a naughty comma where there should not be one.

v.0.2.

Offline

#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
Moderator
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: 180
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

Board footer

Powered by FluxBB