* version from this plugin.
*/
define('GLM_MEMBERS_SOCIAL_PLUGIN_VERSION', '0.0.6');
-// define('GLM_MEMBERS_SOCIAL_PLUGIN_DB_VERSION', '0.0.1');
+define('GLM_MEMBERS_SOCIAL_PLUGIN_DB_VERSION', '0.0.1');
// This is the minimum version of the GLM Members DB plugin require for this plugin.
define('GLM_MEMBERS_SOCIAL_PLUGIN_MIN_MEMBERS_REQUIRED_VERSION', '1.0.57');
*/
// Load Contacts data abstract
-//require_once(GLM_MEMBERS_CONTACTS_PLUGIN_CLASS_PATH.'/data/dataContacts.php');
+require_once(GLM_MEMBERS_SOCIAL_PLUGIN_CLASS_PATH.'/data/dataSocial.php');
-class GlmMembersAdmin_member_social // extends GlmDataContacts
+class GlmMembersAdmin_member_social extends GlmDataSocial
{
/**
public function modelAction($actionData = false)
{
+ $displayData = 'Hello, World! This is the Social Add-On "social" model talking to you from inside WordPress.';
+ $success = true;
+ $socials = false;
+ $socialUpdated = false;
+ $haveMember = false;
+ $socialError = false;
+ $newSocial = false;
+ $option = false;
+
+ $socialArray = array(
+ 'facebook' => array(
+ 'name' => 'Facebook',
+ 'xpos' => -5,
+ 'ypos' => -5,
+ 'baseurl' => 'www.facebook.com'
+ ),
+ 'twitter' => array(
+ 'name' => 'Twitter',
+ 'xpos' => -44,
+ 'ypos' => -5,
+ 'baseurl' => 'www.twitter.com'
+ ),
+ 'pinterest' => array(
+ 'name' => 'Pinterest',
+ 'xpos' => -84,
+ 'ypos' => -5,
+ 'baseurl' => 'www.pinterest.com'
+ ),
+ 'googleplus' => array(
+ 'name' => 'Google Plus',
+ 'xpos' => -124,
+ 'ypos' => -5,
+ 'baseurl' => 'www.google.com'
+ ),
+ 'digg' => array(
+ 'name' => 'Digg',
+ 'xpos' => -163,
+ 'ypos' => -5,
+ 'baseurl' => 'www.digg.com'
+ ),
+ 'linkedin' => array(
+ 'name' => 'LinkedIn',
+ 'xpos' => -203,
+ 'ypos' => -5,
+ 'baseurl' => 'www.linkedin.com'
+ ),
+ 'instagram' => array(
+ 'name' => 'Instagram',
+ 'xpos' => -242,
+ 'ypos' => -5,
+ 'baseurl' => 'www.instagram.com'
+ ),
+ 'youtube' => array(
+ 'name' => 'YouTube',
+ 'xpos' => -322,
+ 'ypos' => -5,
+ 'baseurl' => 'www.youtube.com'
+ ),
+ 'flickr' => array(
+ 'name' => 'Flickr',
+ 'xpos' => -44,
+ 'ypos' => -44,
+ 'baseurl' => 'www.flickr.com'
+ ),
+ 'blog' => array(
+ 'name' => 'blog',
+ 'xpos' => -124,
+ 'ypos' => -45,
+ 'baseurl' => '#'
+ ),
+ 'photobucket' => array(
+ 'name' => 'Photobucket',
+ 'xpos' => -282,
+ 'ypos' => -45,
+ 'baseurl' => 'www.photobucket.com'
+ ),
+ );
+
+ // If there's an action option
+ if (isset($_REQUEST['option'])) {
+ $option = trim($_REQUEST['option']);
+ }
+
+ $socialData = $this->editEntry($memberID);
+
+ if (!$socialData) {
+ $socialData = $this->newEntry($memberID);
+ $newSocial = true;
+
+ }
+// switch($option) {
+// case 'update':
+// default:
+// $this->updateEntry($memberID);
+// if ($socialData) {
+// $socialUpdated = true;
+// } else {
+// $socialError = true;
+// }
+//
+// $option = 'update';
+// break;
+// }
+
+ $memberID = 0;
+ if (isset($_REQUEST['member']) && ($_REQUEST['member']-0) > 0) {
+ $memberID = $_REQUEST['member'] - 0;
+ }
+ if ($memberID == 0) {
+
+ // There should have been a member ID - So failure
+ return array(
+ 'status' => false,
+ 'menuItemRedirect' => 'error',
+ 'modelRedirect' => 'index',
+ 'view' => 'admin/error/index.html',
+ 'data' => false
+ );
+
+ }
+
+// if (isset($_REQUEST['option']) && $_REQUEST['option'] == 'submit') {
+ if ($option == 'submit') {
+
+ $socialData = $this->updateEntry($memberID);
+
+ if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
+ glmMembersAdmin::addNotice("<b> Social Update:</b> $memberID", 'Process');
+ }
- $displayData = 'This is the Social "Member" "Social" model talking to you from inside WordPress.';
+ // If update was successful then use editEntry() to setup for the edit again.
+ if ($socialData) {
+ $socialData = $this->editEntry($memberID);
+ $socialUpdated = true;
+
+ // Also update all member info records with any possible name change
+ $sql = "
+ UPDATE ".GLM_MEMBERS_SOCIAL_PLUGIN_DB_PREFIX."socialURL
+ SET facebook_url = www.testval.com
+ WHERE member_id = 1
+ ;";
+// $sql = "
+// UPDATE ".GLM_MEMBERS_SOCIAL_PLUGIN_DB_PREFIX."socialURL
+// SET facebook_url = '".addslashes($socialData['fieldData']['name'])."'
+// WHERE member_id = $memberID
+// ;";
+ $this->wpdb->query($sql);
+
+ }
+ }
+
+ // If we had a fatal error, redirect to the error page
+ if ($socialError) {
+ return array(
+ 'status' => $success,
+ 'option' => $option,
+ 'menuItemRedirect' => 'error',
+ 'modelRedirect' => 'index',
+ 'view' => 'admin/error/index.html',
+ 'data' => false
+ );
+ }
+
+ if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
+ glmMembersAdmin::addNotice($memberTypes, 'DataBlock', 'Member Types Data');
+ }
+
// Compile template data
$templateData = array(
'displayData' => $displayData,
- 'assetsUrl' => GLM_MEMBERS_SOCIAL_PLUGIN_ASSETS_URL
-
+ 'socialArray' => $socialArray,
+ 'assetsUrl' => GLM_MEMBERS_SOCIAL_PLUGIN_ASSETS_URL,
+ 'socials' => $socials,
+ 'socialUpdated' => $socialUpdated,
+ 'socialError' => $socialError,
+ 'haveMember' => $haveMember,
+ 'memberID' => $memberID,
+ 'option' => $option
);
-
+
// Return status, any suggested view, and any data to controller
return array(
'status' => true,
'view' => 'admin/member/social.html',
'data' => $templateData
);
-
}
-
}
// Load Contacts data abstract
//require_once(GLM_MEMBERS_CONTACTS_PLUGIN_CLASS_PATH.'/data/dataContacts.php');
+
+
+
class GlmMembersAdmin_social_index // extends GlmDataContacts
{
public function modelAction($actionData = false)
{
-
$displayData = 'Hello, World! This is the Social Add-On "social" model talking to you from inside WordPress.';
+ $success = true;
+ $socials = false;
+ $socialUpdated = false;
+ $haveMember = false;
+ $socialError = false;
+ $newSocial = false;
+ $option = false;
+
+ $socialArray = array(
+ 'facebook' => array(
+ 'name' => 'Facebook',
+ 'xpos' => -5,
+ 'ypos' => -5,
+ 'baseurl' => 'www.facebook.com'
+ ),
+ 'twitter' => array(
+ 'name' => 'Twitter',
+ 'xpos' => -44,
+ 'ypos' => -5,
+ 'baseurl' => 'www.twitter.com'
+ ),
+ 'pinterest' => array(
+ 'name' => 'Pinterest',
+ 'xpos' => -84,
+ 'ypos' => -5,
+ 'baseurl' => 'www.pinterest.com'
+ ),
+ 'googleplus' => array(
+ 'name' => 'Google Plus',
+ 'xpos' => -124,
+ 'ypos' => -5,
+ 'baseurl' => 'www.google.com'
+ ),
+ 'digg' => array(
+ 'name' => 'Digg',
+ 'xpos' => -163,
+ 'ypos' => -5,
+ 'baseurl' => 'www.digg.com'
+ ),
+ 'linkedin' => array(
+ 'name' => 'LinkedIn',
+ 'xpos' => -203,
+ 'ypos' => -5,
+ 'baseurl' => 'www.linkedin.com'
+ ),
+ 'instagram' => array(
+ 'name' => 'Instagram',
+ 'xpos' => -242,
+ 'ypos' => -5,
+ 'baseurl' => 'www.instagram.com'
+ ),
+ 'youtube' => array(
+ 'name' => 'YouTube',
+ 'xpos' => -322,
+ 'ypos' => -5,
+ 'baseurl' => 'www.youtube.com'
+ ),
+ 'flickr' => array(
+ 'name' => 'Flickr',
+ 'xpos' => -44,
+ 'ypos' => -44,
+ 'baseurl' => 'www.flickr.com'
+ ),
+ 'blog' => array(
+ 'name' => 'blog',
+ 'xpos' => -124,
+ 'ypos' => -45,
+ 'baseurl' => '#'
+ ),
+ 'photobucket' => array(
+ 'name' => 'Photobucket',
+ 'xpos' => -282,
+ 'ypos' => -45,
+ 'baseurl' => 'www.photobucket.com'
+ ),
+ );
+
+ // If there's an action option
+ if (isset($_REQUEST['option'])) {
+ $option = trim($_REQUEST['option']);
+ }
+
+ $socialData = $this->editEntry($memberID);
+
+ if (!$socialData) {
+ $socialData = $this->newEntry($memberID);
+ $newSocial = true;
+
+ }
+// switch($option) {
+// case 'update':
+// default:
+// $this->updateEntry($memberID);
+// if ($socialData) {
+// $socialUpdated = true;
+// } else {
+// $socialError = true;
+// }
+//
+// $option = 'update';
+// break;
+// }
+
+ $memberID = 0;
+ if (isset($_REQUEST['member']) && ($_REQUEST['member']-0) > 0) {
+ $memberID = $_REQUEST['member'] - 0;
+ }
+ if ($memberID == 0) {
+
+ // There should have been a member ID - So failure
+ return array(
+ 'status' => false,
+ 'menuItemRedirect' => 'error',
+ 'modelRedirect' => 'index',
+ 'view' => 'admin/error/index.html',
+ 'data' => false
+ );
+
+ }
+
+// if (isset($_REQUEST['option']) && $_REQUEST['option'] == 'submit') {
+ if ($option == 'submit') {
+
+ $socialData = $this->updateEntry($memberID);
+
+ if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) {
+ glmMembersAdmin::addNotice("<b> Social Update:</b> $memberID", 'Process');
+ }
+ // If update was successful then use editEntry() to setup for the edit again.
+ if ($socialData) {
+
+ $socialData = $this->editEntry($memberID);
+ $socialUpdated = true;
+
+ // Also update all member info records with any possible name change
+ $sql = "
+ UPDATE ".GLM_MEMBERS_SOCIAL_PLUGIN_DB_PREFIX."socialURL
+ SET facebook_url = www.testval.com
+ WHERE member_id = 1
+ ;";
+// $sql = "
+// UPDATE ".GLM_MEMBERS_SOCIAL_PLUGIN_DB_PREFIX."socialURL
+// SET facebook_url = '".addslashes($socialData['fieldData']['name'])."'
+// WHERE member_id = $memberID
+// ;";
+ $this->wpdb->query($sql);
+
+ }
+ }
+
+ // If we had a fatal error, redirect to the error page
+ if ($socialError) {
+ return array(
+ 'status' => $success,
+ 'option' => $option,
+ 'menuItemRedirect' => 'error',
+ 'modelRedirect' => 'index',
+ 'view' => 'admin/error/index.html',
+ 'data' => false
+ );
+ }
+
+ if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG_VERBOSE) {
+ glmMembersAdmin::addNotice($memberTypes, 'DataBlock', 'Member Types Data');
+ }
+
// Compile template data
$templateData = array(
- 'displayData' => $displayData
+ 'displayData' => $displayData,
+ 'socialArray' => $socialArray,
+ 'assetsUrl' => GLM_MEMBERS_SOCIAL_PLUGIN_ASSETS_URL,
+ 'socials' => $socials,
+ 'socialUpdated' => $socialUpdated,
+ 'socialError' => $socialError,
+ 'haveMember' => $haveMember,
+ 'memberID' => $memberID,
+ 'option' => $option
);
// Return status, any suggested view, and any data to controller
'view' => 'admin/social/index.html',
'data' => $templateData
);
-
}
-
-
}
{
$displayData = 'Welcome to more information!<br>This is the Social Add-On "social" model with action "more" talking to you from inside WordPress.';
-
+ $socialArray = array(
+ 'member1' => array(
+ 'facebookurl' => 'www.facebook.com',
+ 'youtubeurl' => 'www.youtube.com',
+ 'googleurl' => 'www.google.com',
+ 'gaslighturl' => 'www.gaslightmedia.com'
+ ),
+
+ 'member2' => array(
+ 'facebookurl' => 'www.facebook.com',
+ 'youtubeurl' => 'www.youtube.com',
+ 'googleurl' => 'www.google.com',
+ 'gaslighturl' => 'www.gaslightmedia.com'
+ ),
+
+ 'member2' => array(
+ 'facebookurl' => 'www.facebook.com',
+ 'youtubeurl' => 'www.youtube.com',
+ 'googleurl' => 'www.google.com',
+ 'gaslighturl' => 'www.gaslightmedia.com'
+ )
+
+ );
// Compile template data
$templateData = array(
- 'displayData' => $displayData
+ 'displayData' => $displayData,
+ 'socialArray' => $socialArray
);
// Return status, any suggested view, and any data to controller
+++ /dev/null
--- Gaslight Media Members Database - Social
--- 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,
--- all queries must be separated by a line with four dashes
-
-
--- Social Management Settings
-CREATE TABLE {prefix}management (
- id INT NOT NULL AUTO_INCREMENT,
- canonical_social_page TINYTEXT NULL, -- Canonical page slug for detail
- PRIMARY KEY (id)
-);
-
-----
-
--- Set default social management entry
-INSERT INTO {prefix}management
- ( id, canonical_social_page )
- VALUES
- ( 1, 'social data' )
-;
-
-----
-
-CREATE TABLE {prefix}social (
- id INT NOT NULL AUTO_INCREMENT,
- blogger_url TEXT NULL,
- youtube_url TEXT NULL,
- facebook_url TEXT NULL,
- twitter_url TEXT NULL,
- imgur_url TEXT NULL,
- flickr_url TEXT NULL,
- tumblr_url TEXT NULL,
- instagram_url TEXT NULL,
- linkedin_url TEXT NULL,
- googleplus_url TEXT NULL,
- PRIMARY KEY (id)
-);
-
-----
-
-CREATE TABLE {prefix}SOCIALTEST (
- id INT NOT NULL AUTO_INCREMENT,
- active BOOLEAN NULL, -- Package is active
- title TINYTEXT NULL, -- Title of package
- package_slug TINYTEXT NULL, -- Package name slug for canonical URLs (lowercase, "-" for spaces, no punctuation)
- descr TEXT NULL, -- Description of package
- short_descr TINYTEXT NULL, -- Short description of package
- image TINYTEXT NULL, -- Package image
- start_date TIMESTAMP NULL, -- Date display of this package starts
- end_date TIMESTAMP NULL, -- Date display of this package ends (last date of display)
- expire_date TIMESTAMP NULL, -- Date package expires (first date it's expired)
- position INT NULL, -- Display order position
- pricing TINYTEXT NULL, -- Pricing, descriptive
- ref_type INT NULL, -- Type of entity this package is associated with
- ref_dest INT NULL, -- Pointer to the specific entity
- PRIMARY KEY (id),
-);
+++ /dev/null
-<?php
-/**
- * Gaslight Media Members Database
- * GLM Members Social DB Versions
- *
- * PHP version 5.5
- *
- * @category glmWordPressPlugin
- * @package glmMembersDatabase
- * @author Gaslight Media <dev@gaslightmedia.com>
- * @license http://www.gaslightmedia.com Gaslightmedia
- * @release dbVersions.php,v 1.0 2014/10/31 19:31:47 cscott Exp $
- * @link http://dev.gaslightmedia.com/
- */
-
-
-/**********************************************************************
- * NOTE: THIS IS A SOCIAL FILE - DO NOT USE UNMODIFIED
- *
- * Please change all references to social, Social, or SOCIAL 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!
- **********************************************************************/
-
-
-$glmMembersSocialDbVersions = array(
- '0.0.1' => array('version' => '0.0.1', 'tables' => 3)
-);
-
--- /dev/null
+-- Gaslight Media Members Database - Social
+-- 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 recent 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,
+-- all queries must be separated by a line with four dashes
+
+CREATE TABLE {prefix}socialURL (
+ member_id INT NULL,
+ facebook_url TEXT NULL,
+ twitter_url TEXT NULL,
+ pinterest_url TEXT NULL,
+ googleplus_url TEXT NULL,
+ digg_url TEXT NULL,
+ linkedin_url TEXT NULL,
+ instagram_url TEXT NULL,
+ rss_url TEXT NULL,
+ youtube_url TEXT NULL,
+ flickr_url TEXT NULL,
+ blog_url TEXT NULL,
+ photobucket_url TEXT NULL
+ PRIMARY KEY (member_id),
+ INDEX(member_id)
+);
+
+----
+
+CREATE TABLE {prefix}socialMEDIA (
+ id INT NOT NULL AUTO_INCREMENT,
+ social_name TINYTEXT NULL,
+ social_xpos int NULL,
+ social_ypos int NULL,
+ social_baseurl TINYTEXT NULL,
+ PRIMARY KEY (id)
+);
+
+----
+
+INSERT INTO
\ No newline at end of file
--- /dev/null
+<?php
+/**
+ * Gaslight Media Members Database
+ * GLM Members Social DB Versions
+ *
+ * PHP version 5.5
+ *
+ * @category glmWordPressPlugin
+ * @package glmMembersDatabase
+ * @author Gaslight Media <dev@gaslightmedia.com>
+ * @license http://www.gaslightmedia.com Gaslightmedia
+ * @release dbVersions.php,v 1.0 2014/10/31 19:31:47 cscott Exp $
+ * @link http://dev.gaslightmedia.com/
+ */
+
+
+/**********************************************************************
+ * NOTE: THIS IS A SOCIAL FILE - DO NOT USE UNMODIFIED
+ *
+ * Please change all references to social, Social, or SOCIAL 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!
+ **********************************************************************/
+
+
+$glmMembersSocialDbVersions = array(
+ '0.0.1' => array('version' => '0.0.1', 'tables' => 1)
+);
--- /dev/null
+{include file='admin/error/header.html'}
+
+ <h2>Sorry, we've had an error.</h2>
+
+ <p><b>Error: </b>: An invalid action has been specified.</p>
+
+ {if $errorMsg}<p>{$errorMsg}</p>{/if}
+
+ <p>Please try again. If you still get the same error, contact Gaslight Media at 231-487-0692 for assistance.</p>
+
+{include file='admin/footer.html'}
--- /dev/null
+<div class="wrap">
+
+ <h2>{$glmPluginName}</h2>
+
+
\ No newline at end of file
--- /dev/null
+{include file='admin/error/header.html'}
+
+ <center>
+
+ <h3>Sorry, we've had some type of fatal error.</h3>
+
+ <p>Please try again. If you still get the same error, contact Gaslight Media at 231-487-0692 for assistance.</p>
+
+ </center>
+
+{include file='admin/footer.html'}
+
<h3>Members Social Tab</h3>
<p>{$displayData}</p>
<table class="glm-admin-table">
-<!-- foreach $socials as $social
-{foreach from=$socials item=social}
-<tr><th><div id="glm-member-db-admin-social-{$social->name|lower}" title="{$social->name}" class="glm-member-db-social-icon" style="background: url('{$assetsUrl}/social-few-full-sprite.jpg') repeat scroll -5px -5px;height:{$social->xpos};width:{$social->ypos);display:block;"></div>{$social->name}</th><td><input type="text" placeholder="{$social->name} url" name="{$social->name}" class="glm-form-text-input"></td></tr>
-{/foreach}
---->
-<tr><th><div id="glm-member-db-admin-social-facebook" title="facebook" class="glm-member-db-social-icon" style="background: url('{$assetsUrl}/social-few-full-sprite.jpg') repeat scroll -5px -5px;height:33px;width:33px;display:block;"></div>Facebook</th><td><input type="text" placeholder="Facebook URL" name="facebook" class="glm-form-text-input"></td></tr>
-<tr><th><div id="glm-member-db-admin-social-twitter" title="twitter" class="glm-member-db-social-icon" style="background: url('{$assetsUrl}/social-few-full-sprite.jpg') repeat scroll -44px -5px;height:33px;width:33px;display:block;"></div>Twitter</th><td><input type="text" name="Twitter" class="glm-form-text-input"></td></tr>
-<tr><th><div id="glm-member-db-admin-social-pinterest" title="pinterest" class="glm-member-db-social-icon" style="background: url('{$assetsUrl}/social-few-full-sprite.jpg') repeat scroll -84px -5px;height:33px;width:33px;display:block;"></div>Pinterest</th><td><input type="text" name="name" class="glm-form-text-input"></td></tr>
-<tr><th><div id="glm-member-db-admin-social-googleplus" title="googleplus" class="glm-member-db-social-icon" style="background: url('{$assetsUrl}/social-few-full-sprite.jpg') repeat scroll -124px -5px;height:33px;width:33px;display:block;"></div>Google Plus</th><td><input type="text" name="name" class="glm-form-text-input"></td></tr>
-<tr><th><div id="glm-member-db-admin-social-digg" title="digg" class="glm-member-db-social-icon" style="background: url('{$assetsUrl}/social-few-full-sprite.jpg') repeat scroll -163px -5px;height:33px;width:33px;display:block;"></div>Digg</th><td><input type="text" name="name" class="glm-form-text-input"></td></tr>
-<tr><th><div id="glm-member-db-admin-social-linkedin" title="linkedin" class="glm-member-db-social-icon" style="background: url('{$assetsUrl}/social-few-full-sprite.jpg') repeat scroll -203px -5px;height:33px;width:33px;display:block;"></div>LinkedIn</th><td><input type="text" name="name" class="glm-form-text-input"></td></tr>
-<tr><th><div id="glm-member-db-admin-social-instagram" title="instagram" class="glm-member-db-social-icon" style="background: url('{$assetsUrl}/social-few-full-sprite.jpg') repeat scroll -242px -5px;height:33px;width:33px;display:block;"></div>Instagram</th><td><input type="text" name="name" class="glm-form-text-input"></td></tr>
-<tr><th><div id="glm-member-db-admin-social-rss" title="" class="glm-member-db-social-icon" style="background: url('{$assetsUrl}/social-few-full-sprite.jpg') repeat scroll -282px -5px;height:33px;width:33px;display:block;"></div>RSS</th><td><input type="text" name="name" class="glm-form-text-input"></td></tr>
-<tr><th><div id="glm-member-db-admin-social-youtube" title="youtube" class="glm-member-db-social-icon" style="background: url('{$assetsUrl}/social-few-full-sprite.jpg') repeat scroll -322px -5px;height:33px;width:33px;display:block;"></div>YouTube</th><td><input type="text" name="name" class="glm-form-text-input"></td></tr>
-<tr><th><div id="glm-member-db-admin-social-wordpress" title="wordpress" class="glm-member-db-social-icon" style="background: url('{$assetsUrl}/social-few-full-sprite.jpg') repeat scroll -5px -44px;height:33px;width:33px;display:block;"></div>Wordpress</th><td><input type="text" name="name" class="glm-form-text-input"></td></tr>
-<tr><th><div id="glm-member-db-admin-social-flickr" title="flickr" class="glm-member-db-social-icon" style="background: url('{$assetsUrl}/social-few-full-sprite.jpg') repeat scroll -44px -44px;height:33px;width:33px;display:block;"></div>Flickr</th><td><input type="text" name="name" class="glm-form-text-input"></td></tr>
-<tr><th><div id="glm-member-db-admin-social-pinterest" title="" class="glm-member-db-social-icon" style="background: url('{$assetsUrl}/social-few-full-sprite.jpg') repeat scroll -84px -45px;height:33px;width:33px;display:block;"></div>Pinterest2</th><td><input type="text" name="name" class="glm-form-text-input"></td></tr>
-<tr><th><div id="glm-member-db-admin-social-blog" title="" class="glm-member-db-social-icon" style="background: url('{$assetsUrl}/social-few-full-sprite.jpg') repeat scroll -124px -45px;height:33px;width:33px;display:block;"></div>Blog</th><td><input type="text" name="name" class="glm-form-text-input"></td></tr>
-<tr><th><div id="glm-member-db-admin-social-wordpress" title="" class="glm-member-db-social-icon" style="background: url('{$assetsUrl}/social-few-full-sprite.jpg') repeat scroll -163px -45px;height:33px;width:33px;display:block;"></div>Wordpress2</th><td><input type="text" name="name" class="glm-form-text-input"></td></tr>
-<tr><th><div id="glm-member-db-admin-social-X" title="" class="glm-member-db-social-icon" style="background: url('{$assetsUrl}/social-few-full-sprite.jpg') repeat scroll -203px -45px;height:33px;width:33px;display:block;"></div>?name?</th><td><input type="text" name="name" class="glm-form-text-input"></td></tr>
-<tr><th><div id="glm-member-db-admin-social-X" title="" class="glm-member-db-social-icon" style="background: url('{$assetsUrl}/social-few-full-sprite.jpg') repeat scroll -242px -45px;height:33px;width:33px;display:block;"></div>?name?</th><td><input type="text" name="name" class="glm-form-text-input"></td></tr>
-<tr><th><div id="glm-member-db-admin-social-photobucket" title="" class="glm-member-db-social-icon" style="background: url('{$assetsUrl}/social-few-full-sprite.jpg') repeat scroll -282px -45px;height:33px;width:33px;display:block;"></div>Photobucket</th><td><input type="text" name="name" class="glm-form-text-input"></td></tr>
-<tr><th><div id="glm-member-db-admin-social-blg2" title="" class="glm-member-db-social-icon" style="background: url('{$assetsUrl}/social-few-full-sprite.jpg') repeat scroll -322px -46px;height:33px;width:33px;display:block;"></div>Blog2</th><td><input type="text" name="name" class="glm-form-text-input"></td></tr>
-</table>
+ <div class="wrap">
+ <div id="glm-admin-content-container">
+ <h3>Social Model</h3>
+ <p>{$displayData}</p>
+ <a href="{$thisURL}?page={$thisPage}&glm_action=more">Click me to see more!</a>
+ <form action="{$thisURL}?page={$thisPage}" method="post" enctype="multipart/form-data">
+ <input type="submit" class="button glm-button submit" value="{if $memberInfoID && $memberInfo}Update member information{else}Add new member information{/if}">
+ <div class="button glm-button right">Update</div>
+ <table class="glm-admin-table">
+ {foreach from=$socialArray key=k item=socialItem}
+ <tr>
+ <th>
+ <div id="glm-member-db-admin-social-{$socialItem.name|lower}" title="{$socialItem.name}" class="glm-member-db-social-icon" style="background: url('{$assetsUrl}/social-few-full-sprite.jpg') repeat scroll {$socialItem.xpos}px {$socialItem.ypos}px;height:33px;width:33px;display:block;">
+ </div>
+ {$socialItem.name}
+ </th>
+ <td>
+ <input type="text" placeholder="{$socialItem.name} URL" name="{$socialItem.name|lower}" class="glm-form-text-input">
+ </td>
+ </tr>
+ {/foreach}
+ </table>
+ <input type="submit" class="button glm-button submit" value="{if $memberInfoID && $memberInfo}Update member information{else}Add new member information{/if}">
+ </form>
+ </div>
+</div>
{include file='admin/footer.html'}
\ No newline at end of file
<h3>Social Model</h3>
<p>{$displayData}</p>
<a href="{$thisURL}?page={$thisPage}&glm_action=more">Click me to see more!</a>
+
+ <form action="{$thisURL}?page={$thisPage}" method="post" enctype="multipart/form-data">
+ <input type="submit" class="button glm-button submit" value="{if $memberInfoID && $memberInfo}Update member information{else}Add new member information{/if}">
+ <div class="button glm-button right">Update</div>
+ <table class="glm-admin-table">
+ {foreach from=$socialArray key=k item=socialItem}
+ <tr>
+ <th>
+ <div id="glm-member-db-admin-social-{$socialItem.name|lower}" title="{$socialItem.name}" class="glm-member-db-social-icon" style="background: url('{$assetsUrl}/social-few-full-sprite.jpg') repeat scroll {$socialItem.xpos}px {$socialItem.ypos}px;height:33px;width:33px;display:block;">
+ </div>
+ {$socialItem.name}
+ </th>
+ <td>
+ <input type="text" placeholder="{$socialItem.name} URL" name="{$socialItem.name|lower}" class="glm-form-text-input">
+ </td>
+ </tr>
+ {/foreach}
+ </table>
+ <input type="submit" class="button glm-button submit" value="{if $memberInfoID && $memberInfo}Update member information{else}Add new member information{/if}">
+ </form>
+
</div>
</div>
\ No newline at end of file