1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-15 10:02:02 +02:00

Sitedown shortcodes upgraded to v2.x spec. Bootstrap css added by default.

This commit is contained in:
Cameron 2016-03-11 17:30:17 -08:00
parent f23a016111
commit b2fd2942da
4 changed files with 68 additions and 25 deletions

View File

@ -15,23 +15,43 @@
*/
if (!defined('e107_INIT')) { exit; }
include_once(e_HANDLER.'shortcode_handler.php');
$sitedown_shortcodes = $tp -> e_sc -> parse_scbatch(__FILE__);
/*
SC_BEGIN SITEDOWN_TABLE_MAINTAINANCETEXT
global $pref,$tp;
if($pref['maintainance_text']) {
return $tp->toHTML($pref['maintainance_text'], TRUE, 'parse_sc', 'admin');
} else {
return "<b>- ".SITENAME." ".LAN_SITEDOWN_00." -</b><br /><br />".LAN_SITEDOWN_01 ;
class sitedown_shortcodes extends e_shortcode
{
function sc_sitedown_table_maintainancetext($parm=null)
{
$pref = e107::pref('core');
$tp = e107::getParser();
if(!empty($pref['maintainance_text']))
{
return $tp->toHTML($pref['maintainance_text'], TRUE, 'parse_sc', 'admin');
}
else
{
return "<b>- ".SITENAME." ".LAN_SITEDOWN_00." -</b><br /><br />".LAN_SITEDOWN_01 ;
}
}
function sc_sitedown_table_pagename($parm=null)
{
return PAGE_NAME;
}
function sc_sitedown_theme_css($parm=null)
{
return THEME_ABS."style.css";
}
function sc_sitedown_e107_css($parm=null)
{
return e_WEB_ABS."css/e107.css";
}
}
SC_END
SC_BEGIN SITEDOWN_TABLE_PAGENAME
return PAGE_NAME;
SC_END
*/
?>

View File

@ -26,19 +26,26 @@ if(!isset($SITEDOWN_TABLE))
<head>
<meta http-equiv='content-type' content='text/html; charset=utf-8' />
<meta http-equiv='content-style-type' content='text/css' />\n
<link rel='stylesheet' href='".THEME_ABS."style.css' type='text/css' media='all' />
<link rel='stylesheet' href='{SITEDOWN_E107_CSS}' type='text/css' media='all' />
<link rel='stylesheet' href='{SITEDOWN_THEME_CSS}' type='text/css' media='all' />
<link rel='stylesheet' media='all' property='stylesheet' type='text/css' href='http://netdna.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css' />
<link rel='stylesheet' media='all' property='stylesheet' type='text/css' href='http://netdna.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css' />
<title>{SITEDOWN_TABLE_PAGENAME}</title>
<style type='text/css'>
.img-responsive { display: inline }
</style>
</head>
<body>
<div style='text-align:center;font-size: 14px; color: black; font-family: Tahoma, Verdana, Arial, Helvetica; text-decoration: none'>
<div style='text-align:center'>{LOGO}</div>
<hr />
<br />
{SITEDOWN_TABLE_MAINTAINANCETEXT}
</div>
<div style='margin-top:100px; text-align:center'>
{XURL_ICONS: size=3x&tip-pos=bottom}
<div class='container'>
<div style='text-align:center;font-size: 14px; color: black; font-family: Tahoma, Verdana, Arial, Helvetica; text-decoration: none'>
<div style='text-align:center'>{LOGO}</div>
<hr />
<br />
{SITEDOWN_TABLE_MAINTAINANCETEXT}
</div>
<div style='margin-top:100px; text-align:center'>
{XURL_ICONS: type=facebook,twitter,google-plus,github,instagram,linkedin&size=3x&tip-pos=bottom}
</div>
</div>
</body>
</html>";

View File

@ -53,6 +53,7 @@ class social_shortcodes extends e_shortcode
public $var;
/**
* {XURL_ICONS: size=2x}
* {XURL_ICONS: type=facebook,twitter,vimeo}
*/
function sc_xurl_icons($parm='')
{
@ -76,6 +77,19 @@ class social_shortcodes extends e_shortcode
$class = (vartrue($parm['size'])) ? 'fa-'.$parm['size'] : '';
$tooltipPos = vartrue($parm['tip-pos'], 'top');
if(!empty($parm['type']))
{
$newList = array();
$tmp = explode(",",$parm['type']);
foreach($tmp as $v)
{
$newList[$v] = $social[$v];
}
$social = $newList;
}
$text = '';
foreach($social as $id => $data)

View File

@ -24,7 +24,9 @@ header('Content-type: text/html; charset=utf-8');
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/lan_'.e_PAGE);
require_once(e_CORE.'shortcodes/batch/sitedown_shortcodes.php');
// require_once(e_CORE.'shortcodes/batch/sitedown_shortcodes.php');
$sitedown_shortcodes= e107::getScBatch('sitedown');
if (!$SITEDOWN_TABLE)
{