Jump to content
tobycatlin

File Library v1.0

Recommended Posts

Contrib to provide a list of downloadable files.

 

My client asked for a list of PDF articles about his business and i though it could be a useful general purpose file library for files unrelated to specific products.

 

Can be downloaded here:


I ain't got time to bleed

Share this post


Link to post
Share on other sites

Heya,

 

I Installed your contribution File Liberary 1.1 but there is 1 problem. I can add files etc via admin menu but on the frontpage it just doesnt show up. Meaning I dont see files etc just a blank page:(

Any ideawhat this can be??

Share this post


Link to post
Share on other sites

Thanks for the update. It was driving me crazy that the admin was losing the paths and I had to re-enter them when I was 1st setting this up. I had it on my list of things to look into but never got around to it.

 

Thanks for a nice little contrib. Good Job! :thumbsup:

Share this post


Link to post
Share on other sites

Hi Toby:

 

Thanks for this, it looks like a great contribution.

 

I've just installed v1.2, but admin is not saving the file path or image path. Clicking Save in admin gives me two "Error: Destination does not exist." messages. (The file is in the catalog/download/ directory, and the image is in the catalog/images/ directory--both are defined correctly in configuration.) I've tried chmodding both directories with 755 and 777, no joy. But both paths save successfully when I enter them via phpmyadmin.

 

Then when I delete a file with the TEXT_DELETE_IMAGE checkbox checked (there is no assigned image, because the path won't save...), I get this:

 

Warning: unlink(../): Is a directory in /home/mysite/public_html/catalog/admin/files.php on line 101

 

Warning: unlink(../): Is a directory in /home/mysite/public_html/catalog/admin/files.php on line 104

 

Warning: Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/catalog/admin/files.php:101) in /home/mysite/public_html/catalog/admin/includes/functions/general.php on line 18

 

Cheers.


"Buy the ticket, take the ride..." -HST

Share this post


Link to post
Share on other sites

Hi Douglas

I have put up a new version with better error checking when deleting files. It will check that both the file and the image are present before deleting. Thinking about it this does mean that you must attach an image. Anyway it should prevent those 'Warning: unlink(../)' messages.

 

As for the other message "Error: Destination does not exist." i cannot replicate.

I trust you know that those boxes should have the path of a file on your hard disk (use browse button to find it) which then gets uploaded to a folder called files.

 

Check that you have the files folder in the root of your catalogue and it's chmodded to 777. They way i see it with what i know, the most likley cause is the files folder doesn't exist and so the message relates to the fact that the script has nowhere to upload the file to. If this is the case i'll see about putting in a check for it.


I ain't got time to bleed

Share this post


Link to post
Share on other sites

Hi Toby:

Don't mind me, I just like to skip over instructions like "make sure that catalog/files exists..." Must have been excessive fatigue from snow shoveling... :blush: Your contribution works as advertised, and thanks for the quick response & update.

 

Just a few cosmetic things (and I hope to not insert foot in mouth again)...

 

* Admin says, "Please fill out the following information for the new country".

 

* I'm missing language definitions for TEXT_FILES_COVER_IMAGE, TEXT_DELETE_IMAGE, and NAVBAR_TITLE. No big deal.


"Buy the ticket, take the ride..." -HST

Share this post


Link to post
Share on other sites
Hi Toby:

Don't mind me, I just like to skip over instructions like "make sure that catalog/files exists..." Must have been excessive fatigue from snow shoveling... :blush: Your contribution works as advertised, and thanks for the quick response & update.

 

Just a few cosmetic things (and I hope to not insert foot in mouth again)...

 

* Admin says, "Please fill out the following information for the new country".

 

* I'm missing language definitions for TEXT_FILES_COVER_IMAGE, TEXT_DELETE_IMAGE, and NAVBAR_TITLE. No big deal.

 

yea I really dig this contrib. I use it to allow customers to download install sheets various products we sell. I did change the layout/display to suit my needs and make it jive with the rest of my site.

 

When things slow down a bit I hope to take a crack on having it pick up the file type as well as the file size.

Share this post


Link to post
Share on other sites

i'll stick in a check for the destination folder and fix those language defs. It's a bad habit of mine to overlook the details.

 

The reason i wrote this contrib is because i wanted a really light weight script that was much simpler to use than many of the other 'fully featured' ones.

Do you guys think it's necessary to put in some config values like which folder to upload to or is it a simple enough task to chenge in in the code.


I ain't got time to bleed

Share this post


Link to post
Share on other sites

As for the file sizes and types i did start doing it but it didn't work right off the bat so i gave up. but carrerarod if you want to take i look that would be great.

In the upload class there is a parse method that should return file size type and temp name.


I ain't got time to bleed

Share this post


Link to post
Share on other sites
Do you guys think it's necessary to put in some config values like which folder to upload to or is it a simple enough task to chenge in in the code.

 

Not necessary, IMO.

 

The reason i wrote this contrib is because i wanted a really light weight script that was much simpler to use than many of the other 'fully featured' ones.

 

Must be a law of nature or something that a script starts out lightweight and simple, and then gets more complex as more people start messing with it... :o File size would be handy to see, and maybe the number of downloads.


"Buy the ticket, take the ride..." -HST

Share this post


Link to post
Share on other sites

o,k,, let me be the dummy who has to ask the silly question?

 

well,, i think i know but want to ask instead of break something.

 

I installed this.

all apears well.

 

however,, what is the best way to use this on the front end side?

display it? call it in, add it in ,?

 

that way i dont break nothing,, and do it right the first time?

 

Thanks guys,,,

 

Tom


no bugs in my stuff,,, just random features ;)

Share this post


Link to post
Share on other sites
well,, i think i know but want to ask instead of break something.

 

I installed this.

all apears well.

 

however,, what is the best way to use this on the front end side?

display it? call it in, add it in ,? 

 

 

Hi Tom:

 

As you may have guessed, you can add a link to catalog/files.php. I don't think you can break it... ;)


"Buy the ticket, take the ride..." -HST

Share this post


Link to post
Share on other sites

Hey Douglas

Sorry for delay in thanking you for the response.

I didnt get an email on this one, and just happened to look at the thread again.

 

Thanks for taking time to reply

Regards

Tom


no bugs in my stuff,,, just random features ;)

Share this post


Link to post
Share on other sites
Heya,

 

I Installed your contribution File Liberary 1.1 but there is 1 problem. I can add files etc via admin menu but on the frontpage it just doesnt show up. Meaning I dont see files etc just a blank page:(

Any ideawhat this can be??

 

 

i've the same problem...

plz tell me how to fix this

Share this post


Link to post
Share on other sites
Can you post me a link? I'll take a look.

 

Yes, I can... but my site is currently 'down for maintenance' to the public, because it aint finished yet. Can u sent me a pm with your IP-adress so I can set down for maintenance

to exclude your ip ..

 

greetz

 

p.s. if you want to mail me: digiwill@gmail.com

 

tnx!

Share this post


Link to post
Share on other sites

hehe, was it nice? :)

 

erm... could you pm me with your ip-adress ??? so I can let u take a look at my site.....

 

thanx

Share this post


Link to post
Share on other sites

Hey guys,

 

Toby and I figured out that it's the STS-contrib that's causin' the problem.

Maybe someone else encounterd this problem 2 and has a fix for it, or could write a fix?

 

Greetz

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×