mirror of
https://github.com/e107inc/e107.git
synced 2025-08-03 13:17:24 +02:00
News template tweaks
This commit is contained in:
@@ -84,13 +84,15 @@ class news_shortcodes extends e_shortcode
|
|||||||
|
|
||||||
function sc_newscomments($parm)
|
function sc_newscomments($parm)
|
||||||
{
|
{
|
||||||
|
|
||||||
$pref = e107::getPref();
|
$pref = e107::getPref();
|
||||||
$sql = e107::getDb();
|
$sql = e107::getDb();
|
||||||
|
|
||||||
if($pref['comments_disabled'] == 1)
|
if($pref['comments_disabled'] == 1)
|
||||||
{
|
{
|
||||||
return;
|
return "Disabled";
|
||||||
}
|
}
|
||||||
|
|
||||||
$news_item = $this->news_item;
|
$news_item = $this->news_item;
|
||||||
$param = $this->param;
|
$param = $this->param;
|
||||||
|
|
||||||
@@ -123,7 +125,7 @@ class news_shortcodes extends e_shortcode
|
|||||||
{
|
{
|
||||||
$NEWIMAGE = $param['image_nonew_small'];
|
$NEWIMAGE = $param['image_nonew_small'];
|
||||||
}
|
}
|
||||||
return (!$news_item['news_allow_comments'] ? ''.($pref['comments_icon'] ? $NEWIMAGE : '')." <a href='".e107::getUrl()->create('news/view/item', $news_item)."'>".$param['commentlink'].$news_item['news_comment_total'].'</a>' : $param['commentoffstring']);
|
return (!$news_item['news_allow_comments'] ? ''.($pref['comments_icon'] ? $NEWIMAGE : '')." <a href='".e107::getUrl()->create('news/view/item', $news_item)."'>".$param['commentlink'].intval($news_item['news_comment_total']).'</a>' : vartrue($param['commentoffstring'],'Disabled') );
|
||||||
}
|
}
|
||||||
|
|
||||||
function sc_trackback($parm)
|
function sc_trackback($parm)
|
||||||
@@ -452,15 +454,26 @@ class news_shortcodes extends e_shortcode
|
|||||||
return $info;
|
return $info;
|
||||||
}
|
}
|
||||||
|
|
||||||
function sc_newstags($parm=5)
|
function sc_newstags($parm='')
|
||||||
{
|
{
|
||||||
$tmp = explode(",",$this->news_item['news_meta_keywords']);
|
$tmp = explode(",",$this->news_item['news_meta_keywords']);
|
||||||
$words = array();
|
$words = array();
|
||||||
foreach($tmp as $val)
|
foreach($tmp as $val)
|
||||||
{
|
{
|
||||||
$words[] = "<a href='".e_BASE."news.php?tag=".$val."'><span class='label'>".$val."</span></a>";
|
if(trim($val))
|
||||||
|
{
|
||||||
|
$words[] = "<a href='".e_BASE."news.php?tag=".$val."'><span class='label'>".$val."</span></a>";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return implode(", ",$words);
|
|
||||||
|
if(count($words))
|
||||||
|
{
|
||||||
|
return implode("",$words);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return "None";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -71,6 +71,7 @@ $NEWS_TEMPLATE['list']['item'] = '
|
|||||||
';
|
';
|
||||||
*/
|
*/
|
||||||
// Attempt at bootstrap style
|
// Attempt at bootstrap style
|
||||||
|
// XXX As displayed by news.php (no query) or news.php?list.1.1 (ie. regular view of a particular category)
|
||||||
$NEWS_TEMPLATE['default']['item'] = '
|
$NEWS_TEMPLATE['default']['item'] = '
|
||||||
{SETIMAGE: w=600}
|
{SETIMAGE: w=600}
|
||||||
<div class="view-item">
|
<div class="view-item">
|
||||||
|
@@ -71,12 +71,14 @@ legend { font-size: 14px; font-weight: bold; padding: 5px; }
|
|||||||
|
|
||||||
|
|
||||||
/******** News item styling */
|
/******** News item styling */
|
||||||
|
|
||||||
.post-meta { margin: -7px 0 10px; }
|
.post-meta { margin: -7px 0 10px; }
|
||||||
.post-meta span { margin-right: 7px; margin-bottom: 0; padding-right: 10px; white-space: nowrap; border-right: 1px solid #dddddd; font-size: 12px; }
|
.post-meta span { margin-right: 7px; margin-bottom: 0; padding-right: 10px; white-space: nowrap; border-right: 1px solid #dddddd; font-size: 12px; }
|
||||||
.post-meta span:last-child { margin: 0; padding: 0; border: none; }
|
.post-meta span:last-child { border: none; }
|
||||||
.post-meta span i[class^="icon-"] { margin-right: 7px; }
|
.post-meta span i[class^="icon-"] { margin-right: 7px; }
|
||||||
|
|
||||||
.news_image { margin-bottom: 10px; }
|
.news_image { margin-bottom: 10px; }
|
||||||
|
div.view-item { margin-bottom:50px }
|
||||||
|
|
||||||
/******** FEATUREBOX PLUGIN */
|
/******** FEATUREBOX PLUGIN */
|
||||||
#featurebox-ajax-container { display: block }
|
#featurebox-ajax-container { display: block }
|
||||||
|
Reference in New Issue
Block a user