Page 1 of 2

Uploads module errors and question

Posted: Mon Sep 19, 2005 1:29 pm
by hesbas
I try to use the uploads module. I think its very usefull and looks good. It works, but when I opload a file I get these error notices:

Notice: Undefined variable: nameCallback in D:\Inetpub\cms\modules\Uploads\Uploads.module.php on line 2641

Notice: Undefined variable: file in D:\Inetpub\cms\modules\Uploads\Uploads.module.php on line 2597

Notice: Undefined variable: return_id in D:\Inetpub\cms\modules\Uploads\Uploads.module.php on line 2279

Am I doing something wrong here?

Is there a posibility to link an icon to a file type?

Re: Uploads module errors and question

Posted: Mon Sep 19, 2005 3:50 pm
by calguy1000
I checked through my 1.04 code and found a couple of these issues, so I created a new version 1.0.5  I'm going to upload that to the wiki right away here.
I only found a couple of the errors though, couldn't find the $file error.

I think that you are encountering these errors because of your php settings, mine aren't set too strict.  but if you'll work with me, I'll get it all fixed up in short order.

Re: Uploads module errors and question

Posted: Tue Sep 20, 2005 12:51 pm
by hesbas
Good work, fast reaction!! Thanks.

I tried the 1.06 version and now I got these messages:

Notice: Undefined index: input_description in D:\Inetpub\cms\modules\Uploads\Uploads.module.php on line 2765

Notice: Undefined variable: file in D:\Inetpub\cms\modules\Uploads\Uploads.module.php on line 2774

It all seem to work exept for these messages

Re: Uploads module errors and question

Posted: Tue Sep 20, 2005 1:09 pm
by hesbas
Just an other question:

How do I integrate the input template in to a page?
I can show the list with files and I can upload using the admin site.

Thanks again

Re: Uploads module errors and question

Posted: Tue Sep 20, 2005 1:44 pm
by calguy1000
{cms_module module=Uploads mode=upload category=something} should do the trick.  I would go in and edit the upload form template to something that looks decent though.

Re: Uploads module errors and question

Posted: Wed Sep 21, 2005 2:20 am
by calguy1000
Uploads v1.0.7 is in the wiki
which allows renaming of files.

Re: Uploads module errors and question

Posted: Wed Sep 21, 2005 2:25 pm
by hesbas
It all seems to work fine now!

Thanks again!

Re: Uploads module errors and question

Posted: Fri Sep 23, 2005 4:38 pm
by Greg
Using 1.07 - created a folder with file manager in uploads called minutes...

In Add Category
Notice: Undefined variable: row in d:\aaaweb\cms\modules\Uploads\Uploads.module.php on line 1834

Uploads Interface:
When clicking the upload button after browsing for a file and completing all fields:
Notice: Undefined index: input_description in d:\aaaweb\cms\modules\Uploads\Uploads.module.php on line 2775

Notice: Undefined variable: file in d:\aaaweb\cms\modules\Uploads\Uploads.module.php on line 2784

Detailed view: shows this after using the admin module to upload a file and a page created with detailed parameter
Id 4
Name Kalendar_eng.pdf
Date 0000-00-00 00:00:00
Author Greg
Size (Kb) 2
Summary 
Description 127.0.0.1

Clicking the above link results in file not found.

Creating a page and Using the upload link {cms_module module="Uploads" mode="upload" category="minutes"}
After Browsing for a file, completing all the fields I get:

Error!

Error: Insufficient parameters supplied to module!

Re: Uploads module errors and question

Posted: Fri Sep 23, 2005 4:41 pm
by calguy1000
Hi

I've noticed some errors with respect to scanning if there are spaces in the filenames.  I will have to make a 1.0.8 that renames the files to remove the spaces and change them with underscores.

I'll check into your errors right away though.

Re: Uploads module errors and question

Posted: Fri Sep 23, 2005 4:46 pm
by calguy1000
can you send me the text of the source around those errors, I've changed things since then and the line numbers don't match.

thx.

Re: Uploads module errors and question

Posted: Fri Sep 23, 2005 4:57 pm
by Greg
Hi Calguy

Here is the code
1834 -  $row['upload_category_listable']));
2775 -  $params['input_description'],
2784 -  $this->lang('uploaded', $file) );

Thanks,

Re: Uploads module errors and question

Posted: Mon Oct 03, 2005 12:04 am
by westis
Hi,

Using Uploads Module 1.07, when uploading and not selecting any file name under "Upload As", then the file name field is just empty... Would be great if the original file name is the default if no other name is selected.

Also, if I then try to rename the file to the name of the original file name I am told that this name already exists.

When deleting a file from the Uploads interface it seems like the file itself is not deleted (at least not in the case where I left the Upload As field empty). Therefore I have to manually delete it if I'd like to upload an updated version of a file with the same name.

And lastly, a not-so-urgent feature request. I'm using the Uploads Module to show a list of modules (working on the new CMSMS site). Would it be possible to upload two (or more) files that so-to-speak are connected to the same name (in this case the same module, I use the summary field for the module name). For my example, one tar file and one zip file for the same module. Something for future versions, but not urgent at the moment.

Thanks! :-)
/westis

Re: Uploads module errors and question

Posted: Mon Oct 03, 2005 2:16 pm
by westis
Hi again,

A couple of more feature requests for the Uploads module (they keep on coming... ;-) )

1. Would be great with some kind of BBCode for the description field, that interprets the return key as
and that automatically makes links of what should be links (www, http:// etc.). Possibly also some simple BBCode buttons like in this forum, for bold text, lists etc.

2. UserID integration, so that only registered users can upload files through the frontend Uploads form (mode="upload"). Or is this possible already?

3. And a question: I tried to customize the frontend Uploads form, but couldn't find the template or code for it. Where can I customize that form?

Re: Uploads module errors and question

Posted: Mon Oct 03, 2005 2:19 pm
by calguy1000
Hi Westis... I was thinking of enabling the wysiwig editor of choice for the description field, but haven't gotten around to it yet.

However, userid integration is already posible with the customcontent module.  take a look at it.  You simply embed the uploads tag inbetween custom contents tags, and off you go.

Re: Uploads module errors and question

Posted: Thu Oct 06, 2005 2:16 pm
by Pim
I tried to use the upload module,
but after I installed everything turnded the code in a template (also set the category and the mode in my template)
nothing is showed in mij preview screen.

Can anybody help me?

thank you

Pim