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.
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
#106 2009-03-20 21:30:47
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
Mary wrote:
For the article in question, what have you entered in the file custom field?
Bingo! It’s an article listing, & each article has a file ID number in the custom field … except one of them had 1f
instead of 1
.
Sorry for troubling you.
Offline
#107 2009-03-21 12:22:46
- gomedia
- Plugin Author
- Registered: 2008-06-01
- Posts: 1,373
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
Mary,
In upm_article_file_list, it seems that a class will only get applied to a wraptag if it’s a <ul>
or <ol>
– is that right?
Adi
Offline
#108 2009-03-22 05:10:06
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: [plugin] [ORPHAN] upm_file: Associate single or multiple files with an article.
At present, yes. This would be an artifact from before the core wraptag handling was improved, and I just forgot about updating this one. I’ll post an update soon to remedy this.
Offline