diff --git a/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/assets/css/index.html b/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/assets/css/index.html new file mode 100644 index 00000000..0e44bd0e --- /dev/null +++ b/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/assets/css/index.html @@ -0,0 +1,4 @@ + +
+ + \ No newline at end of file diff --git a/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/assets/css/socialloginandsocialshare.css b/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/assets/css/socialloginandsocialshare.css new file mode 100644 index 00000000..b9c6c869 --- /dev/null +++ b/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/assets/css/socialloginandsocialshare.css @@ -0,0 +1,203 @@ +.loginRadiusProviders input{ + margin:0 +} +.loginRadiusProviders{ + width: 325px; + float: left; + margin-top:6px; +} +.socialTitle{ + width: 225px !important; + clear: none !important; + margin: 5px !important; + display:inline !important; +} +div.current input, div.current textarea, div.current select { + float: none !important; +} +dt.open h3 { + background:#ddd !important; +} +dd { + margin-left: 0px !important; +} +dt.tabs h3 { + float: left; + margin-right: 11px; + border: #CCC 1px solid; + padding: 9px; + margin-bottom: 0px; + margin-left: 2px; + border-bottom: 0px; + background: #fff; +} +div.current { + clear: both; +} +.help_ul { + margin:0 0 15px 25px; + padding:0px; + float:left; + list-style:circle; +} +.help_ul li a { + font-family:Arial, Helvetica, sans-serif; + font-size:12px; + color:#000000; + line-height:160%; +} +.stay_ul { + margin:0 0 15px 10px; + padding:0px; + float:left; + list-style:none; +} +.stay_ul li { + line-height:160%; + float:left; + margin:0 10px 0 0; +} +.sociallogin_table .lrsubhead { + font-weight: bold ; + font-size: 13px ; + font-weight: bold ; +} +.sociallogin_form { + padding: 0; + background-color: #fff; +} +.sociallogin_form a { + text-decoration: none !important; +} +.sociallogin_form .blank a { + text-decoration: none !important; + padding: 0 15px !important; + font-weight: bold; +} +.sociallogin_form a:hover { + text-decoration: none !important;; +} +.sociallogin_form legend { + margin-left: 10px; + line-height: 30px; +} +.sociallogin_form .lrrow { + padding: 5px 10px; + font-size: 12px; + clear: both; + overflow: hidden; +} +.sociallogin_form .lrrow_title { + font-size: 14px; + font-weight: bold; + margin-top: 15px; + color:#00ccff; +} +.sociallogin_form .lrrow_button { + background-color: #F6F6F6; + border-top: 1px dotted #ddd; + margin-top: 14px; + padding: 5px 10px; +} +.sociallogin_form .lrrow_description { + padding: 5px 0 10px 10px; + font-weight: bold; + color:#00ccff; +} +.sociallogin_form_main { + background-color: #EAF7FF; +} +.sociallogin_form_main .lrrow { + margin-bottom: 7px; +} +.sociallogin_form_main .lrrow_button { + background-color: #EAF7FF; +} +.icon-48-configuration { + background-image: url("../img/configuration.gif"); +} +.sociallogin_table { + background-color: #efefef ; + border: 1px solid #ccc ; + margin-bottom: 10px ; + border-collapse: collapse; + font-family: sans-serif; + font-size: 12px; + line-height: 1.4em; + margin-left: 2px; + width: 100%; +} +.sociallogin_table input { + border-color: #aaa ; +} +.sociallogin_table .head { + font-weight: bold ; + font-size: 13px ; + font-weight: bold ; + background-color: #ddd ; +} +.sociallogin_table th, .sociallogin_table label { + color: #222222; + text-shadow: 0 1px 0 #FFFFFF; +} +.sociallogin_table th { + padding: 10px; + text-align: left; + vertical-align: top; + width: 200px; +} +.sociallogin_table th, .sociallogin_table label { + font-weight: normal; + text-shadow: 0 1px 0 #FFFFFF; +} +.sociallogin_table td { + font-size: 12px; + line-height: 20px; + margin-bottom: 9px; + padding: 8px 10px; +} +.sociallogin_table td, textarea { + line-height: inherit; +} +.sociallogin_table td, textarea, input, select { + font-family: inherit; + font-size: inherit; + font-weight: inherit; +} +.sociallogin_table tr td.sociallogin_row { + line-height: 36px ; +} +.sociallogin_table tr.description td { + color: #0D5995 ; +} +.sociallogin_table .lrrow_white { + background-color: #fff ; +} +.sociallogin_table th, .sociallogin_table label { + color: #222222; + text-shadow: 0 1px 0 #FFFFFF; +} +.sociallogin_table th { + padding: 10px; + text-align: left; + vertical-align: top; + width: 200px; +} +.sociallogin_table th, .sociallogin_table label { + font-weight: normal; + text-shadow: 0 1px 0 #FFFFFF; +} +.lrgreenbutton{ + background: #5BB75B; + border-radius: 5px; + text-align: center; + margin: 15px; + padding: 10px 50px; + font-size: 15px; + color:#fff; + text-decoration:none; + font-weight:bold; +} +.lrgreenbutton:hover{ + background: #51A351; +} \ No newline at end of file diff --git a/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/assets/img/configuration.gif b/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/assets/img/configuration.gif new file mode 100644 index 00000000..592b10d8 Binary files /dev/null and b/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/assets/img/configuration.gif differ diff --git a/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/assets/index.html b/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/assets/index.html new file mode 100644 index 00000000..0e44bd0e --- /dev/null +++ b/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/assets/index.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/controller.php b/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/controller.php new file mode 100644 index 00000000..f7067c92 --- /dev/null +++ b/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/controller.php @@ -0,0 +1,74 @@ +getModel (); + $input = JFactory::getApplication()->input; + $view = $input->get('view', 'socialloginandsocialshare'); + $option = $input->get('option', 'socialloginandsocialshare'); + $model->saveSettings($view); + $mainframe->enqueueMessage (JText::_ ('COM_SOCIALLOGIN_SETTING_SAVED')); + $this->setRedirect (JRoute::_ ('index.php?option='.$option.'&view='.$view.'&layout=default', false)); + } + + /** + * Save and close settings + */ + public function save() + { + $mainframe = JFactory::getApplication(); + $model = &$this->getModel(); + $input = JFactory::getApplication()->input; + $view = $input->get('view', 'socialloginandsocialshare'); + $model->saveSettings ($view); + $mainframe->enqueueMessage (JText::_ ('COM_SOCIALLOGIN_SETTING_SAVED')); + $this->setRedirect (JRoute::_ ('index.php', false)); + } + + /** + * cancel settings + */ + + public function cancel () + { + $this->setRedirect (JRoute::_ ('index.php', false)); + } + +} diff --git a/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/index.html b/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/index.html new file mode 100644 index 00000000..fa6d84e8 --- /dev/null +++ b/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/index.html @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/install/index.html b/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/install/index.html new file mode 100644 index 00000000..0e44bd0e --- /dev/null +++ b/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/install/index.html @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/install/install.mysql.utf8.sql b/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/install/install.mysql.utf8.sql new file mode 100644 index 00000000..d11adf75 --- /dev/null +++ b/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/install/install.mysql.utf8.sql @@ -0,0 +1,14 @@ +CREATE TABLE IF NOT EXISTS `#__loginradius_settings` ( + `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, + `setting` varchar(255) NOT NULL, + `value` varchar(1000) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `setting` (`setting`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; + +CREATE TABLE IF NOT EXISTS `#__loginradius_users` ( + `id` int(11), + `loginradius_id` varchar(255) NULL, + `provider` varchar(255) NULL, + `lr_picture` varchar(255) NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8; \ No newline at end of file diff --git a/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/install/script_socialloginandsocialshare.php b/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/install/script_socialloginandsocialshare.php new file mode 100644 index 00000000..f09bae17 --- /dev/null +++ b/deployed/socialloginandsocialshare/administrator/components/com_socialloginandsocialshare/install/script_socialloginandsocialshare.php @@ -0,0 +1,299 @@ +modules = array(); + $status->plugins = array(); + $db = JFactory::getDBO (); + $src = $parent->getParent()->getPath('source'); + $manifest = $parent->getParent()->manifest; + $isUpdate = JFile::exists(JPATH_SITE.DS.'modules'.DS.'mod_socialloginandsocialshare'.DS.'mod_socialloginandsocialshare.php'); + // create a folder inside your images folder + JFolder::create(JPATH_ROOT.DS.'images'.DS.'sociallogin'); + + // Load sociallogin language file + $lang = JFactory::getLanguage(); + $lang->load('com_socialloginandsocialshare', JPATH_SITE); + + // Installing modules. + $modules = $manifest->xpath('modules/module'); + foreach ($modules AS $module) { + $mod_data = array (); + foreach ($module->attributes () as $key => $value) { + $mod_data [$key] = strval ($value); + } + $mod_data ['client'] = JApplicationHelper::getClientInfo ($mod_data ['client'], true); + if (is_null($mod_data ['client']->name)) $client = 'site'; + $path = $src.DS.$mod_data ['module']; + $installer = new JInstaller; + $result = $installer->install($path); + if ($result) { + $status->modules[] = array('name'=>$mod_data ['module'],'client'=>$mod_data ['client']->name, 'result'=>$result); + } + } + if (!$isUpdate) { + $query = "UPDATE #__modules SET title = '".$mod_data ['title']."', position='".$mod_data ['position']."', ordering='".$mod_data ['order']."', published = 1, access=1 WHERE module='".$mod_data ['module']."'"; + $db->setQuery($query); + $db->execute(); + } + $query = 'SELECT `id` FROM `#__modules` WHERE module = ' . $db->Quote ($mod_data ['module']); + $db->setQuery ($query); + if (!$db->execute()) { + $parent->getParent()->abort (JText::_ ('Module') . ' ' . JText::_ ('Install') . ': ' . $db->stderr (true)); + return false; + } + $mod_id = $db->loadResult (); + if ((int) $mod_data ['client']->id == 0) { + $query = 'REPLACE INTO `#__modules_menu` (moduleid,menuid) values (' . $db->Quote ($mod_id) . ',0)'; + $db->setQuery ($query); + if (!$db->execute()) { + // Install failed, roll back changes + $parent->getParent()->abort (JText::_ ('Module') . ' ' . JText::_ ('Install') . ': ' . $db->stderr (true)); + return false; + } + } + + // Installing plugins. + $plugins = $manifest->xpath('plugins/plugin'); + foreach ($plugins AS $plugin) { + $plg_data = array (); + foreach ($plugin->attributes() as $key => $value) { + $plg_data [$key] = strval ($value); + } + $path = $src . DS . 'plg_'.$plg_data['plugin']; + $installer = new JInstaller; + $result = $installer->install($path); + if ($result) { + $query = "UPDATE #__extensions SET enabled=1 WHERE type='plugin' AND element=".$db->Quote($plg_data ['plugin'])." AND folder=".$db->Quote($plg_data ['group']); + $db->setQuery($query); + $db->execute(); + } + // Plugin Installed + $status->plugins[] = array('name'=>$plg_data ['plugin'], 'group'=>$plg_data ['group']); + } + $this->installationResults($status); + } + public function uninstall($parent) + {$db = JFactory::getDBO(); + $status = new stdClass; + $status->modules = array(); + $status->plugins = array(); + $manifest = $parent->getParent()->manifest; + $plugins = $manifest->xpath('plugins/plugin'); + foreach ($plugins as $plugin) + { + $name = (string)$plugin->attributes()->plugin; + $group = (string)$plugin->attributes()->group; + $query = "SELECT `extension_id` FROM #__extensions WHERE `type`='plugin' AND element = ".$db->Quote($name)." AND folder = ".$db->Quote($group); + $db->setQuery($query); + $extensions = $db->loadColumn(); + if (count($extensions)) + { + foreach ($extensions as $id) + { + $installer = new JInstaller; + $result = $installer->uninstall('plugin', $id); + } + $status->plugins[] = array('name' => $name, 'group' => $group, 'result' => $result); + } + + } + $modules = $manifest->xpath('modules/module'); + foreach ($modules as $module) + { + $name = (string)$module->attributes()->module; + $client = (string)$module->attributes()->client; + $db = JFactory::getDBO(); + $query = "SELECT `extension_id` FROM `#__extensions` WHERE `type`='module' AND element = ".$db->Quote($name).""; + $db->setQuery($query); + $extensions = $db->loadColumn(); + if (count($extensions)) + { + foreach ($extensions as $id) + { + $installer = new JInstaller; + $result = $installer->uninstall('module', $id); + } + $status->modules[] = array('name' => $name, 'client' => $client, 'result' => $result); + } + + } + //$this->uninstallationResults($status); + } + public function update($parent) + { + if (!defined('DS')){ + define('DS',DIRECTORY_SEPARATOR); + } + $status = new stdClass; + $status->modules = array(); + $status->plugins = array(); + $db = JFactory::getDBO (); + $src = $parent->getParent()->getPath('source'); + $manifest = $parent->getParent()->manifest; + $isUpdate = JFile::exists(JPATH_SITE.DS.'modules'.DS.'mod_socialloginandsocialshare'.DS.'mod_socialloginandsocialshare.php'); + // create a folder inside your images folder + JFolder::create(JPATH_ROOT.DS.'images'.DS.'sociallogin'); + + // Load sociallogin language file + $lang = JFactory::getLanguage(); + $lang->load('com_socialloginandsocialshare', JPATH_SITE); + + // Installing modules. + $modules = $manifest->xpath('modules/module'); + foreach ($modules AS $module) { + $mod_data = array (); + foreach ($module->attributes () as $key => $value) { + $mod_data [$key] = strval ($value); + } + $mod_data ['client'] = JApplicationHelper::getClientInfo ($mod_data ['client'], true); + if (is_null($mod_data ['client']->name)) $client = 'site'; + $path = $src.DS.$mod_data ['module']; + $installer = new JInstaller; + $result = $installer->update($path); + if ($result) { + $status->modules[] = array('name'=>$mod_data ['module'],'client'=>$mod_data ['client']->name, 'result'=>$result); + } + } + if (!$isUpdate) { + $query = "UPDATE #__modules SET title = '".$mod_data ['title']."', position='".$mod_data ['position']."', ordering='".$mod_data ['order']."', published = 1, access=1 WHERE module='".$mod_data ['module']."'"; + $db->setQuery($query); + $db->execute(); + } + $query = 'SELECT `id` FROM `#__modules` WHERE module = ' . $db->Quote ($mod_data ['module']); + $db->setQuery ($query); + if (!$db->execute()) { + $parent->getParent()->abort (JText::_ ('Module') . ' ' . JText::_ ('Install') . ': ' . $db->stderr (true)); + return false; + } + $mod_id = $db->loadResult (); + if ((int) $mod_data ['client']->id == 0) { + $query = 'REPLACE INTO `#__modules_menu` (moduleid,menuid) values (' . $db->Quote ($mod_id) . ',0)'; + $db->setQuery ($query); + if (!$db->execute()) { + // Install failed, roll back changes + $parent->getParent()->abort (JText::_ ('Module') . ' ' . JText::_ ('Install') . ': ' . $db->stderr (true)); + return false; + } + } + + // Installing plugins. + $plugins = $manifest->xpath('plugins/plugin'); + foreach ($plugins AS $plugin) { + $plg_data = array (); + foreach ($plugin->attributes() as $key => $value) { + $plg_data [$key] = strval ($value); + } + $path = $src . DS . 'plg_'.$plg_data['plugin']; + $installer = new JInstaller; + $result = $installer->update($path); + if ($result) { + $query = "UPDATE #__extensions SET enabled=1 WHERE type='plugin' AND element=".$db->Quote($plg_data ['plugin'])." AND folder=".$db->Quote($plg_data ['group']); + $db->setQuery($query); + $db->execute(); + } + // Plugin Installed + $status->plugins[] = array('name'=>$plg_data ['plugin'], 'group'=>$plg_data ['group']); + $query = "SELECT `extension_id` FROM `#__extensions` WHERE type='plugin' AND element=".$db->Quote($plg_data ['plugin'])." AND folder=".$db->Quote($plg_data ['group']); + $db->setQuery ($query); + if (!$db->execute()) { + $parent->getParent()->abort (JText::_ ('Plugin') . ' ' . JText::_ ('Update') . ': ' . $db->stderr (true)); + return false; + } + } + $this->installationResults($status); + } + private function installationResults($status) + { + $rows = 0; + if (count($status->modules) AND count($status->plugins)) {?> +| + | + | |
|---|---|---|
| + | ||
| + | + | + |
| + | + | |
| + | + | + |
| + | + | + |
| + | + | + |
| + | + | + |
+ Social Login and Social Share! + Social Login + + +
+ +| + | |
|---|---|
|
+ + settings['fbenable']) ? $this->settings['fbenable'] : ""); + if ($fbenable == '0') $fbdisableLogin = "checked='checked'"; + else if ($fbenable == '1') $fbenableLogin = "checked='checked'"; + else $fbenableLogin = "checked='checked'";?> + /> + + /> + |
+ |
| + + + | |
|
+ + + + + |
+ |
| + + | +|
|
+ + settings['genable']) ? $this->settings['genable'] : ""); + if ($genable == '0') $disableLogin = "checked='checked'"; + else if ($genable == '1') $enableLogin = "checked='checked'"; + else $enableLogin = "checked='checked'";?> + /> + + /> + |
+ |
|
+ + + + + + |
+ |
| + + | +|
| + | |
|---|---|
| + settings['share']) ? $this->settings['share'] : ""); + if ($share == '0') $disableshare = "checked='checked'"; + else if ($share == '1') $enableshare = "checked='checked'"; + else $enableshare = "checked='checked'";?> + /> + + /> + |
+ |
| + + + | |
| + settings['fblike']) == 'on' ? 'on' : 'off'); + $fbsendenable = (isset($this->settings['fbsend']) == 'on' ? 'on' : 'off'); + $googleplusenable = (isset($this->settings['googleplus']) == 'on' ? 'on' : 'off'); + $googleshareenable = (isset($this->settings['googleshare']) == 'on' ? 'on' : 'off'); + if ($fblikeenable == 'on'){ $fblike = "checked='checked'";} + if ($fbsendenable == 'on'){ $fbsend = "checked='checked'";} + if ($googleplusenable == 'on'){ $googleplus = "checked='checked'";} + if ($googleshareenable == 'on'){ $googleshare = "checked='checked'";} + ?> +
+ value="on" style="float: left !important;margin: 0; padding: 0;"/>
+
+
+
+ value="on" style="float: left !important;margin: 0; padding: 0;" />
+
+
+
+ value="on" style="float: left !important;margin: 0; padding: 0;" />
+
+
+
+ value="on" style="float: left !important;margin: 0; padding: 0;" />
+
+
+ |
+ |
| + settings['shareontoppos']) == 'on' ? 'on' : 'off'); + if ($shareontoppos == 'on'){ $shareontop = "checked='checked'";} + $shareonbottompos = (isset($this->settings['shareonbottompos']) == 'on' ? 'on' : 'off'); + if ($shareonbottompos == 'on'){ $shareonbottom = "checked='checked'";} + ?> +
+ value="on" style="float: left !important;margin: 0; padding: 0;" />
+
+
+
+ value="on" style="float: left !important;margin: 0; padding: 0;" />
+
+
+ |
+|
|
+ + setQuery($query); + $rows = $db->loadObjectList(); + ?> + settings['articles']) ? $this->settings['articles'] : ""); + $articles = unserialize($articles);?> + + |
+|
| '; + if($this->fblike == 'on'){ + $beforediv .= ''; + } + + $beforediv .= ' | +'; + if($this->fbsend == 'on'){ + $beforediv .= ''; + } + $beforediv .= ' | +';
+ if($this->googleplus == 'on'){
+ $beforediv .= ' |
+ ';
+ if($this->googleshare == 'on'){
+ $beforediv .= ' |
+
| '; + if($this->fblike == 'on'){ + $afterdiv .= ''; + } + + $afterdiv .= ' | +'; + if($this->fbsend == 'on'){ + $afterdiv .= ''; + } + $afterdiv .= ' | +';
+ if($this->googleplus == 'on'){
+ $afterdiv .= ' |
+ ';
+ if($this->googleshare == 'on'){
+ $afterdiv .= ' |
+