Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#109 2009-03-22 06:06:52

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

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

Update now available

Last edited by Mary (2013-01-24 17:24:13)

Offline

#110 2009-05-21 17:10:17

jordi
Member
From: Barcelona
Registered: 2005-09-14
Posts: 94
Website

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

A quick question… Are there any known issues to take into account when using this plugin together with Gerhard’s glz_custom_fields?

Offline

#111 2009-05-21 19:05:06

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

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

jordi wrote:

A quick question… Are there any known issues to take into account when using this plugin together with Gerhard’s glz_custom_fields?

I’m always using both and never had a problem

Offline

#112 2009-05-25 10:13:56

jordi
Member
From: Barcelona
Registered: 2005-09-14
Posts: 94
Website

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

Good to know it, thank you.

Offline

#113 2010-05-11 15:59:36

photonomad
Member
Registered: 2005-09-10
Posts: 290
Website

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

Thought I’d post it in this forum because I am using upm_file. However, if it doesn’t belong here, I will post somewhere else.

I am trying to figure out a way to display a thumbnail preview (not an icon) on-the-fly of the first page of pdf files in my upm file list for an article. I found some php that might be able to take a file and use image magick to make it into a jpg. My main question here is, how do I pick out each file name using php $GLOBALS?

I will be using this code in my files form and, since it will be inside <txp:php> tags, I can’t use <txp:file_download_name /> to get the name of the file. Thanks in advance for any hints or suggestions!

<txp:php>
$file = $GLOBALS ???how to get the filename here???
the rest of the code here for converting to a jpg thumbnail...
</txp:php>

Offline

#114 2010-05-11 16:34:55

rsilletti
Moderator
From: Spokane WA
Registered: 2004-04-28
Posts: 707

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

I can’t use <txp:file_download_name /> to get the name of the file.

Why not? If you are inside a file_download_list form, or something that will serve for it, and inside txp:php tags, file_download_name(); should return that name. If you are not inside a file list form and function there won’t be any dynamic source for that value however.

Last edited by rsilletti (2010-05-11 16:35:23)

Offline

#115 2010-05-11 16:57:22

photonomad
Member
Registered: 2005-09-10
Posts: 290
Website

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

Thanks rsilletti, I didn’t realize it was that simple. I will give it a try!

Offline

#116 2010-07-14 16:33:51

wornout
Member
From: Italy
Registered: 2009-01-20
Posts: 256
Website

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

redbot wrote:

I’m always using both and never had a problem

This is true if you use the default custom fields (1 to 10).
Can be fixed?

Last edited by wornout (2010-07-14 16:35:10)

Offline

#117 2010-07-14 18:39:56

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

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

wornout wrote:

This is true if you use the default custom fields (1 to 10).
Can be fixed?

Hi,
actually you are perfectly right: if you use a cf beyond 10 upm_file won’t work.
I myself had this issue once and I had to change the ‘files’ cf to one below 10.
It was a nightmare ;-)
…but this solved the question.

Offline

#118 2010-07-14 21:55:01

uli
Moderator
From: Cologne
Registered: 2006-08-15
Posts: 4,303

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

wornout wrote:

This is true if you use the default custom fields (1 to 10).
Can be fixed?

wornout, almost at the bottom of the file there’s an array, around line 536. Try adding your cf’s no. and see if it breaks anything.


In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links

Offline

#119 2010-07-15 06:54:41

wornout
Member
From: Italy
Registered: 2009-01-20
Posts: 256
Website

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

Thanks uli,
it works!!!

Offline

#120 2010-07-15 09:15:49

redbot
Plugin Author
Registered: 2006-02-14
Posts: 1,410

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

wornout wrote:

Thanks uli,
it works!!!

Good to know, thank you from me too!

Offline

Board footer

Powered by FluxBB