EllisLab text mark
Advanced Search
1 of 4
1
   
Plugin: MX Zip ( EE1 / EE2 )
Posted: 24 August 2009 06:56 AM   [ Ignore ]
Avatar
Joined: 2008-01-04
354 posts

MX Zip will help you to package files into zip archive direct from ExpressionEngine.

It’s just a initial release. Please send me all issues and bugs. Feature requests welcome.

Download&Documentation;

 Signature 

my EE2 addons| Support forum | my EE1 addons
Like my addons? Follow me: @eecms @max_lazar

 
Posted: 24 August 2009 09:58 AM   [ Ignore ]   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2006-04-15
12649 posts

Hi Max,

Looks great, well done. Just wondering though should the list of files be comma separated or semi-colon separated as per the code example on the page shown above? At the moment you have semi-colons in the code but the documentation says comma separated list. Just wondering which is correct?

Best wishes,

Mark

 Signature 

Shopping Cart Plugin | Full List Of Add-Ons | About Me
——————————————————————————————
2.x Bug Tracker | Upgrade Errors

 
Posted: 24 August 2009 10:11 AM   [ Ignore ]   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2008-01-04
354 posts

comma - is correct. Thanks Mark - in last moment I decide to switch splitting from semi to comma, and forgot to replace example.

 Signature 

my EE2 addons| Support forum | my EE1 addons
Like my addons? Follow me: @eecms @max_lazar

 
Posted: 24 August 2009 10:14 AM   [ Ignore ]   [ # 3 ]   [ Rating: 0 ]
Avatar
Joined: 2006-04-15
12649 posts
Max Lazar - 24 August 2009 02:11 PM

comma - is correct. Thanks Mark - in last moment I decide to switch splitting from semi to comma, and forgot to replace example.

No problems. Thanks for the info. Will give this a go later on. Thanks again for what looks to me to be a great little plugin grin

Best wishes,

Mark

 Signature 

Shopping Cart Plugin | Full List Of Add-Ons | About Me
——————————————————————————————
2.x Bug Tracker | Upgrade Errors

 
Posted: 12 October 2009 08:22 AM   [ Ignore ]   [ # 4 ]   [ Rating: 0 ]
Avatar
Joined: 2009-01-19
233 posts

I was wondering - could you use this to create a dynamically produced zip pack of items?

for example, you have a website with a bunch of albums / songs on it. If you want to make them available to people, you could show a list of songs each displayed as weblog entries, and checkboxes next to each.
the user then checks each song they want to download, hits a submit button and it selects each .mp3 song and bundles em together and makes available as a .zip file to download?

I know this is a slightly bizarre example, I’m just trying to get my head round its capabilities.

Also, how does it manage folder / duplicates as it zips things together? eg you want:
song x on album 1 by radiohead
song y on album 1 by radiohead
song z on album 2 by radiohead

and the files are ordered in a typical artist > album > songs structure on your site.

as it adds them can it keep the file structure so the user will end up with a zip with:
radiohead
  > album 1
  > song x
  > song y
  > album 2
  > song z

or does it just grab each file and put them in the same folder:
radiohead
  > song x
  > song y
  > song z

Only asking as I’m thinking about using MX zip for a little project i’m plotting at the mo and wondered how flexible it is… being able to maintain folder structure would be vital, being able to condense various files within the same directories without duplicating the folders would be perfect!... and no its not for filesharing radiohead mp3s!!!

Thanks,
Andy

 Signature 

moogaloo.com

twitter | facebook | dribbble

Free Agent - invoicing, time tracking & accounting made easy - 10% off for life.

 
Posted: 19 October 2009 09:58 AM   [ Ignore ]   [ # 5 ]   [ Rating: 0 ]
Avatar
Joined: 2008-01-04
354 posts

hello moogaloo. Sorry - i missed the mail regarding new message.
About you question - yes, it’s possible to create a dynamically produced zip pack with MX Zip. It’s was the main goal of this plugin, but this plug-in makes a copy of directory structure so in your case the zip structure will look as:

my_mp3_dir
  >radiohead
  >> album 1
  >> song x
  >> song y
  >> album 2
  >> song z

Soon I will publish new version of this plugin with dir_root option for zip, which will make possible to except some folders level from zip (like my_mp3_dir)

 Signature 

my EE2 addons| Support forum | my EE1 addons
Like my addons? Follow me: @eecms @max_lazar

 
Posted: 19 October 2009 10:05 AM   [ Ignore ]   [ # 6 ]   [ Rating: 0 ]
Avatar
Joined: 2009-01-19
233 posts

Hey there.

Thanks for getting back to me.

I think a formatting bug founds its way in there… just checking it would keep the artist > album > song structure as below (the previous structure was putting the albums in the same level as the songs):

my_mp3_dir
  > radiohead
  > > album 1
  > > > song x
  > > > song y
  > > album 2
  > > > song z

how easy would it be to generate the zip file from a page form as created by a series of weblog entries? check a bunch of entries, hit submit and it adds all selected files to the zip in the correct folder structures?

(sorry if you’ve already answered these, I just need to make sure I understand it correctly before I embark on this little adventure!)

 Signature 

moogaloo.com

twitter | facebook | dribbble

Free Agent - invoicing, time tracking & accounting made easy - 10% off for life.

 
Posted: 19 October 2009 10:20 AM   [ Ignore ]   [ # 7 ]   [ Rating: 0 ]
Avatar
Joined: 2008-01-04
354 posts

oh… sorry - my mistake. In this version its impossible to create folder structures as you want.
I included it in my future list. I will send you a note after releasing the new version. Its can take a 1-3 days(busy week:) ).

 Signature 

my EE2 addons| Support forum | my EE1 addons
Like my addons? Follow me: @eecms @max_lazar

 
Posted: 19 October 2009 10:43 AM   [ Ignore ]   [ # 8 ]   [ Rating: 0 ]
Avatar
Joined: 2009-01-19
233 posts

Haha - 1-3 days is no problem at all - got a busy week myself so won’t be needing it that soon anyway!
What else you got planned for the new version?

 Signature 

moogaloo.com

twitter | facebook | dribbble

Free Agent - invoicing, time tracking & accounting made easy - 10% off for life.

 
Posted: 19 October 2009 01:57 PM   [ Ignore ]   [ # 9 ]   [ Rating: 0 ]
Avatar
Joined: 2008-02-28
2331 posts

This is really cool, subscribing. Many music centric sites can use this ‘build your download’ option.
Brandon Kelly has implemented ‘virtual briefcase’. So maybe a co-lab would boost the project?

 Signature 

Defeat is a state of mind; no one is ever defeated until defeat has been accepted as a reality.

 
Posted: 21 October 2009 04:02 AM   [ Ignore ]   [ # 10 ]   [ Rating: 0 ]
Avatar
Joined: 2008-01-04
354 posts
moogaloo - 19 October 2009 02:43 PM

What else you got planned for the new version?

Will see – what do you want?? After creating normal structure of plugin in my future list stay point of optimizing php zip part.

New structure:

{exp:zip direct_output="true" folder="" filename="test.zip" max_size="50"
 
store_full_path="yes" max_root_level="3"}
    {zip
:files}
    [file_path
,folder_structure4zip]
    [file_path
,folder_structure4zip]]
    [file_path
,folder_structure4zip]
    [file_path
,folder_structure4zip]
    {
/zip:files}

    {if file_limit}
    File Limit

    
{/if}
{
/exp:zip} 

New tag settings
store_full_path - use the real path in zip folder structure or not (default - yes)
max_root_level - if you use full_path tag max_root_level, it gives you an opportunity to cut up some folder levels.  Folder levels counted from the most deep level, so if the real path is
folderA/FolderB/FolderC/FolderD/file.doc
and
max_root_level = “3”
in zip package you will have FolderB/FolderC/FolderD/file.doc


[file_path,folder_structure4zip,folder_type]
file_path - file which you want to zip with full or relative server path.
folder_structure4zip (optional) - individual folder path for file in the zip archive.

New version will be available soon, but if you have some note regarding new options - send me a note.

 Signature 

my EE2 addons| Support forum | my EE1 addons
Like my addons? Follow me: @eecms @max_lazar

 
Posted: 21 October 2009 05:05 AM   [ Ignore ]   [ # 11 ]   [ Rating: 0 ]
Avatar
Joined: 2009-01-19
233 posts

Cool!

I would say it would be more useful to define the “root” folder that all selected files will come off, regardless of how deep they are buried.
If you have a selected a file that is well buried in folders, and set max to eg 3, how will it then manage other files that aren’t so buried? Will it confuse the file structure when it put them all together with common files?

Also, can MX zip pack up whole folders (including any subfolders and all files in them) as well as files? I would say this would be very useful (to me at least!).

 Signature 

moogaloo.com

twitter | facebook | dribbble

Free Agent - invoicing, time tracking & accounting made easy - 10% off for life.

 
Posted: 21 October 2009 05:27 AM   [ Ignore ]   [ # 12 ]   [ Rating: 0 ]
Avatar
Joined: 2008-01-04
354 posts
moogaloo - 21 October 2009 09:05 AM

Cool!
I would say it would be more useful to define the “root” folder that all selected files will come off, regardless of how deep they are buried.
If you have a selected a file that is well buried in folders, and set max to eg 3, how will it then manage other files that aren’t so buried? Will it confuse the file structure when it put them all together with common files?

Its better to use examples smile

lets take store_full_path=“yes” and max_root_level=“3”, no individual path and folder=”“
folder4/folder3/folder2/folder1/file.doc   in zip - folder3/folder2/folder1/file.doc
folder3/folder2/folder1/file.doc in zip folder3/folder2/folder1/file.doc
folder1/file.doc in zip folder1/file.doc


Actually we will have the following structure for zip:

{folder_tag}/{original_file_path_with_or_without_max_level}/{individual_folder_from_file_tag}/{file}

And all this element can be optional.

moogaloo - 21 October 2009 09:05 AM

Also, can MX zip pack up whole folders (including any subfolders and all files in them) as well as files? I would say this would be very useful (to me at least!).

yes, it possible to do even in current version - I used it in examples.

 Signature 

my EE2 addons| Support forum | my EE1 addons
Like my addons? Follow me: @eecms @max_lazar

 
Posted: 22 October 2009 03:54 PM   [ Ignore ]   [ # 13 ]   [ Rating: 0 ]
Avatar
Joined: 2004-11-16
228 posts

I’m running into some trouble,

I’m using the sample code but can’t seem to get it to spit out anything.

{exp:zip direct_output="true" folder="" filename="test.zip" max_size="50"}
  {zip
:files}
    http
://www.sample.com/downloads/bob.pdf {/zip:files}

  
{if file_limit}
    File Limit

  
{/if}
{
/exp:zip} 

Thoughts?

EE 1.6.7.

 Signature 

T. Payton
OneCreative | Albuquerque, NM

 
Posted: 22 October 2009 04:02 PM   [ Ignore ]   [ # 14 ]   [ Rating: 0 ]
Avatar
Joined: 2006-04-15
12649 posts

Oops never did report back on testing this one out. I too can’t get it to output anything either. Used the standard documentation code but nothing ever happens. :-(

 Signature 

Shopping Cart Plugin | Full List Of Add-Ons | About Me
——————————————————————————————
2.x Bug Tracker | Upgrade Errors

 
Posted: 22 October 2009 04:06 PM   [ Ignore ]   [ # 15 ]   [ Rating: 0 ]
Avatar
Joined: 2008-01-04
354 posts

tpayton u need to use server path or relative path.

do I need add futures with options to add files by http requests?

 Signature 

my EE2 addons| Support forum | my EE1 addons
Like my addons? Follow me: @eecms @max_lazar

 
1 of 4
1