* Plugin Name: GLM Members Database Contacts
* Plugin URI: http://www.gaslightmedia.com/
* Description: Gaslight Media Members Database.
- * Version: 1.0.6
+ * Version: 1.0.7
* Author: Chuck Scott
* Author URI: http://www.gaslightmedia.com/
* License: GPL2
* version when there's a change in the database!! Use the
* version nunmber of that release for the DB version.
*/
-define('GLM_MEMBERS_CONTACTS_PLUGIN_VERSION', '1.0.6');
+define('GLM_MEMBERS_CONTACTS_PLUGIN_VERSION', '1.0.7');
define('GLM_MEMBERS_CONTACTS_PLUGIN_MIN_MEMBERS_REQUIRED_VERSION', '1.0.44');
define('REQUIRED_GLM_MEMBERS_PLUGIN_MIN_DB_VERSION', '1.0.41');
// If we get here, this is a pure contact user, start them at their profile
- return '/wp-admin/admin.php?page=glm-members-admin-menu-profile';
+ return '/wp-admin/admin.php?page=glm-members-admin-menu-member';
}
// Check that we have good member data
if (is_array($memberData) && isset($memberData['id']) && $memberData['id'] > 0) {
+ // Also store the member id in a WordPress Option in case user clicks "Member" sub-menu
+ update_option('glmMembersDatabaseMemberID', $this->memberID);
+
$haveMember = true;
$memberName = $memberData['name'];
<?php
/**
* Gaslight Media Members Database
- * Admin Member My Profile
+ * Admin Member User Profile
*
* PHP version 5.5
*
if ($this->config['loggedInUser']['contactUser']) {
add_submenu_page(
$mainMenuSlug,
- 'My Profile',
- 'My Profile',
+ 'User Profile',
+ 'User Profile',
'glm_members_edit_my_contact_info',
'glm-members-admin-menu-profile',
function() {$this->controller('profile');}
{if $option == 'list'}
{if apply_filters('glm_members_permit_admin_member_contacts_add_contact', true)}
- <a href="{$thisURL}?page={$thisPage}&glm_action=contacts&member={$memberID}&option=create" class="button-primary glm-button glm-right">Add New Member Contact</a>
+ <a href="{$thisURL}?page={$thisPage}&glm_action=contacts&member={$memberID}&option=create" class="button button-primary glm-button glm-right">Add New Member Contact</a>
{/if}
<form class="glm-right" onSubmit="return false;">
<span{if $haveFilter} class="glm-notice"{/if}><b>List Filters:</b> </span>
{if $option == 'create' || $option == 'edit'}
- <a href="{$thisURL}?page={$thisPage}&glm_action=contacts&member={$memberID}" class="button-primary glm-button glm-right">Return to Contact List</a>
+ <a href="{$thisURL}?page={$thisPage}&glm_action=contacts&member={$memberID}" class="button button-primary glm-button glm-right">Return to Contact List</a>
{if $option == 'create'}
<h2 class="glm-left">Add New Contact</h2>
{else}
{if $contactUpdated}<h2 class="glm-notice glm-flash-updated">Contact Updated</h2>{/if}
- <a id="deleteContactButton" class="button-primary glm-button glm-right">Delete this Contact</a>
+ <a id="deleteContactButton" class="button button-primary glm-button glm-right">Delete this Contact</a>
<div id="deleteContactDialog" class="glm-dialog-box" title="Delete Contact">
<center>
- <p><a id="deleteContactCancel" class="button-primary">Cancel</a></p>
+ <p><a id="deleteContactCancel" class="button button-primary">Cancel</a></p>
<p><input id="deleteContactSubmit" type="submit" value="Delete this contact"></p>
</center>
<div class="glm-item-container">
{if $contactInfo.fieldData.image}
<div id="largeImageDialog" class="glm-dialog-box" title="Large sized image">
<img src="{$glmPluginMediaURL}/images/large/{$contactInfo.fieldData.image}">
- <a id="largeImageCancel" class="button-primary glm-right">Close</a><br>
+ <a id="largeImageCancel" class="button button-primary glm-right">Close</a><br>
</div>
<table class="glm-admin-image-edit-table">
<tr>
<td>
<input type="checkbox" name="image_delete"> Delete Image<br>
{$contactInfo.fieldData.image}<br>
- <p><div id="largeImageButton" class="button-primary">Show Large Image</div></p>
+ <p><div id="largeImageButton" class="button button-primary">Show Large Image</div></p>
</td>
</tr>
<th>City</th>
<td class="glm-item-container">
<!-- Add new city dialog -->
- <div id="newCityButton" class="button-primary glm-right">Add a new City</div>
+ <div id="newCityButton" class="button button-secondary glm-right">Add a new City</div>
<div id="newCityDialog" class="glm-dialog-box" title="Enter a New City">
<table class="glm-admin-table">
<tr>
</tr>
</table>
<p><span class="glm-required">*</span> Required</p>
- <a id="newCityCancel" class="button-primary glm-right">Cancel</a>
+ <a id="newCityCancel" class="button button-primary glm-right">Cancel</a>
<input id="newCitySubmit" type="submit" value="Add new City">
</div>
<!-- City Selection -->
<th {if $contactInfo.fieldRequired.url}class="glm-required"{/if}>Web Address (URL):</th>
<td {if $contactInfo.fieldFail.url}class="glm-form-bad-input"{/if}>
{if $contactInfo.fieldData.url}
- <a class="button-primary glm-right" href="http://{$contactInfo.fieldData.url}" target="urlTarget">Test Link</a>
+ <a class="button button-secondary glm-right" href="http://{$contactInfo.fieldData.url}" target="urlTarget">Test Link</a>
{/if}
http://<input type="text" name="url" value="{$contactInfo.fieldData.url}" class="glm-form-text-input-medium" placeholder="ex: www.gaslightmedia.com">
{if $contactInfo.fieldFail.url}<p>{$contactInfo.fieldFail.url}</p>{/if}
{/if} <!-- /if option -->
{else} <!-- Member not specified or not found -->
- <h2><span class="glm-error">ERROR:</span> Specified member not found!</h2>
+ <h2 class="glm-error">No current member.</h2>
{/if}
<script type="text/javascript">
--- /dev/null
+<div class="wrap">
+ <h2>Your Contact and Log-in Profile</h2>
+ <h2 class="nav-tab-wrapper">
+ <a href="{$thisURL}?page={$thisPage}&glm_action=index" class="nav-tab{if $thisAction==index} nav-tab-active{/if}">User Profile</a>
+{foreach $addOnTabs as $a}
+ <a href="{$thisURL}?page=glm-members-admin-menu-{$a.menu}&glm_action={$a.action}" class="nav-tab{if $thisAction==$a.action} nav-tab-active{/if}">{$a.text}</a>
+{/foreach}
+ </h2>
+ <div id="glm-admin-content-container">
+
\ No newline at end of file
-<div class="wrap">
-
- <h2>Your Contact and Log-in Profile</h2>
-
- <h2 class="nav-tab-wrapper">
- <a href="{$thisURL}?page={$thisPage}&glm_action=index" class="nav-tab{if $thisAction==index}-active{/if}">Profile</a>
- </h2>
- <div id="glm-admin-content-container">
+{include file="$glmWordpresBasePluginPath/glm-member-db-contacts/views/admin/profile/header.html"}
{if apply_filters('glm_members_permit_admin_profile_index_edit_profile', true)}
<th>City</th>
<td class="glm-item-container">
<!-- Add new city dialog -->
- <div id="newCityButton" class="button-primary glm-right">Add a new City</div>
+ <div id="newCityButton" class="button button-secondary glm-right">Add a new City</div>
<div id="newCityDialog" class="glm-dialog-box" title="Enter a New City">
<table class="glm-admin-table">
<tr>
</tr>
</table>
<p><span class="glm-required">*</span> Required</p>
- <a id="newCityCancel" class="button-primary glm-right">Cancel</a>
+ <a id="newCityCancel" class="button button-primary glm-right">Cancel</a>
<input id="newCitySubmit" type="submit" value="Add new City">
</div>
<!-- City Selection -->
<th {if $contactInfo.fieldRequired.url}class="glm-required"{/if}>Web Address (URL):</th>
<td {if $contactInfo.fieldFail.url}class="glm-form-bad-input"{/if}>
{if $contactInfo.fieldData.url}
- <a class="button-primary glm-right" href="http://{$contactInfo.fieldData.url}" target="urlTarget">Test Link</a>
+ <a class="button button-secondary glm-right" href="http://{$contactInfo.fieldData.url}" target="urlTarget">Test Link</a>
{/if}
http://<input type="text" name="url" value="{$contactInfo.fieldData.url}" class="glm-form-text-input-medium" placeholder="ex: www.gaslightmedia.com">
{if $contactInfo.fieldFail.url}<p>{$contactInfo.fieldFail.url}</p>{/if}