mirror of
https://github.com/e107inc/e107.git
synced 2025-08-20 21:32:09 +02:00
Voux theme now sets a default social plugin preference during install. "instant edit" links added to custom menus, other news2. (more to come)
This commit is contained in:
@@ -11,12 +11,15 @@
|
||||
//@see https://developers.facebook.com/docs/plugins/like-button
|
||||
e107::lan('social',false, true);
|
||||
$pref = e107::pref('social');
|
||||
|
||||
$caption = "Facebook";
|
||||
$caption .= e107::getForm()->instantEditButton(e_PLUGIN_ABS."social/admin_config.php#tab-1",'P');
|
||||
|
||||
|
||||
if(deftrue('SOCIAL_FACEBOOK_INIT') )
|
||||
{
|
||||
e107::js('footer-inline', SOCIAL_FACEBOOK_INIT); // defined in e_header.php
|
||||
|
||||
|
||||
|
||||
$action = vartrue($pref['facebook_like_menu_action'], 'like'); // or 'recommend';
|
||||
$layout = vartrue($pref['facebook_like_menu_layout'], 'standard'); // standard, button_count, button or box_count.
|
||||
$width = vartrue($pref['facebook_like_menu_width'], 150);
|
||||
@@ -28,17 +31,19 @@ if(deftrue('SOCIAL_FACEBOOK_INIT') )
|
||||
$text .= '<div class="fb-like" data-href="'.rtrim($ref.'/').'" data-width="'.$width.'px" data-layout="'.$layout.'" data-colorscheme="'.$theme.'" data-action="'.$action.'" data-show-faces="true" data-share="'.$share.'"></div>';
|
||||
$text .= "</div>";
|
||||
|
||||
e107::getRender()->tablerender('Facebook',$text,'facebook-like-menu');
|
||||
|
||||
|
||||
e107::getRender()->tablerender($caption,$text,'facebook-like-menu');
|
||||
|
||||
}
|
||||
elseif(deftrue('XURL_FACEBOOK'))
|
||||
{
|
||||
$width = vartrue($pref['facebook_like_menu_width'], 350);
|
||||
$text .= '<iframe src="//www.facebook.com/plugins/likebox.php?href='.urlencode(XURL_FACEBOOK).'&width='.$width.'&height=200&colorscheme=light&show_faces=true&header=false&stream=false&show_border=false" scrolling="no" style="border:none; overflow:hidden; width:350px;height:200px;max-width:100%;" allowtransparency="true" frameborder="0"></iframe>';
|
||||
e107::getRender()->tablerender('Facebook',$text,'facebook-like-menu');
|
||||
e107::getRender()->tablerender($caption,$text,'facebook-like-menu');
|
||||
}
|
||||
elseif(ADMIN)
|
||||
{
|
||||
$text = "<div class='alert alert-danger'>".LAN_SOCIAL_100."</div>";
|
||||
e107::getRender()->tablerender('Facebook',$text,'facebook-like-menu');
|
||||
e107::getRender()->tablerender($caption,$text,'facebook-like-menu');
|
||||
}
|
Reference in New Issue
Block a user