1
0
mirror of https://github.com/e107inc/e107.git synced 2025-06-05 18:35:01 +02:00

Social plugin language use (05-21-16)

This commit is contained in:
tgtje 2016-05-21 10:55:28 +02:00
parent 6952cb9272
commit 201730b25d
12 changed files with 156 additions and 55 deletions

View File

@ -89,7 +89,7 @@ class signup_shortcodes extends e_shortcode
// 'signup' Creates a new XUP user if not found, otherwise it logs the person in.
$button = (defset('FONTAWESOME') === 4) ? $tp->toGlyph('fa-'.$ic, array('size'=>$size)) : "<img class='e-tip' title='Register using your {$p} account' src='".e_IMAGE_ABS."xup/{$p}.png' alt='' />";
$text .= " <a title='Sign-in using your {$p} account' role='button' class='signup-xup btn btn-primary' href='".e107::getUrl()->create('system/xup/signup?provider='.$p.'&back='.base64_encode(e_REQUEST_URL))."'>".$button."</a> ";
$text .= " <a title='".$tp->lanVars(LAN_PLUGIN_SOCIAL_XUP_SIGNUP, $p)." ' role='button' class='signup-xup btn btn-primary' href='".e107::getUrl()->create('system/xup/signup?provider='.$p.'&back='.base64_encode(e_REQUEST_URL))."'>".$button."</a> ";
}
//TODO different icon options. see: http://zocial.smcllns.com/
}
@ -129,7 +129,7 @@ class signup_shortcodes extends e_shortcode
$ic = 'windows';
}
$button = (defset('FONTAWESOME') === 4) ? "<span title='Register using your {$p} account'>".$tp->toGlyph('fa-'.$ic, array('size'=>$size))."</span>" : "<img class='e-tip' title='Register using your {$p} account' src='".e_IMAGE_ABS."xup/{$p}.png' alt='' />";
$button = (defset('FONTAWESOME') === 4) ? "<span title='".$tp->lanVars(LAN_PLUGIN_SOCIAL_XUP_REG, $p)."'>".$tp->toGlyph('fa-'.$ic, array('size'=>$size))."</span>" : "<img class='e-tip' title='Register using your {$p} account' src='".e_IMAGE_ABS."xup/{$p}.png' alt='' />";
$text .= " <a class='signup-xup ".$class."' role='button' href='".e107::getUrl()->create('system/xup/signup?provider='.$p.'&back='.base64_encode(e_REQUEST_URL))."'>".$button."</a> ";
}

View File

@ -50,7 +50,7 @@ define ('PASSWORD_DEFAULT_TYPE',PASSWORD_E107_MD5);
//define ('PASSWORD_DEFAULT_TYPE',PASSWORD_E107_SALT);
// Required language file - if not loaded elsewhere, uncomment next line
//include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/lan_user.php');
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/lan_user.php');
class UserHandler
{

View File

@ -33,5 +33,6 @@ define("LAN_EMAIL_187", "Email address to send to");
define("LAN_EMAIL_188", "I thought you might be interested in this news story from");
define("LAN_EMAIL_189", "I thought you might be interested in this article from");
define("LAN_EMAIL_190", "Enter visible code");
define("LAN_SOCIAL_LINK_CHK", "Check out this link: "); //called in soc.plugin
?>

View File

@ -115,6 +115,14 @@ define("LAN_USER_84", "This will prevent your email address from being displayed
define("LAN_USER_85", "If you want to change your user name, you must ask a site administrator");
define("LAN_USER_86", "Maximum avatar size is --WIDTH-- x --HEIGHT-- pixels");
// social plugin
define("LAN_XUP_ERRM_01", "Signup failed! This feature is disabled.");
define("LAN_XUP_ERRM_02", "Signup failed! Wrong provider.");
define("LAN_XUP_ERRM_03", "Log in Failed! Wrong provider.");
define("LAN_XUP_ERRM_04", "Signup failed! User already signed in.");
define("LAN_XUP_ERRM_05", "Signup failed! User already exists. Please use 'login' instead.");
define("LAN_XUP_ERRM_06", "Signup failed! Can't access user email - registration without an email is impossible.");
// Error messages for when user data is missing. Done this way so that other code can override the default messages

View File

@ -9,6 +9,8 @@ if (!getperms('P'))
exit;
}
e107::lan('social',true, true);
e107::lan('social',false, true);
class social_adminarea extends e_admin_dispatcher
{
@ -71,29 +73,29 @@ class social_ui extends e_admin_ui
protected $fieldpref = array();
protected $preftabs = array("Sharing", 'Facebook Comments', 'Facebook Menu', 'Twitter Menu', );
protected $preftabs = array(" ".LAN_SOCIAL_ADMIN_14." ", LAN_SOCIAL_ADMIN_15, LAN_SOCIAL_ADMIN_16, LAN_SOCIAL_ADMIN_17, );
protected $prefs = array(
'facebook_comments_limit' => array('title'=> 'Limit', 'type'=>'number', 'tab'=>1, 'data' => 'int','help'=>'Number of comments to display.'),
'facebook_comments_theme' => array('title'=> 'Theme', 'type'=>'dropdown', 'tab'=>1, 'writeParms'=>array('optArray'=>array('light'=>'Light','dark'=>'Dark')), 'data' => 'str','help'=>''),
'facebook_comments_loadingtext' => array('title'=> 'Text while loading', 'type'=>'text', 'tab'=>1, 'data' => 'str', 'writeParms'=>array('placeholder'=>'Loading...'), 'help'=>''),
'facebook_comments_limit' => array('title'=> LAN_SOCIAL_ADMIN_18, 'type'=>'number', 'tab'=>1, 'data' => 'int','help'=>LAN_SOCIAL_ADMIN_29),
'facebook_comments_theme' => array('title'=> LAN_SOCIAL_ADMIN_19, 'type'=>'dropdown', 'tab'=>1, 'writeParms'=>array('optArray'=>array('light'=>LAN_SOCIAL_ADMIN_35,'dark'=>LAN_SOCIAL_ADMIN_36)), 'data' => 'str','help'=>''),
'facebook_comments_loadingtext' => array('title'=> LAN_SOCIAL_ADMIN_21, 'type'=>'text', 'tab'=>1, 'data' => 'str', 'writeParms'=>array('placeholder'=>LAN_SOCIAL_ADMIN_30), 'help'=>''),
'facebook_like_menu_theme' => array('title'=> 'Theme', 'type'=>'dropdown', 'tab'=>2, 'writeParms'=>array('optArray'=>array('light'=>'Light','dark'=>'Dark')), 'data' => 'str'),
'facebook_like_menu_action' => array('title'=> 'Action', 'type'=>'dropdown', 'tab'=>2, 'writeParms'=>array('optArray'=>array('like'=>'Like','recommend'=>'Recommend')), 'data' => 'str'),
'facebook_like_menu_width' => array('title'=> 'Width', 'type'=>'number', 'tab'=>2, 'data' => 'int','help'=>'Width in px'),
'facebook_like_menu_theme' => array('title'=> LAN_SOCIAL_ADMIN_19, 'type'=>'dropdown', 'tab'=>2, 'writeParms'=>array('optArray'=>array('light'=>LAN_SOCIAL_ADMIN_35,'dark'=>LAN_SOCIAL_ADMIN_36)), 'data' => 'str'),
'facebook_like_menu_action' => array('title'=> LAN_SOCIAL_ADMIN_20, 'type'=>'dropdown', 'tab'=>2, 'writeParms'=>array('optArray'=>array('like'=>'Like','recommend'=>LAN_SOCIAL_ADMIN_32)), 'data' => 'str'),
'facebook_like_menu_width' => array('title'=> LAN_SOCIAL_ADMIN_22, 'type'=>'number', 'tab'=>2, 'data' => 'int','help'=>LAN_SOCIAL_ADMIN_31),
// 'facebook_like_menu_ref' => array('title'=> "Referrer", 'type'=>'text', 'tab'=>2, 'data' => 'str', 'writeParms'=>'size=xxlarge', 'help'=>'Leave blank to use Site Url'),
'twitter_menu_theme' => array('title'=> 'Theme', 'type'=>'dropdown', 'tab'=>3, 'writeParms'=>array('optArray'=>array('light'=>'Light','dark'=>'Dark')), 'data' => 'str'),
'twitter_menu_height' => array('title'=> 'Height', 'type'=>'number', 'tab'=>3, 'data' => 'int','help'=>'Height in px'),
'twitter_menu_limit' => array('title'=> 'Limit', 'type'=>'number', 'tab'=>3, 'data' => 'int','help'=>'Number of tweets to display.'),
'twitter_menu_theme' => array('title'=> LAN_SOCIAL_ADMIN_19, 'type'=>'dropdown', 'tab'=>3, 'writeParms'=>array('optArray'=>array('light'=>LAN_SOCIAL_ADMIN_35,'dark'=>LAN_SOCIAL_ADMIN_36)), 'data' => 'str'),
'twitter_menu_height' => array('title'=> LAN_SOCIAL_ADMIN_23, 'type'=>'number', 'tab'=>3, 'data' => 'int','help'=>LAN_SOCIAL_ADMIN_33),
'twitter_menu_limit' => array('title'=> LAN_SOCIAL_ADMIN_18, 'type'=>'number', 'tab'=>3, 'data' => 'int','help'=>LAN_SOCIAL_ADMIN_34),
'sharing_mode' => array('title'=> 'Display Mode', 'type'=>'dropdown', 'tab'=>0, 'writeParms'=>array('optArray'=>array('normal'=>'Normal','dropdown'=>'Dropdown','off'=>'Disabled')), 'data' => 'str','help'=>''),
'sharing_hashtags' => array('title'=> 'Hashtags', 'type'=>'tags', 'tab'=>0, 'data' => 'str','help'=>'Excluding the # symbol.'),
'sharing_mode' => array('title'=> LAN_SOCIAL_ADMIN_24, 'type'=>'dropdown', 'tab'=>0, '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'=>0, 'data' => 'str','help'=>LAN_SOCIAL_ADMIN_28),
'sharing_providers' => array('title'=> 'Providers', 'type'=>'checkboxes', 'tab'=>0, 'writeParms'=>array(), 'data' => 'str','help'=>''),
);
@ -263,14 +265,13 @@ class social_ui extends e_admin_ui
{
$this->testUrl = SITEURL."?route=system/xup/test";
$notice = "Note: In most cases you will need to obtain an id and secret key from one of the providers. Click the blue links to the right to configure.
<br />You may test your configuration with the following URL:<br /><a href='".$this->testUrl."' rel='external'>".$this->testUrl."</a>";
$notice = "".LAN_SOCIAL_ADMIN_08." <br /><a href='".$this->testUrl."' rel='external'>".$this->testUrl."</a>";
$callBack = SITEURL."index.php";
$notice .= "<br /><br />Your callback URL is: </br ><a href='".$callBack."'>".$callBack."</a>";
$notice .= "<br /><br />".LAN_SOCIAL_ADMIN_09."</br ><a href='".$callBack."'>".$callBack."</a>";
return array("caption"=>"Help",'text'=> $notice);
return array("caption"=>LAN_HELP,'text'=> $notice);
}
@ -294,11 +295,11 @@ class social_ui extends e_admin_ui
</colgroup>
<tbody>
<tr>
<td><label for='social-login-active'>Social Signup/Login</label>
<td><label for='social-login-active'>".LAN_SOCIAL_ADMIN_02."</label>
</td>
<td>
".$frm->radio_switch('social_login_active', $pref['social_login_active'])."
<div class='smalltext field-help'>Allows users to signup/login with their social media accounts. When enabled, this option will still allow users to signup/login even if the core user registration system above is disabled. </div>
<div class='smalltext field-help'>".LAN_SOCIAL_ADMIN_07." </div>
</td>
</tr>
@ -315,10 +316,10 @@ class social_ui extends e_admin_ui
</colgroup>
<thead>
<tr>
<th>Provider</th>
<th>Key/ID</th>
<th>Secret</th>
<th class='center'>Signup/Login</th>
<th>".LAN_SOCIAL_ADMIN_04."</th>
<th>".LAN_SOCIAL_ADMIN_05."</th>
<th>".LAN_SOCIAL_ADMIN_06."</th>
<th class='center'>".LAN_SOCIAL_ADMIN_03."</th>
</tr>
</thead>
@ -334,7 +335,7 @@ class social_ui extends e_admin_ui
$textKeys = '';
$textScope = '';
$keyCount= array();
$label = varset($this->social_external[$prov]) ? "<a class='e-tip' rel='external' title='Get a key from the provider' href='".$this->social_external[$prov]."'>".$prov."</a>" : $prov;
$label = varset($this->social_external[$prov]) ? "<a class='e-tip' rel='external' title=' ".LAN_SOCIAL_ADMIN_10."' href='".$this->social_external[$prov]."'>".$prov."</a>" : $prov;
$radio_label = strtolower($prov);
$text .= "
<tr>
@ -450,10 +451,10 @@ class social_ui extends e_admin_ui
$text2 .= "
<tr>
<td><label for='".$text_label."'>Your ".$var['label']." page</label></td>
<td><label for='".$text_label."'>".LAN_SOCIAL_ADMIN_11." ".$var['label']." ".LAN_SOCIAL_ADMIN_12."</label></td>
<td>
".$frm->text($keypref, $pref['xurl'][$k], false, $opts)."
<div class='field-help'>Used by some themes to provide a link to your ".$var['label']." page. (".$def.")</div>
<div class='field-help'>".LAN_SOCIAL_ADMIN_13." ".$var['label']." ".LAN_SOCIAL_ADMIN_12." (".$def.")</div>
</td>
</tr>
";
@ -468,8 +469,8 @@ class social_ui extends e_admin_ui
";
$tabs = array();
$tabs[] = array('caption'=>"Applications", 'text'=>$text);
$tabs[] = array('caption'=>'Pages', 'text'=>$text2);
$tabs[] = array('caption'=> LAN_SOCIAL_ADMIN_00, 'text'=>$text);
$tabs[] = array('caption'=> LAN_SOCIAL_ADMIN_01, 'text'=>$text2);
$ret = $frm->open('social','post',null, 'class=form-horizontal').$frm->tabs($tabs);

View File

@ -7,7 +7,7 @@
*/
if (!defined('e107_INIT')) { exit; }
e107::lan('social',false, true);
@ -18,25 +18,24 @@ class social_shortcodes extends e_shortcode
public function getProviders()
{
$emailMessage = "Check out this link: "; //TODO LAN
$emailMessage = LAN_SOCIAL_LINK_CHK;
//TODO LANS ie. "Share on [x]" in English_global.php
$providers = array(
'email' => array('icon' => 'e-social-mail', 'title'=>"Email to someone", 'url' => "mailto:EMAIL_RECIPIENT?subject=[t]&body=".rawurlencode($emailMessage)."[u]"),
'facebook-like' => array('icon' => 'e-social-thumbs-up', 'title'=>"Like on Facebook", 'url' => "http://www.facebook.com/plugins/like.php?href=[u]"),
'facebook-share' => array('icon' => 'e-social-facebook', 'title'=>"Share on Facebook", 'url' => "http://www.facebook.com/sharer.php?u=[u]&t=[t]"),
'twitter' => array('icon' => 'e-social-twitter', 'title'=>"Share on Twitter", 'url' => "http://twitter.com/share?url=[u]&text=[t]"),
'google-plus1' => array('icon' => 'e-social-gplus', 'title'=>"+1 on Google", 'url' => "https://apis.google.com/_/+1/fastbutton?usegapi=1&size=large&hl=en&url=[u]"),
$providers = array(
'email' => array('icon' => 'e-social-mail', 'title'=>" ".LAN_SOCIAL_002." ", 'url' => "mailto:EMAIL_RECIPIENT?subject=[t]&body=".rawurlencode($emailMessage)."[u]"),
'facebook-like' => array('icon' => 'e-social-thumbs-up', 'title'=>" ".LAN_SOCIAL_001." Facebook", 'url' => "http://www.facebook.com/plugins/like.php?href=[u]"),
'facebook-share' => array('icon' => 'e-social-facebook', 'title'=>" ".LAN_SOCIAL_000." Facebook", 'url' => "http://www.facebook.com/sharer.php?u=[u]&t=[t]"),
'twitter' => array('icon' => 'e-social-twitter', 'title'=>"".LAN_SOCIAL_000." Twitter", 'url' => "http://twitter.com/share?url=[u]&text=[t]"),
'google-plus1' => array('icon' => 'e-social-gplus', 'title'=>" ".LAN_SOCIAL_003." ", 'url' => "https://apis.google.com/_/+1/fastbutton?usegapi=1&size=large&hl=en&url=[u]"),
// 'google-plus' => array('icon' => 'fa-google-plus', 'title'=>"On Google Plus", 'url' => "https://plusone.google.com/_/+1/confirm?hl=en&url=[u]"),
'linkedin' => array('icon' => 'e-social-linkedin', 'title'=>"Share on LinkedIn", 'url' => "http://www.linkedin.com/shareArticle?mini=true&url=[u]"),
'pinterest' => array('icon' => 'e-social-pinterest', 'title'=>"Share on Pinterest", 'url' => "http://www.pinterest.com/pin/create/button/?url=[u]&description=[t]&media=[m]"),
'linkedin' => array('icon' => 'e-social-linkedin', 'title'=>"".LAN_SOCIAL_000." LinkedIn", 'url' => "http://www.linkedin.com/shareArticle?mini=true&url=[u]"),
'pinterest' => array('icon' => 'e-social-pinterest', 'title'=>"".LAN_SOCIAL_000." Pinterest", 'url' => "http://www.pinterest.com/pin/create/button/?url=[u]&description=[t]&media=[m]"),
// 'thumblr' => array('icon' => 'fa-tumblr', 'title'=>"On Tumblr", 'url' => "http://www.tumblr.com/share/link?url=[u]&name=[t]&description=[d]"),
'stumbleupon' => array('icon' => 'e-social-stumbleupon', 'title'=>"Share on StumbleUpon",'url' => "http://www.stumbleupon.com/submit?url=[u]&title=[t]"),
'reddit' => array('icon' => 'e-social-reddit', 'title'=>"Share on Reddit", 'url' => "http://reddit.com/submit?url=[u]&title=[t]"),
'digg' => array('icon' => 'e-social-digg', 'title'=>"Share on Digg", 'url' => "http://www.digg.com/submit?url=[u]"),
'stumbleupon' => array('icon' => 'e-social-stumbleupon', 'title'=>"".LAN_SOCIAL_000." StumbleUpon",'url' => "http://www.stumbleupon.com/submit?url=[u]&title=[t]"),
'reddit' => array('icon' => 'e-social-reddit', 'title'=>"".LAN_SOCIAL_000." Reddit", 'url' => "http://reddit.com/submit?url=[u]&title=[t]"),
'digg' => array('icon' => 'e-social-digg', 'title'=>"".LAN_SOCIAL_000." Digg", 'url' => "http://www.digg.com/submit?url=[u]"),
//http://reddit.com/submit?url=http%3A%2F%2Fwebsite.com&title=Website%20Title // no fa icon available
//http://www.digg.com/submit?url=http%3A%2F%2Fwebsite.com // no fa icon available
);
@ -135,7 +134,7 @@ class social_shortcodes extends e_shortcode
if(!empty($parm['label']))
{
$text .= "<p>Sign in with:</p>";
$text .= "<p>".LAN_PLUGIN_SOCIAL_SIGNIN."</p>";
}
$text .= $sc->sc_signup_xup_login($parm);
@ -351,7 +350,7 @@ class social_shortcodes extends e_shortcode
$account = basename(XURL_TWITTER);
//data-related="twitterapi,twitter"
$text = '<a class="twitter-timeline" href="'.XURL_TWITTER.'" data-widget-id="'.varset($parm['id']).'" data-theme="'.varset($parm['theme'],'light').'" data-link-color="#cc0000" data-aria-polite="assertive" width="100%" height="'.varset($parm['height'],300).'" lang="'.e_LAN.'">Tweets by @'.$account.'</a>';
$text = '<a class="twitter-timeline" href="'.XURL_TWITTER.'" data-widget-id="'.varset($parm['id']).'" data-theme="'.varset($parm['theme'],'light').'" data-link-color="#cc0000" data-aria-polite="assertive" width="100%" height="'.varset($parm['height'],300).'" lang="'.e_LAN.'">'.LAN_SOCIAL_201.'@'.$account.'</a>';
$text .= <<<TMPL

View File

@ -9,7 +9,7 @@
*/
//@see https://developers.facebook.com/docs/plugins/like-button
e107::lan('social',false, true);
if(deftrue('SOCIAL_FACEBOOK_INIT') )
{
e107::js('footer-inline', SOCIAL_FACEBOOK_INIT); // defined in e_header.php
@ -31,6 +31,6 @@ if(deftrue('SOCIAL_FACEBOOK_INIT') )
}elseif(ADMIN)
{
$text = "<div class='alert alert-danger'>Unable to display feed. Facebook App ID has not been defined in preferences.</div>";
$text = "<div class='alert alert-danger'>".LAN_SOCIAL_100."</div>";
e107::getRender()->tablerender('Facebook',$text,'twitter-menu');
}

View File

@ -0,0 +1,49 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system -
| social plugin
+----------------------------------------------------------------------------+
*/
define("LAN_SOCIAL_ADMIN_SUMM", "Adds Facebook, Twitter and other social media widgets to e107.");
define("LAN_SOCIAL_ADMIN_00", "Applications");
define("LAN_SOCIAL_ADMIN_01", "Pages");
define("LAN_SOCIAL_ADMIN_02", "Social Signup/Login"); //tab
define("LAN_SOCIAL_ADMIN_03", "Signup/Login"); //bar
define("LAN_SOCIAL_ADMIN_04", "Provider");
define("LAN_SOCIAL_ADMIN_05", "Key/ID");
define("LAN_SOCIAL_ADMIN_06", "Secret");
define("LAN_SOCIAL_ADMIN_07", "Allows users to signup/login with their social media accounts. When enabled, this option will still allow users to signup/login even if the core user registration system above is disabled.");
define("LAN_SOCIAL_ADMIN_08", "Note: In most cases you will need to obtain an id and secret key from one of the providers.</br> Click the blue links to the right to configure. </br></br>You may test your configuration with the following URL:");
define("LAN_SOCIAL_ADMIN_09", "Your callback URL is: ");
define("LAN_SOCIAL_ADMIN_10", "Get a key from the provider");
define("LAN_SOCIAL_ADMIN_11", "Your");
define("LAN_SOCIAL_ADMIN_12", "page");
define("LAN_SOCIAL_ADMIN_13", "Used by some themes to provide a link to your ");
define("LAN_SOCIAL_ADMIN_14", "Sharing");
define("LAN_SOCIAL_ADMIN_15", "Facebook Comments");
define("LAN_SOCIAL_ADMIN_16", "Facebook Menu");
define("LAN_SOCIAL_ADMIN_17", "Twitter Menu");
define("LAN_SOCIAL_ADMIN_18", "Limit");
define("LAN_SOCIAL_ADMIN_19", "Theme");
define("LAN_SOCIAL_ADMIN_20", "Action");
define("LAN_SOCIAL_ADMIN_21", "Text while loading");
define("LAN_SOCIAL_ADMIN_22", "Width");
define("LAN_SOCIAL_ADMIN_23", "Height");
define("LAN_SOCIAL_ADMIN_24", "Display Mode");
define("LAN_SOCIAL_ADMIN_25", "Normal");
define("LAN_SOCIAL_ADMIN_26", "Dropdown");
define("LAN_SOCIAL_ADMIN_27", "Disabled");
define("LAN_SOCIAL_ADMIN_28", "Excluding the # symbol.");
define("LAN_SOCIAL_ADMIN_29", "Number of comments to display.");
define("LAN_SOCIAL_ADMIN_30", "Loading...");
define("LAN_SOCIAL_ADMIN_31", "Width in px");
define("LAN_SOCIAL_ADMIN_32", "Recommend");
define("LAN_SOCIAL_ADMIN_33", "Height in px");
define("LAN_SOCIAL_ADMIN_34", "Number of tweets to display.");
define("LAN_SOCIAL_ADMIN_35", "Light");
define("LAN_SOCIAL_ADMIN_36", "Dark");
?>

View File

@ -0,0 +1,25 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system -
| social plugin
+----------------------------------------------------------------------------+
*/
//LAN_SOCIAL_000 to LAN_SOCIAL_099 // Common parts of the frontend
define("LAN_SOCIAL_000", "Share On");
define("LAN_SOCIAL_001", "Like on");
define("LAN_SOCIAL_002", "Email to someone");
define("LAN_SOCIAL_003", "+1 on Google");
//LAN_SOCIAL_100 to LAN_SOCIAL_199 // Facebook specific
define("LAN_SOCIAL_100", "Unable to display feed. Facebook App ID has not been defined in preferences.");
//LAN_SOCIAL_200 to LAN_SOCIAL_299 // Twitter specific
define("LAN_SOCIAL_200", "Unable to display feed. Twitter URL has not been defined in preferences.");
define("LAN_SOCIAL_201", "Tweets by");
define("LAN_SOCIAL_202", "Post to Twitter");
define("LAN_SOCIAL_203", "Type your tweet here.");
?>

View File

@ -0,0 +1,17 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system -
| social plugin
+----------------------------------------------------------------------------+
*/
define("LAN_PLUGIN_SOCIAL_DESCR", "Adds options to replace the e107 comment engine with Facebook. Add Twitter feeds to your site. etc.");
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");
?>

View File

@ -2,8 +2,8 @@
<e107Plugin name="Social" 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="">Adds Facebook, Twitter and other social media widgets to e107.</summary>
<description lan="">Adds options to replace the e107 comment engine with Facebook. Add Twitter feeds to your site. etc.</description>
<summary lan="LAN_SOCIAL_ADMIN_SUMM">Adds Facebook, Twitter and other social media widgets to e107.</summary>
<description lan="LAN_PLUGIN_SOCIAL_DESCR">Adds options to replace the e107 comment engine with Facebook. Add Twitter feeds to your site. etc.</description>
<keywords>
<word>facebook</word>
<word>twitter</word>

View File

@ -9,8 +9,9 @@
*/
//@see https://dev.twitter.com/web/embedded-timelines
e107::lan('social',false, true);
if(deftrue('XURL_TWITTER'))
if(deftrue('XURL_TWITTER'))
{
e107::js('footer-inline', '
@ -30,14 +31,14 @@ if(deftrue('XURL_TWITTER'))
$text = '<a class="twitter-timeline" data-theme="'.$theme.'" href="'.XURL_TWITTER.'" data-tweet-limit="'.$limit.'" data-widget-id="'.$widgetId.'" style="height:'.$height.'px" data-screen-name="'.$screenName.'" data-chrome="noheader nofooter transparent noscrollbar">Tweets by @'.$screenName.'</a>';
$text = '<a class="twitter-timeline" data-theme="'.$theme.'" href="'.XURL_TWITTER.'" data-tweet-limit="'.$limit.'" data-widget-id="'.$widgetId.'" style="height:'.$height.'px" data-screen-name="'.$screenName.'" data-chrome="noheader nofooter transparent noscrollbar">'.LAN_SOCIAL_201."@".$screenName.'</a>';
e107::getRender()->tablerender('Twitter',$text,'twitter-menu');
}elseif(ADMIN)
{
$text = "<div class='alert alert-danger'>Unable to display feed. Twitter URL has not been defined in preferences.</div>";
$text = "<div class='alert alert-danger'>".LAN_SOCIAL_200."</div>";
e107::getRender()->tablerender('Twitter',$text,'twitter-menu');
}