page_name,page_id,page_title,content,keywords,language,original_page
index_page,1,index_page,"==Documentation==

[[toc]]

===Introductory===

* [[about|About Xataface]]
* [http://xataface.com/documentation/tutorial/getting_started Getting Started Tutorial]
* [[How to build a PHP MySQL Application with 4 lines of code]]
* [[Troubleshooting",,en,0
testpage2,2,testpage2,"Another test page
[[testpage]]",,en,0
fields.ini_file,3,fields.ini_file,"==fields.ini File Reference==

[[toc]]

===Overview===

The fields.ini file is a configuration file which is associated with a single table of a database application.  It provides metadata about the table's fields to help Xataface dictate how they s","fields.ini directives ",en,0
widget:type,4,widget:type,"==widget:type Directive Reference==

The widget:type directive in the [[fields.ini file]] specifies the type of widget that should be used to edit a particular field in HTML forms.  Xataface uses [http://pear.php.net/package/HTML_QuickForm/ HTML_QuickFo",,en,0
valuelists.ini_file,5,valuelists.ini_file,"==valuelists.ini file Reference==

[[toc]]

The valuelists.ini file stores value lists that can be used as [[vocabulary|vocabularies]] for select lists, checkbox groups, and other widgets the provide the user with options to choose from.

Each table","valuelists, dynamic valuelists, programmatically defined valuelists",en,0
actions.ini_file,6,actions.ini_file,"==actions.ini file Reference==

[[toc]]

The actions.ini file stores information about the various [[action]]s that can be performed by your application.  An action may be manifested in two ways:

# As a web page
# As a menu item

And there is no",,en,0
Delegate_class_methods,7,Delegate_class_methods,"==Delegate Class Reference==

[[toc]]

A delegate class is a PHP class that complements a particular table with custom bahaviors.  Basic table metadata can be supplied using the [[fields.ini file]], however some things are better customized using PHP.","RSS,Feeds,delegate classes, triggers",en,0
Internet_Media_Manager,8,"Internet Media Manager","'''Manage your videos and photos all in one place'''

[[toc]]

===Watch the Guided Tour (6 minutes)===
<nowiki>
<embed src=""http://media.weblite.ca/lib/flvplayer.swf"" width=""640"" height=""448"" bgcolor=""#FFFFFF"" type=""application/x-shockwave-flash"" pl","Internet Media Manager,resize photos,image gallery,photo gallery,video gallery",en,0
__prefs__,9,__prefs__,"==__prefs__ fields.ini Section==

A global section of the [[fields.ini file]] that sets the preferences for the given table and its records.

E.g.
<code>
[__prefs__]
    hide_posted_by=1 ; Hides the ""Posted by"" text in glance lists (e.g. related re",,en,0
preferences,10,preferences,"==Xataface Preferences==

[[toc]]

Xataface preferences can be defined in 3 ways:

# In the ''[_prefs]'' section of rhe [[conf.ini file]] for global static preferences.
# Implementing the [[getPreferences]] method in the [[Application Delegate Clas","preferences, prefs, getPreferences",en,0
block__blockname,11,block__blockname,"===Available Blocks===

This is a grep to show the blocks that are defined in Xataface templates:

* Dataface_ActionsMenu.html:actions_menu_head
* Dataface_ActionsMenu.html:actions_menu_tail
* Dataface_Add_Existing_Related_Record.html:before_add_exi",,en,0
Application_Delegate_Class,12,"Application Delegate Class","[[toc]]

===Synopsis===

The application delegate class is similar to the [[Delegate_class_methods|table_delegate_class]] except that it is applicable to the application as a whole, not just one table.  It allows the developer to implement hooks that ","application delegate class",en,0
beforeRegister,13,beforeRegister,"==beforeRegister() Trigger==

A trigger that can be implemented in the [[Application Delegate Class]] or the [[Table Delegate Class]], to be executed before the registration form is saved.  This can be used to perform some custom actions like emailing t",,en,0
afterRegister,14,afterRegister,"==afterRegister() Trigger==

A trigger that can be implemented in the [[Application Delegate Class]] or the [[Table Delegate Class]], to be executed after the registration form is saved.  This can be used to perform some custom actions like emailing the",,en,0
validateRegistrationForm,15,validateRegistrationForm,"==validateRegistrationForm() hook==

A hook that validates the input into the user registration form to make sure that the input is valid.

===Signature===

function validateRegistrationForm( array $values ) : mixed

====Parameters====

{| class",,en,0
sendRegistrationActivationEmail,16,sendRegistrationActivationEmail,"==sendRegistrationActivationEmail() Hook==

A hook that can be implemented in the [[Application Delegate Class]] or the [[Table Delegate Class]] to override the sending of an activation email to the user.

===Signature===

function sendRegistrationA",,en,0
getRegistrationActivationEmailInfo,17,getRegistrationActivationEmailInfo,"==getRegistrationActivationEmailInfo() Hook==

A hook that can be implemented in the [[Application Delegate Class]] or the [[Table Delegate Class]] to override the default information that is used to send the registration activation email (the email tha",,en,0
getRegistrationActivationEmailSubject,18,getRegistrationActivationEmailSubject,"==getRegistrationActivationEmailSubject() Hook==

A hook that can be implemented in the [[Application Delegate Class]] or the [[Table Delegate Class]] to override the default registration activation email subject line (the email that the user receives w",,en,0
getRegistrationActivationEmailMessage,19,getRegistrationActivationEmailMessage,"==getRegistrationActivationEmailSubject() Hook==

A hook that can be implemented in the [[Application Delegate Class]] or the [[Table Delegate Class]] to override the default registration activation email message body (the email that the user receives w",,en,0
relationships.ini_file,20,relationships.ini_file,"==relationships.ini File Reference==

[[toc]]

===Overview===

The relationship.ini file is a configuration file which is associated with a single table of a database application.  It provides metadata about the table's relationships to other tables","relationships.ini file, relationships",en,0
authentication,21,authentication,"==Xataface Authentication==

[[toc]]

Xataface comes with authentication ready to roll out of the box.  With a couple of [[_auth|configuration options]] in the [[conf.ini file]], you can activate the default authentication scheme which uses a table (o","authentication, [_auth], CAS Authentication, Authentication Modules, Basic Authentication, Security",en,0
Writing_Custom_Authentication_Plugins,22,Writing_Custom_Authentication_Plugins,"==Writing a Custom Authentication Plugin for Xataface==

[[toc]]

Xataface has a pluggable [[authentication]] framework that allows you to easily write your own custom [[authentication]] modules to tie in with other systems.  Several plugins have alre",,en,0
xataface_templates,23,xataface_templates,"==Xataface Templates==

[[toc]]

Xataface uses the [http://smarty.php.net Smarty Template Engine] to power all of its templates.  Templates are stored in the one of the following locations:

* %XATAFACE_ROOT%/Dataface/templates
* %SITE_ROOT%/templa","templates, plugins, smarty",en,0
templates:tags:use_macro,24,templates:tags:use_macro,"==use_macro Template Tag==

===Synopsis===

The use_macro tag includes another template into the current template with the option to override certain sections.

===Parameters===

{| class=""listing listing2""
|-
! Name
! Description
! Version
|",,en,0
conf.ini_file,25,conf.ini_file,"==conf.ini File==

[[toc]]

The conf.ini file is where most of the application-level configuration information is stored for a Xataface application.  It contains information such as:

* database connection information
* which tables should appear i",,en,0
permissions.ini_file,26,permissions.ini_file,"==The permissions.ini File==

[[toc]]

The permissions.ini file stores custom permissions and roles that can be used by an application.  It is an optional file that should be placed in the application root directory (i.e. the same directory where your","permissions.ini, getPermissions, permissions",en,0
filter,27,filter,"==The filter attribute of the [[fields.ini file]]==

The filter attribute with a value of 1 specifies that a field should be used as a filter field in list view.  In list view, any filter fields will provide a select list with all of the possible values",,en,0
group,28,group,"==group directive in [[fields.ini file]]==

The group directive allows you to declare that certain fields of your table should be grouped together on the edit form and the view tab (and other logical places).  For example, fields like address, city, sta",,en,0
encryption,29,encryption,"==encryption [[fields.ini file]] directive==

The '''encryption''' directive is meant to be used on password fields only.  It specifies that a certain type of encryption is to be used in the storing of values in this field.  For example, many PHP/MySQL ",,en,0
modules,30,"Xataface Modules","[[toc]]

Xataface provides a number of hooks that allow developers to create modules to extend its functionality.  This page lists a handful of the currently available modules.

* [[ShoppingCart|Shopping Cart]] - Converts your application into a shopp","modules, captcha",en,0
ShoppingCart,31,ShoppingCart,"==Xataface Shopping Cart Module==

[[toc]]

Status: Under development
Current Version: 0.2

===Synopsis===

Add a shopping cart to your xataface application.  You can treat any record as a product that can be sold.  Includes Paypal connectivity, ",,en,0
DataGrid,32,DataGrid,"==Xataface DataGrid Module==

Created by Steve Hannah, [http://weblite.ca Web Lite Solutions Corp.]

===Synopsis===

The Xataface DataGrid module uses the Ext DataGrid component (http://extjs.com) to add an editable grid component to your Xataface a",,en,0
after_action_new,33,after_action_new,"==after_action_new trigger==

[[toc]]

This trigger is called after the '''new''' action is successfully completed.  This trigger can be defined in the table [[Delegate class methods|delegate class]] and is often used to redirect to a particular page ",,en,0
examples,34,examples,"==Xataface Examples==

[[toc]]

This section includes concrete examples of how Xataface has been used in the past.

===Demo Applications===

{| class=""listing listing2""
|-
! Screenshot
! Title/Description
! Developed by
|-
| [[Image:http://i","examples, samples",en,0
widget:editor,35,widget:editor,"==widget:editor fields.ini directive==

Return to [[fields.ini file]]

[[toc]]

The widget:editor directive is applicable in the [[fields.ini file]].  It specifies the type of HTML editor that should be used.  This directive is only used when [[widg",,en,0
about,36,about,"==About Xataface==

[[toc]]

Xataface is a flexible and shapable skin that sits on top of MySQL, making it accessible to every-day users. It automatically generates the appropriate forms, lists, and menus for a user to interact with the database witho",,en,0
URL_Conventions,37,URL_Conventions,"==Xataface URL Conventions==

[[toc]]

Xataface adheres to a few simple URL conventions for all of its actions.  When you understand how Xataface URLs work you begin to get far more out of your applications.  By specifying the appropriate query parame","URL Conventions, GET Parameters, POST parameters, Request Parameters",en,0
How_to_build_a_PHP_MySQL_Application_with_4_lines_of_code,38,"How to build a PHP MySQL Application with 4 lines of code","'''The [http://xataface.com Xataface Application Framework] allows you to convert your existing MySQL database into a full-fledged with as little as 4 lines of code.  And it's Not a code generator.'''

[[toc]]

This article is intended to spark intere","tutorial, getting started, installation, first app, 4 lines of code",en,0
Drag_and_Drop_Reordering_of_Relationships,39,Drag_and_Drop_Reordering_of_Relationships,"==Drag and Drop Reordering of Related Records in Xataface==

One powerful aspect of Xataface is its abstraction of relationships between tables.  Once you define a relationship users can browse related records, add new and existing related records, and ",,en,0
Introduction_to_RSS_Feeds_in_Xataface,40,Introduction_to_RSS_Feeds_in_Xataface,"==Introduction to RSS Feeds in Xataface==

[[toc]]

A default Xataface application provides RSS feeds to any found set in your application.  This article explains a little bit about RSS and how you can configure Xataface to give you the desired result","RSS Feeds",en,0
getFeedItem,41,getFeedItem,"==getFeedItem() Delegate Class Method==

[[toc]]

===Synopsis:===

The getFeedItem() method of a table [[Delegate class methods|delegate class]] returns an associative array of parameters for a record as it should appear as part of an [[Introduction",,en,0
getFeed,42,getFeed,"==getFeed() Delegate Class Method==

[[toc]]

===Synopsis:===

The getFeed() method of a table [[Delegate class methods|delegate class]] or [[Application Delegate Class|application delegate class]] returns an associative array of parameters to confi",,en,0
Calendar_Action,43,Calendar_Action,"==Calendar Action==

[[toc]]

Xataface 1.0 includes a built-in calendar action that is disabled by default.  If enabled, it allows you to view the records in any found set as a calendar of events, as follows:

<nowiki>
<div style=""text-align:center",,en,0
timestamp,44,timestamp,"Return to [[fields.ini file]]

A very simple sample of this could be your table contains the table date_created as a type of date.  In your fields.ini, you would include this:

<code>
[date_created]
timestamp=insert
widget:type=hidden
</code>

T","timestamp, date, datetime",en,0
_output_cache,45,"The Xataface Output Cache","<nowiki><div class=""portalMessage"">Note: There was a bug in the output cache affecting Xataface version 1.0 to 1.3rc1.  If you are using a version of Xataface older than 1.3rc2 then you should either disable the output cache, or replace the Dataface/Outpu","output cache",en,0
widget:atts,46,widget:atts,"==widget:atts Directive Reference==

The widget:atts directive in the fields.ini file allows any arbitrary HTML attributes to be added to any of the fields.  It may also be used to specify javascript event handler functions that the widget should call u",,en,0
visibility:fieldName,47,visibility:fieldName,"==Example==

<code>visibility:ConferenceID = hidden</code>

This will make the ConferenceID in the relationship list view disappear.",,en,0
tab,48,tab,"==tab directive of the fields.ini file==

[[toc]]

The ''tab'' directive of the [[fields.ini file]] specifies which tab of the record edit form a field should be displayed on.  Xataface supports multiple tabs on the edit form by way of this ''tab'' di",,en,0
Troubleshooting,49,Troubleshooting,"==Xataface Troubleshooting==

This document is intended to help Xataface developers through some of the most common issues.

[[toc]]

==All I get is a blank white screen!==

The most common issue mentioned in the forums is that an application come",,en,0
__field__permissions,50,__field__permissions,"This method can be used to set the default permissions for all fields in a designated table, when specified in that table's delegate class. It comes in handy in situations when you want to deny access to all fields except for those designated, rather then",,en,0
fieldgroup_template,51,fieldgroup_template,"==Using a custom template for a field group on the edit form==

[[toc]]

Xataface allows you to partition your fields into ''groups'' so that similar fields are grouped together on the edit form.  The default layout of the fields remains simply vertic",,en,0
How_to_Add_Custom_Sections_to_View_Tab,52,How_to_Add_Custom_Sections_to_View_Tab,"==How to Add Custom Sections to the View tab==

[[toc]]

The ''View'' tab is intended to give the user a detailed view of the contents of a record.  By default it shows the values of each non-empty field grouped into their appropriate field groups.  I",,en,0
fieldname__permissions,53,fieldname__permissions,"==fieldname__permissions() method==

[[toc]]

The fieldname__permissions() methods will allow you to define custom permissions on a particular field in the [[delegate class]].  For example to specify permissions on a field named ''foo'' you would defi",,en,0
Email,54,Email,"==Xataface Email Module==

[[toc]]

The Xataface Email module allows you to convert your database into a mailing list so that you can easily send email to any found set of records, as long as the records contain an email address to send to.

==Featu","Email,Email module,Sending Email,Maillist",en,0
blob,55,blob,,,en,0
struct,56,struct,,,en,0
Creating_a_Dashboard,57,Creating_a_Dashboard,"==Creating a Dashboard for your Users==

[[toc]]

Xataface allows you to build powerful data-driven applications quickly, but these applications may be daunting to your users if they don't know what they can do with the application.  Most applications",dashboard,en,0
Selected_Records_Actions,58,Selected_Records_Actions,"==Creating a Custom ''Selected Records'' Action==

[[toc]]

If you view the ''list'' tab in any of your Xataface applications, you'll notice that there is a checkbox next to each row of the list, and there are a number of actions listed at the bottom ",,en,0
no_access_text,59,no_access_text,"Whenever the NO_ACCESS permission is given for a field, normally the text NO ACCESS appears.  But we might want to display another text.  Here is an example of the text subscribe is used instead of NO ACCESS whenever the NO_ACCESS permissions is given.
",,en,0
widget:type_textarea,60,widget:type_textarea,,,en,0
lookup,61,"The Lookup Widget","Return to [[widget:type]] page to see list of all widget types.
Back to [[fields.ini file]] to see other fields.ini directives.

[[toc]]

===Synopsis===

The lookup widget allows users to look a record from another table to insert into the field.  ","lookup widget, widget:filters, widget:-filters:limit, widget:table",en,0
Customizing_the_look_and_feel_of_a_row_or_a_cell,62,Customizing_the_look_and_feel_of_a_row_or_a_cell,"==How to customize the look and feel of elements in the list view==

===Create a method in a delegate class===

In the delegate class, the method ''css__tableRowClass'' is implemented, like in this example :

<code>class tables_journal_interventions",,en,0
How_to_granulate_permissions_on_each_field,63,How_to_granulate_permissions_on_each_field,"==How to granulate permissions on each field==

To reach this aim, there is the method fieldname__permissions to place into the delegate class of the table. 

===Getting the role===

First it is necessary to know the user's role. For this, the metho",,en,0
How_to_authenticate_users_with_LDAP_or_Active_Directory,64,How_to_authenticate_users_with_LDAP_or_Active_Directory,"==How to authenticate users with LDAP or Active Directory==

",,en,0
LDAP_or_Active_Directory,65,"How to authenticate users with LDAP or Active Directory","[[toc]]

It is often easier to use the existing LDAP or Active Directory to authenticate users in Xataface than to create a new password for every user in the table users.

===In the conf.ini===

In the conf.ini file, in the [auth] part, you need to","LDAP,Active Directory,Authentication",en,0
table,66,table,"When using widget:type table, it will store the data as XML.

So the field type must be TEXT (or varchar... but text is better). You can decide which columns you want in the table by creating sub-fields in your fields.ini file as follows:

Suppose you",,en,0
grid,67,grid,"==widget:type = grid==

Suppose we have two tables, tbl_organisation and tbl_individuals, in the edit view for a record in the organisations table (tbl_organisations) we also want to be able to view and edit the individuals within this organisation we c",,en,0
relationship,68,"The relationship fields.ini directive","[[fields.ini file|Return to fields.ini file directives]]

[[toc]]

===Synopsis===

Certain types of widgets (e.g. grid (v1.0) and checkbox (v1.2)) support the relationship directive which allows them to effectively add/remove records from a specifie","grid widget, relationship, checkbox",en,0
checkbox,69,checkbox,"==The checkbox widget==

In the [[fields.ini file]] you can specify a field to be edited using a checkbox widget by setting [[widget:type]] to [[checkbox]].  A checkbox widget can function in 2 different ways depending on the parameters that you assign ",,en,0
documentation_guide,70,"Documentation Guide","Xataface uses a wiki to manage its online documentation which can be edited by anyone.  All you have to do is [http://xataface.com/wiki/index.php?-action=login login with your forum username and password] ([http://xataface.com/forum/profile.php?mode=regis","documentation wiki",en,
GettingStarted:Introduction,71,Introduction,"Web Lite is a simple framework for building data-driven web applications in PHP and MySQL. This section introduces some of the concepts and applications of Dataface.

To fully understand what Xataface is, we must first define a few key terms:

'''Fram","introduction requirements getting started",en,
GettingStarted:Why_Use_Xataface,72,"Why Use Xataface","==Why Use Xataface?==

Some simple examples similar to those that are frequently encountered by web developers, and how dataface can be used to acheive a solution.
As a web services developer in the Faculty of Applied Sciences at Simon Fraser Universit","introduction motivation why",en,
GettingStarted:Installation,73,Installation,"==Installation==

Download and installation instructions for the Web Lite framework.
Xataface is a 100% PHP Framework that comes with all dependencies as part of the installation. The framework itself lives inside a single directory that should be plac","installation troubleshooting downloading ",en,
GettingStarted:first_application,74,"Creating your First Application","==Creating Your First Application==

Build a simple Xataface application.

For our first Xataface application we will try to build a web site for Faculty of Widgetry (From the example in the ""Why Use Xataface"" page). The web site needs to store inform","htaccess first application installation",en,
GettingStarted:using_first_app,75,"Using Your First Application","==Using Your First Application==

A Web Lite application, at its core, provides 4 standard operations: Add new records, edit existing records, delete records, and find records. This section gives a brief overview of how to use your first Dataface applic","""find form"",""edit form"",""delete record"",""user interface"",ui,template,look and feel",en,
GettingStarted:customizing,76,"Customizing Field labels, descriptions, and widgets","==Customizing Field labels, descriptions, and widgets==

Using simple INI configuration files, you can customize the look and feel of your application. You can change widgets, labels, field descriptions, and more.
In the previous 2 sections we learned ","widget labels descriptions onclick handlers",en,
GettingStarted:valuelists,77,"Using Valuelists","==Using Value-lists==

Value-lists serve as vocabularies that can be used for fields such as select lists, checkbox groups, and auto-complete fields.

So far we have not used any enumerated fields such as select lists, checkbox groups, or auto-complet","valuelists, __sql__, select lists, checkbox options,checkbox groups,vocabularies",en,
GettingStarted:relationships,78,Relationships,"==Relationships==

Xataface allows you to define relationships between tables using the relationships.ini file.

Xataface applications without relationships between tables can be quite boring. In our FacultyOfWidgetry application, we have implicitly d",relationships,en,
GettingStarted:validation,79,"Form Validation","==Form Validation==

Xataface allows you to add validation rules to fields using the fields.ini file
A common requirement for forms is to have some validation rules. Here are some example validation rules:

* The Username field is required.
* The Us","form validation,required field,validation rules",en,
GettingStarted:delegate_classes,80,"Delegate Classes","==Delegate Classes==

Use Delegate classes to add permissions, custom serialization, display filters, calculated fields, import/export functionality, and other custom functionality to your application.

For many applications, the configuration files p","delegate classes,getTitle,getPermissions",en,
GettingStarted:triggers,81,Triggers,"==Triggers==

Triggers are methods that can be defined to carry out custom behaviors when certain events occur in the application (e.g., when records are saved, inserted, or deleted).

Triggers are generally regarded as one of the more advanced featur","triggers, beforeSave, afterSave, beforeInsert, afterInsert,sending email",en,
Creating_Printable_Reports,82,"Creating a Custom Printable Report","==Creating a Printable Report==

[[toc]]

It is often useful to provide your users with a printable report that is generated from your database.  Although Xataface doesn't include an explicit reporting module to allow the end users to create their own",,en,
Key,83,"fields.ini Directive: Key","The '''Key''' directive is used only when the table is a view and you need to explicitly define which columns are part of the primary key.  For example, if we created a view on the books table to only show books in a given year as follows:
<code>
create","Key, Views, MySQL Views, Create View, PRI, Primary Keys",en,
http://xataface.com/documentation/how-to/site_with_backoffice_How_to_build_a_site_with_a_backoffice_,84,"A site with a backoffice","==A site with a backoffice==
To create a site with a backoffice for the administrator, so that the visitors do not have to log in to read the pages, you add this code in the ApplicationDelegate.php file in the conf directory :
<code>

function getPerm",,en,
http://xataface.com/documentation/how-to/site_with_backoffice,85,"How to build a site with an optional login form","==How to build a site with an optional login form==
To publish a public site with data without any need to login to access, here is the code :
<code>
function getPermissions(&$record){
    if ( isAdmin() ) return Dataface_PermissionsTool::ALL();
    ",,en,
site_with_backoffice,86,,"==How to build a site with an optional login form==
To publish a public site with data without any need to login to access, here is the code :
<code>
function getPermissions(&$record){
    if ( isAdmin() ) return Dataface_PermissionsTool::ALL();
    ",,en,
sql_delegate_method,87,"__sql__ Delegate Method","return to [[Delegate class methods]]

===Synopsis===

The __sql__ delegate class method can be defined in any delegate class to specify the SQL query that should be used to fetch records for a given table.  This method overrides the [[__sql__]] direct","__sql__, SQL queries, delegate class",en,
secure,88,"secure fields.ini directive","[[fields.ini file]] directive used only with [[container fields]].  If this flag is set, then the field contents will be treated in a secure manner and will obey the application permissions.  If this directive is not set, then uploaded files in [[containe","secure,fields.ini file",en,
file,89,,"==Dynamic select boxes==

To create two select boxes whose one is dependent (slave) of the other (master), we need to use some javascript with Jason.

Create the valuelists.ini:
<code>

;valuelist for the slave
[slaves_list]
__sql__ = ""select sla",,en,
Dynamic_select_boxes,90,,"==Dynamic select boxes==

To create two select boxes whose one is dependent (slave) of the other (master), we need to use some javascript with Jason.

Create the valuelists.ini:
<code>

;valuelist for the slave
[slaves_list]
__sql__ = ""select sla",,en,
setSecurityFilters,91,"setSecurityFilter() method","== Example ==

In the delegate class for the users table:

<code>
<?php
class tables_users {
    function init(&$table){
        if ( !isAdmin() ){
            $table->setSecurityFilter(array('group_id'=>10));
        }
    }
}
</code>

Thi",,en,
Authenticating_Against_the_PHPBB_Users_table,92,"Authenticating Against the PHPBB Users Table","Return to [[authentication]]

[[toc]]

Xataface is able to use the PHPBB users table to authenticate against so that, you can allow your users to log into your Xataface application using the same credentials as they use to access your PHPBB message fo","PHPBB, authentication, security, authentication modules",en,
Authenticating_Against_the_Joomla!_Users_Table,93,,"Xataface is able to use the joomla users table to authenticate against so that, you can allow your users to log into your Xataface application using the same credentials as they use to access your joomla website. Achieving this level of integration requir","joomla authentication md5",en,
fieldname__validate,94,"fieldname__validate Delegate Class Method","Return to [[Delegate class methods]]

[[toc]]

===Synopsis===

Xataface allows you to add validation on any particular field in table by adding a fieldname__validate method to the table's delegate class of the form:
<code>
function myfield__valida","validate, validation, delegate class validation, custom validator",en,
validators,95,"validators:NAME fields.ini directive","Return to [[fields.ini file]]

[[toc]]

===Synopsis===

In the fields.ini file you can specify validation rules to be applied to any field by adding the validators:NAME directive in that field's section of the [[fields.ini file]].

===Available Va","validation, form validation, validators,validator:name",en,
validators:VALIDATOR_NAME:message,96,"validators:VALIDATOR_NAME:message directive for the fields.ini file","Return to [[fields.ini file]]

[[toc]]

===Synopsis===

If you want to customize the error message associated with a particular [[validator|validation rule]] you can use the validators:VALIDATOR_NAME:message directive in the fields.ini file.

===F","validation messages,error messages,form validation rules",en,
_auth,97,"_auth section of the conf.ini file","[[conf.ini file|Return to conf.ini file]]

[[toc]]

===Synopsis===

The ''_auth'' section of the conf.ini file includes configuration directives to enable authentication in a Xataface application.  For more information about authentication and regis","_auth,authentication,conf.ini file,allow_register",en,
registration_form,98,"Setting up User Registration","[[toc]]

===Synopsis===

Xataface optionally enables you to allow users to register for an account in your application.  If your ''users'' table includes a column for email, it will also perform email validation before the account is activated.  Befor","registration form, _auth, authentication",en,
reCAPTCHA_module,99,"The reCAPTCHA module","[[toc]]

===Synopsis===

The Xataface reCAPTCHA module CAPTCHA support to any Xataface form that is rendered to the public (i.e. when users are not logged in).  This is particularly useful for the [[registration form]] as a means of spam prevention.  ","captcha, registration, validation",en,
calendar,100,"Calendar Widget","Back to [[widget:type]]

[[toc]]

===Synopsis===

The calendar widget is the default widget for editing date and datetime fields.  It is javascript pop-up calendar that allows users to select date and time visually.  It can be configured to allow di","calendar widget, fields.ini file, widget:type",en,
Introduction_to_the_Xataface_API,101,"Introduction to the Xataface API","Back to [http://xataface.com/wiki the wiki]

[[toc]]

===Synopsis===

Xataface is provides an API to help in developing your own custom actions.  This API includes objects and functions to more easily interact with the database (i.e. search, edit, d","xataface api, df_get_record, df_get_records_array, Dataface_Record, Editing, Saving, Loading, Searching",en,
before_authenticate,102,"before_authenticate hook","Return to [[Application Delegate Class]]

The '''before_authenticate''' hook is a method that can be defined in the [[Application Delegate Class]] which is called before the authentication step occurs on '''every''' request (not just on login).  It is m",authentication,en,
Customizing_Theme_Based_on_IP_Address,103,"Customizing Theme Based on IP Address","This article deals with the following topics:

# Using [[field__pullValue]]/[[field__pushValue]] methods to customize how a field is edited and stored in the database.
# Using [[beforeHandleRequest]] to modify the application settings based on the user","ip address, pullValue, pushValue, beforeHandleRequest",en,
field__pullValue,104,"field__pullValue delegate class method","[[toc]]

The field__pullValue() delegate class method can be used to transform database from the database for use in an edit/new record form.  Sometimes it is the case that we want users to be able to work with data differently than it is stored in the ","pushValue, pullValue",en,
field__pushValue,105,,"[[toc]]

The field__pushValue() delegate class method can be used to transform a field value as entered in the edit form into a format that can be stored in the database..  Sometimes it is the case that we want users to be able to work with data differe","pullValue, pushValue",en,
__global__,106,"__global__ section for the fields.ini file","Return to [[fields.ini file]]

[[toc]]

===Synopsis===

The fields.ini file supports a __global__ section that applies to all fields in the current table.  This is particularly useful for setting up default functionality that you wish to see on all ","__global__, fields.ini, visibility:list",en,
beforeHandleRequest,107,"beforeHandleRequest Application Delegate Class Method","Return to [[Application Delegate Class]]

[[toc]]

===Synopsis===

The beforeHandleRequest method is a very useful hook that can be implemented in an [[Application Delegate Class]] to perform some processing before every request.  

This hook is c","beforeHandleRequest, Application Delegate",en,
beforeAddRelatedRecord,108,"beforeAddRelatedRecord Delegate Class Method","Return to [[Delegate class methods]]

[[toc]]

==Synopsis==

The ''beforeAddRelatedRecord'' delegate class method can be implemented in any table's delegate class.  It will be executed before any related record is added to that table's relationships","beforeAddRelatedRecord, Delegate class methods, relationship triggers",en,
beforeSave,109,"beforeSave Trigger","Back to [[Delegate class methods]]

[[toc]]



===Synopsis===

The beforeSave trigger can be implemented in any table's [[delegate class|Delegate Class Methods]] to perform functionality that should be run *before* a record of that table is saved.","triggers, beforeSave,",en,
Contribute_to_Xataface_Translation_Project,110,"How to Contribute Translations","[[toc]]

==Synopsis==

Xataface stores its translations in INI files in its lang directory, one for each language.  You can develop your own translation by first copying the en.ini file to xx.ini (where xx is the ISO language code for the language you","Translations, Google Spreadsheets, en.ini, fr.ini",en,
Relationship_Permissions,111,"Relationship Permissions","[[toc]]

==Synopsis==

As relationships are a core feature of Xataface, it is helpful to understand how to handle permissions on related records.  Even if you apply permissions to every table individually, you need to take into account the relationshi","relationships, permissions, rel_relationshipname__permissions, getPermissions, permissions.ini",en,
Module_Developers_Guide,112,"Module Developers Guide","[[toc]]

==Why Write a Xataface Module?==

Xataface modules are components that can be used to extend Xataface's functionality in a generic way so that it can be used on multiple applications.  If you find yourself trying to add the same functionality",modules,en,
XataJax,113,"Introduction to XataJax","[[toc]]

Xataface 1.3 comes with a new module [[XataJax]] which comes installed standard.  [[XataJax]] serves as a foundation for Javascript/AJAX powered Xataface applications and will hopefully usher in a new fresh generation of Xataface powered applic","XataJax, Ajax, Web 2.0",en,
XataJax_Compiler,114,"Introduction to the XataJax Compiler","Return to [[XataJax]]

'''DISCLAIMER''': This page introduces features that require Xataface 1.3 or higher.  At present (Jan. 2011) only Xataface 1.2.6 has been released to the public.

[[toc]]

===Synopsis===

The XataJax compiler is a Javascript","XataJax, compiler, javascript, css, compiler",en,
Using_RecordGrid,115,"Using RecordGrid","==Xataface RecordGrid Class and Template==

Also see [http://lamp.weblite.ca/dataface-0.6/docs/index.php?-table=Classes&-action=browse&ClassID=30| RecordGrid in the API Doc].


[[toc collapse=0]]

===Introduction===
As we learned in '''[http://xat","RecordGrid, Dataface_RecordGrid, data in tabular form",en,
getPasswordChangedEmailInfo,121,"getPasswordChangedEmailInfo Application Delegate Class Method","Return to [[Application Delegate Class]]

[[toc]]

===Synopsis===

Optional method to define the settings for the email that is sent to the user upon successful resetting of their password using the password reset function. 

Introduced in Xatafac","forgot password, reset password",en,
getResetPasswordEmailInfo,122,"getResetPasswordEmailInfo Application Delegate Class Method","Return to [[Application Delegate Class]]

[[toc]]

===Synopsis===

Optional method to define the settings for the email that is sent to the user when they request to reset their password.

Introduced in Xataface 1.3.  Exists in 1.3 or higher.

","forgot password, reset password",en,
afterCopy,123,"afterCopy Delegate class Method","Return to [[Delegate class methods]]

[[toc]]

===Synopsis===

A delegate class method that will be executed after a record is copied using the copy set or copy selected function.  All xataface copies are shallow which means that related records are","afterCopy, copy record hook",en,
beforeCopy,124,"beforeCopy Delegate Class Method","Return to [[Delegate class methods]]

[[toc]]

===Synopsis===

A delegate class method that will be executed before a record is copied using the copy set or copy selected function.  All xataface copies are shallow which means that related records ar","beforeCopy, copy records",en,
getNavItem,125,"getNavItem Application Delegate Class Method","Return to [[Application Delegate Class]]

[[toc]]

===Synopsis===

The getNavItem() method of the application delegate class can be used to override the items that appear in the navigation menu (i.e. the menu that allows users to select the table vi","getNavItem, navigation menu",en,
getChildren,126,"getChildren Delegate Class Method","Return to [[Delegate class methods]]

[[toc]]

The getChildren() method can be implemented in a table's delegate class to specify the logical ""child"" records of a given record which can be used when creating hierarchical applications.  This method wil","getChildren Delegate class method",en,
meta:class,127,"meta:class relationships.ini file directive","Return to [[relationships.ini file]]

[[toc]]

The ''meta:class'' directive allows you to ascribe special meaning to a relationship which Xataface can use in various parts of your application to provide enhanced capabilities.

For example you can sp",,en,
list:type,128,"list:type relationships.ini file directive","Return to [[relationships.ini file]]

[[toc]]

The list:type directive allows you to override the default list that is used to display related records.  As of Xataface 1.3 there is only one possible value that will have any effect on this directive: """,,en,
fieldname__default,133,"fieldname__default Delegate Class Method","Return to [[Delegate class methods]]

[[toc]]

===Synopsis===

Xataface allows you to pre-populate any particular field in a table by adding a fieldname__default method to the table's delegate class of the form:
<code>
function fieldname__default(","default, initialize, populate, pre-populate, delegate class default",en,
init,140,"init() Delegate Class Method","== Synopsis ==

This method is called once, just after the table is loaded for the first time. It allows you to specify initialization details, such as [[setSecurityFilters|security filters]].

Note that it takes a single parameter: a Dataface_Table o",,en,
field__fieldname,141,"Defining Calculated Fields","Return to [[Delegate class methods]]

Xataface allows you to define calculated fields using the delegate class.  These fields won't be visible in the UI by default, but they will be accessible to some modules (e.g. the HTML Reports Module) and they are ","calculated fields, field__fieldname",en,
Grafted_fields,158,"Grafted fields","==Grafted Fields==

===Introduction===
When there are numerous tables, it is difficult for the user to see get an information that will help one to enter the right data in the right field. So instead of navigating in the relative tables and lose some t","grafted fields, grafted, sorting columns, sort, relative records, relative tables",en,
test_page_34,177,"Hello World","Hello world",,en,
Clean_the_html_for_the_export,178,"Clean the HTML to export data","==Clean HTML tags and entities to export your data==
#Override the display() of the field to strip the tags... but this would affect all parts of the application where the HTML fields are displayed.
#Create a grafted field, then override its display to ",,en,
Cached_permissions,179,"Cached Permissions","==Cached Permissions==

===Introduction===
When you insert a SQL query in your getPermissions function, this will slow down the app dramatically because this function is called by each query. To resolve this problem, it is better to use cached permissi","permissions, cache, quick, query",en,
viewable_editable_fields,180,"How to make a field editable for some users and only viewable for some other users","If we want only some users to edit a field and some other users only to view that field, then we need to define a '''fieldX__permissions()''' method for that field which gives desired permissions for specific users.

One solution is as below.

==permi",,en,
after_action_activate,181,"after_action_activate Delegate Class Method","Return to [[Application Delegate Class]]

[[toc]]


The '''after_action_activate''' hook is a method that can be defined in the [[Application Delegate Class]] which is called after an account has been activated via the registration process.  The full","Registration, activation, register, activate, users",en,
column:legend,182,,,,en,
advmultiselect,183,,,,en,
loginFailed,184,"loginFailed() Application Delegate Trigger","[[toc]]

The loginFailed() method of the Application Delegate class is executed after a failed login attempt.

'''Available since 2.0.1'''

==Example==

<code>
function loginFailed($username, $userIp, $time){
    error_log(""Failed login for user","login permissions failed password",en,
