From 6d4d9cf41e8004a3d32e370a0c6c8c98c2c2d857 Mon Sep 17 00:00:00 2001 From: Chuck Scott Date: Thu, 21 Jan 2016 15:15:46 -0500 Subject: [PATCH] Added filters to include content from add-ons in member listings and detail pages --- classes/glmPluginSupport.php | 1 - controllers/admin.php | 3 - glm-member-db.php | 6 +- models/admin/ajax/imageUpload.php | 1 - setup/adminHooks.php | 18 + setup/hooksHelp.html | 673 ++++++++++++++++++++++++++++++ views/admin/management/hooks.html | 415 +----------------- views/front/members/detail.html | 228 +++++----- views/front/members/list.html | 77 ++-- 9 files changed, 872 insertions(+), 550 deletions(-) create mode 100644 setup/hooksHelp.html diff --git a/classes/glmPluginSupport.php b/classes/glmPluginSupport.php index 9bf0d45d..5161382a 100644 --- a/classes/glmPluginSupport.php +++ b/classes/glmPluginSupport.php @@ -60,7 +60,6 @@ class GlmPluginSupport $dataBlocks = get_option('glmMembersAdminNoticeDataBlocks'); $dataBlocks[] = array('data' => $message, 'title' => $title); update_option('glmMembersAdminNoticeDataBlocks', $dataBlocks); - break; case 'AdminNotice': diff --git a/controllers/admin.php b/controllers/admin.php index 7c1f0103..f32a4b33 100644 --- a/controllers/admin.php +++ b/controllers/admin.php @@ -843,9 +843,6 @@ class glmMembersAdmin extends GlmPluginSupport glmMembersAdmin::addNotice($x, 'DataBlock', 'Template Parameters'); } - $templateVars = '
' . print_r($x, 1) . '
'; - glmMembersAdmin::addNotice($templateVars, 'Template Parameters', 'Process'); - } // Generate output from model data and view diff --git a/glm-member-db.php b/glm-member-db.php index 4d6aacaa..50fd72ad 100644 --- a/glm-member-db.php +++ b/glm-member-db.php @@ -432,7 +432,7 @@ function glmMembersAdminNotices($windowed = true) // If windowed for debug, also include HTML header and stylesheet if ($windowed) { - $output .= ' + $output .= ' @@ -541,7 +541,7 @@ function glmMembersStartupNotices() { echo '

'.GLM_MEMBERS_PLUGIN_NAME.' Plugin Warning

'.$startupNotices.'

'; } if ($startupNotices != '') { - //add_action('admin_notices','glmMembersStartupNotices'); + add_action('admin_notices','glmMembersStartupNotices'); } /* @@ -566,7 +566,7 @@ if (is_admin() && $notices) { */ if (!GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) { delete_option('glmMembersAdminNoticeAlerts'); -// delete_option('glmMembersAdminNotices'); + delete_option('glmMembersAdminNotices'); delete_option('glmMembersAdminNoticeProcess'); delete_option('glmMembersAdminNoticeDataBlocks'); } diff --git a/models/admin/ajax/imageUpload.php b/models/admin/ajax/imageUpload.php index f5978478..35c6e251 100644 --- a/models/admin/ajax/imageUpload.php +++ b/models/admin/ajax/imageUpload.php @@ -283,4 +283,3 @@ class GlmMembersAdmin_ajax_imageUpload extends GlmDataImages } } -?> diff --git a/setup/adminHooks.php b/setup/adminHooks.php index 1c005073..8eb9333e 100644 --- a/setup/adminHooks.php +++ b/setup/adminHooks.php @@ -26,4 +26,22 @@ * Also note that parameters will be in the context of the main admin controller constructor. */ + +// Add content to member detail page +add_filter('glm-member-db-admin-management-hoooksHelp', function($content) { + + // Read in this plugin/addon hook help file + $fname = GLM_MEMBERS_PLUGIN_PATH.'/setup/hooksHelp.html'; + if (is_file($fname)) { + $hooksHelp = file_get_contents($fname); + if ($hooksHelp != false) { + $content .= $hooksHelp; + } + } + return $content; + }, + 10, + 2 +); + ?> \ No newline at end of file diff --git a/setup/hooksHelp.html b/setup/hooksHelp.html new file mode 100644 index 00000000..42d21ab3 --- /dev/null +++ b/setup/hooksHelp.html @@ -0,0 +1,673 @@ + + +

Main Member DB Plugin

+ + Add-On Registration Hooks + + glm-member-db-register-addon + Filter + + + Informs the GLM Meembers DB plugin of an installed add-on plugin. Information + on the plugin is provided in an array that's returned from the function + referenced in the add_filer() call. +

+ The data compiled from all registered add-on plugins is stored in the $config + object for reference throughout this plugin. +

+ An example from the registration of + the Contacts add-on is below. +

+
+function glmMembersRegisterContacts($addOns) { + $addOns[GLM_MEMBERS_CONTACTS_PLUGIN_SLUG] = array( + 'dir' => GLM_MEMBERS_CONTACTS_PLUGIN_PATH, + 'name' => GLM_MEMBERS_CONTACTS_PLUGIN_NAME, + 'short_name' => GLM_MEMBERS_CONTACTS_PLUGIN_SHORT_NAME + ); + return $addOns; +} +add_filter('glm-member-db-register-addon','glmMembersRegisterContacts', 10, 1); +
+ + + + glm-member-db-add-menu + Action + + + Hook to add a menu or menus (or sub-menus) to the GLM Member DB menus. Note that + you may have only menu items and sub-menu items under a main menu item, or in other + words, only 3 levels of menus. +
+// This call will generally be in the constructor of the admin controller in the add-on plugin +add_action('glm-member-db-add-menu', array($this, 'glmMembersAddMenusContacts')); + +// The following two functions would be located elsewhere of the admin controller class. +public function glmMembersAddMenusContacts() +{ + // Add hooks to WordPress + add_action('admin_menu', array($this, 'configureMenus')); +} +public function configureMenus () +{ + // A test menu + add_submenu_page( + 'glm-members-admin-menu-members', + 'Contacts', + 'Contacts', + 'glm_members_edit', + 'glm-members-admin-menu-contacts', + array($this, 'glmMembersAdminMenuContacts') + ); +} +
+

+ Note that in the example above that the function references are as they as + would be used when contained in a class and being called from another + method--such as '_constructor()'. This will likely be the case since the + add_action() call will generally be located in the constructor of the + add-on's admin controller and the the function called by that will be + a function in the same class. +

+

+ Current list of standard GLM Member DB menu items. +

+ + + + + + + + + + + + + + +
MenulevelSlug
Member DBMain Menuglm-members-admin-menu-members
MembersSub-Menu(same as Member DB main menu item)
MembersSub-Menuglm-members-admin-menu-members
Member ListSub-Sub-Menuglm-members-admin-menu-members-list
MemberSub-Menuglm-members-admin-menu-member
ConfigureSub-Menuglm-members-admin-menu-configure
ManagementSub-Menuglm-members-admin-menu-management
ShortcodesSub-Menuglm-members-admin-menu-shortcodes
+ + + + glm-member-db-add-tab-for-{menu_item} + Filter + + + Hook to add a tab or tabs to the header for pages in a particular page where + {menu_item} should be the name of the menu item (page) where + the tab(s) should be added. +

+ As shown in the example below, the $addOnTabs array that is passed is an array + of tab definition arrays wherein 'text' is the text displayed on the tab and + 'action' is the action that is to be performed when the tab is clicked. +

+
+// This call will generally be in the constructor of the admin controller in the add-on plugin +add_filter('glm-member-db-add-tab-for-members', array($this, 'glmMembersAddTabForMembers')); + +// The following two functions would be located elsewhere in the admin controller class. +public function glmMembersAddTabForMembers($addOnTabs) +{ + $newTabs = array( + array( + 'text' => 'New Tab', + 'action' => 'contact' + ), + array( + 'text' => 'Another Tab', + 'action' => 'anotherAction' + ) + ); + $addOnTabs = array_merge($addOnTabs, $newTabs); + return $addOnTabs; +} +
+

+ The tabs are generated from this array by the related header.html template + for the related menu item. +

+

+ Note that in the example above that the function references are as they as + would be used when contained in a class and being called from another + method--such as '_constructor()'. This will likely be the case since the + add_filter() call will generally be located in the constructor of the + add-on's admin controller and the the function called by that will be + a function in the same class. +

+ + + + User Permission Hooks + + + glm_members_current_logged_in_user + Filter + + + Hook requesting additional information on any currently logged in user. +

+ This hook is used to accumulate current user information before a controller + is executed. The current user information is stored in $config as 'loggedInUser' + so as to be available to all subsequent code. The data is stored as an array + and defaults to having one 'wpUser' sub-array. +

+

+ The code providing the data should return the supplied data even if it is not + contributing any additional user information. +

+

+ If the code is adding user information (i.e. the Contacts add-on adding information + on a "contact" user), it should probably supply the data in a separate sub-array + (i.e. 'contactUser'). In any case, it must still return the wpUser sub-array + data that was provided by the hook. +

+ + + + glm_members_locked_to_member_id + Filter + + + Hook requesting any member ID to which the current user might be restricted. +

+ The code providing the data should return the provided value if it has no member ID + it wishes to pass back, thus permitting this hook to be chained to more than one + possible source of a member ID to which the user should be restricted. For example, + a user might only have permissions to view or edit one member and therefore should + not have access to any others. +

+ + + + glm_members_menu_members + Filter + + + Hook to test if the logged in user is permitted to see the "Members" menu. +

+ This hook passes the hooked code a boolean saying whether the permission has + been withdrawn by previously hooked code. The default is true, so all hooked + code must pass true back to the hook for the permission to be granted. +

+ + + + glm_members_menu_member + Filter + + + Hook to test if the logged in user is permitted to see the "Member" menu. +

+ This hook passes the hooked code a boolean saying whether the permission has + been withdrawn by previously hooked code. The default is true, so all hooked + code must pass true back to the hook for the permission to be granted. +

+ + + + glm_members_menu_configure + Filter + + + Hook to test if the logged in user is permitted to see the "Configure" menu. +

+ This hook passes the hooked code a boolean saying whether the permission has + been withdrawn by previously hooked code. The default is true, so all hooked + code must pass true back to the hook for the permission to be granted. +

+ + + + glm_members_menu_management + Filter + + + Hook to test if the logged in user is permitted to see the "Management" menu. +

+ This hook passes the hooked code a boolean saying whether the permission has + been withdrawn by previously hooked code. The default is true, so all hooked + code must pass true back to the hook for the permission to be granted. +

+ + + + glm_members_menu_menu_shortcodes + Filter + + + Hook to test if the logged in user is permitted to see the "Shortcodes" menu. +

+ This hook passes the hooked code a boolean saying whether the permission has + been withdrawn by previously hooked code. The default is true, so all hooked + code must pass true back to the hook for the permission to be granted. +

+ + + + glm_members_permit_admin_members_index_add_member + Filter + + + Hook to test if the logged in user is permitted to add a new member on the + Members index page. + + + + glm_members_permit_admin_members_index_member_config_warning + Filter + + + Hook to test if the logged in user is permitted to show the user notices regarding + information managed under the "Configure" menu. + + + + glm_members_permit_admin_member_index_edit_member + Filter + + + Hook to test if the logged in user is permitted to edit member base data. + + + + glm_members_permit_admin_member_index_add_member_info_version + Filter + + + Hook to test if the logged in user is permitted to add a new member information + version on the Member index page. + + + + glm_members_permit_admin_member_index_view_member_info_version + Filter + + + Hook to test if the logged in user is permitted to view member infor versions. + + + + glm_members_permit_admin_member_index_clone_activate_info_version + Filter + + + Hook to test if the logged in user is permitted to Clone or Activate member + information versions on the Member index page. + + + + + + glm_members_permit_admin_widget_members + Filter + + + Hook to test if the logged in user is permitted to search members in the Dashboard Widget. + + + + glm_members_permit_admin_widget_warnings + Filter + + + Hook to test if the logged in user is permitted to see configuration and other members + warnings in the Dashboard Widget. + + + + glm_members_permit_admin_widget_pending_info + Filter + + + Hook to test if the logged in user is permitted to see a list of pending information + records for all members in the Dashboard Widget. + + + + glm_members_permit_admin_member_index_list_inactive_info + Filter + + + Hook to test if the logged in user is permitted to see a list of inactive member information. + + + + glm_members_permit_admin_member_info_edit + Filter + + + Hook to test if the logged in user is permitted to edit member information. + + + + glm_members_permit_admin_profile_index_edit_profile + Filter + + + Hook to test if the logged in user is permitted to edit their own profile. + + + + Front-End Output Hooks - Member List Page + + + glm-member-db-front-members-list-pageTop + Filter + + + + + + glm-member-db-front-members-list-mapTop + Filter + + + + + + glm-member-db-front-members-list-mapBottom + Filter + + + + + + glm-member-db-front-members-list-searchFormTop + Filter + + + + + + glm-member-db-front-members-list-searchFormBottom + Filter + + + + + + glm-member-db-front-members-list-listHeaderTop + Filter + + + + + + glm-member-db-front-members-list-listHeaderBottom + Filter + + + + + + glm-member-db-front-members-list-memberAbove + Filter + $memberID + + + + + glm-member-db-front-members-list-memberTop + Filter + $memberID + + + + + glm-member-db-front-members-list-memberInfoTop + Filter + $memberID + + + + + glm-member-db-front-members-list-memberAddressTop + Filter + $memberID + + + + + glm-member-db-front-members-list-memberInfoBottom + Filter + $memberID + + + + + glm-member-db-front-members-list-memberDetailTop + Filter + $memberID + + + + + glm-member-db-front-members-list-memberDetailBottom + Filter + $memberID + + + + + glm-member-db-front-members-list-memberDescriptionTop + Filter + $memberID + + + + + glm-member-db-front-members-list-memberDescriptionBottom + Filter + $memberID + + + + + glm-member-db-front-members-list-memberDataBelow + Filter + $memberID + + + + + glm-member-db-front-members-list-memberBottom + Filter + $memberID + + + + + glm-member-db-front-members-list-mapBubbleTop + Filter + $memberID + + + + + glm-member-db-front-members-list-mapBubbleBottom + Filter + $memberID + + + + + glm-member-db-front-members-list-memberBelow + Filter + $memberID + + + + + glm-member-db-front-members-list-pageBottom + Filter + + + + + + Front-End Output Hooks - Member Detail Page + + + glm-member-db-front-members-detail-pageTop + Filter + $memberID + + + + + glm-member-db-front-members-detail-addressTop + Filter + $memberID + + + + + glm-member-db-front-members-detail-addressBottom + Filter + $memberID + + + + + glm-member-db-front-members-detail-otherDetailTop + Filter + $memberID + + + + + glm-member-db-front-members-detail-otherDetailBottom + Filter + $memberID + + + + + glm-member-db-front-members-detail-linksTop + Filter + $memberID + + + + + glm-member-db-front-members-detail-linksBottom + Filter + $memberID + + + + + glm-member-db-front-members-detail-attributesTop + Filter + $memberID + + + + + glm-member-db-front-members-detail-attributesBottom + Filter + $memberID + + + + + glm-member-db-front-members-detail-descriptionTop + Filter + $memberID + + + + + glm-member-db-front-members-detail-descriptionBottom + Filter + $memberID + + + + + glm-member-db-front-members-detail-galleryTop + Filter + $memberID + + + + + glm-member-db-front-members-detail-galleryBottom + Filter + $memberID + + + + + glm-member-db-front-members-detail-pageBottom + Filter + $memberID + + + + + glm-member-db-front-members-detail-jqueryScriptTop + Filter + $memberID + + + + + glm-member-db-front-members-detail-jqueryScriptBottom + Filter + $memberID + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/views/admin/management/hooks.html b/views/admin/management/hooks.html index e3b059a1..4a09f9b6 100644 --- a/views/admin/management/hooks.html +++ b/views/admin/management/hooks.html @@ -1,418 +1,17 @@ {include file='admin/management/header.html'} -

Hooks Into GLM Member DB Reference

+

Hooks Into GLM Member DB - Reference

- Listed below are hooks into the GLM Member DB plugin. These hooks are used by - add-ons (child plugins) and by themes to extend and modify behavior and output - content of this plugin and its addons. + Listed below are hooks into the GLM Member DB plugin and Add-Ons. These hooks are used by + the main GLM Member DB plugin, GLM Member DB Add-Ons (child plugins), and by themes to + extend and modify behavior and output content of this plugin and its addons, including the + content on this page.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + {apply_filters('glm-member-db-admin-management-hoooksHelp', '')}
HookTypeDescription
glm-member-db-register-addonFilter - Informs the GLM Meembers DB plugin of an installed add-on plugin. Information - on the plugin is provided in an array that's returned from the function - referenced in the add_filer() call. -

f - The data compiled from all registered add-on plugins is stored in the $config - object for reference throughout this plugin. -

- An example from the registration of - the Contacts add-on is below. -

-
-function glmMembersRegisterContacts($addOns) { - $addOns[GLM_MEMBERS_CONTACTS_PLUGIN_SLUG] = array( - 'dir' => GLM_MEMBERS_CONTACTS_PLUGIN_PATH, - 'name' => GLM_MEMBERS_CONTACTS_PLUGIN_NAME, - 'short_name' => GLM_MEMBERS_CONTACTS_PLUGIN_SHORT_NAME - ); - return $addOns; -} -add_filter('glm-member-db-register-addon','glmMembersRegisterContacts', 10, 1); -
-
glm-member-db-add-menuAction - Hook to add a menu or menus (or sub-menus) to the GLM Member DB menus. Note that - you may have only menu items and sub-menu items under a main menu item, or in other - words, only 3 levels of menus. -
-// This call will generally be in the constructor of the admin controller in the add-on plugin -add_action('glm-member-db-add-menu', array($this, 'glmMembersAddMenusContacts')); - -// The following two functions would be located elsewhere of the admin controller class. -public function glmMembersAddMenusContacts() -{ - // Add hooks to WordPress - add_action('admin_menu', array($this, 'configureMenus')); -} -public function configureMenus () -{ - // A test menu - add_submenu_page( - 'glm-members-admin-menu-members', - 'Contacts', - 'Contacts', - 'glm_members_edit', - 'glm-members-admin-menu-contacts', - array($this, 'glmMembersAdminMenuContacts') - ); -} -
-

- Note that in the example above that the function references are as they as - would be used when contained in a class and being called from another - method--such as '_constructor()'. This will likely be the case since the - add_action() call will generally be located in the constructor of the - add-on's admin controller and the the function called by that will be - a function in the same class. -

-

- Current list of standard GLM Member DB menu items. -

- - - - - - - - - - - - - - -
MenulevelSlug
Member DBMain Menuglm-members-admin-menu-members
MembersSub-Menu(same as Member DB main menu item)
MembersSub-Menuglm-members-admin-menu-members
Member ListSub-Sub-Menuglm-members-admin-menu-members-list
MemberSub-Menuglm-members-admin-menu-member
ConfigureSub-Menuglm-members-admin-menu-configure
ManagementSub-Menuglm-members-admin-menu-management
ShortcodesSub-Menuglm-members-admin-menu-shortcodes
-
glm-member-db-add-tab-for-{literal}{menu_item}{/literal}Filter - Hook to add a tab or tabs to the header for pages in a particular page where - {literal}{menu_item}{/literal} should be the name of the menu item (page) where - the tab(s) should be added. -

- As shown in the example below, the $addOnTabs array that is passed is an array - of tab definition arrays wherein 'text' is the text displayed on the tab and - 'action' is the action that is to be performed when the tab is clicked. -

-
-// This call will generally be in the constructor of the admin controller in the add-on plugin -add_filter('glm-member-db-add-tab-for-members', array($this, 'glmMembersAddTabForMembers')); - -// The following two functions would be located elsewhere in the admin controller class. -public function glmMembersAddTabForMembers($addOnTabs) -{ - $newTabs = array( - array( - 'text' => 'New Tab', - 'action' => 'contact' - ), - array( - 'text' => 'Another Tab', - 'action' => 'anotherAction' - ) - ); - $addOnTabs = array_merge($addOnTabs, $newTabs); - return $addOnTabs; -} -
-

- The tabs are generated from this array by the related header.html template - for the related menu item. -

-

- Note that in the example above that the function references are as they as - would be used when contained in a class and being called from another - method--such as '_constructor()'. This will likely be the case since the - add_filter() call will generally be located in the constructor of the - add-on's admin controller and the the function called by that will be - a function in the same class. -

-
glm_members_current_logged_in_userFilter - Hook requesting additional information on any currently logged in user. -

- This hook is used to accumulate current user information before a controller - is executed. The current user information is stored in $config as 'loggedInUser' - so as to be available to all subsequent code. The data is stored as an array - and defaults to having one 'wpUser' sub-array. -

-

- The code providing the data should return the supplied data even if it is not - contributing any additional user information. -

-

- If the code is adding user information (i.e. the Contacts add-on adding information - on a "contact" user), it should probably supply the data in a separate sub-array - (i.e. 'contactUser'). In any case, it must still return the wpUser sub-array - data that was provided by the hook. -

-
glm_members_locked_to_member_idFilter - Hook requesting any member ID to which the current user might be restricted. -

- The code providing the data should return the provided value if it has no member ID - it wishes to pass back, thus permitting this hook to be chained to more than one - possible source of a member ID to which the user should be restricted. For example, - a user might only have permissions to view or edit one member and therefore should - not have access to any others. -

-
glm_members_menu_membersFilter - Hook to test if the logged in user is permitted to see the "Members" menu. -

- This hook passes the hooked code a boolean saying whether the permission has - been withdrawn by previously hooked code. The default is true, so all hooked - code must pass true back to the hook for the permission to be granted. -

-
glm_members_menu_memberFilter - Hook to test if the logged in user is permitted to see the "Member" menu. -

- This hook passes the hooked code a boolean saying whether the permission has - been withdrawn by previously hooked code. The default is true, so all hooked - code must pass true back to the hook for the permission to be granted. -

-
glm_members_menu_configureFilter - Hook to test if the logged in user is permitted to see the "Configure" menu. -

- This hook passes the hooked code a boolean saying whether the permission has - been withdrawn by previously hooked code. The default is true, so all hooked - code must pass true back to the hook for the permission to be granted. -

-
glm_members_menu_managementFilter - Hook to test if the logged in user is permitted to see the "Management" menu. -

- This hook passes the hooked code a boolean saying whether the permission has - been withdrawn by previously hooked code. The default is true, so all hooked - code must pass true back to the hook for the permission to be granted. -

-
glm_members_menu_menu_shortcodesFilter - Hook to test if the logged in user is permitted to see the "Shortcodes" menu. -

- This hook passes the hooked code a boolean saying whether the permission has - been withdrawn by previously hooked code. The default is true, so all hooked - code must pass true back to the hook for the permission to be granted. -

-
glm_members_permit_admin_members_index_add_memberFilter - Hook to test if the logged in user is permitted to add a new member on the - Members index page. -
glm_members_permit_admin_members_index_member_config_warningFilter - Hook to test if the logged in user is permitted to show the user notices regarding - information managed under the "Configure" menu. -
glm_members_permit_admin_member_index_edit_memberFilter - Hook to test if the logged in user is permitted to edit member base data. -
glm_members_permit_admin_member_index_add_member_info_versionFilter - Hook to test if the logged in user is permitted to add a new member information - version on the Member index page. -
glm_members_permit_admin_member_index_view_member_info_versionFilter - Hook to test if the logged in user is permitted to view member infor versions. -
glm_members_permit_admin_member_index_clone_activate_info_versionFilter - Hook to test if the logged in user is permitted to Clone or Activate member - information versions on the Member index page. -
glm_members_permit_admin_widget_membersFilter - Hook to test if the logged in user is permitted to search members in the Dashboard Widget. -
glm_members_permit_admin_widget_warningsFilter - Hook to test if the logged in user is permitted to see configuration and other members - warnings in the Dashboard Widget. -
glm_members_permit_admin_widget_pending_infoFilter - Hook to test if the logged in user is permitted to see a list of pending information - records for all members in the Dashboard Widget. -
glm_members_permit_admin_member_index_list_inactive_infoFilter - Hook to test if the logged in user is permitted to see a list of inactive member information. -
glm_members_permit_admin_member_info_editFilter - Hook to test if the logged in user is permitted to edit member information. -
glm_members_permit_admin_profile_index_edit_profileFilter - Hook to test if the logged in user is permitted to edit their own profile. -

Contacts Add-On

glm_members_permit_admin_member_contacts_tabFilter - Hook to test if the logged in user is permitted to see the member Contacts tab. -
glm_members_permit_admin_member_contacts_add_contactFilter - Hook to test if the logged in user is permitted to add a new contact. -
glm_members_permit_admin_member_contacts_view_contactFilter - Hook to test if the logged in user is permitted to view a contact. -
glm_members_permit_admin_member_contacts_edit_contactFilter - Hook to test if the logged in user is permitted to edit a contact. -

Packaging Add-On

glm_members_permit_admin_members_packages_tabFilter - Hook to test if the logged in user is permitted to see multi-member packaging tab. -
glm_members_permit_admin_members_packaging_add_packageFilter - Hook to test if the logged in user is permitted to add a new multi-member package. -
glm_members_permit_admin_members_packaging_edit_packageFilter - Hook to test if the logged in user is permitted to edit a multi-member package. -
glm_members_permit_admin_members_packages_tabFilter - Hook to test if the logged in user is permitted to see the member packaging tab. -
glm_members_permit_admin_member_packaging_add_packageFilter - Hook to test if the logged in user is permitted to add a new Member package. -
glm_members_permit_admin_member_packaging_edit_packageFilter - Hook to test if the logged in user is permitted to edit a member package. -
HookTypeAdded ParametersDescription
- - {include file='admin/footer.html'} - - - -'glm-member-db-add-tab-for-'.$menuItem, \ No newline at end of file diff --git a/views/front/members/detail.html b/views/front/members/detail.html index 625db674..aacf5fcb 100644 --- a/views/front/members/detail.html +++ b/views/front/members/detail.html @@ -1,5 +1,7 @@ {include file='front/members/header.html'} +{apply_filters('glm-member-db-front-members-detail-pageTop', '', $member.id)} + {if $haveMember} @@ -38,143 +40,155 @@ {/if} - +
-

- {$member.member} -

- {if $settings.detail_show_address} - {if $settings.detail_show_street} - {if $member.addr1}
{$member.addr1}
{/if} - {if $member.addr2}
{$member.addr2}
{/if} - {/if} - {if $settings.detail_show_citystatezip} - {if $member.city}{$member.city}{if $member.state.name}, {/if}{/if}{if $member.state.name}{$member.state.name}{/if}{if $member.zip} {$member.zip}{/if} - {/if} - {if $member.country.name && $settings.detail_show_country}
{$member.country.name}
{/if} - {/if} - {if $member.phone && $settings.detail_show_phone}
Phone: {$member.phone}
{/if} - {if $member.toll_free && $settings.detail_show_tollfree}
Toll Free: {$member.toll_free}
{/if} - {if $member.region && $settings.detail_show_region}

Region: {$member.region}

{/if} - - -
- {if $settings.detail_show_map} - {if $member.logo && $settings.detail_show_logo} -
- {else} -
- {/if} -
(map loads here)
-
- {/if} - {if $member.logo && $settings.detail_show_logo} -
- - +

+ {$member.member} +

+ {if $settings.detail_show_address} + {apply_filters('glm-member-db-front-members-detail-addressTop', '', $member.id)} + {if $settings.detail_show_street} + {if $member.addr1}
{$member.addr1}
{/if} + {if $member.addr2}
{$member.addr2}
{/if} + {/if} + {if $settings.detail_show_citystatezip} + {if $member.city}{$member.city}{if $member.state.name}, {/if}{/if}{if $member.state.name}{$member.state.name}{/if}{if $member.zip} {$member.zip}{/if} + {/if} + {if $member.country.name && $settings.detail_show_country}
{$member.country.name}
{/if} + {apply_filters('glm-member-db-front-members-detail-addressBottom', '', $member.id)} + {/if} + {apply_filters('glm-member-db-front-members-detail-otherDetailTop', '', $member.id)} + {if $member.phone && $settings.detail_show_phone}
Phone: {$member.phone}
{/if} + {if $member.toll_free && $settings.detail_show_tollfree}
Toll Free: {$member.toll_free}
{/if} + {if $member.region && $settings.detail_show_region}

Region: {$member.region}

{/if} + {apply_filters('glm-member-db-front-members-detail-otherDetailBottom', '', $member.id)} + - {/if} +
+ {if $settings.detail_show_map} + {if $member.logo && $settings.detail_show_logo} +
+ {else} +
+ {/if} +
(map loads here)
+
+ {/if} + {if $member.logo && $settings.detail_show_logo} +
+ + +
+ {/if}
- + + +
+ + {apply_filters('glm-member-db-front-members-detail-internalContentLinks', '', $member.id)} +
+ + +
+ {apply_filters('glm-member-db-front-members-detail-attributesTop', '', $member.id)} {if ($member.amenities && $settings.detail_show_amenities) || ($member.cc_type && $settings.detail_show_creditcards) || ($member.categories && $settings.detail_show_categories)}
- {if $member.amenities && $settings.detail_show_amenities} - - - {foreach $member.amenities as $a} - - - - {/foreach} -
Amenities & Services
- {$a.name} -
+ {apply_filters('glm-member-db-front-members-detail-attributesTop', '', $member.id)} + {if $member.amenities && $settings.detail_show_amenities} + + + {foreach $member.amenities as $a} + + + + {/foreach} +
Amenities & Services
+ {$a.name} +
- {/if} - {if $member.cc_type && $settings.detail_show_creditcards} -

- Credit Cards Accepted: -

    - {foreach $member.cc_type.names as $c} -
  • {$c}
  • - {/foreach} -
-

- {/if} - {if $member.categories && $settings.detail_show_categories} -

- {$terms.term_member_cap} Categories -

    - {foreach $member.categories as $c} -
  • - {if $c.parent_name}{$c.parent_name}: {/if}{$c.name} -
  • - {/foreach} -
-

- {/if} + {/if} + {if $member.cc_type && $settings.detail_show_creditcards} +

+ Credit Cards Accepted: +

    + {foreach $member.cc_type.names as $c} +
  • {$c}
  • + {/foreach} +
+

+ {/if} + {if $member.categories && $settings.detail_show_categories} +

+ {$terms.term_member_cap} Categories +

    + {foreach $member.categories as $c} +
  • + {if $c.parent_name}{$c.parent_name}: {/if}{$c.name} +
  • + {/foreach} +
+

+ {/if} + {apply_filters('glm-member-db-front-members-detail-attributesBottom', '', $member.id)}
+
{else}
{/if}
+ {apply_filters('glm-member-db-front-members-detail-descriptionTop', '', $member.id)} {if $member.descr && $settings.detail_show_descr}{$member.descr|nl2br}{/if} {if $member.short_descr && $settings.detail_show_short_descr}{$member.short_descr|nl2br}{/if} + {apply_filters('glm-member-db-front-members-detail-descriptionBottom', '', $member.id)}
- + {apply_filters('glm-member-db-front-members-detail-descriptionAfter', '', $member.id)} - {if $settings.detail_show_imagegallery && $haveImageGallery} -
- -
- Photo Gallery -
- -
-
    - {foreach $imageGallery as $i} -
  • - {/foreach} -
-
-
- {/if} - {if $settings.detail_show_coupons && $coupons} -
- -
- {/if} - {if $settings.detail_show_packages && $havePackages && $packages} -
- -
- {/if} + {if $settings.detail_show_imagegallery && $haveImageGallery} +
+ {apply_filters('glm-member-db-front-members-detail-galleryTop', '', $member.id)} + +
+ Photo Gallery +
+ +
+
    + {foreach $imageGallery as $i} +
  • + {/foreach} +
+
+ {apply_filters('glm-member-db-front-members-detail-galleryBottom', '', $member.id)} +
+ {/if} + {apply_filters('glm-member-db-front-members-detail-pageBottom', '', $member.id)}
-
+
diff --git a/views/front/members/list.html b/views/front/members/list.html index 51fa518d..838665f6 100644 --- a/views/front/members/list.html +++ b/views/front/members/list.html @@ -1,15 +1,21 @@ {include file='front/members/header.html'} + {apply_filters('glm-member-db-front-members-list-pageTop', '')} + {if $settings.list_show_map} + {apply_filters('glm-member-db-front-members-list-mapTop', '')}
(map loads here)
+ {apply_filters('glm-member-db-front-members-list-mapBottom', '')} {/if} {if $settings.list_show_search} +
+ {apply_filters('glm-member-db-front-members-list-searchFormTop', '')}


Search for a {$terms.term_member_cap}

@@ -51,11 +57,13 @@ {/if}
+ {apply_filters('glm-member-db-front-members-list-searchFormBottom', '')}
{/if} {*list_show_search*} + {apply_filters('glm-member-db-front-members-list-listHeaderTop', '')} {if $settings.list_show_list}

List of {$terms.term_member_plur_cap}

{if $haveMembers} @@ -68,15 +76,18 @@ {/foreach}
{/if} + {apply_filters('glm-member-db-front-members-list-listHeaderBottom', '')} {foreach $members as $m} + {apply_filters('glm-member-db-front-members-list-memberAbove', '', $m.id)}
+ {apply_filters('glm-member-db-front-members-list-memberTop', '', $m.id)}
- + {if $m.logo && $settings.list_show_logo}
@@ -89,16 +100,18 @@

{/if} - -

- {if $settings.list_show_detail_link} - {$m.member} + + {apply_filters('glm-member-db-front-members-list-memberInfoTop', '', $m.id)} +

+ {if $settings.list_show_detail_link} + {$m.member} - {else} - {$m.member} - {/if} -

+ {else} + {$m.member} + {/if} + {if $settings.list_show_address} + {apply_filters('glm-member-db-front-members-list-memberAddressTop', '', $m.id)} {if $settings.list_show_street} {if $m.addr1 && $settings.list_show_address}
{$m.addr1}
{/if} {if $m.addr2 && $settings.list_show_addr2}
{$m.addr2}
{/if} @@ -106,25 +119,28 @@ {if $settings.list_show_citystatezip} {if $m.city}{$m.city}{if $m.state.name}, {/if}{/if}{if $m.state.name}{$m.state.name}{/if}{if $m.zip} {$m.zip}{/if} {/if} - {if $m.country.name && $settings.list_show_country}
{$m.country.name}
{/if} + {if $m.country.name && $settings.list_show_country}
{$m.country.name}
{/if} + {apply_filters('glm-member-db-front-members-list-memberAddressBottom', '', $m.id)} {/if} - {if $m.phone && $settings.list_show_phone}
Phone: {$m.phone}
{/if} - {if $m.toll_free && $settings.list_show_tollfree}
Toll Free: {$m.toll_free}
{/if} - {if $m.region && $settings.list_show_region}

Region: {$m.region}

{/if} - + {apply_filters('glm-member-db-front-members-list-memberDetailTop', '', $m.id)} + {if $m.phone && $settings.list_show_phone}
Phone: {$m.phone}
{/if} + {if $m.toll_free && $settings.list_show_tollfree}
Toll Free: {$m.toll_free}
{/if} + {if $m.region && $settings.list_show_region}

Region: {$m.region}

{/if} + -
+ {if $m.url && $settings.list_show_url}Website{/if} + {if $m.email && $settings.list_show_email}Email{/if} +
+ {apply_filters('glm-member-db-front-members-list-memberDetailBottom', '', $m.id)} +
- - {if $m.short_descr && $settings.list_show_short_descr} - {$m.short_descr|nl2br} - {elseif $m.descr && $settings.list_show_description} - {$m.descr|nl2br} - {/if} - + {apply_filters('glm-member-db-front-members-list-memberDescriptionTop', '', $m.id)} + {if $m.short_descr && $settings.list_show_short_descr} + {$m.short_descr|nl2br} + {elseif $m.descr && $settings.list_show_description} + {$m.descr|nl2br} + {/if} + {apply_filters('glm-member-db-front-members-list-memberDescriptionBottom', '', $m.id)} {if $m.categories && $settings.list_show_categories}

{$terms.term_member_cap} Categories @@ -160,15 +176,19 @@

{/if}
-
+ + {apply_filters('glm-member-db-front-members-list-memberDataBelow', '', $m.id)} + + {apply_filters('glm-member-db-front-members-list-memberBottom', '', $m.id)}
+ {apply_filters('glm-member-db-front-members-list-memberBelow', '', $m.id)}
-
+ {apply_filters('glm-member-db-front-members-list-mapBubbleTop', '', $m.id)} {if $m.logo && $settings.list_map_show_logo}
{/if}
{if $settings.list_map_show_detaillink} @@ -232,10 +252,11 @@
{/if}
+ {apply_filters('glm-member-db-front-members-list-mapBubbleBottom', '', $m.id)}
{/foreach} {*$members*} - + {apply_filters('glm-member-db-front-members-list-pageBottom', '')} {else}
(no {$terms.term_member_plur} listed)
{/if} -- 2.17.1