mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 20:58:30 +01:00
Media-Manager news now includes common images/video etc.
This commit is contained in:
parent
4c41fb6ea2
commit
ea4affeab1
@ -1374,6 +1374,8 @@ class media_admin_ui extends e_admin_ui
|
||||
|
||||
$cat = $this->getQuery('for');
|
||||
|
||||
$cat = urldecode($cat);
|
||||
|
||||
$tabOptions = array(
|
||||
'core-media-icon' => array('caption'=> $tp->toGlyph('fa-file-photo-o').IMALAN_72, 'method' => 'iconTab' ),
|
||||
'core-media-image' => array('caption'=> $tp->toGlyph('fa-file-photo-o').ADLAN_105, 'method' => 'imageTab2' ),
|
||||
@ -1691,10 +1693,10 @@ class media_admin_ui extends e_admin_ui
|
||||
private function mediaManagerPlaceholders()
|
||||
{
|
||||
$type = (E107_DEBUG_LEVEL > 0) ? "text" : "hidden";
|
||||
$br = (E107_DEBUG_LEVEL > 0) ? "<br />" : "";
|
||||
$br = (E107_DEBUG_LEVEL > 0) ? "<br style='clear:both' />" : "";
|
||||
|
||||
$text = "
|
||||
".$br."<input title='bbcode' type='{$type}' readonly='readonly' class='span11 col-md-11' id='bbcode_holder' name='bbcode_holder' value='' />
|
||||
".$br."<input title='bbcode' type='{$type}' style=readonly='readonly' class='span11 col-md-11' id='bbcode_holder' name='bbcode_holder' value='' />
|
||||
".$br."<input title='html/wysiwyg' type='{$type}' class='span11 col-md-11' readonly='readonly' id='html_holder' name='html_holder' value='' />
|
||||
".$br."<input title='(preview) src' type='{$type}' class='span11 col-md-11' readonly='readonly' id='src' name='src' value='' />
|
||||
".$br."<input title='path (saved to db)' type='{$type}' class='span11 col-md-11' readonly='readonly' id='path' name='path' value='' />
|
||||
|
@ -1753,11 +1753,11 @@ class news_form_ui extends e_admin_form_ui
|
||||
}
|
||||
|
||||
|
||||
$text = $frm->imagepicker('news_thumbnail[0]', varset($thumbTmp[0]), varset($paths[0]),'media=news&video=1&legacyPath={e_IMAGE}newspost_images');
|
||||
$text .= $frm->imagepicker('news_thumbnail[1]', varset($thumbTmp[1]), varset($paths[1]),'media=news&video=1&legacyPath={e_IMAGE}newspost_images');
|
||||
$text .= $frm->imagepicker('news_thumbnail[2]', varset($thumbTmp[2]), varset($paths[2]),'media=news&video=1&legacyPath={e_IMAGE}newspost_images');
|
||||
$text .= $frm->imagepicker('news_thumbnail[3]', varset($thumbTmp[3]), varset($paths[3]),'media=news&video=1&legacyPath={e_IMAGE}newspost_images');
|
||||
$text .= $frm->imagepicker('news_thumbnail[4]', varset($thumbTmp[4]), varset($paths[4]),'media=news&video=1&legacyPath={e_IMAGE}newspost_images');
|
||||
$text = $frm->imagepicker('news_thumbnail[0]', varset($thumbTmp[0]), varset($paths[0]), array('media' => 'news+', 'video' => 1, 'legacyPath' => '{e_IMAGE}newspost_images'));
|
||||
$text .= $frm->imagepicker('news_thumbnail[1]', varset($thumbTmp[1]), varset($paths[1]), array('media' => 'news+', 'video' => 1, 'legacyPath' => '{e_IMAGE}newspost_images'));
|
||||
$text .= $frm->imagepicker('news_thumbnail[2]', varset($thumbTmp[2]), varset($paths[2]), array('media' => 'news+', 'video' => 1, 'legacyPath' => '{e_IMAGE}newspost_images'));
|
||||
$text .= $frm->imagepicker('news_thumbnail[3]', varset($thumbTmp[3]), varset($paths[3]), array('media' => 'news+', 'video' => 1, 'legacyPath' => '{e_IMAGE}newspost_images'));
|
||||
$text .= $frm->imagepicker('news_thumbnail[4]', varset($thumbTmp[4]), varset($paths[4]), array('media' => 'news+', 'video' => 1, 'legacyPath' => '{e_IMAGE}newspost_images'));
|
||||
|
||||
// $text .= "<div class='field-help'>Insert image/video into designated area of template.</div>";
|
||||
return $text;
|
||||
|
@ -991,10 +991,14 @@ class e_form
|
||||
parse_str($extras,$extras);
|
||||
}
|
||||
|
||||
$category = str_replace('+', '^', $category); // Bc Fix.
|
||||
|
||||
$cat = ($category) ? '&for='.urlencode($category) : "";
|
||||
$mode = vartrue($extras['mode'],'main');
|
||||
$action = vartrue($extras['action'],'dialog');
|
||||
|
||||
|
||||
|
||||
if(empty($label))
|
||||
{
|
||||
$label = ' Upload an image or file';
|
||||
|
@ -474,7 +474,7 @@ class e_media
|
||||
* Return an array of Images in a particular category
|
||||
*
|
||||
* @param string $type image|audio|video
|
||||
* @param string $cat : category name. use + to include _common eg. 'news+'
|
||||
* @param string $cat : category name. use ^ to include _common eg. 'news^'
|
||||
* @param int $from
|
||||
* @param int|string $amount
|
||||
* @param string $search
|
||||
@ -483,18 +483,21 @@ class e_media
|
||||
*/
|
||||
private function getMedia($type, $cat='', $from=0, $amount=null, $search=null, $orderby=null)
|
||||
{
|
||||
|
||||
// print_a($cat);
|
||||
// $inc = array();
|
||||
$searchinc = array();
|
||||
$catArray = array();
|
||||
|
||||
if(strpos($cat,"+") || !$cat)
|
||||
if(strpos($cat,"^") || !$cat)
|
||||
{
|
||||
$cat = str_replace("+","",$cat);
|
||||
$cat = str_replace("^","",$cat);
|
||||
$catArray[] = '_common_'.$type;
|
||||
}
|
||||
|
||||
if($cat)
|
||||
{
|
||||
if(strpos($cat, "|") && !strpos($cat,"+") )
|
||||
if(strpos($cat, "|") && !strpos($cat,"^") )
|
||||
{
|
||||
$catArray = explode("|",$cat);
|
||||
}
|
||||
@ -509,6 +512,7 @@ class e_media
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// TODO check the category is valid.
|
||||
|
||||
if($search)
|
||||
@ -540,7 +544,7 @@ class e_media
|
||||
}
|
||||
else
|
||||
{
|
||||
$query .= " ORDER BY media_id DESC";
|
||||
$query .= " ORDER BY media_category ASC, media_id DESC"; // places the specified category before the _common categories.
|
||||
}
|
||||
|
||||
if($amount == 'all')
|
||||
|
Loading…
x
Reference in New Issue
Block a user