mirror of
https://github.com/e107inc/e107.git
synced 2025-09-03 11:22:40 +02:00
NewsTags shortcode, some admin-ui fixes and newspost thumbnail BC fixes.
This commit is contained in:
@@ -298,8 +298,8 @@ class news_admin_ui extends e_admin_ui
|
||||
protected $fields = array(
|
||||
'checkboxes' => array('title' => '', 'type' => null, 'width' => '3%', 'thclass' => 'center first', 'class' => 'center', 'nosort' => true, 'toggle' => 'news_selected', 'forced' => TRUE),
|
||||
'news_id' => array('title' => LAN_NEWS_45, 'type' => 'number', 'width' => '5%', 'thclass' => 'center', 'class' => 'center', 'nosort' => false),
|
||||
'news_thumbnail' => array('title' => NWSLAN_67, 'type' => 'image', 'width' => '110px', 'thclass' => 'center', 'class' => "center", 'nosort' => false, 'readParms'=>'thumb=60&thumb_urlraw=0&thumb_aw=60','readonly'=>false),
|
||||
'news_title' => array('title' => NWSLAN_40, 'type' => 'text', 'width' => 'auto', 'thclass' => '', 'class' => null, 'nosort' => false),
|
||||
'news_thumbnail' => array('title' => NWSLAN_67, 'type' => 'method', 'width' => '110px', 'thclass' => 'center', 'class' => "center", 'nosort' => false, 'readParms'=>'thumb=60&thumb_urlraw=0&thumb_aw=60','readonly'=>false),
|
||||
'news_title' => array('title' => NWSLAN_40, 'type' => 'text', 'width' => 'auto', 'thclass' => '', 'class' => null, 'nosort' => false, 'readParms'=>'link={e_BASE}news.php?extend.[id]&dialog=1'),
|
||||
'news_summary' => array('title' => LAN_NEWS_27, 'type' => 'text', 'width' => 'auto', 'thclass' => '', 'class' => null, 'nosort' => false),
|
||||
|
||||
'news_meta_keywords' => array('title' => LAN_KEYWORDS, 'type' => 'text', 'width' => 'auto', 'thclass' => '', 'class' => null, 'nosort' => false),
|
||||
@@ -497,7 +497,20 @@ class news_admin_ui extends e_admin_ui
|
||||
|
||||
class news_form_ui extends e_admin_form_ui
|
||||
{
|
||||
|
||||
function news_thumbnail($curval,$mode)
|
||||
{
|
||||
if(!vartrue($curval)) return;
|
||||
|
||||
if($curval[0] != "{")
|
||||
{
|
||||
$curval = "{e_IMAGE}newspost_images/".$curval;
|
||||
}
|
||||
|
||||
$url = e107::getParser()->thumbUrl($curval,'aw=80');
|
||||
$link = e107::getParser()->replaceConstants($curval);
|
||||
|
||||
return "<a class='e-dialog' href='{$link}'><img src='{$url}' alt='{$curval}' /></a>";
|
||||
}
|
||||
}
|
||||
|
||||
new news_admin();
|
||||
@@ -2053,6 +2066,11 @@ class admin_newspost
|
||||
".$frm->help(LAN_NEWS_23)."</td>
|
||||
<td>
|
||||
";
|
||||
if(vartrue($_POST['news_thumbnail']) && $_POST['news_thumbnail'][0] != "{")//BC compat
|
||||
{
|
||||
$_POST['news_thumbnail'] = "{e_IMAGE}newspost_images/".$_POST['news_thumbnail'];
|
||||
}
|
||||
|
||||
|
||||
|
||||
$text .= $frm->imagepicker('news_thumbnail', $_POST['news_thumbnail'],'','news');
|
||||
|
Reference in New Issue
Block a user