Joomla!-开源天空

2008-10-12
首页 专栏热点 Joomla! 源代码分析 joomla xml 参数类型


joomla xml 参数类型

E-mail

Image list

Description: This provides a drop down list of images: .png, .gif, .jpg, .bmp and .ico. If the parameter has a value saved, this value is selected when the page is first loaded. If not, the default value (if any) is selected.

Screen shot:

Image:Params.imagelist.jpg

XML definition:

<param name="myimage" type="Imagelist" default="" label="Select an image" description="" directory="" exclude="" stripext="" />
  • Name: The name under which the parameter value is stored.
  • Default: The default image.
  • Label: A label displayed next to the drop down box to indicate the purpose of the parameter.
  • Description: Text which is shown as a tooltip when a user moves the mouse over the drop down box.
  • Directory: The directory containing the images to be listed.
  • Exclude: A text string which is used to exclude certain images from the list. Any images whose names contain the string will be excluded.
  • Stripext: Strip these characters.



Language

Description: This provides a drop down list of the installed languages for the Front-end or Back-end. If the parameter has a value saved, this value is selected when the page is first loaded. If not, the default value (if any) is selected.

Screen shot:

Image:Params.language.jpg

XML definition:

<param name="mylanguage" type="Languages" client="site" default="" label="Select a language" description="" />
  • Name: The name under which the parameter value is stored.
  • Client: Use 'site' when you want to display the Front-end languages, and 'administrator' when you want to display the Back-end languages.
  • Default: The default language.
  • Label: A label displayed next to the drop down box to indicate the purpose of the parameter.
  • Description: Text which is shown as a tooltip when a user moves the mouse over the drop down box.



List

Description: This provides a drop down list of custom-defined entries. If the parameter has a value saved, this value is selected when the page is first loaded. If not, the default value (if any) is selected.

Screen shot:

Image:Params.list.jpg

XML definition:

<param name="mylistvalue" type="List" default="" label="Select an option" description="" >
  <option value="0">Option 1</option>
  <option value="1">Option 2</option>
</param>
  • Name: The name under which the parameter value is stored.
  • Default: The default list option.
  • Label: A label displayed next to the drop down box to indicate the purpose of the parameter.
  • Description: Text which is shown as a tooltip when a user moves the mouse over the drop down box.
  • Option: A list entry. The text between the <option>...</option> tags is what is shown in the drop down list.
  • Option value: The value that will be saved for the parameter when a given option is selected.
    • N.B. Don't forget to close the parameter with </param>!



Menu

Description: This provides a drop down list of the available menus from your Joomla! site. If the parameter has a value saved, this value is selected when the page is first loaded. If not, the default value (if any) is selected.

Screen shot:

Image:Params.menu.jpg

XML definition:

<param name="mymenu" type="Menu" default="" label="Select a menu" description="" />
  • Name: The name under which the parameter value is stored.
  • Default: The default menu.
  • Label: A label displayed next to the drop down box to indicate the purpose of the parameter.
  • Description: Text which is shown as a tooltip when a user moves the mouse over the drop down box.



Menu item

Description: This provides a drop down list of the available menu items from your Joomla! site.

Screen shot:

Image:Params.menuitem.jpg

XML definition:

<param name="mymenuitem" type="MenuItem" default="" label="Select a menu item" description="" />
  • Name: The name under which the parameter value is stored.
  • Default: The default menu item.
  • Label: A label displayed next to the drop down box to indicate the purpose of the parameter.
  • Description: Text which is shown as a tooltip when a user moves the mouse over the drop down box.



Password

Description: This provides a text box for entry of a password. The password characters will be obscured as they are entered. If the parameter has a value saved, this value is entered (in obscured form) into the text box. If not, the default value (if any) is entered.

Screen shot:

Image:Params.password.jpg

XML definition:

<param name="mypassword" type="Password" default="" label="Enter a password" description="" size="5" />
  • Name: The name under which the parameter value is stored.
  • Default: The default password.
  • Label: A label displayed next to the drop down box to indicate the purpose of the parameter.
  • Description: Text which is shown as a tooltip when a user moves the mouse over the text box.
  • Size: The width of the text box in characters.



Radio

Description: This provides radio buttons to select different options. If the parameter has a value saved, this value is selected when the page is first loaded. If not, the default value (if any) is selected.

Screen shot:

Image:Params.radio.jpg

XML definition:

<param name="myradiovalue" type="Radio" default="0" label="Select an option" description="" >
  <option value="0">1</option>
  <option value="1">2</option>
</param>
  • Name: The name under which the parameter value is stored.
  • Default: The default radio option.
  • Label: A label displayed next to the drop down box to indicate the purpose of the parameter.
  • Description: Text which is shown as a tooltip when a user moves the mouse over the text box.
  • Option: A radio option. The text between the <option>...</option> tags is shown as the label for the radio button.
  • Option value: The value that will be saved for the parameter when a given option is selected.
    • N.B. Don't forget to close the parameter with </param>!



Section

Description: This provides a drop down list of the sections from your Joomla! site. If the parameter has a value saved, this value is selected when the page is first loaded. If not, the default value (if any) is selected.

Screen shot:

Image:Params.section.jpg

XML definition:

<param name="mysection" type="Section" default="" label="Select a section" description="" />
  • Name: The name under which the parameter value is stored.
  • Default: The default section.
  • Label: A label displayed next to the drop down box to indicate the purpose of the parameter.
  • Description: Text which is shown as a tooltip when a user moves the mouse over the drop down box.



Spacer

Description:' This provides a separator between parameter entry elements.

Screen shot:

Image:Params.spacer.jpg

XML definition:

<param type="Spacer" />



SQL

Description: This provides a drop down list of entries obtained by running a query on the Joomla! database. The first results column returned by the query provides the values for the drop down box. If the parameter has a value saved, this value is selected when the page is first loaded. If not, the default value (if any) is selected.

Screen shot:

Image:Params.sql.jpg

XML definition:

<param name="title" type="SQL" default="" label="Select an article" description="" query="SELECT id, title FROM #__content" />
  • Name: The name under which the parameter value is stored. This should be the same as the query results column that you want to be displayed in the drop-down box.
  • Default: The default value.
  • Label: A label displayed next to the drop down box to indicate the purpose of the parameter.
  • Description: Text which is shown as a tooltip when a user moves the mouse over the drop down box.
  • Query: The MySQL query which provides the data for the drop down box.



Text

Description: This provides a text box for data entry.

Screen shot:

Image:Params.text.jpg

XML definition:

<param name="mytextvalue" type="Text" default="" label="Enter some text" description="" size="10" />
  • Name: The name under which the parameter value is stored.
  • Default: The default text.
  • Label: A label displayed next to the text box to indicate the purpose of the parameter.
  • Description: Text which is shown as a tooltip when a user moves the mouse over the text box.
  • Size: The width of the text box in characters.



Text area

Description: This provides a text area for entry of multi-line text.

Screen shot:

Image:Params.textarea.jpg

XML definition:

<param name="mytextarea" type="Textarea" default="default" label="Enter some text" description="" rows="10" cols="5" />
  • Name: The name under which the parameter value is stored.
  • Default: The default text.
  • Label: A label displayed next to the text area to indicate the purpose of the parameter.
  • Description: Text which is shown as a tooltip when a user moves the mouse over the text area.
  • Rows: The height of the visible text area, in lines.
  • Cols: The width of the visible text area, in characters.



Time zones

Description: This provides a drop down list of time zones.

Screen shot:

Image:Params.timezones.jpg


XML definition:

<param name="mytimezone" type="Timezones" default="-10" label="Select a timezone" description="" />
  • Name: The name under which the parameter value is stored.
  • Default: The default time zone. Use for example '-10' for UTC -10:00
  • Label: A label displayed next to the drop down box to indicate the purpose of the parameter.
  • Description: Text which is shown as a tooltip when a user moves the mouse over the drop down box.
相关文章:
ccNewsletter 1.0 - Native Newsletter Compoment for Joomla! 1.5 Native
好牛的Joomlaedit - AIR版Joomla!内容管理器


收藏此文章:
Digg! Reddit! Del.icio.us! JoomlaVote! Google! Live! Facebook! StumbleUpon! Yahoo! Free social bookmarking plugins and extensions for Joomla! websites!
User Reviews(2)
 明显不负责任啊,翻译完啊!
作者:purity 星期二, 03 六月 2008 17:05
你偷懒啊!
 回复:[文章评论]--joomla xml 参数类型
作者:admin 星期二, 03 六月 2008 17:34
靠,你还好意思说我,你上次答应俺的一个没兑现啊!

嘿嘿,确实最近优点懒!

发表您的文章评论

您的姓名 (昵称)
标题:
评分: 很差一般较好很好
评论:
验证码:
请输入验证码