You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/advanced-topics/custom-limited-access-pages.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,7 @@ First of all, let's create a new file in the 'hooks' folder inside your AppGini-
35
35
include("$hooks_dir/../lib.php");
36
36
```
37
37
38
-
The above code allows you to use the functions provided by AppGini in your custom page, including the function [getMemberInfo()](/appgini/help/working-with-generated-web-database-application/hooks/memberInfo) which you can use for checking permissions. Let's see how to implement each of the above access methods.
38
+
The above code allows you to use the functions provided by AppGini in your custom page, including the function [getMemberInfo()](/appgini/help/advanced-topics/hooks/memberInfo-array/) which you can use for checking permissions. Let's see how to implement each of the above access methods.
39
39
40
40
#### Grant access to one or more groups
41
41
@@ -129,7 +129,7 @@ After controlling access to your custom page, the next step is to customize its
129
129
130
130
#### Link to the page from other pages
131
131
132
-
Finally, you want users to be able to easily reach your page. AppGini makes it easy to add links to the homepage and/or to the navigation menu. To do so, all you need to do is [add a few lines to the "hooks/links-home.php" and/or "hooks/links-navmenu.php" files](/appgini/help/advanced-topics/hooks/folder-contents).
132
+
Finally, you want users to be able to easily reach your page. AppGini makes it easy to add links to the homepage and/or to the navigation menu. To do so, all you need to do is [add a few lines to the "hooks/links-home.php" and/or "hooks/links-navmenu.php" files](/appgini/help/advanced-topics/hooks/folder-contents/).
133
133
134
134
> **Tip!** If you plan to add many custom pages to your application, it might not be very practical to place links to all of them directly into the navigation menu or the homepage. A more organized approach in this case is to create a page listing the custom links and add a link to that page rather than to each custom page.
The `DataList` object exposes many options that you can control to affect the behavior and appearance of each of the AppGini-generated table pages that users see.
12
12
13
-
`DataList` object is passed to the [`tablename_init`](/appgini/help/advanced-topics/hooks/table-specific-hooks#tablename_init) hook function. This hook function is called before displaying data to users. So, you can control the various appearance and behavior options by modifying this object inside that hook function.
13
+
`DataList` object is passed to the [`tablename_init`](/appgini/help/advanced-topics/hooks/table-specific-hooks/#tablename_init) hook function. This hook function is called before displaying data to users. So, you can control the various appearance and behavior options by modifying this object inside that hook function.
14
14
15
15
## Here is a list of the editable properties of the `DataList` object
Copy file name to clipboardExpand all lines: pages/advanced-topics/hooks/folder-contents.md
+2-2
Original file line number
Diff line number
Diff line change
@@ -14,10 +14,10 @@ The hooks folder is where all your custom-defined code should be placed. AppGini
14
14
15
15
## This folder contains the following files:
16
16
17
-
***\_\_global.php**: This file contains hook functions that get called when a new member signs up, when a member signs in successfully and when a member fails to sign in. [_More info ..._](/appgini/help/advanced-topics/hooks/global-hooks)
17
+
***\_\_global.php**: This file contains hook functions that get called when a new member signs up, when a member signs in successfully and when a member fails to sign in. [_More info ..._](/appgini/help/advanced-topics/hooks/global-hooks/)
18
18
19
19
20
-
***_tablename_.php**: For each table in your project, a hook file named the same as the table name is created. This file contains hook functions that get called when a new record is added, when a record is edited, when a record is deleted, … etc. These hooks are table-specific. That's why each table in your project has its own hook file. [_More info ..._](/appgini/help/advanced-topics/hooks/table-specific-hooks)
20
+
***_tablename_.php**: For each table in your project, a hook file named the same as the table name is created. This file contains hook functions that get called when a new record is added, when a record is edited, when a record is deleted, … etc. These hooks are table-specific. That's why each table in your project has its own hook file. [_More info ..._](/appgini/help/advanced-topics/hooks/table-specific-hooks/)
21
21
22
22
23
23
***index.html**: This file should not be edited. It just redirects visitors who try to access the hooks folder to the main page.
Copy file name to clipboardExpand all lines: pages/advanced-topics/hooks/global-hooks.md
+3-3
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ function login_ok($memberInfo, &$args) {
31
31
32
32
### Parameters:
33
33
34
-
*`$memberInfo` is an array containing details of the member who signed in. Please refer to [`memberInfo`](/appgini/help/advanced-topics/hooks/memberInfo-array) for more details.
34
+
*`$memberInfo` is an array containing details of the member who signed in. Please refer to [`memberInfo`](/appgini/help/advanced-topics/hooks/memberInfo-array/) for more details.
35
35
*`$args` is currently not implemented but is reserved for future use.
36
36
37
37
@@ -133,7 +133,7 @@ function member_activity($memberInfo, $activity, &$args){
133
133
134
134
### Parameters:
135
135
136
-
*`$memberInfo` is an associative array containing details of the member who signed up. Please refer to [`memberInfo`](/appgini/help/advanced-topics/hooks/memberInfo-array) for more details.
136
+
*`$memberInfo` is an associative array containing details of the member who signed up. Please refer to [`memberInfo`](/appgini/help/advanced-topics/hooks/memberInfo-array/) for more details.
137
137
*`$activity` is a string indicating the type of activity. It can be one of the following values:
138
138
*`pending`: the member signed up but his account is pending approval by the admin.
139
139
*`automatic`: the member signed up and his account is automatically approved.
@@ -212,7 +212,7 @@ None.
212
212
## `child_records_config()`
213
213
214
214
This hook function was added in AppGini 22.14, and can be used to modify the default configuration of
215
-
the [child records section in the detail view](/appgini/help/working-with-projects/understanding-lookup-fields#parent-children-settings).
215
+
the [child records section in the detail view](/appgini/help/working-with-projects/understanding-lookup-fields/#parent-children-settings).
216
216
217
217
If you open the generated `hooks/__global.php` file in a text editor, you can see this function defined as follows:
Copy file name to clipboardExpand all lines: pages/advanced-topics/hooks/magic-files.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ Line 1 in the code above makes sure this code won't be executed until the page c
34
34
35
35
If you create a file in the hooks folder and name it `tablename-tv.js` (where *`tablename`* is the name of a table in your application), AppGini will automatically load that file and execute it as a JavaScript file in the browser whenever the specified table is displayed. This is very useful to modify the page content/layout or add custom behavior.
36
36
37
-
For an example of how this can be used to add new batch actions, please see the [`batch_actions()` hook documentation](/appgini/help/advanced-topics/hooks/multiple-record-batch-actions).
37
+
For an example of how this can be used to add new batch actions, please see the [`batch_actions()` hook documentation](/appgini/help/advanced-topics/hooks/multiple-record-batch-actions/).
38
38
39
39
Please note that despite the `-tv` suffix, this file is always loaded when the specific table is being viewed, whether the table view is being displayed or not. If you want to execute code *only if* the table view is visible, you can perform this check in the `tablename-tv.js` file:
*`IP`: the IP address from where the member is currently logged.
19
19
*`custom`: a numeric array containing the values of custom fields for the member. Custom fields can be defined via the admin settings page in the admin area of your AppGini application. Currently up to 4 custom fields are supported. So, to access the value of the first custom field for the member, you can use `$memberInfo['custom'][0]`.
20
20
21
-
The `$memberInfo` array is passed to many hook functions, both [global](/appgini/help/advanced-topics/hooks/global-hooks) and [table-specific](/appgini/help/advanced-topics/hooks/table-specific-hooks). For example, you can access the username of the currently logged member in a hook function by using `$memberInfo['username']`.
21
+
The `$memberInfo` array is passed to many hook functions, both [global](/appgini/help/advanced-topics/hooks/global-hooks/) and [table-specific](/appgini/help/advanced-topics/hooks/table-specific-hooks/). For example, you can access the username of the currently logged member in a hook function by using `$memberInfo['username']`.
22
22
23
23
> **Tip:** You can retrieve this array in your own code by calling the function `getMemberInfo()`, which returns this array.
0 commit comments