1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-04 13:47:31 +02:00

Merge pull request #2356 from yesszus/patch-3

Update  e107_plugins/social
This commit is contained in:
Cameron
2017-02-07 18:08:27 -08:00
committed by GitHub
8 changed files with 25 additions and 20 deletions

View File

@@ -42,7 +42,7 @@ class social_adminarea extends e_admin_dispatcher
'main/edit' => 'main/list'
);
protected $menuTitle = 'Social';
protected $menuTitle = LAN_PLUGIN_SOCIAL_NAME;
}
@@ -52,7 +52,7 @@ class social_adminarea extends e_admin_dispatcher
class social_ui extends e_admin_ui
{
protected $pluginTitle = 'Social';
protected $pluginTitle = LAN_PLUGIN_SOCIAL_NAME;
protected $pluginName = 'social';
// protected $eventName = 'social-social'; // remove comment to enable event triggers in admin.
// protected $table = 'social';
@@ -96,12 +96,12 @@ class social_ui extends e_admin_ui
'sharing_mode' => array('title'=> LAN_SOCIAL_ADMIN_24, 'type'=>'dropdown', 'tab'=>1, 'writeParms'=>array('optArray'=>array('normal'=>LAN_SOCIAL_ADMIN_25,'dropdown'=>LAN_SOCIAL_ADMIN_26,'off'=>LAN_SOCIAL_ADMIN_27)), 'data' => 'str','help'=>''),
'sharing_hashtags' => array('title'=> 'Hashtags', 'type'=>'tags', 'tab'=>1, 'data' => 'str','help'=>LAN_SOCIAL_ADMIN_28),
'sharing_providers' => array('title'=> 'Providers', 'type'=>'checkboxes', 'tab'=>1, 'writeParms'=>array(), 'data' => 'str','help'=>''),
'sharing_providers' => array('title'=> LAN_SOCIAL_ADMIN_39, 'type'=>'checkboxes', 'tab'=>1, 'writeParms'=>array(), 'data' => 'str','help'=>''),
'xup_login_update_username' => array('title'=> 'Update User Display Name ', 'type'=>'bool', 'tab'=>0, 'writeParms'=>array(), 'data' => 'str','help'=>''),
'xup_login_update_avatar' => array('title'=> 'Update User Avatar', 'type'=>'bool', 'tab'=>0, 'writeParms'=>array(), 'data' => 'str','help'=>''),
'xup_login_update_username' => array('title'=> LAN_SOCIAL_ADMIN_40, 'type'=>'bool', 'tab'=>0, 'writeParms'=>array(), 'data' => 'str','help'=>''),
'xup_login_update_avatar' => array('title'=> LAN_SOCIAL_ADMIN_41, 'type'=>'bool', 'tab'=>0, 'writeParms'=>array(), 'data' => 'str','help'=>''),
'og_image' => array('title'=> "Custom Image", 'type'=>'image', 'tab'=>5, 'data' => 'str','help'=>'og:image'),
'og_image' => array('title'=> LAN_SOCIAL_ADMIN_42, 'type'=>'image', 'tab'=>5, 'data' => 'str','help'=>'og:image'),
);

View File

@@ -41,7 +41,7 @@ class social_admin
if($this->twitterActive == true)
{
$config['fields']['twitter'] = array ( 'title' =>"Post to Twitter", 'type' => 'text', 'tab'=>2, 'writeParms'=> array('size'=>'xxlarge', 'placeholder'=>'Type your tweet here.'), 'width' => 'auto', 'help' => '', 'readParms' => '', 'class' => 'left', 'thclass' => 'left', );
$config['fields']['twitter'] = array ( 'title' =>LAN_SOCIAL_202, 'type' => 'text', 'tab'=>2, 'writeParms'=> array('size'=>'xxlarge', 'placeholder'=>LAN_SOCIAL_203), 'width' => 'auto', 'help' => '', 'readParms' => '', 'class' => 'left', 'thclass' => 'left', );
}
break;
}

View File

@@ -8,6 +8,8 @@
*
*/
e107::lan('social',false, true);
class social_comment
{
private $facebookActive;
@@ -34,7 +36,7 @@ class social_comment
if($engine == 'social::facebook' && empty($this->facebookActive))
{
e107::getMessage()->addInfo("Facebook comments requires that you have a facebook App ID. See the 'social login' area in admin-preferences to add one.");
e107::getMessage()->addInfo(LAN_SOCIAL_WARNING);
}
$config = array();
@@ -51,7 +53,7 @@ class social_comment
if(!deftrue('SOCIAL_FACEBOOK_INIT') && ADMIN)
{
return "<div class='alert alert-important alert-danger'>Unable to render comments. Missing Facebook appID.</div>";
return "<div class='alert alert-important alert-danger'>".LAN_SOCIAL_205."</div>";
}
e107::js('footer-inline', SOCIAL_FACEBOOK_INIT);

View File

@@ -366,7 +366,7 @@ class social_shortcodes extends e_shortcode
$text = '<div class="social-share btn-group hidden-print '.$dir.'">
<a class="'.$tooltip.' btn btn-dropdown btn-default btn-'.$size.' dropdown-toggle" data-toggle="dropdown" href="#" title="Share">'.$label.'</a>
<a class="'.$tooltip.' btn btn-dropdown btn-default btn-'.$size.' dropdown-toggle" data-toggle="dropdown" href="#" title="'.LAN_SOCIAL_204.'">'.$label.'</a>
<ul class="dropdown-menu" role="menu" >

View File

@@ -46,5 +46,7 @@ define("LAN_SOCIAL_ADMIN_35", "Light");
define("LAN_SOCIAL_ADMIN_36", "Dark");
define("LAN_SOCIAL_ADMIN_37", "Open Graph Meta");
define("LAN_SOCIAL_ADMIN_38", "Scope");
define("LAN_SOCIAL_ADMIN_39", "Providers");
define("LAN_SOCIAL_ADMIN_40", "Update User Display Name");
define("LAN_SOCIAL_ADMIN_41", "Update User Avatar");
define("LAN_SOCIAL_ADMIN_42", "Custom Image");

View File

@@ -24,4 +24,6 @@ define("LAN_SOCIAL_200", "Unable to display feed. Twitter URL has not been defi
define("LAN_SOCIAL_201", "Tweets by");
define("LAN_SOCIAL_202", "Post to Twitter");
define("LAN_SOCIAL_203", "Type your tweet here.");
define("LAN_SOCIAL_204", "Share");
define("LAN_SOCIAL_205", "Unable to render comments. Missing Facebook appID.");
define("LAN_SOCIAL_WARNING", "Facebook comments requires that you have a facebook App ID. See the 'social login' area in admin-preferences to add one.");

View File

@@ -12,5 +12,4 @@ define("LAN_PLUGIN_SOCIAL_DESCR", "Adds options to replace the e107 comment eng
define("LAN_PLUGIN_SOCIAL_SIGNIN", "Sign in with:");
define("LAN_PLUGIN_SOCIAL_XUP_SIGNUP", "Sign-in with your [x] account");
define("LAN_PLUGIN_SOCIAL_XUP_REG", "Register with your [x] account");
define("LAN_PLUGIN_SOCIAL_NAME", "Social");

View File

@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<e107Plugin name="Social" version="1.0" date="2012-12-01" compatibility="2.0" installRequired="true" >
<e107Plugin name="Social" lan="LAN_PLUGIN_SOCIAL_NAME" version="1.0" date="2012-12-01" compatibility="2.0" installRequired="true" >
<category>settings</category>
<author name="e107 Inc." email="devs@e107.org" />
<summary lan="LAN_SOCIAL_ADMIN_SUMM">Adds Facebook, Twitter and other social media widgets to e107.</summary>