简体   繁体   English

将joomla 1.5模块转换为joomla 3.1模块

[英]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. 我想将joomla 1.5模块转换为joomla 3.1模块,这是joomla 1.5模块中清单文件中的一部分。

<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 ? 我不知道在joomla 3.1中应该使用什么代替“ params”和“ param”,请告诉我在joomla 3中应该使用什么?

They now become fields with a few extra changes. 现在,它们变为具有一些其他更改的字段。 So you module XML would look like this: 因此,您的模块XML如下所示:

<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 请注意,在Joomla 1.5的XML文件的开头,您将看到<install> ,应将其更改为<extension> ,并且文件底部的标记也是如此

Well - 1.5 to 3.1 is quite a way, sometimes it is easier to rewrite modules instead of porting them. 好吧-1.5到3.1是一种不错的方法,有时重写模块比移植它们更容易。

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 xml-installer-syntax已针对组件,插件和模块进行了统一,并且在joomla文档中有很好的记录: http : //docs.joomla.org/Manifest_fileshttp://docs.joomla.org/Standard_form_field_types

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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