";
// $text .= "
";
$text .= $this->videoTab();
$text .= "
";
@@ -1219,6 +1207,36 @@ class media_admin_ui extends e_admin_ui
return $text;
}
+
+
+
+ function imageTab($type,$options)
+ {
+ $tag = ($options['bbcode']) ? "" : $this->getQuery('tagid');
+
+ if(varset($_GET['w']))
+ {
+ $options['w'] = intval($_GET['w']);
+ }
+
+ if($type == 'file')
+ {
+ $this->perPage = 0;
+ $this->getTreeModel()->setParam('db_query', $this->_modifyListQry(false, false, false, false, $this->listQry))->load();
+ $text = $this->getUI()->getList();
+ }
+ else
+ {
+ $text = e107::getMedia()->mediaSelect($this->getQuery('for'),$this->getQuery('tagid'), $options); // eg. news, news-thumbnail
+ }
+
+ return $text;
+ }
+
+
+
+
+
function glyphTab($parm='')
@@ -1327,7 +1345,7 @@ class media_admin_ui extends e_admin_ui
);
}
- $parms = array('width' => 200, 'height'=>113, 'type'=>'image', 'tagid'=> $this->getQuery('tagid'), 'action'=>'youtube','searchPlaceholder'=>'Search Youtube');
+ $parms = array('width' => 200, 'height'=>113, 'type'=>'image', 'bbcode'=>'video', 'tagid'=> $this->getQuery('tagid'), 'action'=>'youtube','searchPlaceholder'=>'Search Youtube');
$text = e107::getMedia()->browserCarousel($items, $parms);
diff --git a/e107_core/bbcodes/bb_video.php b/e107_core/bbcodes/bb_video.php
new file mode 100644
index 000000000..be2868484
--- /dev/null
+++ b/e107_core/bbcodes/bb_video.php
@@ -0,0 +1,41 @@
+toVideo($code_text);
+ }
+
+
+}
+
+
+
+
+
+
+
+?>
\ No newline at end of file
diff --git a/e107_core/shortcodes/batch/bbcode_shortcodes.php b/e107_core/shortcodes/batch/bbcode_shortcodes.php
index 2677d67e4..565eb1fbf 100644
--- a/e107_core/shortcodes/batch/bbcode_shortcodes.php
+++ b/e107_core/shortcodes/batch/bbcode_shortcodes.php
@@ -124,11 +124,22 @@ class bbcode_shortcodes extends e_shortcode
function bb_youtube($id)
{
+ if($this->var['tagid'] == 'data_') // BC work-around for duplicate IDs.
+ {
+ $tag = "data";
+ }
+ else
+ {
+ list($tag,$tmp) = explode("--",$this->var['tagid']); // works with $frm->bbarea to detect textarea from first half of tag.
+ }
+
+
+
$data = "[youtube]*[/youtube]";
$event = $this->getEvent('addinput',$data,LANHELP_48);
- $text = "
";
+ // $text = "";
// $text .="
";
-
+ $text = "";
$text .= $this->button(e_IMAGE_ABS."bbcode/youtube.png", 'youtube', LANHELP_48);
$text .= "";
diff --git a/e107_core/shortcodes/batch/news_shortcodes.php b/e107_core/shortcodes/batch/news_shortcodes.php
index 9d97f4114..dd0659bc0 100644
--- a/e107_core/shortcodes/batch/news_shortcodes.php
+++ b/e107_core/shortcodes/batch/news_shortcodes.php
@@ -29,10 +29,17 @@ class news_shortcodes extends e_shortcode
protected $e107;
//protected $param; - shouldn't be set - see __set/__get methods of e_shortcode & news::render_newsitem()
+ protected $commentsDisabled;
+
+
function __construct($eVars = null)
{
parent::__construct($eVars);
$this->e107 = e107::getInstance();
+
+ $pref = e107::getPref();
+
+ $this->commentsDisabled = vartrue($pref['comments_disabled']);
}
function sc_newstitle()
@@ -88,11 +95,11 @@ class news_shortcodes extends e_shortcode
$pref = e107::getPref();
$sql = e107::getDb();
- if($pref['comments_disabled'] == 1)
+ if($this->commentsDisabled)
{
- return "Disabled";
+ return;
}
-
+
$news_item = $this->news_item;
$param = $this->param;
@@ -192,6 +199,10 @@ class news_shortcodes extends e_shortcode
*/
function sc_newscommentlink($parm)
{
+ if($this->commentsDisabled)
+ {
+ return;
+ }
$class = varset($parm['class']) ? " ".$parm['class'] : "";
$text = ($this->news_item['news_allow_comments'] ? $this->param['commentoffstring'] : "
news_item)."'>".$this->param['commentlink'].'');
@@ -203,6 +214,11 @@ class news_shortcodes extends e_shortcode
*/
function sc_newscommentcount($parm)
{
+ if($this->commentsDisabled)
+ {
+ return;
+ }
+
$text = varset($parm['glyph']) ? e107::getParser()->toGlyph($parm['glyph']) : "";
$text .= $this->news_item['news_comment_total'];
return $text;
diff --git a/e107_handlers/bbcode_handler.php b/e107_handlers/bbcode_handler.php
index ddf8f81ee..dab791619 100644
--- a/e107_handlers/bbcode_handler.php
+++ b/e107_handlers/bbcode_handler.php
@@ -42,9 +42,9 @@ class e_bbcode
'html', 'flash', 'link', 'email',
'url', 'quote', 'left', 'right',
'b', 'justify', 'file', 'stream',
- 'textarea', 'list', 'php', 'time',
+ 'textarea', 'list', 'time',
'spoiler', 'hide', 'youtube', 'sanitised',
- 'p', 'h', 'nobr', 'block','table','th', 'tr','tbody','td','markdown'
+ 'p', 'h', 'nobr', 'block','table','th', 'tr','tbody','td','markdown','video'
);
foreach($this->core_bb as $c)
diff --git a/e107_handlers/form_handler.php b/e107_handlers/form_handler.php
index 77e572729..4786653fa 100644
--- a/e107_handlers/form_handler.php
+++ b/e107_handlers/form_handler.php
@@ -696,6 +696,7 @@ class e_form
*/
function userpicker($name_fld, $id_fld, $default_name, $default_id, $options = array())
{
+ $tp = e107::getParser();
if(!is_array($options)) parse_str($options, $options);
$default_name = vartrue($default_name, '');
@@ -706,11 +707,13 @@ class e_form
$fldid = $this->name2id($name_fld);
$hidden_fldid = $this->name2id($id_fld);
- $ret = $this->text($name_fld,$default_name,20, "class=e-tip&title=Type name of user&typeahead=users&readonly=".vartrue($options['readonly']))
- .$this->hidden($id_fld,$default_id, array('id' => $this->name2id($id_fld)))." id#
".$default_id.'';
- $ret .= "
reset";
+ $ret = '
";
- e107::getJs()->footerInline("
+ e107::js('footer-inline', "
\$('#{$fldid}').blur(function () {
\$('#{$fldid}-id').html(\$('#{$hidden_fldid}').val());
});
@@ -718,6 +721,7 @@ class e_form
\$('#{$fldid}-id').html('0');
\$('#{$hidden_fldid}').val(0);
\$('#{$fldid}').val('');
+ return false;
});
");
@@ -3240,7 +3244,7 @@ class e_form
if(!isset($parms['__options'])) $parms['__options'] = array();
if(!is_array($parms['__options'])) parse_str($parms['__options'], $parms['__options']);
- if((empty($value) && vartrue($parms['currentInit'])) || vartrue($parms['current']))
+ if((empty($value) && varset($parms['currentInit'],USERID)!==0) || vartrue($parms['current'])) // include current user by default.
{
$value = USERID;
if(vartrue($parms['current']))
diff --git a/e107_handlers/media_class.php b/e107_handlers/media_class.php
index 655d9cfef..e7a1bb09a 100644
--- a/e107_handlers/media_class.php
+++ b/e107_handlers/media_class.php
@@ -1025,7 +1025,8 @@ class e_media
'previewUrl' => $defaultThumb ,
'thumbUrl' => $defaultThumb,
'title' => '',
- 'gridClass' => 'span2'
+ 'gridClass' => 'span2',
+ 'bbcode' => ''
);
@@ -1044,7 +1045,7 @@ class e_media
\n\n" : "";
- $text .= "\n\n
\n\n";
+
$text .= "