For example, below shows an XML request used for the Setup->Member Settings menu:
Code: Select all
<xml>
<admin_header />
<form menu="setup" action="member2" />
<header_font>Member Settings</header_font>
<paragraph>
Welcome to the <b>Member Settings</b> section, where you can manage all member types within the system. Lets hope the new XML back-end engine
works good this time.
</paragraph>
<if variable="_success_create"><success>Successfully created new member type, ~type_name~</success></if>
<if variable="_success_edit"><success>Successfully updated member type, ~name~</success></if>
<section>Existing Member Types</section>
<function alias="display_table" table="member_types" />
<form_button>
<submit>Edit Member Type</submit>
<submit>Delete Member Type</submit>
</form_button>
<section>Create Member Type</section>
<function alias="display_form" form="create_member_type" />
<form_button>
<submit_reset>Create Member Type</submit_reset>
</form_button>
<admin_footer />
</xml>
FUNCTION XML TAGS
Especially take note in the two <function> XML tags in the above request. While the framework is processing an XML request like this, for every <function> tag it knows to send a request to the appropriate back-end function. In reality, every <function> XML request looks something like:
Code: Select all
<function system="member" module="member_type" action="create" />THE display_table AND display_form FUNCTIONS
With the above XML request, the framework executes the display_table and display_form functions, which are core functions in the system. The first function retrieves and displays a table listing all member types within the system, and the second function displays all form fields required to create a new member type. The new framework allows for both, internal forms and tables, each of which can be called using the above <function> tags. Defining a form or table is extremley easy, and nothing more than adding a few records into the database. The software then retrieves the information on the appropriate form / table, parses it accordingly, and results in the above image.
ANOTHER XML EXAMPLE
Below is another example of an XML request that can be used within the Admin Control Panel to create a new member in the system:
Code: Select all
<xml>
<admin_header />
<function alias="create_member" />
<paragraph>
Successfully created the new member, ~username~. You may view the new member's self replicating web site by going to:
<br /><center><a href="~member-site~">~member_sie~</a></center>
</paragraph>
<section>Member Profile</section>
<function system="member" action="display_profile" username="~username~" />
<admin_footer />
</xml>Thanks,
Matt