Final Coreparameters

Embed Size (px)

Citation preview

  • 8/16/2019 Final Coreparameters

    1/12

    Available extension parameter types and how to use themWhen you create an extension (component, module, plugin or template)you can implement parameters in the .XML ile. With this parameters youcan set options, and use them in the main ile, the .!"! ile.

    #here are $% extension parameter types available in &oomla' . . *ou canuse them easily and in this document you will ind a description or all othem. *ou can also add your own parameters, but this will not be describedin this document.

    License#his document is released under &oomla' +lectronic ocumentation License .

    Author#his document is made by Marie-e van der #uin .

    Table of contents XML ile !arameters

    /ore parameters /alendar /ategory +ditors 0ile list 0older list "elp sites "idden

    1mage list Language List Menu Menu item !assword 2adio 3ection 3pacer 34L #ext #ext area #ime 5ones

    http://code.google.com/p/google-highly-open-participation-joomla/wiki/JEDLhttp://code.google.com/p/google-highly-open-participation-joomla/wiki/JEDLmailto:[email protected]?subject=Unit%20Test%20Plan%20for%20the%20Article%20Managermailto:[email protected]?subject=Unit%20Test%20Plan%20for%20the%20Article%20Managermailto:[email protected]?subject=Unit%20Test%20Plan%20for%20the%20Article%20Managerhttp://code.google.com/p/google-highly-open-participation-joomla/wiki/JEDL

  • 8/16/2019 Final Coreparameters

    2/12

    XML file*ou need an XML ile or every extension. 1t is used mainly to install the extension. A

    particular XML ile loo-s li-e this6

    Parameters#he parameters should be placed between the and tags. *ou can also

    add groups. 0or example, the 7Advanced7 group. #his will loo- li-e this6

    8ote6 *ou can not add groups to templates.

    /ore !arameters#here are $% parameter types available within your &oomla' . installation. #hese are6

    /alendar, /ategory, +ditors, 0ile list, 0older list, "elp sites, "idden, 1mage list, Language, List,Menu, Menu item, !assword, 2adio, 3ection, 3pacer, 34L, #ext, #ext area and #ime 5ones, andwill be described here in detail.

    +ach one is described in the ollowing order6 escription 3creen shot o output XML ile 1mplementation in !"! ile

    2e erence

    !ame of our extension#reated ate%our name%our e-mail address

    #op rig$t*icense+ for example ,!'/, * ersion of t$e extension escription of t$e extension

    add t$e files )et(een t$ose tags

    *anguage file

    lace t$e parameters )et(een t$ese tags.

    !ormal parameters

    dvanced parameters

  • 8/16/2019 Final Coreparameters

    3/12

    Calendarescription6 #his parameter shows a text box where you can ill in the date. *ou can also choose

    the date rom a calendar, which pops up a ter you clic-ed on the icon next to the text box.

    3creen shot6

    XML ile6 9se the ollowing code in the XML ile to create a parameter li-e this.

    8ame6 #he name used to implement in the !"! ile.#ype6 0or a calendar parameter, use 7/alendar7.

    e ault6 #he de ault date.Label6 #he name displayed at the output o the parameter.

    escription6 #he description displayed as a tool tip.0ormat6 #he ormat o the date.

    !"! ile6 0or example, get the parameter, named publish:up, li-e this6

    2e erence6 administrator;components;com:content;admin.content.html.php, $$ $ ?%

    4pu)lis$ up = ne( 6 ate74ro(->pu)lis$ up 9

    4categor ;4section->id ;

  • 8/16/2019 Final Coreparameters

    4/12

    Editorsescription6 #his parameter shows a drop down list o the available W*31W*@ editors.

    3creen shot6

    XML ile6 9se the ollowing code in the XML ile to create a parameter li-e this.

    8ame6 #he name used to implement in the !"! ile.#ype6 0or an editor parameter, use 7+ditor7.

    e ault6 #he de ault editor.Label6 #he name displayed at the output o the parameter.

    escription6 #he description displayed as a tool tip.!"! ile6 0or example, get the parameter, named editors, li-e this6

    2e erence6 administrator;components;com:con ig;controllers;application.php, =<

    File listescription6 #his parameter shows a drop down list o iles rom a certain directory.

    3creen shot6

    XML ile6 9se the ollowing code in the XML ile to create a parameter li-e this.

    8ame6 #he name used to implement in the !"! ile.#ype6 0or a ile list parameter, use 70ilelist7.

    e ault6 #he de ault ile.Label6 #he name displayed at the output o the parameter.

    escription6 #he description displayed as a tool tip.irectory6 #he directory rom which the iles should be showed.

    0or example administratorB.0ilter6 3earch in the iles and only show the iles containing this word or

    letter.+xclude6 +xclude a certain ile, ile ormat or word rom showing in the list.

    3tripext6 3trip these characters.!"! ile6 0or example, get the parameter, named editors, li-e this6

    4t$is->lists; &ditors

    4params->get7 arameter!ame

  • 8/16/2019 Final Coreparameters

    5/12

    Folder listescription6 #his parameter shows a drop down list o olders rom a certain directory.

    3creen shot6

    XML ile6 9se the ollowing code in the XML ile to create a parameter li-e this.

    8ame6 #he name used to implement in the !"! ile.#ype6 0or a older list parameter, use 70olderlist7.

    e ault6 #he de ault older.Label6 #he name displayed at the output o the parameter.

    escription6 #he description displayed as a tool tip.irectory6 #he directory rom which the olders should be showed.

    0or example administratorB.0ilter6 3earch within the olders and only show the olders containing this

    word or letter.+xclude6 +xclude a certain older or some olders containing a certain word

    rom showing in the list.3tripext6 3trip these characters.

    !"! ile6 0or example, get the parameter, named header/olor, li-e this6

    2e erence6 administrator;templates;-hepri;cpanel.php, >

    Help sitesescription6 #his parameter shows a drop down list o the help sites o your &oomla' 1nstallation.

    #hese can be ound at administrator;help;helpsites .xml3creen shot6

    XML ile6 9se the ollowing code in the XML ile to create a parameter li-e this.

    8ame6 #he name used to implement in the !"! ile.#ype6 0or a help site parameter, use 7"elpsites7.

    e ault6 #he de ault editor.Label6 #he name displayed at the output o the parameter.

    escription6 #he description displayed as a tooltip.!"! ile6 0or example, get the parameter, named helpsites, li-e this6

    2e erence6 administrator;components;com:con ig;controllers;application.php, C% C>

    4t$is->params->get7 $eader#olor + green

    4t$is->params->get7 $elpsites + local

  • 8/16/2019 Final Coreparameters

    6/12

    value=""

    value=""

    4user->get7 id

    Hiddenescription6 #his parameter collects in ormation about the user viewing the parameter section.

    3creen shot6 As the name saysD this parameter is a hidden one. 8o output will be displayed.XML ile6 9se the ollowing code in the XML ile to create a parameter li-e this.

    8ame6 #he name used to implement in the !"! ile.#ype6 0or a hidden parameter, use 7"idden7.Ealue6 #he data which needs to be collected.

    #wo examples6@et 1 o user6

    @et ilter order6

    !"! ile6 0or example, get the parameter, named id, li-e this6

    2e erence6 administrator;components;com:users;views;user;view.html.php, $ F<

    Image listescription6 #his parameter shows a drop down list with imagesD .png, .gi , .Gpg, .bmp and .ico.

    3creen shot6

    XML ile6 9se the ollowing code in the XML ile to create a parameter li-e this.

    8ame6 #he name used to implement in the !"! ile.#ype6 0or an image list parameter, use 71magelist7.

    e ault6 #he de ault image.Label6 #he name displayed at the output o the parameter.

    escription6 #he description displayed as a tooltip.irectory6 #he directory rom which the images should be showed.

    0or example imagesHstoriesB.+xclude6 +xclude a certain image name, ormat or word rom showing in the

    list.3tripext6 3trip these characters.

    !"! ile6 0or example, get the parameter, named image, li-e this6

    2e erence6 administrator;components;com:categories;admin.categories.php, ?=<

    6 @A*BB 7 list.images + image + 4ro(->image 9

  • 8/16/2019 Final Coreparameters

    7/12

    4params = 4t$is->user->get arameters7true 9

    ec$o 4params->render7 params 9

    4t$is->params->get7 color ariation

    Languageescription6 #his parameter shows a drop down list with the installed languages or 0ront end or

    Iac- end.3creen shot6

    XML ile6 9se the ollowing code in the XML ile to create a parameter li-e this

    8ame6 #he name used to implement in the !"! ile.#ype6 0or a language parameter, use 7Languages7./lient6 9se 7site7 when you want to display the 0ront end languages, use

    7administrator7 when you want to display the Iac- end languages.e ault6 #he de ault language.

    Label6 #he name displayed at the output o the parameter.escription6 #he description displayed as a tooltip.

    !"! ile6 0or example, get the parameters li-e this6

    2e erence6 administrator;components;com:users;views;user;tmpl; orm.php, == =C

    Listescription6 #his parameter shows a drop down list with options.

    3creen shot6

    XML ile6 9se the ollowing code in the XML ile to create a parameter li-e this.

    8ame6 #he name used to implement in the !"! ile.

    #ype6 0or a list parameter, use 7List7.e ault6 #he de ault list option.Label6 #he name displayed at the output o the parameter.

    escription6 #he description displayed as a tooltip.Jption6 #he option. !lace the label beween Koption and KHoption . *ou can

    add as many as you would li-e.Jption value6 #he name used to implement in the !"! ile.

    on not orget to close the parameter with !"! ile6 0or example, get the parameter, named colorEariation, li-e this6

    2e erence6 templates;rhu-:mil-yway;index.php,

    *a)el option 1*a)el option 2

  • 8/16/2019 Final Coreparameters

    8/12

    4t$is->params->get7 menu

    Menuescription6 #his parameter shows a drop down list with the menus rom your &oomla' site.

    3creen shot6

    XML ile6 9se the ollowing code in the XML ile to create a parameter li-e this.

    8ame6 #he name used to implement in the !"! ile.#ype6 0or a menu parameter, use 7Menu7.

    e ault6 #he de ault menu.Label6 #he name displayed at the output o the parameter.

    escription6 #he description displayed as a tooltip.!"! ile6 0or example, get the parameter, named menu, li-e this6

    Menu itemescription6 #his parameter shows a drop down list with the menu items rom your &oomla' site.

    3creen shot6

    XML ile6 9se the ollowing code in the XML ile to create a parameter li-e this.

    8ame6 #he name used to implement in the !"! ile.#ype6 0or a menu parameter, use 7Menu1tem7.

    e ault6 #he de ault menu item.Label6 #he name displayed at the output o the parameter.

    escription6 #he description displayed as a tooltip.!"! ile6 0or example, get the parameter, named selections, li-e this6

    2e erence6 administrator;components;com:templates;admin.templates.html.php,lines ?$ ? (create &ava3cript) and ?=$

    4lists; selections

  • 8/16/2019 Final Coreparameters

    9/12

    1

    2

    4t$is->user->get7 pass(ord

    Pass ordescription6 #his parameter shows a text box, where you can ill in a (hidden) password.

    3creen shot6

    XML ile6 9se the ollowing code in the XML ile to create a parameter li-e this.

    8ame6 #he name used to implement in the !"! ile.#ype6 0or a password parameter, use 7!assword7.

    e ault6 #he de ault password.Label6 #he name displayed at the output o the parameter.

    escription6 #he description displayed as a tooltip.3i5e6 #he width o the text box.

    !"! ile 0or example, get the parameter, named password, li-e this6

    2e erence6 administrator;components;com:users;views;user;tmpl; orm.php, $

    !adioescription6 #his parameter shows radio buttons to select di erent options.

    3creen shot6

    XML ile6 9se the ollowing code in the XML ile to create a parameter li-e this.

    8ame6 #he name used to implement in the !"! ile.#ype6 0or a radio parameter, use 72adio7.

    e ault6 #he de ault radio option.Label6 #he name displayed at the output o the parameter.

    escription6 #he description displayed as a tooltip.Jption6 #he option. !lace the label beween Koption and KHoption . *ou can

    add as many as you would li-e.Jption value6 #he name used to implement in the !"! ile.

    on not orget to close the parameter with !"! ile6 0or example, get the parameter, named smtpauth, li-e this6

    2e erence6 administrator;components;com:con ig;controllers;application.php, >

    4lists; smtpaut$ = 6 @A*BB 7 select.)ooleanlist +smtpaut$ + class="input)ox" + 4ro(->smtpaut$ 9

  • 8/16/2019 Final Coreparameters

    10/12

    "ectionescription6 #his parameter shows a drop down list with the sections rom your &oomla' site.

    3creen shot6

    XML ile6 9se the ollowing code in the XML ile to create a parameter li-e this.

    8ame6 #he name used to implement in the !"! ile.#ype6 0or a section parameter, use 73ection7.

    e ault6 #he de ault section.Label6 #he name displayed at the output o the parameter.

    escription6 #he description displayed as a tooltip.!"! ile6 0or example, get the parameter, named sectionid, li-e this6

    2e erence6 administrator;components;com:content;controller.php, >

  • 8/16/2019 Final Coreparameters

    11/12

    4t$is->params->get7 title

    "#Lescription6 #his parameter creates a drop down list based on the database.

    3creen shot6

    XML ile6 9se the ollowing code in the XML ile to create a parameter li-e this.

    8ame6 #he name used to implement in the !"! ile. #his should be the sameas the label o the Nuery.

    #ype6 0or a sNl parameter, use 734L7.e ault6 #he de ault item, use the value rom the Nuery to de ine it.

    Label6 #he name displayed at the output o the parameter.escription6 #he description displayed as a tooltip.

    4uery6 9se any Nuery to the database you want. 0or example, use 73+L+/#76

    2eplace the 7value7 and 7label7 by existing columns o your database.2eplace 7table7 by a table rom the database. o not add the pre ix. 0orexample, Gos:categories will become O:categories.

    !"! ile6 0or example, get the parameter, named title, li-e this6

    Te$tescription6 #his parameter shows a text box.

    3creen shot6

    XML ile6

    8ame6 #he name used to implement in the !"! ile.#ype6 0or a text parameter, use 7#ext7.

    e ault6 #he de ault text.Label6 #he name displayed at the output o the parameter.

    escription6 #he description displayed as a tool tip3i5e6 #he width o the text box.

    !"! ile6 0or example, get the parameter, named count, li-e this6

    2e erence6 modules;mod:sections;helper.php, $=

    Huer ="E&*@ value+ la)el DIA J ta)le"

    4count = intval74params->get7 count + 20 9

  • 8/16/2019 Final Coreparameters

    12/12

    4t$is->params->get7 title

    Te$t areaescription6 #his parameter shows a text area.

    3creen shot6

    XML ile6

    8ame6 #he name used to implement in the !"! ile.#ype6 0or a text area parameter, use 7#extarea7.

    e ault6 #he de ault text.Label6 #he name displayed at the output o the parameter.

    escription6 #he description displayed as a tool tip2ows6 #he number o rows o the text area./ols6 #he number o columns o the text area.

    !"! ile6 0or example, get the parameter, named area, li-e this6

    Time %onesescription6 #his parameter shows a drop down list with all time 5ones.

    3creen shot6

    XML ile6

    8ame6 #he name used to implement in the !"! ile.#ype6 0or a time 5one parameter, use 7#ime5ones7.

    e ault6 #he de ault time 5one. 9se or example 7 %7 or 9#/ %6%%Label6 #he name displayed at the output o the parameter.

    escription6 #he description displayed as a tool tip!"! ile6 0or example, get this and other parameters, li-e this6

    2e erence6 components;com:user;views;user;tmpl; orm.php, =<

    4t$is->params->render7 params