简体   繁体   中英

convert joomla 1.5 modules to joomla 3.1 modules

i want to convert joomla 1.5 module to joomla 3.1 modules this is a section in manifest file in joomla 1.5 module.

<params>
                <param name="dir" type="text" label="Directory" description="Directory Upload" default="upload"/>
        <param name="type" type="list" default="*" label="Select a file type" description="File type">
             <option value="*">Any File </option>
             <option value="image/png">PNG</option>
             <option value="image/gif">GIF</option>
           </param>          
                <param name="user_names" type="text" label="User Names (optional)" description="Names users (optionas)" default=""/>    
        </params>

i do not know what should use instead of "params" and "param" in joomla 3.1 please tell me what i should use in joomla 3 ?

They now become fields with a few extra changes. So you module XML would look like this:

<config>
   <fields name="params">
      <fieldset name="Basic">

         <field name="type" type="list" default="*" label="Select a file type" description="File type" />                               
         <field name="facebook" default="1" type="radio" label="JJ_SOCIAL_SLIDER_FACEBOOK" description="JJ_SOCIAL_SLIDER_FACEBOOK_DESC">
              <option value="*">Any File </option>
              <option value="image/png">PNG</option>
              <option value="image/gif">GIF</option>
         </field>
         <field name="user_names" type="text" label="User Names (optional)" description="Names users (optionas)" default="" />

      </fieldset>
   </fields>
</config>

Note that at the beginning of the XML file for Joomla 1.5, you will see <install> and this should be changed to <extension> , and the same goes for the tag at the very bottom of the file

Well - 1.5 to 3.1 is quite a way, sometimes it is easier to rewrite modules instead of porting them.

The xml-installer-syntax has been unified for components, plugins and modules and is quite well documented in the joomla docs: http://docs.joomla.org/Manifest_files and http://docs.joomla.org/Standard_form_field_types

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM