";
@@ -768,21 +769,94 @@ class e_media
* Get all Glyphs
* @todo Cache
*/
- function getGlyphs()
+ function getGlyphs($type='fa4',$prefix = '')
{
+ $icons = array();
- $pattern = '/\.(icon-(?:\w+(?:-)?)+):before\s+{\s*content:\s*"(.+)";\s+}/';
- $subject = file_get_contents(e_WEB_JS.'font-awesome/css/font-awesome.css');
+ if($type == 'bs2')
+ {
+ $matches = array(
+ 'glass','music','search','envelope','heart','star','star-empty','user','film','th-large','th','th-list','ok',
+ 'remove','zoom-in','zoom-out','off','signal','cog','trash','home','file','time','road','download-alt','download',
+ 'upload','inbox','play-circle','repeat','refresh','list-alt','lock','flag','headphones','volume-off','volume-down',
+ 'volume-up','qrcode','barcode','tag','tags','book','bookmark','print','camera','font','bold','italic','text-height',
+ 'text-width','align-left','align-center','align-right','align-justify','list','indent-left','indent-right',
+ 'facetime-video','picture','pencil','map-marker','adjust','tint','edit','share','check','move','step-backward',
+ 'fast-backward','backward','play','pause','stop','forward','fast-forward','step-forward','eject','chevron-left',
+ 'chevron-right','plus-sign','minus-sign','remove-sign','ok-sign','question-sign','info-sign','screenshot',
+ 'remove-circle','ok-circle','ban-circle','arrow-left','arrow-right','arrow-up','arrow-down','share-alt',
+ 'resize-full','resize-small','plus','minus','asterisk','exclamation-sign','gift','leaf','fire','eye-open',
+ 'eye-close','warning-sign','plane','calendar','random','comment','magnet','chevron-up','chevron-down',
+ 'retweet','shopping-cart','folder-close','folder-open','resize-vertical','resize-horizontal','hdd',
+ 'bullhorn','bell','certificate','thumbs-up','thumbs-down','hand-right','hand-left','hand-up','hand-down',
+ 'circle-arrow-right','circle-arrow-left','circle-arrow-up','circle-arrow-down','globe','wrench','tasks',
+ 'filter','briefcase','fullscreen'
+ );
+
+ foreach($matches as $match)
+ {
+ $icons[] = $prefix.$match;
+ }
+
+ return $icons;
+ }
+
+ if($type == 'bs3')
+ {
+ $matches = array(
+ 'adjust','align-center','align-justify','align-left','align-right','arrow-down','arrow-left','arrow-right','arrow-up','asterisk','backward','ban-circle','barcode','bell','bold','book
+ ','bookmark','briefcase','bullhorn','calendar','camera','certificate','check','chevron-down','chevron-left','chevron-right','chevron-up','circle-arrow-down','circle-arrow-left','circle-arrow-right
+ ','circle-arrow-up','cloud','cloud-download','cloud-upload','cog','collapse-down','collapse-up','comment','compressed','copyright-mark','credit-card','cutlery','dashboard','download','download-alt
+ ','earphone','edit','eject','envelope','euro','exclamation-sign','expand','export','eye-close','eye-open','facetime-video','fast-backward','fast-forward','file','film','filter','fire','flag
+ ','flash','floppy-disk','floppy-open','floppy-remove','floppy-save','floppy-saved','folder-close','folder-open','font','forward','fullscreen','gbp','gift
+ ','glass','globe','hand-down','hand-left','hand-right','hand-up','hd-video','hdd','header','headphones','heart','heart-empty','home','import','inbox','indent-left','indent-right','info-sign','italic','leaf','link','list
+ ','list-alt','lock','log-in','log-out','magnet','map-marker','minus','minus-sign','move','music','new-window','off','ok','ok-circle','ok-sign','open','paperclip','pause','pencil','phone','phone-alt','picture
+ ','plane','play','play-circle','plus','plus-sign','print','pushpin','qrcode','question-sign','random','record','refresh','registration-mark','remove','remove-circle','remove-sign','repeat','resize-full','resize-horizontal
+ ','resize-small','resize-vertical','retweet','road','save','saved','screenshot','sd-video','search','send','share','share-alt','shopping-cart','signal','sort','sort-by-alphabet','sort-by-alphabet-alt
+ ','sort-by-attributes','sort-by-attributes-alt','sort-by-order','sort-by-order-alt','sound-5-1','sound-6-1','sound-7-1','sound-dolby','sound-stereo','star','stats','step-backward','step-forward','stop
+ ','subtitles','tag','tags','tasks','text-height','text-width','th','th-large','th-list','thumbs-down','thumbs-up','time','tint','tower','transfer','trash','tree-conifer','tree-deciduous','unchecked','upload
+ ','usd','user','volume-down','volume-off','volume-up','warning-sign','wrench','zoom-in','zoom-out'
+ );
+
+ foreach($matches as $match)
+ {
+ $icons[] = $prefix.$match;
+ }
+
+ return $icons;
+ }
+ $cache = e107::getCache();
+ $cache->setMD5('_');
+
+ if($data = $cache->retrieve($type,360,true))
+ {
+ return e107::unserialize($data);
+ }
+
+
+ if($type == 'fa4')
+ {
+ $pattern = '/\.(fa-(?:\w+(?:-)?)+):before\s+{\s*content:\s*"(.+)";\s+}/';
+ $subject = e107::getFile()->getRemoteContent('http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css');
+ }
+ elseif($type == 'fa3')
+ {
+ $pattern = '/\.(icon-(?:\w+(?:-)?)+):before\s+{\s*content:\s*"(.+)";\s+}/';
+ $subject = file_get_contents(e_WEB_JS.'font-awesome/css/font-awesome.css');
+ }
+
preg_match_all($pattern, $subject, $matches, PREG_SET_ORDER);
- $icons = array();
+
foreach($matches as $match)
{
$icons[] = $match[1];
}
-
+
+ $data = e107::serialize($icons);
+ $cache->set($type,$data,true);
return $icons;
}
@@ -936,47 +1010,63 @@ class e_media
{
$tp = e107::getParser();
- $defaultThumb = $tp->thumbUrl('','w=400&h=240');
+ $defaultThumb = $tp->thumbUrl('','w=400&h=240');
- $default = array(
- 'width' => 200,
- 'height' => 113,
- 'id' => '',
- 'type' => 'image',
- 'tagid' => '',
- 'saveValue' => '',
- 'previewUrl' => $defaultThumb ,
- 'thumbUrl' => $defaultThumb,
- 'title' => ''
-
- );
+ $default = array(
+ 'width' => 200,
+ 'height' => 113,
+ 'id' => '',
+ 'type' => 'image',
+ 'tagid' => '',
+ 'saveValue' => '',
+ 'previewUrl' => $defaultThumb ,
+ 'thumbUrl' => $defaultThumb,
+ 'title' => '',
+ 'gridClass' => 'span2'
- $data = array();
-
- foreach($default as $k=>$v)
- {
- $data[$k] = isset($row[$k]) ? $row[$k] : $default[$k];
- }
+ );
+
+ $data = array();
+
+ foreach($default as $k=>$v)
+ {
+ $data[$k] = isset($row[$k]) ? $row[$k] : $default[$k];
+ }
- $close = (E107_DEBUG_LEVEL > 0) ? "" : "e-dialog-close";
+ $close = (E107_DEBUG_LEVEL > 0) ? "" : "e-dialog-close";
- $text .= "
";
- $text .= '
";
- $text .= "
";
+ $text .= "\n\n\n
\n\n\n";
return $text;
}
- function browserIndicators($slides=array())
+ function browserIndicators($slides=array(),$uniqueID)
{
if(count($slides)<1)
@@ -985,12 +1075,12 @@ class e_media
}
$indicators = '
- ';
+ ';
foreach($slides as $key=>$v)
{
$id = $key + 1;
- $indicators .= '';
+ $indicators .= '';
}
$indicators .= '
';
@@ -1005,48 +1095,50 @@ class e_media
/* Fix for Bootstrap2 margin-left issue when wrapping */
e107::css('inline','
- .browserItem { margin-bottom:15px }
+ .media-carousel { margin-bottom:15px }
- .row-fluid .browserItem.span6:nth-child(2n + 3) { margin-left : 0px; }
- .row-fluid .browserItem.span4:nth-child(3n + 4) { margin-left : 0px; }
- .row-fluid .browserItem.span3:nth-child(4n + 5) { margin-left : 0px; }
- .row-fluid .browserItem.span2:nth-child(6n + 7) { margin-left : 0px; }
+ .row-fluid .media-carousel.span6:nth-child(2n + 3) { margin-left : 0px; }
+ .row-fluid .media-carousel.span4:nth-child(3n + 4) { margin-left : 0px; }
+ .row-fluid .media-carousel.span3:nth-child(4n + 5) { margin-left : 0px; }
+ .row-fluid .media-carousel.span2:nth-child(6n + 7) { margin-left : 0px; }
');
-
- $frm = varset($option['from']) ? $option['from'] : 0;
- $limit = varset($option['limit']) ? $option['limit'] : 20;
- $bbcode = varset($option['bbcode']) ? $option['bbcode'] : null;
- $navMode = varset($option['nav']) ? TRUE : FALSE;
- $search = varset($option['search']) ? $option['search'] : null;
-
+
$frm = e107::getForm();
// $text .= print_a($_GET,true);
$data_src = $this->mediaSelectNav($category,$parm['tagid'], $parm);
+ $carouselID = 'myCarousel-'.$parm['action'];
//$text = "