質問: joomla xmlマニフェストの利用可能なフィールド 拡張機能を開発するとき、joomlaで使用できるフォームフィールドタイプは何ですか?
回答: joomlaには、カレンダー、カラーピッカー、画像ピッカー、ファイルのアップロード、ファイルの選択など、多くの便利なフィールドを備えた多数のタイプのフォームフィールドが組み込まれています。利用可能なフィールド+---------------------+-------------------------------------------------------------------------------------------------------+ | type | description | +---------------------+-------------------------------------------------------------------------------------------------------+ | accesslevel | provides a drop down list of viewing access levels. | +---------------------+-------------------------------------------------------------------------------------------------------+ | cachehandler | provides a list of available cache handling options. | +---------------------+-------------------------------------------------------------------------------------------------------+ | calendar | provides a text box for entry of a date. an icon next to the text box | | | provides a link to a pop-up calendar, which can also be used | | | to enter the date value. | +---------------------+-------------------------------------------------------------------------------------------------------+ | captcha | provides a drop down list of the captcha plugins. | +---------------------+-------------------------------------------------------------------------------------------------------+ | category | provides a drop down list of categories for an extension. | +---------------------+-------------------------------------------------------------------------------------------------------+ | checkbox | provides a single checkbox to be checked or unchecked | +---------------------+-------------------------------------------------------------------------------------------------------+ | checkboxes | provides unlimited checkboxes that can be used for multi-select. | +---------------------+-------------------------------------------------------------------------------------------------------+ | chrome style | provides a list of template chrome style options grouped by template. | +---------------------+-------------------------------------------------------------------------------------------------------+ | color | provides a color picker when clicking the input box. | +---------------------+-------------------------------------------------------------------------------------------------------+ | content language | provides a list of content languages. | +---------------------+-------------------------------------------------------------------------------------------------------+ | content type | provides a list of content types. | +---------------------+-------------------------------------------------------------------------------------------------------+ | combo | provides a combo box field. | +---------------------+-------------------------------------------------------------------------------------------------------+ | componentlayout | provides a grouped list of core and template alternate layouts | | | for a component item. | +---------------------+-------------------------------------------------------------------------------------------------------+ | contentlanguage | provides a list of installed content languages for use in | | | conjunction with the language switcher plugin. | +---------------------+-------------------------------------------------------------------------------------------------------+ | database connection | provides a list of available database connections, | | | optionally limiting to a given list. | +---------------------+-------------------------------------------------------------------------------------------------------+ | editor | provides an editor area field. | +---------------------+-------------------------------------------------------------------------------------------------------+ | editors | provides a drop down list of the available wysiwyg editors. | | | since joomla 2.5 use plugins form field instead. | +---------------------+-------------------------------------------------------------------------------------------------------+ | email | provides an email field. | +---------------------+-------------------------------------------------------------------------------------------------------+ | file | | +---------------------+-------------------------------------------------------------------------------------------------------+ | filelist | provides a drop down list of files from a specified directory. | +---------------------+-------------------------------------------------------------------------------------------------------+ | folderlist | provides a drop down list of folders from a specified directory. | +---------------------+-------------------------------------------------------------------------------------------------------+ | groupedlist | provides a drop down list of items organized into groups. | +---------------------+-------------------------------------------------------------------------------------------------------+ | header tag | provides a drop down list of the header tags (h1-h6). | +---------------------+-------------------------------------------------------------------------------------------------------+ | helpsite | provides a drop down list of the help sites for your joomla installation. | +---------------------+-------------------------------------------------------------------------------------------------------+ | hidden | provides a hidden field for saving a form field whose value cannot be altered directly | | | by a user in the administrator (it can be altered in code or by editing the params.ini file). | +---------------------+-------------------------------------------------------------------------------------------------------+ | imagelist | provides a drop down list of image files in a specified directory. | +---------------------+-------------------------------------------------------------------------------------------------------+ | integer | provides a drop down list of integers between a minimum and maximum. | +---------------------+-------------------------------------------------------------------------------------------------------+ | language | provides a drop down list of the installed languages for the front-end or back-end. | +---------------------+-------------------------------------------------------------------------------------------------------+ | list | provides a drop down list of custom-defined entries. | +---------------------+-------------------------------------------------------------------------------------------------------+ | media | provides modal access to the media manager for insertion of images with | | | upload for users with appropriate permissions. | +---------------------+-------------------------------------------------------------------------------------------------------+ | menu | provides a drop down list of the available menus from your joomla site. | +---------------------+-------------------------------------------------------------------------------------------------------+ | menu item | provides a drop down list of the available menu items from your joomla site. | +---------------------+-------------------------------------------------------------------------------------------------------+ | module layout | provides a list of alternative layout for a module grouped by core and template. | +---------------------+-------------------------------------------------------------------------------------------------------+ | module order | provides a drop down to set the ordering of module in a given position | +---------------------+-------------------------------------------------------------------------------------------------------+ | module position | provides a text input to set the position of a module. | +---------------------+-------------------------------------------------------------------------------------------------------+ | module tag | provides a list of html5 elements (used to wrap a module in). | +---------------------+-------------------------------------------------------------------------------------------------------+ | note | supports a one line text field. | +---------------------+-------------------------------------------------------------------------------------------------------+ | password | provides a text box for entry of a password. | | | the password characters will be obscured as they are entered. | +---------------------+-------------------------------------------------------------------------------------------------------+ | plugins | provides a list of plugins from a given folder. | +---------------------+-------------------------------------------------------------------------------------------------------+ | radio | provides radio buttons to select different options. | +---------------------+-------------------------------------------------------------------------------------------------------+ | repeatable | allows form fields which can have as many options as the user desires. | +---------------------+-------------------------------------------------------------------------------------------------------+ | rules | provides a matrix of group by action options for managing access control. display depends on context. | +---------------------+-------------------------------------------------------------------------------------------------------+ | sessionhandler | provides a drop down list of session handler options. | +---------------------+-------------------------------------------------------------------------------------------------------+ | spacer | provides a visual separator between form fields. it is purely a visual aid and no value is stored. | +---------------------+-------------------------------------------------------------------------------------------------------+ | sql | 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. | +---------------------+-------------------------------------------------------------------------------------------------------+ | tag | provides an entry point for tags (either ajax or nested). | +---------------------+-------------------------------------------------------------------------------------------------------+ | tel | provides an input field for a telephone number. | +---------------------+-------------------------------------------------------------------------------------------------------+ | templatestyle | provides a drop down list of template styles. | +---------------------+-------------------------------------------------------------------------------------------------------+ | text | provides a text box for data entry. | +---------------------+-------------------------------------------------------------------------------------------------------+ | textarea | provides a text area for entry of multi-line text. | +---------------------+-------------------------------------------------------------------------------------------------------+ | timezone | provides a drop down list of time zones. | +---------------------+-------------------------------------------------------------------------------------------------------+ | url | provides a url text input field. | +---------------------+-------------------------------------------------------------------------------------------------------+ | user | provides a modal list of users. | +---------------------+-------------------------------------------------------------------------------------------------------+ | usergroup | provides a drop down list of user groups. | +---------------------+-------------------------------------------------------------------------------------------------------+ 例の完全なリストは http://docs.joomla.org/form_field にあります。使用例(ほぼ)すべての利用可能なフィールドを含むこのxmlファイルの例は、利用可能なすべてのフィールドとそれらがどのように見えるかを確認するために役立つ場合があります。<?xml version="1.0" encoding="utf-8"?> <extension version="2.5" type="module" client="site" method="upgrade"> <name>all fields demo</name> <description>xml file containing all available form fields in joomla</description> <files> <filename module="mod_allfields">mod_allfields.php</filename> </files> <config> <fields name="params"> <fieldset name="basic"> <field name="access" type="accesslevel" label="jfield_access_label" description="jfield_access_desc" class="span12 small" /> <field name="cache_handler" type="cachehandler" default="" label="cache handler field type" description="com_config_field_cache_handler_desc" filter="word" /> <field name="mycalendar" type="calendar" default="5-10-2008" label="select a date" description="" format="%d-%m-%y" /> <field name="captcha" type="plugins" folder="captcha" label="captcha selection field" description="com_contact_field_captcha_desc" default="" filter="cmd"> <option value="">joption_use_default</option> <option value="0">joption_do_not_use</option> </field> <field name="mycategory" type="category" extension="com_content" label="select a category" description="" /> <field name="show_title" type="checkbox" label="show title" description="show the title of the item" value="1" /> <field name="toppings" type="checkboxes"> <option value="anch">anchovies</option> <option value="chor">chorizo</option> <option value="on">onions</option> <option value="mush">mushrooms</option> </field> <field name="style" type="chromestyle" label="com_modules_field_module_style_label" description="com_modules_field_module_style_desc" /> <field name="backgroundcolor" type="color" default="#eee" label="color selector field" description="tpl_beez3_field_header_background_color_desc" /> <field name="types" type="contenttype" label="tags field type" description="com_tags_field_type_desc" multiple="true" /> <field name="myeditbox" type="combobox" label="myeditbox" description="myeditbox_desc" size="7" /> <field name="mylayout" type="componentlayout" extension="com_content" view="article" label="component layout field" useglobal="true" description="jfield_alt_component_layout" /> <field name="language" type="contentlanguage" label="jfield_language_label" description="com_categories_field_language_desc" class="span12 small"> <option value="*">jall</option> </field> <field name="dbtype" type="databaseconnection" label="db type field" description="com_config_field_database_type_desc" supported="mysql,mysqli,postgresql,sqlsrv,sqlazure" filter="string" /> <field name="test1" label="test field" type="editor" width="300" filter="safehtml" /> <field name="email" type="email" label="jglobal_email" description="com_admin_user_field_email_desc" required="true" size="30" class="inputbox" validate="email" /> <field name="myfilevalue" type="file" label="enter some text" description="choose an image from your computer with maximum 100kb" size="10" accept="image/*" /> <field name="myfile" type="filelist" default="" label="select a file" description="" directory="administrator" filter="" exclude="" stripext="" /> <field name="myfolder" type="folderlist" default="" label="select a folder" directory="administrator" filter="" exclude="" stripext="" /> <field name="mylistvalue" type="groupedlist" default="" label="select an option" description=""> <group label="group 1"> <option value="0">option 1</option> <option value="1">option 2</option> </group> <group label="group 2"> <option value="3">option 3</option> <option value="4">option 4</option> </group> <option value="5">option 5</option> <option value="6">option 6</option> </field> <field name="header_tag" type="headertag" label="com_modules_field_header_tag_label" description="com_modules_field_header_tag_desc" default="h3" /> <field name="myhelpsite" type="helpsite" default="" label="select a help site" description="" /> <field name="mysecretvariable" type="hidden" default="" /> <field name="myimage" type="imagelist" default="" label="select an image" description="" directory="" exclude="" stripext="" /> <field name="myintegervalue" type="integer" default="some integer" label="choose an integer" description="" first="1" last="10" step="1" /> <field name="mylanguage" type="language" client="site" default="en-gb" label="select a language" description="" /> <field name="mylistvalue" type="list" default="" label="select an option" description=""> <option value="0">option 1</option> <option value="1">option 2</option> </field> <field name="myimage" type="media" directory="stories" /> <field name="mymenu" type="menu" default="mainmenu" label="select a menu" description="select a menu" /> <field name="mymenuitem" type="menuitem" default="45" label="select a menu item" description="select a menu item" /> <field name="mymodulelayout" type="modulelayout" label="jfield_alt_layout_label" description="jfield_alt_module_layout_desc" /> <field name="ordering" type="moduleorder" label="jfield_ordering_label" description="jfield_ordering_desc" /> <field name="position" type="moduleposition" description="com_modules_field_position_desc" label="com_modules_field_position_label" default="" maxlength="50" /> <field name="module_tag" type="moduletag" label="com_modules_field_module_tag_label" description="com_modules_field_module_tag_desc" default="div" /> <field name="note31" type="note" class="alert" close="true" label="note field" description="note field description here." /> <field name="mypassword" type="password" default="secret" label="enter a password" description="" size="5" /> <field name="editor" type="plugins" folder="editors" description="com_users_user_field_editor_desc" label="user editor field type"> <option value="">joption_use_default</option> </field> <field name="myradiovalue" type="radio" default="0" label="select an option" description=""> <option value="0">1</option> <option value="1">2</option> </field> <field name="session_handler" type="sessionhandler" default="none" label="session handler field type" description="com_config_field_session_handler_desc" required="true" filter="word" /> <field type="spacer" name="myspacer" label="spacer field type" /> <field name="title" type="sql" default="10" label="sql field type" query="select id as value, title from #__content" /> <field name="tags" type="tag" label="jtag" description="jtag_desc" mode="ajax" class="inputbox span12 small" multiple="true" /> <field name="admin_style" type="templatestyle" client="administrator" description="template style field type" label="template style field type"> <option value="">joption_use_default</option> </field> <field name="mytextvalue" type="text" default="some text" label="enter some text" description="" size="10" /> <field name="mytextarea" type="textarea" default="default" label="enter some text" description="" rows="10" cols="5" /> <field name="mytimezone" type="timezone" default="-10" label="select a timezone" description="" /> <field name="mytextvalue" type="url" default="http://www.example.com" label="enter a url" description="" size="10" /> <field name="modified_user_id" type="user" label="jglobal_field_modified_by_label" class="readonly" readonly="true" filter="unset" /> <field name="guest_usergroup" type="usergroup" label="guest usergroup field type" description="com_users_config_field_guest_user_group_desc" multiple="true" /> </fieldset> </fields> </config> </extension> 一部のフィールドは、joomla 3.0(または3.1、contenttype、noteおよびtagの場合)でのみ使用できることに注意してください。 。カスタムフォームフィールドタイプ拡張機能は、独自のフォームフィールドタイプを定義でき、独自のフォームまたは別の拡張機能によって作成されたフォームで使用できます。手順については、 カスタムフォームフィールドタイプの作成 (joomla!ドキュメンテーション)を参照してください。