by javier | Mar 2, 2022 | Magic Files
In the hooks/footer-extras.php file, add this code: <script> $j(function() { // change ‘tablename’ below to the name of the concerned table if(location.href.match(/tablename/) == null) return; // change the number ‘4’ below to the index...
by javier | Feb 28, 2022 | Magic Files
In many scenarios, you may find it useful to apply an initial filter on one or more of your application tables. This is very easy to achieve using the tablename_init hook. The idea is to check whether your table has any filters applied to it, and if none is applied,...
by javier | Feb 24, 2022 | Magic Files
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 if(!$fp = @fopen($logFile,...
by javier | Feb 24, 2022 | Magic Files
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 | Feb 24, 2022 | Magic Files
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 | Feb 24, 2022 | Magic Files
Q: How do I link to a specific record in one of the AppGini-generated tables? Sometime, I want to send someone a link to one of the records in a table. I don’t want him to have to view all records first and then select one of them. I just want him to view the...
Recent Comments