diff options
Diffstat (limited to 'liberty_plugins/data.carousel.php')
| -rwxr-xr-x | liberty_plugins/data.carousel.php | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/liberty_plugins/data.carousel.php b/liberty_plugins/data.carousel.php index 0d0d833..d15dd4f 100755 --- a/liberty_plugins/data.carousel.php +++ b/liberty_plugins/data.carousel.php @@ -10,6 +10,7 @@ * required setup */ namespace Bitweaver\Liberty; + use Bitweaver\Fisheye\FisheyeImage; use Bitweaver\BitBase; use Bitweaver\KernelTools; @@ -43,7 +44,6 @@ $pluginParams = [ $gLibertySystem->registerPlugin( PLUGIN_GUID_DATACAROUSEL, $pluginParams ); $gLibertySystem->registerDataTag( $pluginParams['tag'], PLUGIN_GUID_DATACAROUSEL ); - function data_carousel( $pData, $pParams ) { global $gBitSystem, $gBitSmarty; $ret = ' '; @@ -89,15 +89,15 @@ function data_carousel( $pData, $pParams ) { $out = '<div class="carousel slide" data-ride="carousel" id="myCarousel">'; $out .= '<ol class="carousel-indicators">'; $out .= '<li class="active" data-slide-to="0" data-target="#myCarousel"> </li>'; - for ( $i=1; $i<$num; $i++ ) { + for ( $i=1; $i<$num; $i++ ) { $out .= '<li data-slide-to="'.$i.'" data-target="#myCarousel"> </li>'; - } + } $out .= '</ol>'; $out .= '<div class="carousel-inner" role="listbox">'; $i=0; foreach( $images as $image ) { - // insert source url if we need the original file + // insert source url if we need the original file if( !empty( $pParams['size'] ) && $pParams['size'] == 'original' ) { $thumbUrl = $image['source_url']; } elseif( $image['thumbnail_url'] ) { @@ -119,7 +119,7 @@ function data_carousel( $pData, $pParams ) { ' src="' .$thumbUrl.'"'. ' height="103" width="800"'. ' /></div>'; - + if( !empty( $pParams['nolink'] ) ) { } elseif( !empty( $wrapper['link'] ) ) { // if this image is linking to something, wrap the image with the <a> @@ -127,9 +127,9 @@ function data_carousel( $pData, $pParams ) { } elseif ( empty( $pParams['size'] ) || $pParams['size'] != 'original' ) { if ( $image['source_url'] ) { $ret = '<a href="'.trim( $image['source_url'] ).'">'.$ret.'</a>'; - } + } } - + if( !empty( $wrapper['style'] ) || !empty( $class ) || !empty( $wrapper['description'] ) ) { $ret = '<'.$wrapper['wrapper'].' class="'.( !empty( $wrapper['class'] ) ? $wrapper['class'] : "img-responsive" ).'" style="'.$wrapper['style'].'">'.$ret.( !empty( $wrapper['description'] ) ? '<br />'.$wrapper['description'] : '' ).'</'.$wrapper['wrapper'].'>'; } @@ -170,7 +170,7 @@ function data_carousel_help() { .'<tr class="odd">' .'<td>num</td>' .'<td>' . KernelTools::tra( "key-words") . '<br />' . KernelTools::tra("(optional)") . '</td>' - .'<td>' . KernelTools::tra( "Number of images to display from the gallery") + .'<td>' . KernelTools::tra( "Number of images to display from the gallery") . KernelTools::tra( "(Default = " ) . '<strong>10</strong>)</td>' .'</tr>' .'</table>' |
