mirror of
https://github.com/e107inc/e107.git
synced 2025-08-18 20:31:41 +02:00
Issue #435 - More Bootstrap 3 tweaks
This commit is contained in:
@@ -158,6 +158,8 @@ class featurebox_shortcodes// must match the plugin's folder name. ie. [PLUGIN_F
|
||||
$base = vartrue($parm['base'], 'nav').'_';
|
||||
$tree_ids = array_keys($tree->getTree()); //all available item ids
|
||||
|
||||
|
||||
|
||||
$ret = $category->toHTML(varset($tmpl[$base.'start']), true);
|
||||
$cols = $category->getParam('cols', 1);
|
||||
|
||||
@@ -168,6 +170,7 @@ class featurebox_shortcodes// must match the plugin's folder name. ie. [PLUGIN_F
|
||||
{
|
||||
$total = $tree->getTotal();
|
||||
}
|
||||
|
||||
// loop for limit number
|
||||
elseif(isset($parm['uselimit']))
|
||||
{
|
||||
@@ -186,14 +189,19 @@ class featurebox_shortcodes// must match the plugin's folder name. ie. [PLUGIN_F
|
||||
{
|
||||
$total = ceil($total / $cols);
|
||||
}
|
||||
|
||||
|
||||
$model = clone $category;
|
||||
$item = new plugin_featurebox_item();
|
||||
$tmp = array();
|
||||
|
||||
for ($index = 1; $index <= $total; $index++)
|
||||
{
|
||||
|
||||
$nodeid = varset($tree_ids[($index - 1) * $cols], 0);
|
||||
if($nodeid && $tree->hasNode($nodeid))
|
||||
{
|
||||
|
||||
$model->setParam('counter', $index)
|
||||
->setParam('total', $total)
|
||||
->setParam('active', $index == varset($parm['from'], 1));
|
||||
|
@@ -186,10 +186,12 @@ class plugin_featurebox_item extends e_model
|
||||
|
||||
/**
|
||||
* Item counter number (starting from 1)
|
||||
* @param optional - to strat from 0 if needed. (bootstrap 3)
|
||||
*/
|
||||
public function sc_featurebox_counter()
|
||||
{
|
||||
return $this->getParam('counter', 1);
|
||||
public function sc_featurebox_counter($parm=1)
|
||||
{
|
||||
$count = $this->getParam('counter', 1);
|
||||
return ($oarm == 0) ? $count - 1 : $count;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -8,6 +8,51 @@
|
||||
// TODO - list of all available shortcodes & schortcode parameters
|
||||
$FEATUREBOX_CATEGORY_TEMPLATE = array();
|
||||
|
||||
// Bootstrap 3
|
||||
|
||||
|
||||
$FEATUREBOX_CATEGORY_TEMPLATE['bootstrap3_carousel']['list_start'] = '
|
||||
<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
|
||||
{FEATUREBOX_NAVIGATION|bootstrap3_carousel=loop&uselimit=1}
|
||||
<!-- Wrapper for slides -->
|
||||
<div class="carousel-inner">
|
||||
|
||||
';
|
||||
|
||||
$FEATUREBOX_CATEGORY_TEMPLATE['bootstrap3_carousel']['list_end'] = '
|
||||
</div>
|
||||
|
||||
<!-- Controls -->
|
||||
<a class="left carousel-control" href="#carousel-example-generic" data-slide="prev">
|
||||
<span class="glyphicon glyphicon-chevron-left"></span>
|
||||
</a>
|
||||
<a class="right carousel-control" href="#carousel-example-generic" data-slide="next">
|
||||
<span class="glyphicon glyphicon-chevron-right"></span>
|
||||
</a>
|
||||
|
||||
|
||||
</div><!-- end row -->
|
||||
|
||||
<!-- end carousel -->
|
||||
';
|
||||
|
||||
$FEATUREBOX_CATEGORY_TEMPLATE['bootstrap3_carousel']['nav_start'] = '<!-- Indicators --><ol class="carousel-indicators">';
|
||||
$FEATUREBOX_CATEGORY_TEMPLATE['bootstrap3_carousel']['nav_item'] = '<li data-target="#carousel-example-generic" data-slide-to="{FEATUREBOX_COUNTER=0}" class="{FEATUREBOX_ACTIVE}"></li>';
|
||||
$FEATUREBOX_CATEGORY_TEMPLATE['bootstrap3_carousel']['nav_end'] = '</ol>';
|
||||
$FEATUREBOX_CATEGORY_TEMPLATE['bootstrap3_carousel']['nav_separator'] = '';
|
||||
|
||||
|
||||
$FEATUREBOX_CATEGORY_TEMPLATE['bootstrap3_carousel']['col_start'] = '';
|
||||
$FEATUREBOX_CATEGORY_TEMPLATE['bootstrap3_carousel']['col_end'] = '';
|
||||
$FEATUREBOX_CATEGORY_TEMPLATE['bootstrap3_carousel']['item_start'] = '';
|
||||
$FEATUREBOX_CATEGORY_TEMPLATE['bootstrap3_carousel']['item_end'] = '';
|
||||
$FEATUREBOX_CATEGORY_TEMPLATE['bootstrap3_carousel']['item_separator'] = '';
|
||||
$FEATUREBOX_CATEGORY_TEMPLATE['bootstrap3_carousel']['item_empty'] = '';
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// v2.x Default - Bootstrap.
|
||||
|
||||
@@ -289,7 +334,8 @@ $FEATUREBOX_CATEGORY_TEMPLATE['camera']['js_type'] = 'jquery';
|
||||
* @var array
|
||||
*/
|
||||
$FEATUREBOX_CATEGORY_INFO = array(
|
||||
'bootstrap_carousel' => array('title' => 'Bootstrap Carousel', 'description' => "Bootstrap's Hero slider"),
|
||||
'bootstrap_carousel' => array('title' => 'Bootstrap v2 Carousel', 'description' => "Bootstrap's Hero slider"),
|
||||
'bootstrap3_carousel' => array('title' => 'Bootstrap v3 Carousel', 'description' => "Bootstrap's Hero slider"),
|
||||
'bootstrap_tabs' => array('title' => 'Bootstrap Tabs' , 'description' => 'Tabbed Feature box items'),
|
||||
// 'camera' => array('title' => 'Image-Slider (jquery)' , 'description' => 'Image transitions using the "Camera" jquery plugin'),
|
||||
// 'accordion' => array('title' => 'Accordion (jquery)' , 'description' => 'Accordion utilizing jQuery UI'),
|
||||
|
@@ -15,10 +15,10 @@ $FEATUREBOX_TEMPLATE['bootstrap_carousel_left'] = '
|
||||
<!-- slide -->
|
||||
<div class="{FEATUREBOX_ACTIVE} item slide{FEATUREBOX_COUNTER}">
|
||||
<div class="row">
|
||||
<div class="span6">
|
||||
<div class="featurebox-item-image pull-left span6">
|
||||
{FEATUREBOX_IMAGE}
|
||||
</div>
|
||||
<div class="span4">
|
||||
<div class="featurebox-item-text span4">
|
||||
<h1>
|
||||
{FEATUREBOX_TITLE}
|
||||
</h1>
|
||||
@@ -33,11 +33,11 @@ $FEATUREBOX_TEMPLATE['bootstrap_carousel_left'] = '
|
||||
$FEATUREBOX_TEMPLATE['bootstrap_carousel_right'] = '
|
||||
<div class="{FEATUREBOX_ACTIVE} item slide{FEATUREBOX_COUNTER}">
|
||||
<div class="row">
|
||||
<div class="span4 animated fadeInUpBig">
|
||||
<div class="featurebox-item-text col-md-4 span4 animated fadeInUpBig">
|
||||
<h1>{FEATUREBOX_TITLE}</h1>
|
||||
{FEATUREBOX_TEXT}
|
||||
</div>
|
||||
<div class="span6 animated fadeInDownBig">
|
||||
<div class="featurebox-item-image col-md-6 span6 animated fadeInDownBig">
|
||||
{FEATUREBOX_IMAGE}
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user