--- /dev/null
+Assets folder for things like images and other
+files that might need to be read directly.
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Gaslight Media Members Database
+ * Admin Member User Profile
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package glmMembersDatabase
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release index.php,v 1.0 2014/10/31 19:31:47 cscott Exp $
+ * @link http://dev.gaslightmedia.com/
+ */
+
+// Load Contacts data abstract
+//require_once(GLM_MEMBERS_CONTACTS_PLUGIN_CLASS_PATH.'/data/dataContacts.php');
+
+class GlmMembersAdmin_info_index // extends GlmDataContacts
+{
+
+ /**
+ * WordPress Database Object
+ *
+ * @var $wpdb
+ * @access public
+ */
+ public $wpdb;
+ /**
+ * Plugin Configuration Data
+ *
+ * @var $config
+ * @access public
+ */
+ public $config;
+ /**
+ * Contact Info
+ *
+ * @var $contactInfo
+ * @access public
+ */
+ public $contactInfo = false;
+ /**
+ * Member ID
+ *
+ * @var $memberID
+ * @access public
+ */
+ public $memberID = false;
+ /**
+ * Contact ID
+ *
+ * @var $contactID
+ * @access public
+ */
+ public $contactID = false;
+
+
+ /*
+ * Constructor
+ *
+ * This contructor performs the work for this model. This model returns
+ * an array containing the following.
+ *
+ * 'status'
+ *
+ * True if successfull and false if there was a fatal failure.
+ *
+ * 'view'
+ *
+ * A suggested view name that the contoller should use instead of the
+ * default view for this model or false to indicate that the default view
+ * should be used.
+ *
+ * 'data'
+ *
+ * Data that the model is returning for use in merging with the view to
+ * produce output.
+ *
+ * @wpdb object WordPress database object
+ *
+ * @return array Array containing status, suggested view, and any data
+ */
+ public function __construct ($wpdb, $config)
+ {
+
+ // Save WordPress Database object
+ $this->wpdb = $wpdb;
+
+ // Save plugin configuration object
+ $this->config = $config;
+
+ /*
+ * Run constructor for the Contacts data class
+ *
+ * Note, the third parameter is a flag that indicates to the Contacts
+ * data class that it should flag a group of fields as 'view_only'.
+ */
+// parent::__construct(false, false, true);
+
+
+ }
+
+ public function modelAction($actionData = false)
+ {
+
+ $displayData = 'This is the Sample Add-On "Info" model talking to you from inside WordPress.';
+
+ // Compile template data
+ $templateData = array(
+ 'displayData' => $displayData
+ );
+
+ // Return status, any suggested view, and any data to controller
+ return array(
+ 'status' => true,
+ 'modelRedirect' => false,
+ 'view' => 'admin/info/index.html',
+ 'data' => $templateData
+ );
+
+ }
+
+
+}
--- /dev/null
+<?php
+/**
+ * Gaslight Media Members Database
+ * Admin Member User Profile
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package glmMembersDatabase
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release index.php,v 1.0 2014/10/31 19:31:47 cscott Exp $
+ * @link http://dev.gaslightmedia.com/
+ */
+
+// Load Contacts data abstract
+//require_once(GLM_MEMBERS_CONTACTS_PLUGIN_CLASS_PATH.'/data/dataContacts.php');
+
+class GlmMembersAdmin_members_sample // extends GlmDataContacts
+{
+
+ /**
+ * WordPress Database Object
+ *
+ * @var $wpdb
+ * @access public
+ */
+ public $wpdb;
+ /**
+ * Plugin Configuration Data
+ *
+ * @var $config
+ * @access public
+ */
+ public $config;
+ /**
+ * Contact Info
+ *
+ * @var $contactInfo
+ * @access public
+ */
+ public $contactInfo = false;
+ /**
+ * Member ID
+ *
+ * @var $memberID
+ * @access public
+ */
+ public $memberID = false;
+ /**
+ * Contact ID
+ *
+ * @var $contactID
+ * @access public
+ */
+ public $contactID = false;
+
+
+ /*
+ * Constructor
+ *
+ * This contructor performs the work for this model. This model returns
+ * an array containing the following.
+ *
+ * 'status'
+ *
+ * True if successfull and false if there was a fatal failure.
+ *
+ * 'view'
+ *
+ * A suggested view name that the contoller should use instead of the
+ * default view for this model or false to indicate that the default view
+ * should be used.
+ *
+ * 'data'
+ *
+ * Data that the model is returning for use in merging with the view to
+ * produce output.
+ *
+ * @wpdb object WordPress database object
+ *
+ * @return array Array containing status, suggested view, and any data
+ */
+ public function __construct ($wpdb, $config)
+ {
+
+ // Save WordPress Database object
+ $this->wpdb = $wpdb;
+
+ // Save plugin configuration object
+ $this->config = $config;
+
+ /*
+ * Run constructor for the Contacts data class
+ *
+ * Note, the third parameter is a flag that indicates to the Contacts
+ * data class that it should flag a group of fields as 'view_only'.
+ */
+// parent::__construct(false, false, true);
+
+
+ }
+
+ public function modelAction($actionData = false)
+ {
+
+ $displayData = 'This is the Sample "Members" "Sample" model talking to you from inside WordPress.';
+
+ // Compile template data
+ $templateData = array(
+ 'displayData' => $displayData
+ );
+
+ // Return status, any suggested view, and any data to controller
+ return array(
+ 'status' => true,
+ 'modelRedirect' => false,
+ 'view' => 'admin/members/sample.html',
+ 'data' => $templateData
+ );
+
+ }
+
+
+}
--- /dev/null
+<?php
+/**
+ * Gaslight Media Members Database
+ * Admin Member User Profile
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package glmMembersDatabase
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release index.php,v 1.0 2014/10/31 19:31:47 cscott Exp $
+ * @link http://dev.gaslightmedia.com/
+ */
+
+// Load Contacts data abstract
+//require_once(GLM_MEMBERS_CONTACTS_PLUGIN_CLASS_PATH.'/data/dataContacts.php');
+
+class GlmMembersAdmin_sample_index // extends GlmDataContacts
+{
+
+ /**
+ * WordPress Database Object
+ *
+ * @var $wpdb
+ * @access public
+ */
+ public $wpdb;
+ /**
+ * Plugin Configuration Data
+ *
+ * @var $config
+ * @access public
+ */
+ public $config;
+ /**
+ * Contact Info
+ *
+ * @var $contactInfo
+ * @access public
+ */
+ public $contactInfo = false;
+ /**
+ * Member ID
+ *
+ * @var $memberID
+ * @access public
+ */
+ public $memberID = false;
+ /**
+ * Contact ID
+ *
+ * @var $contactID
+ * @access public
+ */
+ public $contactID = false;
+
+
+ /*
+ * Constructor
+ *
+ * This contructor performs the work for this model. This model returns
+ * an array containing the following.
+ *
+ * 'status'
+ *
+ * True if successfull and false if there was a fatal failure.
+ *
+ * 'view'
+ *
+ * A suggested view name that the contoller should use instead of the
+ * default view for this model or false to indicate that the default view
+ * should be used.
+ *
+ * 'data'
+ *
+ * Data that the model is returning for use in merging with the view to
+ * produce output.
+ *
+ * @wpdb object WordPress database object
+ *
+ * @return array Array containing status, suggested view, and any data
+ */
+ public function __construct ($wpdb, $config)
+ {
+
+ // Save WordPress Database object
+ $this->wpdb = $wpdb;
+
+ // Save plugin configuration object
+ $this->config = $config;
+
+ /*
+ * Run constructor for the Contacts data class
+ *
+ * Note, the third parameter is a flag that indicates to the Contacts
+ * data class that it should flag a group of fields as 'view_only'.
+ */
+// parent::__construct(false, false, true);
+
+
+ }
+
+ public function modelAction($actionData = false)
+ {
+
+ $displayData = 'Hello, World! This is the Sample Add-On "sample" model talking to you from inside WordPress.';
+
+ // Compile template data
+ $templateData = array(
+ 'displayData' => $displayData
+ );
+
+ // Return status, any suggested view, and any data to controller
+ return array(
+ 'status' => true,
+ 'modelRedirect' => false,
+ 'view' => 'admin/sample/index.html',
+ 'data' => $templateData
+ );
+
+ }
+
+
+}
--- /dev/null
+<?php
+/**
+ * Gaslight Media Members Database
+ * Admin Member User Profile
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package glmMembersDatabase
+ * @author Chuck Scott <cscott@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release index.php,v 1.0 2014/10/31 19:31:47 cscott Exp $
+ * @link http://dev.gaslightmedia.com/
+ */
+
+// Load Contacts data abstract
+//require_once(GLM_MEMBERS_CONTACTS_PLUGIN_CLASS_PATH.'/data/dataContacts.php');
+
+class GlmMembersAdmin_sample_more // extends GlmDataContacts
+{
+
+ /**
+ * WordPress Database Object
+ *
+ * @var $wpdb
+ * @access public
+ */
+ public $wpdb;
+ /**
+ * Plugin Configuration Data
+ *
+ * @var $config
+ * @access public
+ */
+ public $config;
+ /**
+ * Contact Info
+ *
+ * @var $contactInfo
+ * @access public
+ */
+ public $contactInfo = false;
+ /**
+ * Member ID
+ *
+ * @var $memberID
+ * @access public
+ */
+ public $memberID = false;
+ /**
+ * Contact ID
+ *
+ * @var $contactID
+ * @access public
+ */
+ public $contactID = false;
+
+
+ /*
+ * Constructor
+ *
+ * This contructor performs the work for this model. This model returns
+ * an array containing the following.
+ *
+ * 'status'
+ *
+ * True if successfull and false if there was a fatal failure.
+ *
+ * 'view'
+ *
+ * A suggested view name that the contoller should use instead of the
+ * default view for this model or false to indicate that the default view
+ * should be used.
+ *
+ * 'data'
+ *
+ * Data that the model is returning for use in merging with the view to
+ * produce output.
+ *
+ * @wpdb object WordPress database object
+ *
+ * @return array Array containing status, suggested view, and any data
+ */
+ public function __construct ($wpdb, $config)
+ {
+
+ // Save WordPress Database object
+ $this->wpdb = $wpdb;
+
+ // Save plugin configuration object
+ $this->config = $config;
+
+ /*
+ * Run constructor for the Contacts data class
+ *
+ * Note, the third parameter is a flag that indicates to the Contacts
+ * data class that it should flag a group of fields as 'view_only'.
+ */
+// parent::__construct(false, false, true);
+
+
+ }
+
+ public function modelAction($actionData = false)
+ {
+
+ $displayData = 'Welcome to more information!<br>This is the Sample Add-On "sample" model with action "more" talking to you from inside WordPress.';
+
+ // Compile template data
+ $templateData = array(
+ 'displayData' => $displayData
+ );
+
+ // Return status, any suggested view, and any data to controller
+ return array(
+ 'status' => true,
+ 'modelRedirect' => false,
+ 'view' => 'admin/sample/more.html',
+ 'data' => $templateData
+ );
+
+ }
+
+
+}
/*
* Added menus or sub-menus examples
*
+ * // Add a main menu item
+ * add_menu_page(
+ * 'GLM Sample', // Page Title
+ * 'GLM Sample', // Menu Title
+ * 'glm-members-members', // Capability
+ * 'glm-members-admin-menu-glm-sample', // Menu Slug
+ * function() {$this->controller('sample');}, // Called function
+ * false, // Icon URL
+ * '92' // Menu Position
+ * );
+ *
+ * // Add a sub-menu item
* add_submenu_page(
- * 'glm-members-admin-menu-members', // Parent slug
+ * 'glm-members-admin-menu-sample', // Parent slug
* 'Sample', // Page title
* 'Sample', // Menu Title
* 'glm_members_edit', // Capability required
* If creating a main menu item with add_menu_page(), please document
* that structure here.
*
+ * NOTE: The menu slug is the link for the page. It is also parsed by
+ * the controller and used to find the model to load. The
+ * "glm-members-admin-menu-" portion should not change, the last
+ * segment is the model directory name. By default the "index.php" file
+ * in that directory is executed. If the URL includes a "glm_action"
+ * parameter, then the model file called is in the same directory but
+ * is named the same as the "glm_action" parameter.
+ *
*/
+
+// Add a main menu item
+add_menu_page(
+ 'GLM Sample', // Page Title
+ 'GLM Sample', // Menu Title
+ 'glm-members-members', // Capability
+ 'glm-members-admin-menu-sample', // Menu Slug
+ function() {$this->controller('sample');}, // Called function
+ false, // Icon URL
+ '92' // Menu Position
+);
+
+add_submenu_page(
+ 'glm-members-admin-menu-sample', // Parent slug
+ 'Sample', // Page title
+ 'Sample', // Menu Title
+ 'glm_members_members', // Capability required
+ 'glm-members-admin-menu-sample-sample', // Menu slug
+ function() {$this->controller('sample');}
+);
+
+add_submenu_page(
+ 'glm-members-admin-menu-sample', // Parent slug
+ 'Info', // Page title
+ 'Info', // Menu Title
+ 'glm_members_members', // Capability required
+ 'glm-members-admin-menu-sample-info', // Menu slug
+ function() {$this->controller('info');}
+);
*
*/
+add_filter('glm-member-db-add-tab-for-members',
+ function($addOnTabs) {
+ $newTabs = array(
+ array(
+ 'text' => 'Sample',
+ 'menu' => 'members',
+ 'action' => 'sample'
+ )
+ );
+ $addOnTabs = array_merge($addOnTabs, $newTabs);
+ return $addOnTabs;
+ }
+);
$glmMembersSampleAddOnValidActions = array(
'adminActions' => array(
-/*
'members' => array(
- 'sample' => GLM_MEMBERS_SAMPLE_PLUGIN_SLUG
+ 'sample' => GLM_MEMBERS_SAMPLE_PLUGIN_SLUG,
),
- 'member' => array(
- 'sample' => GLM_MEMBERS_SAMPLE_PLUGIN_SLUG
+ 'sample' => array(
+ 'index' => GLM_MEMBERS_SAMPLE_PLUGIN_SLUG,
+ 'more' => GLM_MEMBERS_SAMPLE_PLUGIN_SLUG,
),
- 'management' => array(
- 'sample' => GLM_MEMBERS_SAMPLE_PLUGIN_SLUG
+ 'info' => array(
+ 'index' => GLM_MEMBERS_SAMPLE_PLUGIN_SLUG
)
-*/
),
'frontActions' => array(
/*
--- /dev/null
+<div class="wrap">
+ <div id="glm-admin-content-container">
+ <h3>Info Sub-menu Model</h3>
+ <p>{$displayData}</p>
+ </div>
+</div>
\ No newline at end of file
--- /dev/null
+{include file='admin/members/header.html'}
+
+ <h3>Members Sample Tab</h3>
+ <p>{$displayData}</p>
+
+{include file='admin/footer.html'}
\ No newline at end of file
--- /dev/null
+<div class="wrap">
+ <div id="glm-admin-content-container">
+ <h3>Sample Model</h3>
+ <p>{$displayData}</p>
+ <a href="{$thisURL}?page={$thisPage}&glm_action=more">Click me to see more!</a>
+ </div>
+</div>
\ No newline at end of file
--- /dev/null
+<div class="wrap">
+ <div id="glm-admin-content-container">
+ <h3>Sample Model - More Information</h3>
+ <p>{$displayData}</p>
+ </div>
+</div>
\ No newline at end of file