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.
Thank you Redbot, that was clear and helpful. Works great now.
Offline
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
I have a problem with the plugin
here it works:
http://www.womm.it/artre/progetti/32/un-progetto-psicologia-scolastica
here it doesn’t work (error 403 forbidden)
http://www.artre.coop/cooperativa/5/organizzazione
The second one is a different installation of textpattern, the first one were some design experiment before putting the site online.
I suppose the problem is given by some interaction with plugin i installed in the second installation and not in the first (i.e. hak_tinymce, or rss_admin_show_adv_opts, or lam_image_uploader).
Anyway… even upm_file_popper has a different behaviour: instead of popping me the window with the file picker, it opens a different tab in my firefox…
( i tried with different browsers in case was a security issue, but no)
can you help me please? it’s really important
UPDATE: tried reinstalling upm_file and upm_file_popper, but no result…
Last edited by midmood (2009-02-08 15:53:41)
Offline
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
OK, i found the problem. Hope this helps
I inserted the upm_file tag in a page which need username and password to access to,
so, in every page, even the public ones, i can download the file by clicking it only if i’m logged in (doesn’t matter what user i am and which privileges i have)
I need the files in public pages to be downloaded by every visitor, even if not logged
Is there a way to fix this?
thank you
Simone (Italy)
UPDATE: please note: right clicking the file i can download something, but the file downloaded is corrupted
Last edited by midmood (2009-02-08 16:30:29)
Offline
#94 2009-02-08 22:04:22
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
I’m confused.
Are you saying your entire site is password protected but you want file downloads to not be? If so, it would depend upon how you’re achieving the password protection. That’s really outside the scope of the plugin support (since it’s nothing to do with the plugin itself), but I can see if I can help you figure it out.
If that’s not what you mean, can you elaborate further?
Offline
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
Mary wrote:
I’m confused. Are you saying your entire site is password protected but you want file downloads to not be?
No, I wasn’ìt clear cause of my bad english :-)
but now i have more information!
only a single template page is password protected. But the plugin behaviour is the same in the whole website
every single download, even in the public pages, needs the visitor to be logged as ADMIN in the private page to work fine.
i can’t give you my admin password but trust me, i created a user for each privs level and the only one that work is admin. for the other users and the generic visitor downloads are forbidden.
thank you for your reply anyway :-)
Last edited by midmood (2009-02-08 22:28:51)
Offline
#96 2009-02-08 23:39:51
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
So this would be a Textpattern core tag or plugin tag that is doing the password protection? You don’t need to give me passwords or anything, but how your protection works is relevant.
The actual download of files is handled by Textpattern itself (and it doesn’t protect file downloads in any manner), all my plugin does is provide links to them.
Offline
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
the other plugin is ign_password_protect. which allow to protect some pages or the entire site
I’m not a programmer, but my feeling is that the problem depends on the upm_file plugin.. can you figure out a possible interaction between them?
Last edited by midmood (2009-02-08 23:48:34)
Offline
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
i foud this chunk of code in the ign_password_protect plugin code.
The error message match the one i get:
function ign_filter_downloads() //callback routine called by file_download
{
global $id, $file_error, $ign_user, $pretext, $s;
// test for file_error
if(!$file_error) {
// get file permission, if present
$r = safe_field('permissions','txp_file','id');
if($r) { // if permissions field exists, test against it, otherwise return
if(!empty($ign_user) && ign_checkPrivs($r)) {
//continue on to download
return;
} else {
$s = '';
$pretext['s']='';
txp_die ( "Monkeys!", 403);
}
} else {
return; // no file permissions, so just carry on.
}
} else {
$s = '';
$pretext['s']='';
txp_die(gTxt('404_not_found'), 404);
}
}
Offline
#99 2009-02-08 23:59:37
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
I dug through ign_password_protect and it protects file downloads. So, I would get in contact with Jeremy, and find out from him how to configure it accordingly. :)
Edit: Ah, I see you found it too.
Offline
#100 2009-02-09 00:02:17
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
many, many thanks…. :-)
Offline
#101 2009-02-09 01:36:51
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
Major update now available
Last edited by Mary (2013-01-24 17:26:31)
Offline
#102 2009-02-10 00:22:50
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
just for the other who would have the same problem of me:
the quick solution is here: http://forum.textpattern.com/viewtopic.php?pid=200280#p200280
thank you for the support :-)
Offline
#103 2009-03-05 15:18:14
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
I love this plugin and was wondering if it would be possible to modify the code so that it will allow for the designation of two different custom fields? I would like to list two different types of file downloads in two different places for each article. Currently, I am using upm_file for one type of file (some mp3s) and yab_download for the other type of file (pdf’s etc). However, I’d prefer to use upm_file for both and not yab_download.
I understand that a modification of this kind would probably necessitate that the name of the custom field be specified within the upm_file tag, rather than in the extensions tab.
Just curious. Thanks!
EDIT: Ok… sorry, I realized that I should just use file categories with the plugin as it is now! : )
Last edited by photonomad (2009-03-05 15:36:43)
Offline
#104 2009-03-20 05:24:45
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
Hi Mary,
Just giving your plugin a whirl to associate a file with an article & I’m seeing:
Tag error: <txp:upm_article_file_list /> -> Textpattern Warning: Unknown column '1f' in 'where clause'
select * from txp_file where id in(1f) order by field(id, 1f)
textpattern/lib/txplib_db.php:220 startRows() on line 82
textpattern/lib/txplib_db.php:82 trigger_error()
textpattern/lib/txplib_db.php:282 safe_query()
textpattern/lib/txplib_db.php:220 startRows()
textpattern/lib/txplib_misc.php(574) : eval()'d code:95 safe_rows_start()
textpattern/publish.php:1090 upm_article_file_list()
textpattern/publish.php:1012 processTags()
textpattern/publish.php:770 parse()
textpattern/publish.php:887 doArticles()
textpattern/publish.php:550 parseArticles()
textpattern/publish.php:1090 article()
It’s picking up the required file OK, the output on the page is (for example):
file: COL_Newsletter.pdf [323.29KB]
Category:
download: 1
I’m using upm_file version 0.4, TXP 4.0.7 and in the page I’ve got:
<txp:article>
...
<txp:upm_article_file_list />
</txp:article>
Cheers,
Adi
Offline
#105 2009-03-20 20:33:19
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
For the article in question, what have you entered in the file custom field?
Offline