<?php
/**
* GLM Member-DB WordPress Add-On Plugin
- * Data Class Sample
+ * Data Class Events
*
* PHP version 5.3
*
* @package GLM Member-DB
* @author Chuck Scott <cscott@gaslightmedia.com>
* @license http://www.gaslightmedia.com Gaslightmedia
- * @release SVN: $Id: dataSample.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
+ * @release SVN: $Id: dataEvents.php,v 1.0 2011/01/25 19:31:47 cscott Exp $
*/
-/**********************************************************************
- * NOTE: THIS IS A SAMPLE FILE - DO NOT USE UNMODIFIED
- *
- * Please change all references to sample, Sample, or SAMPLE to a name
- * appropriate for your new Add-On.
- *
- * Data fields in this file are sample only.
- *
- * Remove this message before using this file in production!
- **********************************************************************/
-
// Member Info Data required
require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataMemberInfo.php');
/**
- * GlmDataSample class
+ * GlmDataEvents class
*
* PHP version 5
*
* @release SVN: $Id: dataMembers.php,v 1.0 2011/01/25 19:31:47 cscott
* Exp $
*/
-class GlmDataSample extends GlmDataAbstract
+class GlmDataEvents extends GlmDataAbstract
{
/**
/*
* Table Name
*/
- $this->table = GLM_MEMBERS_SAMPLE_PLUGIN_DB_PREFIX . 'sampletable';
+ $this->table = GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX . 'eventstable';
/*
* Table Data Fields
}
-?>
\ No newline at end of file
+?>
// Load Contacts data abstract
//require_once(GLM_MEMBERS_CONTACTS_PLUGIN_CLASS_PATH.'/data/dataContacts.php');
-class GlmMembersAdmin_members_sample // extends GlmDataContacts
+class GlmMembersAdmin_members_events // extends GlmDataContacts
{
/**
public function modelAction($actionData = false)
{
- $displayData = 'This is the Sample "Members" "Sample" model talking to you from inside WordPress.';
+ $displayData = 'This is the Events "Members" "Events" model talking to you from inside WordPress.';
// Compile template data
$templateData = array(
return array(
'status' => true,
'modelRedirect' => false,
- 'view' => 'admin/members/sample.html',
+ 'view' => 'admin/members/events.html',
'data' => $templateData
);
// Load Contacts data abstract
//require_once(GLM_MEMBERS_CONTACTS_PLUGIN_CLASS_PATH.'/data/dataContacts.php');
-class GlmMembersAdmin_sample_index // extends GlmDataContacts
+class GlmMembersAdmin_events_index // extends GlmDataContacts
{
/**
public function modelAction($actionData = false)
{
- $displayData = 'Hello, World! This is the Sample Add-On "sample" model talking to you from inside WordPress.';
+ $displayData = 'Hello, World! This is the Events Add-On "events" model talking to you from inside WordPress.';
// Compile template data
$templateData = array(
return array(
'status' => true,
'modelRedirect' => false,
- 'view' => 'admin/sample/index.html',
+ 'view' => 'admin/events/index.html',
'data' => $templateData
);
// Load Contacts data abstract
//require_once(GLM_MEMBERS_CONTACTS_PLUGIN_CLASS_PATH.'/data/dataContacts.php');
-class GlmMembersAdmin_sample_more // extends GlmDataContacts
+class GlmMembersAdmin_events_more // extends GlmDataContacts
{
/**
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.';
+ $displayData = 'Welcome to more information!<br>This is the Events Add-On "events" model with action "more" talking to you from inside WordPress.';
// Compile template data
$templateData = array(
return array(
'status' => true,
'modelRedirect' => false,
- 'view' => 'admin/sample/more.html',
+ 'view' => 'admin/events/more.html',
'data' => $templateData
);
* @link http://dev.gaslightmedia.com/
*/
-/**********************************************************************
- * NOTE: THIS IS A SAMPLE FILE - DO NOT USE UNMODIFIED
- *
- * Please change all references to sample, Sample, or SAMPLE to a name
- * appropriate for your new Add-On.
- *
- * This file is used to create hooks into the main plugin or other
- * add-ons. If no such hooks are needed, this file may be omitted.
- *
- * Remove this message before using this file in production!
- **********************************************************************/
-
/*
* Place Misc Hooks and Filters here. If this file exists, it will be included
* by the add-on main plugin script.
<?php
/**
* Gaslight Media Members Database
- * GLM Members DB - Sample Add-on - Admin Tabs
+ * GLM Members DB - Events Add-on - Admin Tabs
*
* PHP version 5.5
*
* @link http://dev.gaslightmedia.com/
*/
-/**********************************************************************
- * NOTE: THIS IS A SAMPLE FILE - DO NOT USE UNMODIFIED
- *
- * Please change all references to sample, Sample, or SAMPLE to a name
- * appropriate for your new Add-On.
- *
- * This file is used to add tabs to existing admin pages in the main
- * plugin or other add-ons. If this add-on does not create additional
- * tabs, this file should be omitted.
- *
- * Remove this message before using this file in production!
- **********************************************************************/
-
/*
* To add a new tab to an existing Member DB page use a block
* like this and replace the {} parameters.
function($addOnTabs) {
$newTabs = array(
array(
- 'text' => 'Sample',
+ 'text' => 'Events',
'menu' => 'members',
- 'action' => 'sample'
+ 'action' => 'events'
)
);
$addOnTabs = array_merge($addOnTabs, $newTabs);
--- Gaslight Media Members Database - Sample
+-- Gaslight Media Members Database - Events
-- File Created: 12/02/15 15:27:15
-- Database Version: 0.0.1
-- Database Creation Script
---
+--
-- This file is called to create a new set of tables for this
-- add-on for the most receint database version for this add-on.
---
+--
-- There should only be one such file in this directory
--
-- To permit each query below to be executed separately,
-- **********************************************************************
--- NOTE: THIS IS A SAMPLE FILE - DO NOT USE UNMODIFIED
+-- NOTE: THIS IS A EVENTS FILE - DO NOT USE UNMODIFIED
--
--- Please change all references to sample, Sample, or SAMPLE to a name
+-- Please change all references to events, Events, or EVENTS to a name
-- appropriate for your new Add-On.
--
--- Tables and queries in this file are sample only.
+-- Tables and queries in this file are events only.
--
-- Remove this message before using this file in production!
-- **********************************************************************/
--- Sample Management Settings
+-- Events Management Settings
CREATE TABLE {prefix}management (
id INT NOT NULL AUTO_INCREMENT,
- canonical_sample_page TINYTEXT NULL, -- Canonical page slug for detail
+ canonical_events_page TINYTEXT NULL, -- Canonical page slug for detail
PRIMARY KEY (id)
);
----
--- Set default sample management entry
+-- Set default events management entry
INSERT INTO {prefix}management
- ( id, canonical_sample_page )
+ ( id, canonical_events_page )
VALUES
- ( 1, 'sample data' )
+ ( 1, 'events data' )
;
<?php
/**
* Gaslight Media Members Database
- * GLM Members Sample DB Versions
+ * GLM Members Events DB Versions
*
* PHP version 5.5
*
* @link http://dev.gaslightmedia.com/
*/
-
-/**********************************************************************
- * NOTE: THIS IS A SAMPLE FILE - DO NOT USE UNMODIFIED
- *
- * Please change all references to sample, Sample, or SAMPLE to a name
- * appropriate for your new Add-On.
- *
- * This file lists all versions of the database tables for this add-on.
- * The last entry in the array below should be for the most recent
- * version and should match the "create_database_V..." file in this
- * directory.
- *
- * NOTE: When first creating a new add-on with database tables, there
- * should only be one line in the array below and there should be no
- * "update_database..." files in this directory.
- *
- * Remove this message before using this file in production!
- **********************************************************************/
-
-
-$glmMembersSampleDbVersions = array(
+$glmMembersEventsDbVersions = array(
'0.0.1' => array('version' => '0.0.1', 'tables' => 2),
'0.0.2' => array('version' => '0.0.2', 'tables' => 3)
);
<?php
/*
- * Gaslight Media Members Database - Sample Add-On
+ * Gaslight Media Members Database - Events Add-On
*
* Database Update Script for version 0.0.2
*/
-/**********************************************************************
- * NOTE: THIS IS A SAMPLE FILE - DO NOT USE UNMODIFIED
- *
- * Please change all references to sample, Sample, or SAMPLE to a name
- * appropriate for your new Add-On.
- *
- * This is a sample database update process. There should be an SQL
- * script for each update in this directory. This php file is optionsl
- * and can be used to perform more complex data updates.
- *
- * If this file exists, it is called after the matching SQL script has
- * been run.
- *
- * ******** THE CODE BELOW IS STICTLY A SAMPLE ********
- *
- * Remove this message before using this file in production!
- **********************************************************************/
-
/*
- * Update sample records to build sample_slug field data from title
+ * Update events records to build events_slug field data from title
*/
-// Get all sample records
-$sampleRecords = $this->wpdb->get_results('SELECT id, title FROM '.GLM_MEMBERS_SAMPLE_PLUGIN_DB_PREFIX.'samples;', ARRAY_A);
+// Get all events records
+$eventsRecords = $this->wpdb->get_results('SELECT id, title FROM '.GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX.'eventss;', ARRAY_A);
-// If there's any sample records
-if ($sampleRecords && count($sampleRecords) > 0) {
+// If there's any events records
+if ($eventsRecords && count($eventsRecords) > 0) {
- // For each sample record
- foreach ($sampleRecords as $p) {
+ // For each events record
+ foreach ($eventsRecords as $p) {
// Create a slug from the title
$slug = sanitize_title($p['title']).'-'.$p['id'];
// Store this value back into the record
$this->wpdb->update(
- GLM_MEMBERS_SAMPLE_PLUGIN_DB_PREFIX.'samples',
+ GLM_MEMBERS_EVENTS_PLUGIN_DB_PREFIX.'eventss',
array(
- 'sample_slug' => $slug
+ 'events_slug' => $slug
),
array( 'id' => $p['id'] ),
array( '%s' ),
<?php
/**
* Gaslight Media Members Database
- * GLM Members Sample Add-On Misc Hooks and Filters
+ * GLM Members Events Add-On Misc Hooks and Filters
*
* PHP version 5.5
*
* @link http://dev.gaslightmedia.com/
*/
-/**********************************************************************
- * NOTE: THIS IS A SAMPLE FILE - DO NOT USE UNMODIFIED
- *
- * Please change all references to sample, Sample, or SAMPLE to a name
- * appropriate for your new Add-On.
- *
- * This file is used to create hooks into the main plugin or other
- * add-ons. If no such hooks are needed, this file may be omitted.
- *
- * Remove this message before using this file in production!
- **********************************************************************/
-
/*
* Place Misc Hooks and Filters here. If this file exists, it will be included
* by the add-on main plugin script.
-<!-- Hooks Help from glm-member-db-sample Add-On -->
+<!-- Hooks Help from glm-member-db-events Add-On -->
/**********************************************************************
- * NOTE: THIS IS A SAMPLE FILE - DO NOT USE UNMODIFIED
+ * NOTE: THIS IS A EVENTS FILE - DO NOT USE UNMODIFIED
*
- * Please change all references to sample, Sample, or SAMPLE to a name
+ * Please change all references to events, Events, or EVENTS to a name
* appropriate for your new Add-On.
*
* This file is used to document hooks provided by this add-on. Content
**********************************************************************/
- <tr><th colspan="3" class="glm-notice"><p>Sample Add-On</p></th></tr>
+ <tr><th colspan="3" class="glm-notice"><p>Events Add-On</p></th></tr>
<tr><th colspan="3">User Permission Hooks</td></tr>
<tr>
- <td>glm_members_permit_admin_members_sample_tab</td>
+ <td>glm_members_permit_admin_members_events_tab</td>
<td>Filter</td>
<td></td>
<td>
- Returns boolean answer to "Is current user permitted to see multi-member Sample tab?"
+ Returns boolean answer to "Is current user permitted to see multi-member Events tab?"
</td>
</tr>
<tr>
- <td>glm_members_permit_admin_members_Sample_add_sample</td>
+ <td>glm_members_permit_admin_members_Events_add_events</td>
<td>Filter</td>
<td></td>
<td>
- Returns boolean answer to "Is current user permitted to add a new multi-member sample?"
+ Returns boolean answer to "Is current user permitted to add a new multi-member events?"
</td>
</tr>
<tr>
- <td>glm_members_permit_admin_members_Sample_edit_sample</td>
+ <td>glm_members_permit_admin_members_Events_edit_events</td>
<td>Filter</td>
<td></td>
<td>
- Returns boolean answer to "Is current user permitted to edit a multi-member sample?"
+ Returns boolean answer to "Is current user permitted to edit a multi-member events?"
</td>
</tr>
<tr>
- <td>glm_members_permit_admin_member_sample_tab</td>
+ <td>glm_members_permit_admin_member_events_tab</td>
<td>Filter</td>
<td></td>
<td>
- Returns boolean answer to "Is current user permitted to see the member Sample tab?"
+ Returns boolean answer to "Is current user permitted to see the member Events tab?"
</td>
</tr>
<tr>
- <td>glm_members_permit_admin_member_Sample_add_sample</td>
+ <td>glm_members_permit_admin_member_Events_add_events</td>
<td>Filter</td>
<td></td>
<td>
- Returns boolean answer to "Is current user permitted to add a new Member sample?"
+ Returns boolean answer to "Is current user permitted to add a new Member events?"
</td>
</tr>
<tr>
- <td>glm_members_permit_admin_member_Sample_edit_sample</td>
+ <td>glm_members_permit_admin_member_Events_edit_events</td>
<td>Filter</td>
<td></td>
<td>
- Returns boolean answer to "Is current user permitted to edit a member sample?"
+ Returns boolean answer to "Is current user permitted to edit a member events?"
</td>
</tr>
<?php
/**
* Gaslight Media Members Database
- * GLM Members DB - Sample Add-on - Permissions
+ * GLM Members DB - Events Add-on - Permissions
*
* PHP version 5.5
*
*/
-/**********************************************************************
- * NOTE: THIS IS A SAMPLE FILE - DO NOT USE UNMODIFIED
- *
- * Please change all references to sample, Sample, or SAMPLE to a name
- * appropriate for your new Add-On.
- *
- * This file is used to add permission checks that can be used throught
- * the main plugin and add-ons. If no such permissions are needed by
- * this add-on, this file should be omitted.
- *
- * Remove this message before using this file in production!
- **********************************************************************/
-
/*
* Below are permission checks for various specific things in this add-on and
* elsewhere in the Member DB main plugin and add-ons.
<?php
/**
* Gaslight Media Members Database
- * GLM Members DB - Sample Add-on - Roles & Capabilities
+ * GLM Members DB - Events Add-on - Roles & Capabilities
*
* PHP version 5.5
*
* @link http://dev.gaslightmedia.com/
*/
-/**********************************************************************
- * NOTE: THIS IS A SAMPLE FILE - DO NOT USE UNMODIFIED
- *
- * Please change all references to sample, Sample, or SAMPLE to a name
- * appropriate for your new Add-On.
- *
- * This file is used to add roles and capability. If none are required,
- * this file should be omitted.
- *
- * Remove this message before using this file in production!
- **********************************************************************/
-
/**
* NOTE: This file is only included in the activate.php process.
* It is not regularly used during operation.
<?php
/**
* Gaslight Media Members Database
- * GLM Members Sample Add-On Short Codes
+ * GLM Members Events Add-On Short Codes
*
* PHP version 5.5
*
* @link http://dev.gaslightmedia.com/
*/
-/**********************************************************************
- * NOTE: THIS IS A SAMPLE FILE - DO NOT USE UNMODIFIED
- *
- * Please change all references to sample, Sample, or SAMPLE to a name
- * appropriate for your new Add-On.
- *
- * This file is used to define shortcodes that will be handled by this
- * add-0n.
- *
- * DO NOT DELETE THIS FILE EVEN IF THERE ARE NOT SHORTCODES
- *
- * Remove this message before using this file in production!
- **********************************************************************/
-
/*
* Array of short-code
*
* ... additional short-codes
* )
*
- * Shortcode descriptions sample
+ * Shortcode descriptions events
*
* <tr>
- * <th>[glm-members-sample-shortcode]</th>
+ * <th>[glm-members-events-shortcode]</th>
* <td> </td>
* <td width="50%">
* <p>
*
*/
-$glmMembersSampleShortcodes = array(
+$glmMembersEventsShortcodes = array(
);
-$glmMembersSampleShortcodesDescription = '';
+$glmMembersEventsShortcodesDescription = '';
<?php
/**
* Gaslight Media Members Database
- * GLM Members Sample Add-On Valid Actions
+ * GLM Members Events Add-On Valid Actions
*
* PHP version 5.5
*
* @link http://dev.gaslightmedia.com/
*/
-/**********************************************************************
- * NOTE: THIS IS A SAMPLE FILE - DO NOT USE UNMODIFIED
- *
- * Please change all references to sample, Sample, or SAMPLE to a name
- * appropriate for your new Add-On.
- *
- * This file is used to define valid actions for both admin and
- * front-end pages.
- *
- * DO NOT DELETE THIS FILE EVEN IF THERE ARE NO ACTIONS
- *
- * Remove this message before using this file in production!
- **********************************************************************/
-
/*
* Array of valid menu items and actions.
*
* DB plugin when this plugin registers itself.
*/
-$glmMembersSampleAddOnValidActions = array(
+$glmMembersEventsAddOnValidActions = array(
'adminActions' => array(
'members' => array(
- 'sample' => GLM_MEMBERS_SAMPLE_PLUGIN_SLUG,
+ 'events' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
),
- 'sample' => array(
- 'index' => GLM_MEMBERS_SAMPLE_PLUGIN_SLUG,
- 'more' => GLM_MEMBERS_SAMPLE_PLUGIN_SLUG,
+ 'events' => array(
+ 'index' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
+ 'more' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
),
'info' => array(
- 'index' => GLM_MEMBERS_SAMPLE_PLUGIN_SLUG
+ 'index' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG
)
),
'frontActions' => array(
/*
- 'sample' => array(
- 'list' => GLM_MEMBERS_SAMPLE_PLUGIN_SLUG,
- 'detail' => GLM_MEMBERS_SAMPLE_PLUGIN_SLUG
+ 'events' => array(
+ 'list' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG,
+ 'detail' => GLM_MEMBERS_EVENTS_PLUGIN_SLUG
)
*/
)
);
-?>
\ No newline at end of file
+?>