by javier | Nov 13, 2020 | Look & Feel, Table Hook Modifications
Integrate the page appearance into your AppGini application After controlling access to your custom page, the next step is to customize its appearance so that it matches the rest of the application pages. This can be very easily achieved by including the header and...
by javier | Nov 13, 2020 | Look & Feel, Table Hook Modifications
links-home.php: You can add custom links in the home page of your application by appending them to this file. The format for each link is: $homeLinks[] = array( ‘url’ => ‘path/to/link’, ‘title’ => ‘Link...
by javier | Nov 13, 2020 | Table Hook Modifications
This example sends a welcome email to new users who were automatically approved, and a ‘please wait’ email for new users pending approval. This hook function is called when a new member signs up. If you open the generated hooks/__global.php file in a text...
by javier | Nov 13, 2020 | Table Hook Modifications
The following example checks that the logged user belongs to the admin group and accordingly allows CSV downloading of records. If the user is not a member of the admin group, CSV downloads are disabled. On the hooks folder look for the tablename.php function...
by javier | Nov 13, 2020 | Table Hook Modifications
In this example, let’s assume that our table contains the fields: unit_price, quantity and total. We want to automatically calculate the value of the total field by multiplying quantity and unit_price. Open the tablename.php on your hooks folder. function...
by javier | Nov 13, 2020 | Table Hook Modifications
The following example sends a notification email to an employee when a user submits a new record. The email contains the record data. function tablename_after_insert($data, $memberInfo, &$args){ // to compose a message containing the submitted data, //...
by javier | Nov 13, 2020 | Table Hook Modifications
Let’s say we have an orders table. When a user makes changes to a record and saves them, we want to automatically calculate the value of the total field using the fields subtotal, discount and sales_tax, where discount and sales_tax are stored as percentages...
by javier | Nov 13, 2020 | Table Hook Modifications
Let’s say that we want to prevent updates to any records in a particular table that are older than 30 days. To do so, we would customize the tablename_before_update() hooks like this: function tablename_before_update(&$data, $memberInfo, &$args){ ...
by javier | Nov 13, 2020 | Table Hook Modifications
In this example, we’ll assume that our table contains a checkbox field named approved. We want to allow deleting of the record only if that field is not checked (set to 0). If the field is checked (set to 1), it won’t be deleted unless the user is a member...
by javier | Nov 13, 2020 | Table Hook Modifications
This example logs the date and time a record was deleted and who deleted it. function tablename_after_delete($selectedID, $memberInfo, &$args){ // log file $logFile=’deletes.log’; // attempt to open the log file for appending...
Recent Comments