Is it possible to decopress eZ packages?

Author Message

kracker (the)

Sunday 17 April 2005 1:52:38 am

I was wondering about just how it could be possible to build a content class say via a text editor and package it as an ez package (containing a class) and load it into ez publish and activate it.

I wonder if you can build content classes outside of the class admin because it can really try your patience clicking in the class editor over and over again just to create the most simple of properties.

While that's ok for small classes larger more complex classes can make it a practice in patience and timed repetition more than the enjoyable experience with most eZ solutions.

So I'm taking it to the forums to see if anyone else has thought of these subjects.

Is it was possible to export a class into an ez pkg file and in turn extract the file the represented the class (like a tar.gz or zip pkg) as an xml (binary or text) or other kind of file, make changes to that class file, repackage the class and install it into eZ publish ( replacing existing ).

What do you think?

happy hacking,
//kracker

michael crichton : state of fear ...

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

kracker (the)

Sunday 17 April 2005 4:03:47 am

Cool,

It <i>is</i> possible to decompress eZ packages using http://www.7-zip.org/ which is licensed under the GNU Lesser General Public License.

I had to decompress a folder selection inside the [Content] (subdir/symlink/file-like-object] of the items : documents (folder), ezcontentclass (folder), package.xml

I guess this means barring any syntax or packaging errors, I should be able to customize the contents of an eZ package and install it into eZ publish as any other package.

I think this is interesting as it allows more experienced developers to simplify how they create their solutions.

Has anyone else used this method to improve their development rate?

happy hacking,
//kracker

Buck65 : Bandits

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

kracker (the)

Sunday 17 April 2005 4:26:18 am

Here is an example of a ezcontentclass/class-kbs.xml (the class definition file), it's an interesting read. with a little printed documentation (package syntax / examples) it would be fairly simple to generate an xml class definition for your custom comment class.

<?xml version="1.0" encoding="UTF-8"?>
<content-class is-container="false">
  <name>KBs</name>
  <identifier>kbs</identifier>
  <remote-id>b417e7da0803bede185c9e02438159e0</remote-id>
  <object-name-pattern>&lt;title|question&gt;</object-name-pattern>
  <remote>
    <site-url>http://example.org/</site-url>
    <url>http://example.org/class/view/35</url>
    <groups>
      <group id="1"
             name="Content" />
    </groups>
    <id>35</id>
    <created>1113561342</created>
    <modified>1113565791</modified>
    <creator>
      <user-id>143</user-id>
      <user-login>kracker</user-login>
    </creator>
    <modifier>
      <user-id>143</user-id>
      <user-login>kracker</user-login>
    </modifier>
  </remote>
  <attributes xmlns:ezcontentclass-attribute="http://ezpublish/contentclassattribute">
    <attribute datatype="ezstring"
               required="false"
               searchable="true"
               information-collector="false"
               translatable="true">
      <remote>
        <id>258</id>
      </remote>
      <name>Title</name>
      <identifier>title</identifier>
      <placement>1</placement>
      <datatype-parameters>
        <max-length>255</max-length>
        <default-string />
      </datatype-parameters>
    </attribute>
    <attribute datatype="ezxmltext"
               required="true"
               searchable="true"
               information-collector="false"
               translatable="true">
      <remote>
        <id>259</id>
      </remote>
      <name>Question</name>
      <identifier>question</identifier>
      <placement>2</placement>
      <datatype-parameters>
        <text-column-count>25</text-column-count>
      </datatype-parameters>
    </attribute>
    <attribute datatype="ezxmltext"
               required="false"
               searchable="true"
               information-collector="false"
               translatable="true">
      <remote>
        <id>260</id>
      </remote>
      <name>Answer</name>
      <identifier>answer</identifier>
      <placement>3</placement>
      <datatype-parameters>
        <text-column-count>25</text-column-count>
      </datatype-parameters>
    </attribute>
    <attribute datatype="ezselection"
               required="false"
               searchable="true"
               information-collector="false"
               translatable="true">
      <remote>
        <id>272</id>
      </remote>
      <name>eZ publish Version</name>
      <identifier>ez_publish_version</identifier>
      <placement>4</placement>
      <datatype-parameters>
        <options>
          <option id="0"
                  name="eZ publish 3.6.0" />
          <option id="1"
                  name="eZ publish 3.5.4" />
          <option id="2"
                  name="eZ publish 3.5.3" />
          <option id="3"
                  name="eZ publish 3.5.2" />
          <option id="4"
                  name="eZ publish 3.5.1" />
          <option id="5"
                  name="eZ publish 3.5.0" />
          <option id="6"
                  name="eZ publish 3.4" />
          <option id="7"
                  name="eZ publish 3.3" />
          <option id="8"
                  name="eZ publish 3.2" />
          <option id="9"
                  name="eZ publish 3.1" />
          <option id="10"
                  name="eZ publish 3" />
          <option id="11"
                  name="eZ publish 2 (modified)" />
          <option id="12"
                  name="eZ publish 2.2.9" />
          <option id="13"
                  name="eZ publish 2.2" />
          <option id="14"
                  name="eZ publish 2" />
          <option id="15"
                  name="eZ publish Online Editor 2.0" />
          <option id="16"
                  name="eZ publish Online Editor 2.1" />
          <option id="17"
                  name="eZ publish Professional" />
          <option id="18"
                  name="eZ publish Professional License" />
          <option id="19"
                  name="eZ publish Database Extension" />
        </options>
        <is-multiselect>1</is-multiselect>
      </datatype-parameters>
    </attribute>
    <attribute datatype="ezselection"
               required="false"
               searchable="true"
               information-collector="false"
               translatable="true">
      <remote>
        <id>273</id>
      </remote>
      <name>Operating System</name>
      <identifier>os</identifier>
      <placement>5</placement>
      <datatype-parameters>
        <options>
          <option id="0"
                  name="GNU/Linux (Desktop)" />
          <option id="1"
                  name="GNU/Linux (Server)" />
          <option id="2"
                  name="Windows (Server)" />
          <option id="3"
                  name="Windows (Desktop)" />
          <option id="4"
                  name="MacOS X 10.x (Server)" />
          <option id="5"
                  name="FreeBSD" />
        </options>
        <is-multiselect>0</is-multiselect>
      </datatype-parameters>
    </attribute>
    <attribute datatype="ezboolean"
               required="false"
               searchable="true"
               information-collector="false"
               translatable="true">
      <remote>
        <id>274</id>
      </remote>
      <name>Enable comments</name>
      <identifier>enable_comments</identifier>
      <placement>6</placement>
      <datatype-parameters>
        <default-value is-set="true" />
      </datatype-parameters>
    </attribute>
  </attributes>
</content-class> 

cheers,
//kracker

green day : brain stew

Member since: 2001.07.13 || http://ezpedia.se7enx.com/

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.