Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2008-12-02 13:18:19

gerhard01
Plugin Author
Registered: 2006-12-07
Posts: 108

Re: yab_download

Try to set the memory limit in the plugin code by yourself.
ini_set("memory_limit","12M");

That worked – great! Thanks!

Methods I prefer:

  1. Try to organize your files so you will have less files per category.
  2. Don’t offer the zip download for files those will consume more memory than allowed.

IMHO, the zip-option is especially useful if you have a lot of files, where your plugin is extremely useful for downloading them all with a single click. Few files – less need for a zip option.

So I will test now my provider’s memory limit ;-).

Last edited by gerhard01 (2008-12-02 13:20:23)

Offline

#17 2008-12-21 12:04:59

trenc
Plugin Author
From: ⛵️, currently Göteborg, SE
Registered: 2008-02-27
Posts: 574
Website GitHub

Re: yab_download

Small update to v0.4: The consumed memory of the zipfile-creation should be decreased (by half) now.


Digital nomad, sailing the world on a sailboat: 32fthome.com

Offline

#18 2009-01-08 13:26:28

trenc
Plugin Author
From: ⛵️, currently Göteborg, SE
Registered: 2008-02-27
Posts: 574
Website GitHub

Re: yab_download

New update to v0.5:
If you have zip creation enabled and you are running a php version 5.2.0 or above then the zip will now be created on harddisk, so the plugin is able to zip many and big files without exhausting memory.
If you are running a php version 5.2.0 or above and you have trouble with some restrictions (safe_mode, open_basedir etc.) so you can force the zip creation in memory (as in plugin version 0.4) with zip="2" instead of zip="1".


Digital nomad, sailing the world on a sailboat: 32fthome.com

Offline

#19 2009-01-08 14:28:47

gerhard01
Plugin Author
Registered: 2006-12-07
Posts: 108

Re: yab_download

New update to v0.5:

Thanks for the update!

However,

<txp:yab_download label1="title" label3="Do it!" label4="zip file" size="KB" cats="files" sort="filename desc" zip="1" zipname="files.zip" />

on my page just resulted in http://article-page#yab_cd_download though I use the tag just once in this article-page. The very same tag and attributes did work with version 0.4.

Last edited by gerhard01 (2009-01-08 15:51:59)

Offline

#20 2009-01-08 16:18:49

trenc
Plugin Author
From: ⛵️, currently Göteborg, SE
Registered: 2008-02-27
Posts: 574
Website GitHub

Re: yab_download

Oh sorry Gerhard,

was my fault: It was a my php4-hack of class constant call, which won’t worked.
I’ve reupped the the corrected version 0.5, please download and install it again!

Sorry for that! :(


Digital nomad, sailing the world on a sailboat: 32fthome.com

Offline

#21 2009-01-09 07:53:16

gerhard01
Plugin Author
Registered: 2006-12-07
Posts: 108

Re: yab_download

reupped the the corrected version 0.5

Thanks a lot for the quick fix – works like a charm.

Offline

#22 2009-11-16 03:30:25

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: yab_download

Hi Tommy,

Nice plugin!

I’m interested in the ZIP file download functionality but want to present the list of individual files separately. A couple of additional options to slim down the output, so that only a download button is output, would be great:

1) Suppress output of the select list markup (it is possible use some CSS to hide it but it would be nice to not to have to do this).
2) An option to not present the zip download checkbox (i.e. the plugin assumes that the box is ticked)
3) An option to escape special characters in the select list (some of my file descriptions have ampersands which are not output as &amp;)

Thanks,

Adi

Offline

#23 2009-11-16 12:02:28

trenc
Plugin Author
From: ⛵️, currently Göteborg, SE
Registered: 2008-02-27
Posts: 574
Website GitHub

Re: yab_download

Hi Adi,

your request is solved – at least I think so – by the new yab_download_v0.6:

  • bugfix: filenames and filedescriptions are now correctly escaped
  • added: new attribute ‘hidelist’ hides the file selection list
  • added: new attribute ‘hidezip’ hides the download-as-zip checkbox

Digital nomad, sailing the world on a sailboat: 32fthome.com

Offline

#24 2009-11-16 23:32:29

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: yab_download

trenc wrote:

your request is solved – at least I think so

Tommy, you’re most kind. It works great … if there’s only one instance on the page. If there’s more than one (& I’m using unique formid) all download buttons download the first ZIP file!

Adi

Offline

#25 2009-11-19 09:10:42

trenc
Plugin Author
From: ⛵️, currently Göteborg, SE
Registered: 2008-02-27
Posts: 574
Website GitHub

Re: yab_download

Oh,
I had a look in the code yesterday. It seems that it (zip and confirmation) never worked on multi instances, because the attributes (variables) will always be overwritten (newbie mistake). :(

The solution for the whole plugin seems to be a bigger rewrite, this wil takes a while. :(

But if you want a quick solution you can strip out the snippets from the plugin code that you need and work with a static variable and a session or similar.

Sorry for that.


Digital nomad, sailing the world on a sailboat: 32fthome.com

Offline

#26 2009-11-19 22:27:28

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,373

Re: yab_download

trenc wrote:

… It seems that it (zip and confirmation) never worked on multi instances … Sorry for that.

That’s a shame but thanks for looking into it.

Regards,

Adi

Offline

#27 2017-02-10 14:50:30

trenc
Plugin Author
From: ⛵️, currently Göteborg, SE
Registered: 2008-02-27
Posts: 574
Website GitHub

Re: yab_download

yab_download_v0.7.txt is now TXP 4.6-ready.


Digital nomad, sailing the world on a sailboat: 32fthome.com

Offline

Board footer

Powered by FluxBB