1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-09 08:06:38 +02:00

Bootstrap3 styling fixes - news

This commit is contained in:
Cameron
2014-01-01 05:20:22 -08:00
parent 5a4d97ca9a
commit 3f0ee1673c
4 changed files with 34 additions and 18 deletions

View File

@@ -494,18 +494,32 @@ class news_shortcodes extends e_shortcode
{
$tmp = explode(",",$this->news_item['news_meta_keywords']);
$words = array();
if($parm == 'label')
{
$start = "<span class='label label-default'>";
$end = "</span>";
$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[] = "<a href='".$url."'><span class='label label-default'>".$val."</span></a>";
$words[] = "<a class='news-tag' href='".$url."'>".$start.$val.$end."</a>";
}
}
if(count($words))
{
return implode(" ",$words);
return implode($sep,$words);
}
else
{

View File

@@ -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 = "<i class='icon-thumbs-up'></i>";
$upDown = "<i class='icon-thumbs-down'></i>";
$upImg = $tp->toGlyph('icon-thumbs-up',false); // "<i class='icon-thumbs-up'></i>";
$upDown = $tp->toGlyph('icon-thumbs-down',false); // "<i class='icon-thumbs-down'></i>";
}
$text = "<span id='{$id}-up'>".intval($curVal['up'])."{$p}</span>

View File

@@ -40,7 +40,7 @@ $NEWS_TEMPLATE['list']['item'] = '
{NEWSSUMMARY}
</p>
<p>
<a href="{NEWSURL}" class="btn btn-info">'.LAN_READ_MORE.'</a>
<a href="{NEWSURL}" class="btn btn-primary">'.LAN_READ_MORE.'</a>
</p>
</div>
</div>
@@ -80,8 +80,8 @@ $NEWS_TEMPLATE['default']['item'] = '
<p class="lead">by {NEWSAUTHOR}</p>
<hr>
<div class="row">
<div class="col-md-6">{GLYPH=time} Posted on {NEWSDATE=short}</div>
<div class="col-md-6 text-right options">{GLYPH=tags} {NEWSTAGS} &nbsp; {GLYPH=comments} {NEWSCOMMENTCOUNT} &nbsp; {EMAILICON} &nbsp; {PRINTICON} &nbsp; {PDFICON} &nbsp; {ADMINOPTIONS}</div>
<div class="col-md-4">{GLYPH=time} {NEWSDATE=short} </div>
<div class="col-md-8 text-right options">{GLYPH=tags} &nbsp;{NEWSTAGS} &nbsp; {GLYPH=folder-open} &nbsp;{NEWSCATEGORY} </div>
</div>
<hr>
{NEWSIMAGE=placeholder}
@@ -91,7 +91,7 @@ $NEWS_TEMPLATE['default']['item'] = '
{NEWSBODY}
<hr>
<div class="options">
<span class="category">Category: {NEWSCATEGORY}</span>
<span class="category ">{GLYPH=comments} {NEWSCOMMENTCOUNT} &nbsp; {EMAILICON} &nbsp; {PRINTICON} &nbsp; {PDFICON} &nbsp; {ADMINOPTIONS}</span>
</div>
';
@@ -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}
<div class="view-item">
<h2>{NEWSTITLE}</h2>
<p class="lead">by {NEWSAUTHOR}</p>
<hr>
<div class="row">
<div class="col-md-6">{GLYPH=time} Posted on {NEWSDATE=short}</div>
<div class="col-md-6 text-right">{GLYPH=tags} {NEWSTAGS} &nbsp; {GLYPH=comments} {NEWSCOMMENTCOUNT} &nbsp; {EMAILICON} &nbsp; {PRINTICON} &nbsp; {PDFICON} &nbsp; {ADMINOPTIONS}</div>
</div>
<div class="row">
<div class="col-md-4">{GLYPH=time} {NEWSDATE=short} </div>
<div class="col-md-8 text-right options">{GLYPH=tags} &nbsp;{NEWSTAGS} &nbsp; {GLYPH=folder-open} &nbsp;{NEWSCATEGORY} </div>
</div>
<hr>
{NEWSIMAGE=placeholder}
<hr>
@@ -127,8 +127,8 @@ $NEWS_TEMPLATE['view']['item'] = '
</div>
<hr>
<div class="options">
<span class="category">Category: {NEWSCATEGORY}</span>
</div>
<span class="category ">{GLYPH=comments} {NEWSCOMMENTCOUNT} &nbsp; {EMAILICON} &nbsp; {PRINTICON} &nbsp; {PDFICON} &nbsp; {ADMINOPTIONS}</span>
</div>
</div>
';
//$NEWS_MENU_TEMPLATE['view']['separator'] = '<br />';

View File

@@ -21,7 +21,7 @@ $NEWS_TEMPLATE['default']['item'] = '
<small><i class="icon-calendar"></i> {NEWSDATE}</small>
<small><i class="icon-user"></i> {NEWSAUTHOR}</small>
<small><i class="icon-comment"></i> {NEWSCOMMENTS}</small>
<small><i class="icon-tag"></i> {NEWSTAGS}</small>
<small><i class="icon-tag"></i> {NEWSTAGS=label}</small>
{EMAILICON}
{PRINTICON}
{PDFICON}
@@ -75,7 +75,7 @@ $NEWS_TEMPLATE['view']['item'] = '
<small><i class="icon-calendar"></i> {NEWSDATE}</small>
<small><i class="icon-user"></i> {NEWSAUTHOR}</small>
<small><i class="icon-comment"></i> {NEWSCOMMENTS}</small>
<small><i class="icon-tag"></i> {NEWSTAGS}</small>
<small><i class="icon-tag"></i> {NEWSTAGS=label}</small>
{EMAILICON}
{PRINTICON}
{PDFICON}