From: Laury GvR Date: Tue, 29 Mar 2016 15:46:57 +0000 (-0400) Subject: Current development version: X-Git-Tag: v1.0.0^2~13 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=ffe37194e00fc30c004187e325ba560d1d9f825c;p=WP-Plugins%2Fglm-member-db-social.git Current development version: --- diff --git a/classes/data/dataRecords.php b/classes/data/dataRecords.php deleted file mode 100644 index 1ac163d..0000000 --- a/classes/data/dataRecords.php +++ /dev/null @@ -1,203 +0,0 @@ - - * @license http://www.gaslightmedia.com Gaslightmedia - * @release SVN: $Id: dataSocial.php,v 1.0 2011/01/25 19:31:47 cscott Exp $ - */ - -/********************************************************************** - * 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. - * - * Data fields in this file are social only. - * - * Remove this message before using this file in production! - **********************************************************************/ - -// Member Info Data required -require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataMemberInfo.php'); - -/** - * GlmDataRecords class - * - * PHP version 5 - * - * @category Data - * @package GLM Member DB - * @author Gaslight Media - * @license http://www.gaslightmedia.com Gaslightmedia - * @release SVN: $Id: dataMembers.php,v 1.0 2011/01/25 19:31:47 cscott - * Exp $ - */ -class GlmDataRecords extends GlmDataAbstract -{ - - /** - * WordPress Database Object - * - * @var $wpdb - * @access public - */ - public $wpdb; - /** - * Plugin Configuration Data - * - * @var $config - * @access public - */ - public $config; - /** - * Data Table Name - * - * @var $table - * @access public - */ - public $table; - /** - * Field definitions - * - * 'type' is type of field as defined by the application - * text Regular text field - * pointer Pointer to an entry in another table - * 'filters' is the filter name for a particular filter ID in PHP filter - * functions - * See PHP filter_id() - * - * 'use' is when to use the field - * l = List - * g = Get - * n = New - * i = Insert - * e = Edit - * u = Update - * d = Delete - * a = All - * - * @var $ini - * @access public - */ - public $fields = false; - /** - * MemberInfo DB object - * - * @var $MemberInfo - * @access public - */ - public $MemberInfo; - - /** - * Constructor - * - * @param object $d database connection - * @param array $config Configuration array - * @param bool $limitedEdit Flag to say indicate limited edit requested - * - * @return void - * @access public - */ - public function __construct($wpdb, $config, $limitedEdit = false) - { - - // If this class is not being extended along with existing $wpdb and $config - if (!$this->wpdb) { - - // Save WordPress Database object - $this->wpdb = $wpdb; - - // Save plugin configuration object - $this->config = $config; - - } - - /* - * Table Name - */ - $this->table = GLM_MEMBERS_SOCIAL_PLUGIN_DB_PREFIX . 'records'; - - /* - * Table Data Fields - */ - - $this->fields = array ( - - // Social ID - 'id' => array ( - 'field' => 'id', - 'type' => 'integer', - 'view_only' => true, - 'use' => 'a' - ), - - // Name of the social record - 'name' => array ( - 'field' => 'name', - 'type' => 'text', - 'default' => true, - 'use' => 'a' - ), - - // X Position of icon in sprite - 'xpos' => array ( - 'field' => 'xpos', - 'type' => 'integer', - 'view_only' => true, - 'use' => 'a' - ), - - // Y Position of icon in sprite - 'ypos' => array( - 'field' => 'ypos', - 'type' => 'integer', - 'required' => true, - 'use' => 'a' - ), - - // Base url of the social record - 'baseurl' => array( - 'field' => 'baseurl', - 'type' => 'text', - 'required' => true, - 'use' => 'a' - ), - - // Active flag - 'active' => array ( - 'field' => 'active', - 'type' => 'checkbox', - 'default' => true, - 'use' => 'a' - ) - ); - } - - /* - * Entry Post Processing Call-Back Method - * - * Perform post-processing for all result entries. - * - * In this case we're using it to append an array of category - * data to each member result and also sort by member name. - * - * @param array $r Array of field result data for a single entry - * @param string $a Action being performed (l, i, g, ...) - * - * @return object Class object - * - */ - public function entryPostProcessing($r, $a) - { - return $r; - } - -} - -?> \ No newline at end of file diff --git a/classes/data/dataSocials.php b/classes/data/dataSocials.php new file mode 100644 index 0000000..7dba8f1 --- /dev/null +++ b/classes/data/dataSocials.php @@ -0,0 +1,202 @@ + + * @license http://www.gaslightmedia.com Gaslightmedia + * @release SVN: $Id: dataSocial.php,v 1.0 2011/01/25 19:31:47 cscott Exp $ + */ + +/********************************************************************** + * 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. + * + * Data fields in this file are social only. + * + * Remove this message before using this file in production! + **********************************************************************/ + +// Member Info Data required +require_once(GLM_MEMBERS_PLUGIN_CLASS_PATH.'/data/dataMemberInfo.php'); + +/** + * GlmDataSocials class + * + * PHP version 5 + * + * @category Data + * @package GLM Member DB + * @author Gaslight Media + * @license http://www.gaslightmedia.com Gaslightmedia + * @release SVN: $Id: dataMembers.php,v 1.0 2011/01/25 19:31:47 cscott + * Exp $ + */ +class GlmDataSocials extends GlmDataAbstract +{ + /** + * WordPress Database Object + * + * @var $wpdb + * @access public + */ + public $wpdb; + /** + * Plugin Configuration Data + * + * @var $config + * @access public + */ + public $config; + /** + * Data Table Name + * + * @var $table + * @access public + */ + public $table; + /** + * Field definitions + * + * 'type' is type of field as defined by the application + * text Regular text field + * pointer Pointer to an entry in another table + * 'filters' is the filter name for a particular filter ID in PHP filter + * functions + * See PHP filter_id() + * + * 'use' is when to use the field + * l = List + * g = Get + * n = New + * i = Insert + * e = Edit + * u = Update + * d = Delete + * a = All + * + * @var $ini + * @access public + */ + public $fields = false; + /** + * MemberInfo DB object + * + * @var $MemberInfo + * @access public + */ + public $MemberInfo; + + /** + * Constructor + * + * @param object $d database connection + * @param array $config Configuration array + * @param bool $limitedEdit Flag to say indicate limited edit requested + * + * @return void + * @access public + */ + public function __construct($wpdb, $config, $limitedEdit = false) + { + + // If this class is not being extended along with existing $wpdb and $config + if (!$this->wpdb) { + + // Save WordPress Database object + $this->wpdb = $wpdb; + + // Save plugin configuration object + $this->config = $config; + + } + + /* + * Table Name + */ + $this->table = GLM_MEMBERS_SOCIAL_PLUGIN_DB_PREFIX . 'socials'; + + /* + * Table Data Fields + */ + + $this->fields = array ( + + // The id for this social medium + 'id' => array ( + 'field' => 'id', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ), + + // Name of the social record + 'name' => array ( + 'field' => 'name', + 'type' => 'text', + 'default' => true, + 'use' => 'a' + ), + + // X Position of icon in sprite + 'xpos' => array ( + 'field' => 'xpos', + 'type' => 'integer', + 'view_only' => true, + 'use' => 'a' + ), + + // Y Position of icon in sprite + 'ypos' => array( + 'field' => 'ypos', + 'type' => 'integer', + 'required' => true, + 'use' => 'a' + ), + + // Base url of the social record + 'baseurl' => array( + 'field' => 'baseurl', + 'type' => 'text', + 'required' => true, + 'use' => 'a' + ), + + // Active flag + 'active' => array ( + 'field' => 'active', + 'type' => 'checkbox', + 'default' => true, + 'use' => 'a' + ) + ); + } + + /* + * Entry Post Processing Call-Back Method + * + * Perform post-processing for all result entries. + * + * In this case we're using it to append an array of category + * data to each member result and also sort by member name. + * + * @param array $r Array of field result data for a single entry + * @param string $a Action being performed (l, i, g, ...) + * + * @return object Class object + * + */ + public function entryPostProcessing($r, $a) + { + return $r; + } + +} + +?> \ No newline at end of file diff --git a/classes/data/dataUrls.php b/classes/data/dataUrls.php index f0e16db..373a89a 100644 --- a/classes/data/dataUrls.php +++ b/classes/data/dataUrls.php @@ -128,8 +128,7 @@ class GlmDataUrls extends GlmDataAbstract */ $this->fields = array ( - - // Social ID + // The id of this url record 'id' => array ( 'field' => 'id', 'type' => 'integer', @@ -137,96 +136,23 @@ class GlmDataUrls extends GlmDataAbstract 'use' => 'a' ), - // The member's URL for facebook - 'facebook' => array ( - 'field' => 'facebook', - 'type' => 'text', - 'default' => true, - 'use' => 'a' - ), - // The member's URL for twitter - 'twitter' => array ( - 'field' => 'twitter', - 'type' => 'text', - 'default' => true, - 'use' => 'a' - ), - - // The member's URL for pinterest - 'pinterest' => array ( - 'field' => 'pinterest', - 'type' => 'text', - 'default' => true, - 'use' => 'a' - ), - - // The member's URL for googleplus - 'googleplus' => array ( - 'field' => 'googleplus', - 'type' => 'text', - 'default' => true, - 'use' => 'a' - ), - - // The member's URL for digg - 'digg' => array ( - 'field' => 'digg', - 'type' => 'text', - 'default' => true, - 'use' => 'a' - ), - - // The member's URL for linkedin - 'linkedin' => array ( - 'field' => 'linkedin', - 'type' => 'text', - 'default' => true, - 'use' => 'a' - ), - - // The member's URL for instagram - 'instagram' => array ( - 'field' => 'instagram', - 'type' => 'text', - 'default' => true, - 'use' => 'a' - ), - - // The member's URL for rss - 'rss' => array ( - 'field' => 'rss', - 'type' => 'text', - 'default' => true, - 'use' => 'a' - ), - - // The member's URL for youtube - 'youtube' => array ( - 'field' => 'youtube', - 'type' => 'text', - 'default' => true, - 'use' => 'a' - ), - - // The member's URL for flickr - 'flickr' => array ( - 'field' => 'flickr', - 'type' => 'text', + // The id of the associated member + 'member_id' => array ( + 'field' => 'member_id', + 'type' => 'integer', 'default' => true, 'use' => 'a' ), - - // The member's URL for blog - 'blog' => array ( - 'field' => 'blog', + // The member's URL for a certain medium + 'url' => array ( + 'field' => 'url', 'type' => 'text', 'default' => true, 'use' => 'a' ), - - // The member's URL for photobucket - 'photobucket' => array ( - 'field' => 'photobucket', + // The social medium + 'social' => array ( + 'field' => 'social', 'type' => 'text', 'default' => true, 'use' => 'a' diff --git a/models/admin/member/social.php b/models/admin/member/social.php index 20a3236..9dadd0f 100644 --- a/models/admin/member/social.php +++ b/models/admin/member/social.php @@ -13,12 +13,8 @@ * @link http://dev.gaslightmedia.com/ */ -// Load Contacts data abstract -require_once(GLM_MEMBERS_SOCIAL_PLUGIN_CLASS_PATH.'/data/dataUrls.php'); - -class GlmMembersAdmin_member_social extends GlmDataUrls +class GlmMembersAdmin_member_social //extends GlmDataUrls { - /** * WordPress Database Object * @@ -33,13 +29,6 @@ class GlmMembersAdmin_member_social extends GlmDataUrls * @access public */ public $config; - /** - * Contact Info - * - * @var $contactInfo - * @access public - */ - public $contactInfo = false; /** * Member ID * @@ -47,33 +36,9 @@ class GlmMembersAdmin_member_social extends GlmDataUrls * @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. * @@ -83,77 +48,44 @@ class GlmMembersAdmin_member_social extends GlmDataUrls */ 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 updateUrlList(&$existingUrls) { -// $getExistingUrls = " -// SELECT * -// FROM ".GLM_MEMBERS_SOCIAL_PLUGIN_DB_PREFIX."urls -// ;"; -// $existingUrls = $this->wpdb->get_results($getExistingUrls, ARRAY_A); -//// $existingUrls = $queryUrls[0]; -// return; -// } - -// public function printSocialList(&$array,$name="Array list") { -// echo "
$name:"; -// foreach($array[0] as $key=>$value) { -// echo(""); -// } -// echo "
$key$value
"; -// } - 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; + $urlUpdated = false; $haveMember = false; $socialError = false; $option = false; $debug = true; - $statusMessage = "debug mode"; + $statusMessage = "Update complete"; + require_once(GLM_MEMBERS_SOCIAL_PLUGIN_CLASS_PATH.'/data/dataUrls.php'); $Urls = new GlmDataUrls($this->wpdb, $this->config); $urlStats = $Urls->getStats(); $haveUrls = ($urlStats > 0); - if ($urlStats && $urlStats > 0) { $haveUrls = true; } - $urlList = $Urls->getList(); - require_once(GLM_MEMBERS_SOCIAL_PLUGIN_CLASS_PATH.'/data/dataRecords.php'); - $Records = new GlmDataRecords($this->wpdb, $this->config); + require_once(GLM_MEMBERS_SOCIAL_PLUGIN_CLASS_PATH.'/data/dataSocials.php'); + $Socials = new GlmDataSocials($this->wpdb, $this->config); + $socialList = $Socials->getList(); + // Get the option or set to default if (isset($_REQUEST['option'])) { $option = trim(filter_var($_REQUEST['option'],FILTER_SANITIZE_STRING)); } else { $option = "default"; } - $recordList = $Records->getList(); - // Get the Member ID $memberID = '0'; if (isset($_REQUEST['member']) && ($_REQUEST['member']-0) > 0) { @@ -169,15 +101,6 @@ class GlmMembersAdmin_member_social extends GlmDataUrls 'data' => false ); } - - echo "
Request:"; - foreach($_REQUEST as $key=>$value) { - echo(""); - } - echo "
$key$value
"; - echo "
UrlList:"; - echo "
".print_r($urlList[$memberID], true)."
"; - echo "
"; if (!$Urls->getEntry($memberID)){ $sql = " @@ -186,14 +109,16 @@ class GlmMembersAdmin_member_social extends GlmDataUrls VALUES ($memberID) ;"; $this->wpdb->query($sql); - echo "sql: $sql"; + if ($debug) { + echo "
Member not found. Created new record in Urls table using id=$memberID with statement: $sql
"; + } } switch ($option) { case "submit": $Urls->updateEntry($memberID); - - + $urlUpdated = true; + $statusMessage = "Social Media URLs Updated"; break; case "social"; @@ -213,12 +138,27 @@ class GlmMembersAdmin_member_social extends GlmDataUrls ); } + // Refresh the Url list before returning it + $urlList = $Urls->getList(); + if ($debug) { + echo "
Request:"; + foreach($_REQUEST as $key=>$value) { + echo(""); + } + echo "
$key$value
"; + echo "
UrlList:"; + echo "
".print_r($urlList[$memberID], true)."
"; + //echo "
Recordlist:
"; + //echo "
".print_r($socialList, true)."
"; + echo "
"; + } + $templateData = array( 'displayData' => $displayData, - 'socials' => $recordList, + 'socials' => $socialList, 'urlList' => $urlList[$memberID], 'assetsUrl' => GLM_MEMBERS_SOCIAL_PLUGIN_ASSETS_URL, - 'socialUpdated' => $socialUpdated, + 'urlUpdated' => $urlUpdated, 'socialError' => $socialError, 'haveMember' => $haveMember, 'memberID' => $memberID, diff --git a/models/admin/settings/social.php b/models/admin/settings/social.php index adb6a8a..e4a2722 100644 --- a/models/admin/settings/social.php +++ b/models/admin/settings/social.php @@ -13,14 +13,8 @@ * @link http://dev.gaslightmedia.com/ */ -// Load Contacts data abstract -//require_once(GLM_MEMBERS_CONTACTS_PLUGIN_CLASS_PATH.'/data/dataContacts.php'); - class GlmMembersAdmin_settings_social // extends GlmDataContacts { - - - /** * WordPress Database Object * @@ -35,26 +29,19 @@ class GlmMembersAdmin_settings_social // extends GlmDataContacts * @access public */ public $config; - - + /** + * Member ID + * + * @var $memberID + * @access public + */ + public $memberID = 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. * @@ -73,110 +60,47 @@ class GlmMembersAdmin_settings_social // extends GlmDataContacts } - - -// public function updateSocialList(&$existingSocials) { -// $getExistingSocials = " -// SELECT * -// FROM ".GLM_MEMBERS_SOCIAL_PLUGIN_DB_PREFIX."media_records -// ;"; -// $existingSocials = $this->wpdb->get_results($getExistingSocials, ARRAY_A); -// } -// -// public function printSocialList($array,$name="Array list") { -// echo "
$name"; -// $i = 0; -// foreach($array as $key=>$socialRecord) { -// foreach($socialRecord as $recordKey=>$recordValue) -// echo(""); -// $i++; -// } -// echo "
$recordKey$recordValue

"; -// } - public function modelAction($actionData = false) { $displayData = 'Hello, World! This is the Social Add-On "settings" model talking to you from inside WordPress.'; $success = true; $socialUpdated = false; $socialError = false; + $statusMessage = 'Social Updated'; $option = false; $debug = true; - $statusMessage = 'Social Updated'; -// $getExistingSocials = " -// SELECT * -// FROM ".GLM_MEMBERS_SOCIAL_PLUGIN_DB_PREFIX."media_records -// ;"; -// $existingSocials = $this->wpdb->get_results($getExistingSocials, ARRAY_A); - // If there's an action option + + require_once(GLM_MEMBERS_SOCIAL_PLUGIN_CLASS_PATH.'/data/dataSocials.php'); + $Socials = new GlmDataSocials($this->wpdb, $this->config); + $socialList = $Socials->getList(); + if (isset($_REQUEST['option'])) { $option = trim(filter_var($_REQUEST['option'],FILTER_SANITIZE_STRING)); } else { $option = "default"; } - - $socials = new GlmDataSocial($this->wpdb, $this->config); - $socialInfo = $socials->getEntry(); - - - $urls = new GlmDataUrls($this->wpdb, $this->config); - $urlList = $urls->getEntry($memberID); echo "
Request:"; - foreach($_REQUEST as $socialRecord=>$value) { - echo(""); + if ($debug) { + echo "
Request:
$socialRecord$value
"; + foreach($_REQUEST as $key=>$value) { + echo(""); + } + echo "
$key$value
"; +// echo "
UrlList:"; +// echo "
".print_r($urlList[$memberID], true)."
"; +// echo "
Recordlist:
"; + echo "
".print_r($socialList, true)."
"; +// echo "
"; } - echo ""; switch ($option) { case "submit": - if (GLM_MEMBERS_PLUGIN_ADMIN_DEBUG) { - glmMembersAdmin::addNotice("  Social Update:", 'Process'); - } - - foreach($existingSocials as $key => $socialRecord) { - $socialUpdated = false; - $sql = ""; - - $recordBool = $socialRecord['active']; - if(isset($_REQUEST['checkname-'.strtolower($socialRecord['name'])])){ - $socialBool = 1; - } else { - $socialBool = 0; - } -// echo " | checkname-".strtolower($socialRecord['name'])." | "; -// $socialChecked = $_REQUEST['checkname-'.strtolower($socialRecord['name'])]; - if ($socialBool != $recordBool) { - echo " - Unequal, rec:$recordBool and soc:$socialBool
"; - $sql = " - UPDATE ".GLM_MEMBERS_SOCIAL_PLUGIN_DB_PREFIX."media_records - SET active = $socialBool - WHERE id = ".$socialRecord['id']." - ;"; - $socialUpdated = true; - $this->wpdb->query($sql); - } - if ($socialUpdated) { - if ($debug){ - echo "
".$statusMessage."
"; - echo "
Social:".$socialRecord."
"; - echo "
Social url:".$value."
"; - echo "
statement:".$sql."
"; - } - } - } - if ($debug) { - $this->updateSocialList($existingSocials); - $this->printSocialList($existingSocials,"Existing Socials Post Submit"); - } + $Socials->updateEntry(); break; - case "social"; + case "social"; default: - $this->updateSocialList($existingSocials); - - if ($debug) { - $this->printSocialList($existingSocials,"Existing Socials Default:"); - } + break; } @@ -196,7 +120,7 @@ class GlmMembersAdmin_settings_social // extends GlmDataContacts // glmMembersAdmin::addNotice($memberTypes, 'DataBlock', 'Member Types Data'); // } // Refresh the URL list before sending it to the front - $this->updateSocialList($existingSocials); + // Compile template data $templateData = array( 'displayData' => $displayData, @@ -204,7 +128,7 @@ class GlmMembersAdmin_settings_social // extends GlmDataContacts 'socialUpdated' => $socialUpdated, 'socialError' => $socialError, 'option' => $option, - 'existingSocials' => $existingSocials, + 'socials' => $socialList, 'statusMessage' => $statusMessage ); diff --git a/setup/databaseScripts/create_database_V0.0.1.sql b/setup/databaseScripts/create_database_V0.0.1.sql index 9912c57..422e44c 100644 --- a/setup/databaseScripts/create_database_V0.0.1.sql +++ b/setup/databaseScripts/create_database_V0.0.1.sql @@ -12,26 +12,17 @@ -- all queries must be separated by a line with four dashes CREATE TABLE {prefix}urls ( - id INT NULL, - facebook TEXT NULL, - twitter TEXT NULL, - pinterest TEXT NULL, - googleplus TEXT NULL, - digg TEXT NULL, - linkedin TEXT NULL, - instagram TEXT NULL, - rss TEXT NULL, - youtube TEXT NULL, - flickr TEXT NULL, - blog TEXT NULL, - photobucket TEXT NULL, - PRIMARY KEY (id), - INDEX(id) + id INT NOT NULL AUTO_INCREMENT, + member_id INT NULL, + url TINYTEXT NULL, + medium TINYTEXT NULL, + PRIMARY KEY (id), + INDEX(id) ); ---- -CREATE TABLE {prefix}records ( +CREATE TABLE {prefix}socials ( id INT NOT NULL AUTO_INCREMENT, name TINYTEXT NULL, xpos int NULL, @@ -44,7 +35,7 @@ CREATE TABLE {prefix}records ( ---- -INSERT INTO {prefix}records +INSERT INTO {prefix}socials (name, xpos, ypos, baseurl, active) VALUES ('Facebook',-5,-5,'www.facebook.com',true), ('Twitter',-44,-5,'www.twitter.com',true), @@ -58,4 +49,20 @@ INSERT INTO {prefix}records ('blog',-124,-45, '#',true), ('Photobucket',-282,-45,'www.photobucket.com',true), ('RSS',-282,-5,'#',false) +; + +---- + +INSERT INTO {prefix}urls + (member_id, url, medium) + VALUES (1,'facebook.com/1','Facebook'), + (1,'pinterest.com/1','Pinterest'), + (1,'Twitter.com/1','Twitter'), + (2,'pinterest.com/2','Pinterest'), + (2,'facebook.com/2','Facebook'), + (2,'Twitter.com/2','Twitter'), + (2,'instagram.com/2','Instagram'), + (2,'youtube.com/2','YouTube'), + (2,'flickr.com/2','Flickr'), + (1,'flickr.com/1','Flickr') ; \ No newline at end of file diff --git a/views/admin/member/social.html b/views/admin/member/social.html index 9b7e021..ed983bf 100644 --- a/views/admin/member/social.html +++ b/views/admin/member/social.html @@ -1,10 +1,44 @@ {include file='admin/members/header.html'} -

{if $socialUpdated}{$statusMessage}{/if}

+

{if $urlUpdated}{$statusMessage}{/if}

Member Social Tab

{$displayData}

+ +
+
+ + + + + + + + + + + + + + + + +
Social Name: + + +
Icon: +
+
+
Description: + +
+

* Required

+ Cancel + +
+
+
Click me to see more! -
+
Update
@@ -14,9 +48,12 @@ {$socialField = $socialItem.name|lower} + + +
- {$socialItem.name} + {$socialItem.name} @@ -34,6 +71,25 @@ jQuery(document).ready(function($) { // Flash certain elements for a short time after display $(".glm-flash-updated").fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500).fadeIn(500).fadeOut(500); + $("#editMemberTypeDialog").dialog({ + autoOpen: false, + minWidth: 400, + dialogClass: "glm-dialog-no-close" + }); + $('.editMemberType').click( function() { + var typeID = $(this).attr('data-memberTypeID'); + var typeName = $(this).text(); +// var typeDescr = $('#editMemberTypeDescr_' + typeID).html(); + $('#glmSocName').text(typeName); + $('#editMemberTypeName').val(typeName.trim()); +// $('#editMemberTypeDescr').val(typeDescr.trim()); + $("#editMemberTypeDialog").dialog("open"); + }); + $('#editMemberTypeCancel').click( function() { + $("#editMemberTypeDialog").dialog("close"); + }); + }); + {include file='admin/footer.html'} \ No newline at end of file diff --git a/views/admin/settings/social.html b/views/admin/settings/social.html index 0a47b77..b552145 100644 --- a/views/admin/settings/social.html +++ b/views/admin/settings/social.html @@ -3,17 +3,17 @@

Member Social Tab

{$displayData}

- Click me to see more! - +
Update
- {foreach from=$existingSocials key=k item=socialItem} + aaaa + {foreach from=$socials key=k item=socialItem} {$socialField = $socialItem.name|lower}
- +