Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

  1. Index
  2. » Archives
  3. » Mod File Upload

#1 2004-11-14 08:41:59

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Mod File Upload

In response to the request of many to be able to upload any type of file in to Txp, instead of just images. Request Forum Thread

Mod File Upload

Offline

#2 2004-11-14 13:22:41

obeewan
Archived Plugin Author
From: Stockholm, Sweden
Registered: 2004-08-12
Posts: 319
Website

Re: Mod File Upload

I believe the reason no one did it is that you need to do some modding of the back-end which will could brake in future updates aswell as we (atleast I :) waited for it to be either implemented by Dean or when the admin plugin part of the system will/shall/if be implemented.

But I will definatly try this plugin out :)

Last edited by obeewan (2004-11-14 13:23:04)


Plugins: ob1_advanced_search 1.032b, ob1_search_score 1.0, ob1_pagination 2.5, ob1_title 4.1, ob1_modified 2.1

“Let your plans be dark and as impenetratable as night, and when you move, fall like a thunderbolt.”
— Sun Tzu

Offline

#3 2004-11-14 15:39:16

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Mod File Upload

Hi Manfre. I think this may be a nice plug-in but I’m not getting it to work at the moment. My initial problem was that it wasn’t picking up the “txp_file.php” and I couldn’t go into the new “files” tab at all without errors. In your instructions you have this placed in the “lib” folder but it should go into the “include” folder. Having sorted that I can now go into the “files” tab but I’m getting this error:-

“Warning: chdir(): No such file or directory (errno 2) in
/my_root_path/textpattern/include/txp_file.php on line 507”

It’s also telling me that it can’t access my specified directory as it isn’t chmod 777. I know that it is so I’m presuming it just isn’t picking up the correct URL as it suggests in the above warning. I’m using “clean” URLs so how should I specify the directory in the “admin preferences”?

As an aside I happen to use wilshire’s Quick Pik 2 mod and it’s picking up the new “files” tab fine just in case anyone thought they might need to bring the old tabs back.

Stuart

Last edited by thebombsite (2004-11-14 15:43:18)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#4 2004-11-14 17:02:00

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: Mod File Upload

Sorry about the wrong path in the instructions. Fixed.

The directory should be an absolute file system path to the folder you wish to park the uploads. It’s recommended that this path is not under your public_html folder because then people will be able to directly link to the files, instead of being forced to use the ./textpattern/download.php script. For example, on textdrive it would be /usr/home/username/files/

Last edited by Manfre (2004-11-14 17:02:32)

Offline

#5 2004-11-14 17:12:01

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Mod File Upload

So my new directory should be at the same level as “public_html”?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#6 2004-11-14 17:22:58

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: Mod File Upload

Correct.

Edit: I made a blunder in the instructions. I left out changes that need to be made to txp_category.php. These changes don’t prevent anything from working, but it means that you can’t create file categories. The steps are in the newly uploaded mod file, which is at the same url.

Last edited by Manfre (2004-11-14 17:41:43)

Offline

#7 2004-11-14 17:53:51

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Mod File Upload

Yes I sorted the directory out OK then found I had nowhere to create categories. I’ll grab the new version. In the meanwhile are there file types that can’t be uploaded? Or would it be shorter to list the file types that can?

Last edited by thebombsite (2004-11-14 17:54:29)


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#8 2004-11-14 18:00:48

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: Mod File Upload

There are no restrictions to the type of files that can be uploaded. There really isn’t a need to restrict based upon file type since the files should be parked in a non web fetchable/executable path. I figure if some one gets your Txp password and uploads a malicious file, then they will still need a way to execute the file.

Offline

#9 2004-11-14 18:09:58

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Mod File Upload

Thanks. Additional mods done and categories accessible. Now to try out the tags.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#10 2004-11-14 18:32:10

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Mod File Upload

Well everything seems to work OK except when I click on the tag. I’ve created a tag with text but when I click on it I just get a blank browser page. The URL for the page is pointing to

“……/textpattern/download.php?id=1”

which seems logical but nothing is happening.


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#11 2004-11-14 19:44:15

Manfre
Plugin Author
From: North Carolina
Registered: 2004-05-22
Posts: 588
Website

Re: Mod File Upload

What browser are you using? I just downloaded the file “afterglow.zip” with that link.

Offline

#12 2004-11-14 20:05:57

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: Mod File Upload

I’m using FF 1.0 but I’ve been messing about with “permissions” a bit. Maybe I’m mis-understanding the permissions. If I set the file to “none” I assumed anyone could download it but I just get the blank page. In fact if I set it to anything other than “publisher” or “1” I get a blank page. If it’s set to “publisher” I can download it. I am the publisher of course. So what am I missing here? Is this a “cookie” thing? Do I need to remove my existing cookie?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

  1. Index
  2. » Archives
  3. » Mod File Upload

Board footer

Powered by FluxBB