1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00

Basic Social 'XURL' shortcode added and used by the default Bootstrap theme.

This commit is contained in:
Cameron 2014-01-14 11:20:10 -08:00
parent 4c3f3288ce
commit 748888f2de
3 changed files with 75 additions and 3 deletions

View File

@ -0,0 +1,57 @@
<?php
/*
* Copyright (c) e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
* $Id: e_shortcode.php 12438 2011-12-05 15:12:56Z secretr $
*
* Featurebox shortcode batch class - shortcodes available site-wide. ie. equivalent to multiple .sc files.
*/
if (!defined('e107_INIT')) { exit; }
class social_shortcodes extends e_shortcode
{
function sc_xurl_icons($parm='')
{
$social = array(
'rss' => array('href'=> (e107::isInstalled('rss_menu') ? e_PLUGIN_ABS."rss_menu/rss.php?news.2" : ''), 'title'=>'Feed'),
'facebook' => array('href'=> deftrue('XURL_FACEBOOK'), 'title'=>'Facebook'),
'twitter' => array('href'=> deftrue('XURL_TWITTER'), 'title'=>'Twitter'),
'googleplus' => array('href'=> deftrue('XURL_GOOGLE'), 'title'=>'Google Plus'),
'linkedin' => array('href'=> deftrue('XURL_LINKEDIN'), 'title'=>'LinkedIn'),
'pinterest' => array('href'=> deftrue('XURL_PINTEREST'), 'title'=>'Pinterest'),
'instagram' => array('href'=> deftrue('XURL_INSTAGRAM'), 'title'=>'Instagram'),
'youtube' => array('href'=> deftrue('XURL_YOUTUBE'), 'title'=>'YouTube'),
'vimeo' => array('href'=> deftrue('XURL_VIMEO'), 'title'=>'Vimeo')
);
$text = '';
foreach($social as $id => $data)
{
if($data['href'] != '')
{
$text .= '<a rel="external" href="'.$data['href'].'" class="social-icon social-'.$id.'">
<span class="fa fa-'.$id.'"></span>
</a>';
$text .= "\n";
}
}
if($text !='')
{
return '<p class="xurl-social-icons">'.$text.'</p>';
}
}
}
?>

View File

@ -92,4 +92,13 @@ body {
left: 0;
min-width: 100%;
height: 500px;
}
.xurl-social-icons a {
font-size: 24px;
color: inherit;
text-decoration: none;
}

View File

@ -118,9 +118,15 @@ $LAYOUT['_header_'] = '
// applied after every layout.
$LAYOUT['_footer_'] = ' <hr>
<footer>
{SITEDISCLAIMER}
</footer>
<footer>
<div class="col-lg-6">
{SITEDISCLAIMER}
</div>
<div class="col-lg-6 text-right">
{XURL_ICONS}
</div>
</footer>
</div> <!-- /container -->
';