mirror of
https://github.com/e107inc/e107.git
synced 2025-04-22 13:41:52 +02:00
More other-news tweaks
This commit is contained in:
parent
4132b454ae
commit
2d504efb7c
e107_plugins/news
@ -35,6 +35,7 @@ if(!$OTHERNEWS2_STYLE)
|
||||
{
|
||||
if(deftrue('BOOTSTRAP')) // v2.x
|
||||
{
|
||||
define("OTHERNEWS_COLS",false);
|
||||
$template = e107::getTemplate('news', 'news_menu', 'other2');
|
||||
$OTHERNEWS2_STYLE = $template['item'];
|
||||
}
|
||||
@ -107,7 +108,7 @@ LEFT JOIN #news_category AS nc ON n.news_category = nc.category_id
|
||||
WHERE n.news_class IN (".USERCLASS_LIST.") AND n.news_start < ".time()." AND (n.news_end=0 || n.news_end>".time().")
|
||||
AND FIND_IN_SET(3, n.news_render_type) ORDER BY n.news_datestamp DESC LIMIT 0,". defset('OTHERNEWS2_LIMIT',5);
|
||||
|
||||
if ($sql->db_Select_gen($query))
|
||||
if ($sql->gen($query))
|
||||
{
|
||||
$text = $tp->parseTemplate($template['start'],true);
|
||||
|
||||
@ -116,7 +117,8 @@ if ($sql->db_Select_gen($query))
|
||||
$text = "<table style='width:100%' cellpadding='0' cellspacing='".defset('OTHERNEWS2_SPACING',0)."'>";
|
||||
$t = 0;
|
||||
$wid = floor(100/$nbr_cols);
|
||||
while ($row = $sql->db_Fetch())
|
||||
|
||||
while ($row = $sql->fetch())
|
||||
{
|
||||
$text .= ($t % $nbr_cols == 0) ? "<tr>" : "";
|
||||
$text .= "\n<td style='$style ; width:$wid%;'>\n";
|
||||
@ -144,7 +146,7 @@ if ($sql->db_Select_gen($query))
|
||||
}
|
||||
else // perfect for divs.
|
||||
{
|
||||
while ($row = $sql->db_Fetch())
|
||||
while ($row = $sql->fetch())
|
||||
{
|
||||
$text .= $ix->render_newsitem($row, 'return', '', $OTHERNEWS2_STYLE, $param);
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ if(!$OTHERNEWS_STYLE)
|
||||
{
|
||||
if(deftrue('BOOTSTRAP')) // v2.x
|
||||
{
|
||||
|
||||
define("OTHERNEWS_COLS",false);
|
||||
$template = e107::getTemplate('news', 'news_menu', 'other');
|
||||
|
||||
$item_selector = '<div class="btn-group pull-right"><a class="btn btn-mini " href="#otherNews" data-slide="prev">‹</a>
|
||||
@ -114,7 +114,7 @@ LEFT JOIN #user AS u ON n.news_author = u.user_id
|
||||
LEFT JOIN #news_category AS nc ON n.news_category = nc.category_id
|
||||
WHERE n.news_class IN (".USERCLASS_LIST.") AND n.news_start < ".$_t." AND (n.news_end=0 || n.news_end>".$_t.") AND FIND_IN_SET(2, n.news_render_type) ORDER BY n.news_datestamp DESC LIMIT 0,".OTHERNEWS_LIMIT;
|
||||
|
||||
if ($sql->db_Select_gen($query))
|
||||
if ($sql->gen($query))
|
||||
{
|
||||
$text = $tp->parseTemplate($template['start'],true);
|
||||
|
||||
@ -124,7 +124,7 @@ if ($sql->db_Select_gen($query))
|
||||
$t = 0;
|
||||
|
||||
$wid = floor(100/$nbr_cols);
|
||||
while ($row = $sql->db_Fetch())
|
||||
while ($row = $sql->fetch())
|
||||
{
|
||||
$text .= ($t % $nbr_cols == 0) ? "<tr>" : "";
|
||||
$text .= "\n<td style='$style ; width:$wid%;'>\n";
|
||||
|
@ -62,7 +62,7 @@ $NEWS_MENU_TEMPLATE['other']['start'] = "<div id='otherNews' data-interval='fal
|
||||
{SETIMAGE: w=400&h=200&crop=1}"; // set the {NEWSIMAGE} dimensions.
|
||||
$NEWS_MENU_TEMPLATE['other']['item'] = '<div class="item {ACTIVE}">
|
||||
{NEWSIMAGE}
|
||||
<h2>{NEWSTITLE}</h2>
|
||||
<h3>{NEWSTITLE}</h3>
|
||||
<p>{NEWSSUMMARY}</p>
|
||||
<p class="text-right"><a class="btn" href="{NEWSURL}">'.LAN_READ_MORE.' »</a></p>
|
||||
</div>';
|
||||
@ -81,8 +81,8 @@ $NEWS_MENU_TEMPLATE['other2']['caption'] = TD_MENU_L2;
|
||||
$NEWS_MENU_TEMPLATE['other2']['start'] = "<ul class='media-list unstyled othernews2-block'>{SETIMAGE: w=100&h=100&crop=1}"; // set the {NEWSIMAGE} dimensions.
|
||||
$NEWS_MENU_TEMPLATE['other2']['item'] = "<li class='media'>
|
||||
<span class='media-object pull-left'>{NEWSIMAGE}</span>
|
||||
<div class='media-body'><b>{NEWSTITLELINK}</b><br />
|
||||
<small class='muted smalltext'>{NEWSSUMMARY}</small><br />
|
||||
<div class='media-body'><h4>{NEWSTITLELINK}</h4>
|
||||
<p class='text-right'><a class='btn' href='{NEWSURL}'>".LAN_READ_MORE." »</a></p>
|
||||
</div>
|
||||
</li>\n";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user