From 3f0ee1673cc7da80538fcdfa59c188c635e99381 Mon Sep 17 00:00:00 2001 From: Cameron Date: Wed, 1 Jan 2014 05:20:22 -0800 Subject: [PATCH] Bootstrap3 styling fixes - news --- .../shortcodes/batch/news_shortcodes.php | 18 +++++++++++++-- e107_handlers/rate_class.php | 8 ++++--- e107_plugins/news/templates/news_template.php | 22 +++++++++---------- .../templates/news/news_template.php | 4 ++-- 4 files changed, 34 insertions(+), 18 deletions(-) diff --git a/e107_core/shortcodes/batch/news_shortcodes.php b/e107_core/shortcodes/batch/news_shortcodes.php index 423f6c1e6..f50d2c947 100644 --- a/e107_core/shortcodes/batch/news_shortcodes.php +++ b/e107_core/shortcodes/batch/news_shortcodes.php @@ -494,18 +494,32 @@ class news_shortcodes extends e_shortcode { $tmp = explode(",",$this->news_item['news_meta_keywords']); $words = array(); + + if($parm == 'label') + { + $start = ""; + $end = ""; + $sep = " "; + } + else + { + $start = ""; + $end = ""; + $sep = ", "; + } + foreach($tmp as $val) { if(trim($val)) { $url = e107::getUrl()->create('news/list/tag',array('tag'=>$val)); // e_BASE."news.php?tag=".$val - $words[] = "".$val.""; + $words[] = "".$start.$val.$end.""; } } if(count($words)) { - return implode(" ",$words); + return implode($sep,$words); } else { diff --git a/e107_handlers/rate_class.php b/e107_handlers/rate_class.php index 3e31caf0d..c8cacc27e 100644 --- a/e107_handlers/rate_class.php +++ b/e107_handlers/rate_class.php @@ -255,7 +255,9 @@ class rater { * @param $perc: optional percentage mode. Displays percentages instead of totals. */ function renderLike($table,$itemid,$curVal=false,$perc=false) - { + { + $tp = e107::getParser(); + $id = "rate-".$table."-".$itemid; // "-up or -down is appended to the ID by jquery as both value will need updating. if($curVal == false) @@ -270,8 +272,8 @@ class rater { if(deftrue('BOOTSTRAP')) { - $upImg = ""; - $upDown = ""; + $upImg = $tp->toGlyph('icon-thumbs-up',false); // ""; + $upDown = $tp->toGlyph('icon-thumbs-down',false); // ""; } $text = "".intval($curVal['up'])."{$p} diff --git a/e107_plugins/news/templates/news_template.php b/e107_plugins/news/templates/news_template.php index e9a053442..0a23f323c 100644 --- a/e107_plugins/news/templates/news_template.php +++ b/e107_plugins/news/templates/news_template.php @@ -40,7 +40,7 @@ $NEWS_TEMPLATE['list']['item'] = ' {NEWSSUMMARY}

- '.LAN_READ_MORE.' + '.LAN_READ_MORE.'

@@ -80,8 +80,8 @@ $NEWS_TEMPLATE['default']['item'] = '

by {NEWSAUTHOR}


-
{GLYPH=time} Posted on {NEWSDATE=short}
-
{GLYPH=tags} {NEWSTAGS}   {GLYPH=comments} {NEWSCOMMENTCOUNT}   {EMAILICON}   {PRINTICON}   {PDFICON}   {ADMINOPTIONS}
+
{GLYPH=time} {NEWSDATE=short}
+
{GLYPH=tags}  {NEWSTAGS}   {GLYPH=folder-open}  {NEWSCATEGORY}

{NEWSIMAGE=placeholder} @@ -91,7 +91,7 @@ $NEWS_TEMPLATE['default']['item'] = ' {NEWSBODY}
- Category: {NEWSCATEGORY} + {GLYPH=comments} {NEWSCOMMENTCOUNT}   {EMAILICON}   {PRINTICON}   {PDFICON}   {ADMINOPTIONS}
'; @@ -106,15 +106,15 @@ $NEWS_TEMPLATE['default']['item'] = ' //XXX TODO GEt this looking good in the default Bootstrap theme. $NEWS_TEMPLATE['view']['item'] = ' -{SETIMAGE: w=800} +{SETIMAGE: w=900&h=300}

{NEWSTITLE}

by {NEWSAUTHOR}


-
-
{GLYPH=time} Posted on {NEWSDATE=short}
-
{GLYPH=tags} {NEWSTAGS}   {GLYPH=comments} {NEWSCOMMENTCOUNT}   {EMAILICON}   {PRINTICON}   {PDFICON}   {ADMINOPTIONS}
-
+
+
{GLYPH=time} {NEWSDATE=short}
+
{GLYPH=tags}  {NEWSTAGS}   {GLYPH=folder-open}  {NEWSCATEGORY}
+

{NEWSIMAGE=placeholder}
@@ -127,8 +127,8 @@ $NEWS_TEMPLATE['view']['item'] = '

- Category: {NEWSCATEGORY} -
+ {GLYPH=comments} {NEWSCOMMENTCOUNT}   {EMAILICON}   {PRINTICON}   {PDFICON}   {ADMINOPTIONS} + '; //$NEWS_MENU_TEMPLATE['view']['separator'] = '
'; diff --git a/e107_themes/bootstrap/templates/news/news_template.php b/e107_themes/bootstrap/templates/news/news_template.php index 491a40870..2d118029f 100644 --- a/e107_themes/bootstrap/templates/news/news_template.php +++ b/e107_themes/bootstrap/templates/news/news_template.php @@ -21,7 +21,7 @@ $NEWS_TEMPLATE['default']['item'] = ' {NEWSDATE} {NEWSAUTHOR} {NEWSCOMMENTS} - {NEWSTAGS} + {NEWSTAGS=label} {EMAILICON} {PRINTICON} {PDFICON} @@ -75,7 +75,7 @@ $NEWS_TEMPLATE['view']['item'] = ' {NEWSDATE} {NEWSAUTHOR} {NEWSCOMMENTS} - {NEWSTAGS} + {NEWSTAGS=label} {EMAILICON} {PRINTICON} {PDFICON}