From: Chuck Scott Date: Tue, 21 Jun 2016 16:20:40 +0000 (-0400) Subject: Some database adjustments and additional descriptive information X-Git-Tag: v1.0.0^2~42 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=eda7b4ae25c6e8189c18bbe7d5c744ff95148ffc;p=WP-Plugins%2Fglm-member-db-leads.git Some database adjustments and additional descriptive information --- diff --git a/models/admin/settings/leads.php b/models/admin/settings/leads.php new file mode 100644 index 0000000..2805073 --- /dev/null +++ b/models/admin/settings/leads.php @@ -0,0 +1,135 @@ + + * @license http://www.gaslightmedia.com Gaslightmedia + * @release leads.php,v 1.0 2014/10/31 19:31:47 cscott Exp $ + * @link http://dev.gaslightmedia.com/ + */ + +/** + * GlmMembersAdmin_settings_leads + * + * PHP version 5 + * + * @category Model + * @package GLM Member DB + * @author Chuck Scott + * @license http://www.gaslightmedia.com Gaslightmedia + * @release SVN: $Id: packaging.php,v 1.0 2011/01/25 19:31:47 cscott + * Exp $ + */ +class GlmMembersAdmin_settings_leads // extends GlmDataLeadsSettings +{ + + /** + * WordPress Database Object + * + * @var $wpdb + * @access public + */ + public $wpdb; + /** + * dbh Postgres database connection + * + * @var mixed + * @access public + */ + public $dbh; + /** + * settings used for the schema and tablenames + * + * @var mixed + * @access public + */ + public $settings = array(); + /** + * categories + * + * @var bool + * @access public + */ + public $categories = array(); + public $oldCatMap = array(); + /** + * events + * + * @var bool + * @access public + */ + public $events = array(); + public $image_owner; + + /** + * 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 members data class +// parent::__construct(false, false); + + } + + /** + * modelAction + * + * @param bool $actionData + * @access public + * @return void + */ + public function modelAction($actionData = false) + { + + + // Compile template data + $templateData = array( + ); + + // Return status, suggested view, and data to controller + return array( + 'status' => true, + 'menuItemRedirect' => false, + 'modelRedirect' => false, + 'view' => 'admin/settings/leads.html', + 'data' => $templateData + ); + + + } + +} diff --git a/readme.txt b/readme.txt index c1290ca..8cd0671 100644 --- a/readme.txt +++ b/readme.txt @@ -24,4 +24,5 @@ e.g. 1. Upload `plugin-name.php` to the `/wp-content/plugins/` directory 1. Activate the plugin through the 'Plugins' menu in WordPress +== Plugin Construction == diff --git a/setup/adminTabs.php b/setup/adminTabs.php index 68614b1..9219db6 100644 --- a/setup/adminTabs.php +++ b/setup/adminTabs.php @@ -37,6 +37,7 @@ // If user can manage all members if (current_user_can('glm_members_members')) { if (apply_filters('glm_members_permit_admin_members_leads_tab', true)) { + add_filter('glm-member-db-add-tab-for-management', function($addOnTabs) { $newTabs = array( @@ -50,5 +51,21 @@ if (current_user_can('glm_members_members')) { return $addOnTabs; } ); + + add_filter('glm-member-db-add-tab-for-settings', + function($addOnTabs) { + $newTabs = array( + array( + 'text' => 'Leads', + 'menu' => 'settings', + 'action' => 'leads' + ), + + ); + $addOnTabs = array_merge($addOnTabs, $newTabs); + return $addOnTabs; + } + ); + } } diff --git a/setup/databaseScripts/create_database_V0.0.1.sql b/setup/databaseScripts/create_database_V0.0.1.sql index 46856e4..fe9cfa0 100644 --- a/setup/databaseScripts/create_database_V0.0.1.sql +++ b/setup/databaseScripts/create_database_V0.0.1.sql @@ -100,15 +100,6 @@ CREATE TABLE {prefix}lead_interests ( ---- --- How Heard - List of possible responses to "how did you hear about ..." - Forms use ID as value -CREATE TABLE {prefix}how_heard ( - id INT NOT NULL AUTO_INCREMENT, - title TINYTEXT NULL, -- Interest Title - PRIMARY KEY (id) -); - ----- - -- lead_searches - Memorized search configurations CREATE TABLE {prefix}searches ( id INT NOT NULL AUTO_INCREMENT, diff --git a/setup/databaseScripts/dbVersions.php b/setup/databaseScripts/dbVersions.php index 0d26ab7..bf6b86f 100644 --- a/setup/databaseScripts/dbVersions.php +++ b/setup/databaseScripts/dbVersions.php @@ -14,6 +14,6 @@ */ $glmMembersLeadsDbVersions = array( - '0.0.1' => array('version' => '0.0.1', 'tables' => 11, 'date' => '6/8/2016') + '0.0.1' => array('version' => '0.0.1', 'tables' => 10, 'date' => '6/8/2016') ); diff --git a/setup/validActions.php b/setup/validActions.php index f262677..bb4a1be 100644 --- a/setup/validActions.php +++ b/setup/validActions.php @@ -37,6 +37,9 @@ $glmMembersLeadsAddOnValidActions = array( ), 'management' => array( 'leads' => GLM_MEMBERS_LEADS_PLUGIN_SLUG + ), + 'settings' => array( + 'leads' => GLM_MEMBERS_LEADS_PLUGIN_SLUG ) ), ); diff --git a/views/admin/settings/leads.html b/views/admin/settings/leads.html new file mode 100644 index 0000000..89fbcd4 --- /dev/null +++ b/views/admin/settings/leads.html @@ -0,0 +1,3 @@ +{include file='admin/settings/header.html'} + +

ADMIN LEADS SETTINGS VIEW STUFF GOES HERE

\ No newline at end of file