mirror of
https://github.com/e107inc/e107.git
synced 2025-05-02 18:27:52 +02:00
Featurebox now accepts videos. Some minor tweaking to the Bootstrap3 template.
This commit is contained in:
parent
748888f2de
commit
712379f52e
@ -2822,7 +2822,7 @@ class e_parser
|
||||
return '<div class="video-responsive video-thumbnail thumbnail">'.$video.'</div>';
|
||||
}
|
||||
|
||||
return '<div class="video-responsive">'.$video.'</div>';
|
||||
return '<div class="'.vartrue($parm['class'],'video-responsive').'">'.$video.'</div>';
|
||||
}
|
||||
|
||||
if($type == 'mp4') //TODO FIXME
|
||||
|
@ -211,7 +211,7 @@ class fb_main_ui extends e_admin_ui
|
||||
'fb_id' => array('title'=> LAN_ID, 'type' => 'number', 'data'=> 'int', 'width' =>'5%', 'forced'=> TRUE),
|
||||
'fb_category' => array('title'=> LAN_CATEGORY, 'type' => 'dropdown', 'inline'=>true, 'data'=> 'int', 'width' => '10%', 'filter'=>TRUE, 'batch'=>TRUE),
|
||||
'fb_title' => array('title'=> LAN_TITLE, 'type' => 'text', 'inline'=>true, 'width' => 'auto', 'thclass' => 'left'),
|
||||
'fb_image' => array('title'=> "Image", 'type' => 'image', 'width' => '100px', 'readParms'=>'thumb=60&thumb_urlraw=0&thumb_aw=60','writeParms'=>'size=xxlarge&media=featurebox'),
|
||||
'fb_image' => array('title'=> "Image/Video", 'type' => 'image', 'width' => '100px', 'readParms'=>'thumb=60&thumb_urlraw=0&thumb_aw=60','writeParms'=>'size=xxlarge&media=featurebox&video=1'),
|
||||
|
||||
'fb_text' => array('title'=> FBLAN_08, 'type' => 'bbarea', 'width' => '30%', 'readParms' => 'expand=...&truncate=50&bb=1','writeParms'=>'template=admin'),
|
||||
//DEPRECATED 'fb_mode' => array('title'=> FBLAN_12, 'type' => 'dropdown', 'data'=> 'int', 'width' => '5%', 'filter'=>TRUE, 'batch'=>TRUE),
|
||||
|
@ -77,18 +77,22 @@ class plugin_featurebox_item extends e_model
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
$url = $tp->replaceConstants($this->get('fb_imageurl'), 'full');
|
||||
|
||||
if(empty($url)) return '';
|
||||
|
||||
parse_str($parm, $parm);
|
||||
if(!vartrue($parm['href']))
|
||||
|
||||
if(vartrue($parm['href']))
|
||||
{
|
||||
return $tp->replaceConstants($url);
|
||||
}
|
||||
|
||||
$title = vartrue($parm['text']) ? defset($parm['text']) : FBLAN_02;
|
||||
$title = vartrue($parm['text']) ? defset($parm['text']) : LAN_MORE;
|
||||
$alt = $tp->toAttribute($this->get('fb_title'), false, 'TITLE');
|
||||
|
||||
$buttonCls = vartrue($parm['button']) ? "class='btn' " : "";
|
||||
$buttonCls = vartrue($parm['button']) ? 'class="btn btn-primary" ' : "";
|
||||
|
||||
|
||||
|
||||
return '<a '.$buttonCls.'id="featurebox-url-'.$this->getId().'" href="'.$url.'" title="'.$alt.'" rel="'.$tp->toAttribute(vartrue($parm['rel'], '')).'">'.$title.'</a>';
|
||||
}
|
||||
@ -124,6 +128,12 @@ class plugin_featurebox_item extends e_model
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
if($video = e107::getParser()->toVideo($this->get('fb_image')))
|
||||
{
|
||||
return $video;
|
||||
}
|
||||
|
||||
parse_str($parm, $parm);
|
||||
$tp = e107::getParser();
|
||||
|
||||
|
@ -27,7 +27,7 @@ $FEATUREBOX_TEMPLATE['bootstrap_carousel_left'] = '
|
||||
<!-- slide --> {SETIMAGE: w=600&h=500&crop=1}
|
||||
<div class="{FEATUREBOX_ACTIVE} item slide{FEATUREBOX_COUNTER}">
|
||||
<div class="media container">
|
||||
<div class="media-object featurebox-item-image pull-left ">
|
||||
<div class="media-object featurebox-item-image col-lg-6 pull-left ">
|
||||
{FEATUREBOX_IMAGE=placeholder}
|
||||
</div>
|
||||
<div class="media-body featurebox-item-text span4">
|
||||
@ -35,6 +35,9 @@ $FEATUREBOX_TEMPLATE['bootstrap_carousel_left'] = '
|
||||
{FEATUREBOX_TITLE}
|
||||
</h1>
|
||||
{FEATUREBOX_TEXT}
|
||||
|
||||
<p>{FEATUREBOX_BUTTON}</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -46,12 +49,15 @@ $FEATUREBOX_TEMPLATE['bootstrap_carousel_right'] = '
|
||||
{SETIMAGE: w=600&h=500&crop=1}
|
||||
<div class="{FEATUREBOX_ACTIVE} item slide{FEATUREBOX_COUNTER}">
|
||||
<div class="media container">
|
||||
<div class="featurebox-item-image media-object pull-right span6 animated fadeInDownBig">
|
||||
<div class="featurebox-item-image media-object pull-right span6 col-lg-6">
|
||||
{FEATUREBOX_IMAGE=placeholder}
|
||||
</div>
|
||||
<div class="featurebox-item-text media-body animated fadeInUpBig">
|
||||
<h1>{FEATUREBOX_TITLE}</h1>
|
||||
{FEATUREBOX_TEXT}
|
||||
|
||||
<p>{FEATUREBOX_BUTTON}</p>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -94,11 +94,20 @@ body {
|
||||
height: 500px;
|
||||
}
|
||||
|
||||
|
||||
.media-object.featurebox-item-image {
|
||||
margin: 25px 0px;
|
||||
}
|
||||
|
||||
|
||||
.xurl-social-icons a {
|
||||
font-size: 24px;
|
||||
font-size: 28px;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.xurl-social-icons a:hover {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.btn { margin-top:10px }
|
Loading…
x
Reference in New Issue
Block a user