Editing XMBML Coding
Jump to navigation
Jump to search
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
This page will outline the logic behind [[XMB]] .xml configuration files. | |||
This page | |||
== Basic XML Structure == | |||
This is a reduced version of [[XMB-Network | category_network.xml]] with only one icon (tex_browser) that launches the webbrowser (type:x-xmb/xmlwebbrowser). The .xml is loaded starting from <View id="root">, then inside the <Items> table there is a <Query> linking to #seg_browser (the character "#" links to a <View id> in the same file, so is linked to <View id="seg_browser">). When <View id="seg_browser"> is loaded first starts reading the table of <Items> that contains an <Item> that is linked using attr="browser" to a table of attributes <Table key="browser" | This is a reduced version of [[XMB-Network | category_network.xml]] with only one icon (tex_browser) that launches the webbrowser (type:x-xmb/xmlwebbrowser). The .xml is loaded starting from <View id="root">, then inside the <Items> table there is a <Query> linking to #seg_browser (the character "#" links to a <View id> in the same file, so is linked to <View id="seg_browser">). When <View id="seg_browser"> is loaded first starts reading the table of <Items> that contains an <Item> that is linked using attr="browser" to a table of attributes <Table key="browser" | ||
{{Boxcode| | {{Boxcode|content=<syntaxhighlight lang="xml"> | ||
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||
Line 32: | Line 32: | ||
**<View id="seg_browser"> contains 1 <Items> with the key="browser" | **<View id="seg_browser"> contains 1 <Items> with the key="browser" | ||
{{Boxcode| | {{Boxcode|content=<syntaxhighlight lang="xml"> | ||
<View id="root"> | <View id="root"> | ||
<Items> | <Items> | ||
Line 72: | Line 72: | ||
! Query classes x-xmb !! <key> !! <attr> !! <src> !! Remarks | ! Query classes x-xmb !! <key> !! <attr> !! <src> !! Remarks | ||
|- | |- | ||
| <Query class="type:x-xmb/'''folder-pixmap'''" || {{Yes}} || {{Yes}} || {{Yes}} || Has many uses see [[XMB modding|here]] | |||
| <Query class="type:x-xmb/'''folder-pixmap'''" || {{Yes}} || {{Yes}} || {{Yes}} || Has many uses see [[ | |||
|- | |- | ||
| <Query class="type:x-xmb/'''xmlmcutility'''" || {{Yes}} || {{Yes}} || {{Yes}} || PS1 and PS2 virtual memory card utility | | <Query class="type:x-xmb/'''xmlmcutility'''" || {{Yes}} || {{Yes}} || {{Yes}} || PS1 and PS2 virtual memory card utility | ||
Line 102: | Line 100: | ||
! Item classes x-xmb !! <key> !! <attr> !! <src> !! Remarks | ! Item classes x-xmb !! <key> !! <attr> !! <src> !! Remarks | ||
|- | |- | ||
| <Item class="type:x-xmb/'''module-action'''" || {{Yes}} || {{Yes}} || {{No}} || Uses a particular module to support the XMB item. See [[ | | <Item class="type:x-xmb/'''module-action'''" || {{Yes}} || {{Yes}} || {{No}} || Uses a particular module to support the XMB item. See [[VSH_module-action|VSH module-action]] page | ||
|- | |- | ||
| <Item class="type:x-xmb/'''vmc-new'''" || {{Yes}} || {{Yes}} || {{No}} || | | <Item class="type:x-xmb/'''vmc-new'''" || {{Yes}} || {{Yes}} || {{No}} || | ||
Line 109: | Line 107: | ||
|- | |- | ||
| <Item class="type:x-xmb/'''xmleditingvideo'''" || {{Yes}} || {{Yes}} || {{No}} || | | <Item class="type:x-xmb/'''xmleditingvideo'''" || {{Yes}} || {{Yes}} || {{No}} || | ||
|- | |- | ||
| <Item class="type:x-xmb/'''xmlgameexit'''" || {{Yes}} || {{No}} || {{No}} || | | <Item class="type:x-xmb/'''xmlgameexit'''" || {{Yes}} || {{No}} || {{No}} || | ||
Line 286: | Line 282: | ||
|- | |- | ||
| x-host/'''mount-info''' || ? || ? || ? || found inside explore_plugin.sprx | | x-host/'''mount-info''' || ? || ? || ? || found inside explore_plugin.sprx | ||
|- | |||
| x-host/'''unknown''' || ? || ? || ? || found inside explore_plugin.sprx | |||
|- | |- | ||
| x-host/'''directory''' || ? || ? || ? || found inside explore_plugin.sprx | | x-host/'''directory''' || ? || ? || ? || found inside explore_plugin.sprx | ||
Line 343: | Line 341: | ||
| {{No}} || ? || ? || {{No}} || ? || ? || ? || ? || ? | | {{No}} || ? || ? || {{No}} || ? || ? || ? || ? || ? | ||
| ? || ? || ? | | ? || ? || ? | ||
| {{Yes}} || ? || ? || ? || ? || ? || ? || {{Yes}} || ? || ? || ? || | | {{Yes}} || ? || ? || ? || ? || ? || ? || {{Yes}} || ? || ? || ? || ? || ? || ? || ? | ||
| ? | | ? | ||
| "none", "hide | | "none", "hide" | ||
|- | |- | ||
| | | cf_connection | ||
| ? || ? || ? || ? || ? || ? || ? || {{Yes}} || {{Yes}} | | ? || ? || ? || ? || ? || ? || ? || {{Yes}} || {{Yes}} | ||
| ? || ? || ? | | ? || ? || ? | ||
| ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? | | ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? | ||
Line 373: | Line 364: | ||
| {{No}} || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? | | {{No}} || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? | ||
| ? | | ? | ||
| "segment | | "segment" | ||
|- | |- | ||
| content_id | | content_id | ||
Line 429: | Line 420: | ||
| ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || {{Yes}} | | ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || {{Yes}} | ||
| ? | | ? | ||
| "game | | "game" | ||
|- | |- | ||
| custom_priority | | custom_priority | ||
Line 436: | Line 427: | ||
| ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? | | ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? | ||
| ? | | ? | ||
| "game=-80", "video | | "game=-80", "video=-80" | ||
|- | |- | ||
| data_connection | | data_connection | ||
Line 457: | Line 448: | ||
| ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? | | ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? | ||
| ? | | ? | ||
| "0" | | "0" | ||
|- | |- | ||
| fo_lbl2_alpha | | fo_lbl2_alpha | ||
Line 464: | Line 455: | ||
| ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? | | ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? | ||
| ? | | ? | ||
| "0" | | "0" | ||
|- | |- | ||
| focus | | focus | ||
Line 485: | Line 476: | ||
| {{Yes}} || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? | | {{Yes}} || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? | ||
| ? | | ? | ||
| | | "0", "1", "2", "3", "4", "5", "6", "-46", "-47", "-48", "-49", "-50" | ||
|- | |- | ||
| fs_path | | fs_path | ||
Line 507: | Line 498: | ||
| ? | | ? | ||
| "/dev_hdd0/myicon.png" | | "/dev_hdd0/myicon.png" | ||
|- | |- | ||
| icon_notation | | icon_notation | ||
Line 611: | Line 588: | ||
| {{Yes}} || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? | | {{Yes}} || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? | ||
| ? | | ? | ||
| "NotifyErrorNoExecute", "http://m.facebook.com" | | "NotifyErrorNoExecute", "http://m.facebook.com" | ||
|- | |- | ||
| module_name | | module_name | ||
Line 626: | Line 603: | ||
| ? | | ? | ||
| "xcb://localhost/query?..." | | "xcb://localhost/query?..." | ||
|- | |- | ||
| path | | path | ||
Line 639: | Line 609: | ||
| ? || ? || ? || ? || ? || ? || ? || ? || ? || {{Yes}} || ? || ? || ? || ? || ? | | ? || ? || ? || ? || ? || ? || ? || ? || ? || {{Yes}} || ? || ? || ? || ? || ? | ||
| ? | | ? | ||
| | | ? | ||
|- | |- | ||
| pkg_src | | pkg_src | ||
Line 681: | Line 651: | ||
| {{No}} || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? | | {{No}} || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? || ? | ||
| ? | | ? | ||
| "msg_error_no_file" | | "msg_error_no_file" | ||
|- | |- | ||
| title | | title | ||
Line 818: | Line 788: | ||
'''icon_rsc'''. Displays an image from a .rco as XMB icon. Cannot be used at the same time as 'icon' | '''icon_rsc'''. Displays an image from a .rco as XMB icon. Cannot be used at the same time as 'icon' | ||
'''info'''. Displays XMB title information from plain text input. This is shown below the 'title' or 'title_rsc' entry in a smaller font | '''info'''. Displays XMB title information from plain text input. This is shown below the 'title' or 'title_rsc' entry in a smaller font. Cannot be used at the same time as 'info_rsc' | ||
'''info_rsc'''. Displays XMB title information from relevant .rco. This is shown below the 'title' or 'title_rsc' entry | '''info_rsc'''. Displays XMB title information from relevant .rco. This is shown below the 'title' or 'title_rsc' entry ins a smaller font. Cannot be used at the same time as 'info' | ||
'''ingame''' Use: tells the PS3 if the item can be accessed ingame | '''ingame''' Use: tells the PS3 if the item can be accessed ingame | ||
Line 842: | Line 812: | ||
'''module_action'''. Is the commanded to be used by the module | '''module_action'''. Is the commanded to be used by the module | ||
'''module_name''' Use: the name of the module to be used from | '''module_name''' Use: the name of the module to be used from this [[VSH Module-Action|list]] | ||
'''str_noitem'''. Displays information from relevant .rco when no data/XMB items are found | '''str_noitem'''. Displays information from relevant .rco when no data/XMB items are found | ||
Line 850: | Line 820: | ||
'''title_rsc'''. Displays XMB main title text referred from relevant .rco. Cannot be used at the same time as 'title' | '''title_rsc'''. Displays XMB main title text referred from relevant .rco. Cannot be used at the same time as 'title' | ||
== | == Examples == | ||
=== An XMB item tree === | |||
For this we will make a XMB item which will act as a folder opening up into 3 other XMB items. | |||
1/ First create the root XMB item which acts as a folder | |||
{{Boxcode|content=<syntaxhighlight lang="xml"> | |||
<View id="XMB_Folder_1"> | |||
<Attributes> | |||
<Table key="xmb_folder"> | |||
<Pair key="icon_rsc"><String>tex_album_icon</String></Pair> | |||
<Pair key="title"><String>XMB Menu Item</String></Pair> | |||
<Pair key="info"><String>This will subdivide into 3 items :)</String></Pair> | |||
<Pair key="child"><String>segment</String></Pair> | |||
</Table> | |||
</Attributes> | |||
<Items> | |||
<Query class="type:x-xmb/folder-pixmap" key="xmb_folder" attr="xmb_folder" src="#XMB_Folder_1_container" /> | |||
</Items> | |||
</View> | |||
</syntaxhighlight>}} | |||
Important Notes: | |||
* I've used "''<Query class="type:x-xmb/folder-pixmap"''" for <Items> sub-entry type as it is good for displaying menus. | |||
* The 'attr' in the <Items> sub-entry (xmb_folder) is the same as the table key in Attibutes, so those attributes are assigned to the xmb_folder <Items> sub-entry. | |||
* the 'src' is pointing to 'XMB_Folder_1_container' - the another XMB .xml entry in the current .xml | |||
* the icon is from a .rco file and is a basic folder icon, like what the 'Game Data' XMB item uses | |||
* 'title' and 'info' are in plain text | |||
* 'child' is set as 'segment' so the XMB knows this item will subdivide into other XMB items | |||
In order to create a working XMB sub menu the root xmb item (in this "XMB_Folder_1") must have its 'src' linking to a "container" (its the best way to think about it) and not directly linking to XMB items in the sub menu.( If you do not do this when you select your root XMB item to display a sub menu, the 'output' or 'action' of the XMB items of the sub menu will be shown rather than the actual XMB items): | |||
{{Boxcode|content=<syntaxhighlight lang="xml"> | |||
<View id="XMB_Folder_1_container"> | |||
<Items> | |||
<Query class="type:x-xmb/folder-pixmap" key="xmb_folder_container" src="#XMB_Folder_1_contents" /> | |||
</Items> | |||
</View> | |||
</syntaxhighlight>}} | |||
Important Notes: | |||
* This has no attributes as it simply acts as a contents container/linker | |||
Now to create the XMB .xml entry which holds the sub menu items: | |||
{{Boxcode|content=<syntaxhighlight lang="xml"> | |||
<View id="XMB_Folder_1_contents"> | |||
<Attributes> | |||
<Table key="xmb_subitem_1"> | |||
<Pair key="icon_rsc"><String>tex_album_icon</String></Pair> | |||
<Pair key="title"><String>XMB Sub Menu Item</String></Pair> | |||
<Pair key="info"><String>Dummy Sub item 1</String></Pair> | |||
<Pair key="str_noitem"><String>msg_error_no_gamedata</String></Pair> | |||
</Table> | |||
<Table key="xmb_subitem_2"> | |||
<Pair key="icon_rsc"><String>tex_album_icon</String></Pair> | |||
<Pair key="title"><String>XMB Sub Menu Item</String></Pair> | |||
<Pair key="info"><String>Dummy Sub item 2</String></Pair> | |||
<Pair key="str_noitem"><String>msg_error_no_gamedata</String></Pair> | |||
</Table> | |||
<Table key="xmb_subitem_3"> | |||
<Pair key="icon_rsc"><String>tex_album_icon</String></Pair> | |||
<Pair key="title"><String>XMB Sub Menu Item</String></Pair> | |||
<Pair key="info"><String>Dummy Sub item 3</String></Pair> | |||
<Pair key="str_noitem"><String>msg_error_no_gamedata</String></Pair> | |||
</Table> | |||
</Attributes> | |||
<Items> | |||
<Query class="type:x-xmb/folder-pixmap" key="xmb_subitem_1" attr="xmb_subitem_1" /> | |||
<Query class="type:x-xmb/folder-pixmap" key="xmb_subitem_2" attr="xmb_subitem_2" /> | |||
<Query class="type:x-xmb/folder-pixmap" key="xmb_subitem_3" attr="xmb_subitem_3" /> | |||
</Items> | |||
</View> | |||
</syntaxhighlight>}} | |||
Important Notes: | |||
* These are dummy items, they do not 'go anywhere' or perform any function. They will just print the str_noitem message when clicked because they have no function | |||
* notice how the <attr> from the <Items> sub entries matches the <Table keys> from the <Attributes> sub entries | |||
* The <Attributes> and the <Items> sub entries do not have to be in the same order to work | |||
=== A Web-Site link === | |||
This type of entry could be placed on the root of the XMB category, or in an XMB Item Tree. This is also an application of the '[[VSH:Module-Action|module-action]]' function. Example: | |||
{{Boxcode|content=<syntaxhighlight lang="xml"> | |||
<View id="seg_xmb_weblink"> | |||
<Attributes> | |||
<Table key="link_1"> | |||
<Pair key="icon_rsc"><String>dev_wiki_icon</String></Pair> | |||
<Pair key="title"><String>PS3 Dev Wiki</String></Pair> | |||
<Pair key="info"><String>Some info here</String></Pair> | |||
<Pair key="module_name"><String>webbrowser_plugin</String></Pair> | |||
<Pair key="module_action"><String>http://www.ps3devwiki.com/</String></Pair> | |||
</Table> | |||
</Attributes> | |||
<Items> | |||
<Item class="type:x-xmb/module-action" key="link_1" attr="link_1"/> | |||
</Items> | |||
</View> | |||
</syntaxhighlight>}} | |||
*Important Notes: | |||
**The 'Attributes' for this Web-Link follows the Attribute rules for a 'module-action' entry. | |||
**The 'webbrowser_plugin' module has been used to handle the request in the 'module_action' pair key, which is a web address | |||
**The 'attr' in the Items sub-entry is the same as the table key in the 'Attributes' sub-entry. | |||
**Remember that the icon_rsc string will search the rco file(used by the module running the category which this web link is on) for the icon 'dev_wiki_icon'. Whereas the title and info strings will just print the contents of the string. | |||
{{ | {{System Firmware}}<noinclude>[[Category:Main]]</noinclude> |