mirror of
https://github.com/e107inc/e107.git
synced 2025-08-01 04:10:38 +02:00
Issue #1298 Forum Query Fix and general cleanup. News Image Dimensions added where possible.
This commit is contained in:
@@ -203,9 +203,10 @@ if (ADMIN && isset($queryinfo) && is_array($queryinfo))
|
||||
{
|
||||
$c = 1;
|
||||
$mySQLInfo = $sql->mySQLinfo;
|
||||
echo "<div class='e-debug query-notice'><table class='fborder' style='width: 100%;'>
|
||||
echo "<div class='e-debug query-notice'>
|
||||
<table class='fborder table table-bordered table-striped' style='width: 100%;'>
|
||||
<tr>
|
||||
<td class='fcaption' style='width: 5%;'>ID</td><td class='fcaption' style='width: 95%;'>SQL Queries</td>\n</tr>\n";
|
||||
<th class='fcaption' style='width: 5%;'>ID</th><th class='fcaption' style='width: 95%;'>SQL Queries</th>\n</tr>\n";
|
||||
foreach ($queryinfo as $infovalue)
|
||||
{
|
||||
echo "<tr>\n<td class='forumheader3' style='width: 5%;'>{$c}</td><td class='forumheader3' style='width: 95%;'>{$infovalue}</td>\n</tr>\n";
|
||||
|
@@ -883,7 +883,7 @@ class e_layout
|
||||
$frm = e107::getForm();
|
||||
|
||||
// $text = "<i class='icon-align-justify'></i> ";
|
||||
$text .= str_replace("_menu","",$row['name']);
|
||||
$text = str_replace("_menu","",$row['name']);
|
||||
|
||||
// $layout = 'layout';
|
||||
// $area = 'area';
|
||||
@@ -986,6 +986,12 @@ class e_layout
|
||||
|
||||
foreach($files as $file)
|
||||
{
|
||||
|
||||
if($file == 'e_menu.php')
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
$valid_menu = false;
|
||||
|
||||
if (file_exists($file['path'].'/plugin.xml') || file_exists($file['path'].'/plugin.php'))
|
||||
|
@@ -468,6 +468,7 @@ class news_shortcodes extends e_shortcode
|
||||
$newsThumb = $tmp['file'];
|
||||
|
||||
$class = 'news-thumbnail-'.$tmp['count'];
|
||||
$dimensions = null;
|
||||
|
||||
if(!$newsThumb && $parm != 'placeholder')
|
||||
{
|
||||
@@ -510,7 +511,11 @@ class news_shortcodes extends e_shortcode
|
||||
$_src = $src = ($newsThumb[0] == '{' || $parms[1] == 'placeholder') ? e107::getParser()->replaceConstants($newsThumb, 'abs') : e_IMAGE_ABS."newspost_images/".$newsThumb;
|
||||
|
||||
|
||||
if($parms[2] || $parms[1] == 'placeholder') $src = e107::getParser()->thumbUrl($src, $parms[2]);
|
||||
if($parms[2] || $parms[1] == 'placeholder')
|
||||
{
|
||||
$src = e107::getParser()->thumbUrl($src, $parms[2]);
|
||||
$dimensions = e107::getParser()->thumbDimensions();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -523,15 +528,15 @@ class news_shortcodes extends e_shortcode
|
||||
break;
|
||||
|
||||
case 'tag':
|
||||
return "<img class='news_image ".$class."' src='".$src."' alt='' style='".$this->param['thumbnail']."' />";
|
||||
return "<img class='news_image ".$class."' src='".$src."' alt='' style='".$this->param['thumbnail']."' {$dimensions} />";
|
||||
break;
|
||||
|
||||
case 'img':
|
||||
return "<a href='".$_src."' rel='external image'><img class='news_image ".$class."' src='".$src."' alt='' style='".$this->param['thumbnail']."' /></a>";
|
||||
return "<a href='".$_src."' rel='external image'><img class='news_image ".$class."' src='".$src."' alt='' style='".$this->param['thumbnail']."' {$dimensions} /></a>";
|
||||
break;
|
||||
|
||||
default:
|
||||
return "<a href='".e107::getUrl()->create('news/view/item', $this->news_item)."'><img class='news_image img-responsive img-rounded ".$class."' src='".$src."' alt='' style='".$this->param['thumbnail']."' /></a>";
|
||||
return "<a href='".e107::getUrl()->create('news/view/item', $this->news_item)."'><img class='news_image img-responsive img-rounded ".$class."' src='".$src."' alt='' style='".$this->param['thumbnail']."' {$dimensions} /></a>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -654,6 +659,7 @@ class news_shortcodes extends e_shortcode
|
||||
|
||||
$class = "news_image news-image img-responsive img-rounded";
|
||||
$class .= ' news-image-'.$tmp['count'];
|
||||
$dimensions = null;
|
||||
|
||||
|
||||
if($tp->isVideo($srcPath))
|
||||
@@ -667,7 +673,8 @@ class news_shortcodes extends e_shortcode
|
||||
{
|
||||
if(varset($parm['type']) == 'placeholder' || vartrue($parm['placeholder']))
|
||||
{
|
||||
$src = $tp->thumbUrl(); // placeholder;
|
||||
$src = $tp->thumbUrl(); // placeholder;
|
||||
$dimensions = $tp->thumbDimensions();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -676,7 +683,8 @@ class news_shortcodes extends e_shortcode
|
||||
}
|
||||
elseif($srcPath[0] == '{' ) // Always resize. Use {SETIMAGE: w=x&y=x&crop=0} PRIOR to calling shortcode to change.
|
||||
{
|
||||
$src = $tp->thumbUrl($srcPath);
|
||||
$src = $tp->thumbUrl($srcPath);
|
||||
$dimensions = $tp->thumbDimensions();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -709,12 +717,12 @@ class news_shortcodes extends e_shortcode
|
||||
break;
|
||||
|
||||
case 'tag':
|
||||
return "<img class='{$class}' src='".$src."' alt='' style='".$this->param['thumbnail']."' />";
|
||||
return "<img class='{$class}' src='".$src."' alt='' style='".$this->param['thumbnail']."' {$dimensions} />";
|
||||
break;
|
||||
|
||||
case 'url':
|
||||
default:
|
||||
return "<a href='".e107::getUrl()->create('news/view/item', $this->news_item)."'><img class='{$class}' src='".$src."' alt='' style='".$this->param['thumbnail']."' /></a>";
|
||||
return "<a href='".e107::getUrl()->create('news/view/item', $this->news_item)."'><img class='{$class}' src='".$src."' alt='' style='".$this->param['thumbnail']."' {$dimensions} /></a>";
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@@ -187,9 +187,9 @@ if (ADMIN && isset($queryinfo) && is_array($queryinfo))
|
||||
{
|
||||
$c = 1;
|
||||
$mySQLInfo = $sql->mySQLinfo;
|
||||
echo "<div class='e-debug query-notice'><table class='fborder' style='width: 100%;'>
|
||||
echo "<div class='e-debug query-notice'><table class='fborder table table-striped table-bordered' style='width: 100%;'>
|
||||
<tr>
|
||||
<td class='fcaption' style='width: 5%;'>ID</td><td class='fcaption' style='width: 95%;'>SQL Queries</td>\n</tr>\n";
|
||||
<th class='fcaption' style='width: 5%;'>ID</th><th class='fcaption' style='width: 95%;'>SQL Queries</th>\n</tr>\n";
|
||||
foreach ($queryinfo as $infovalue)
|
||||
{
|
||||
echo "<tr>\n<td class='forumheader3' style='width: 5%;'>{$c}</td><td class='forumheader3' style='width: 95%;'>{$infovalue}</td>\n</tr>\n";
|
||||
|
@@ -1724,7 +1724,7 @@ class e107forum
|
||||
";
|
||||
if ($sql->gen($qry))
|
||||
{
|
||||
$row = $sql->fetch(MYSQL_ASSOC);
|
||||
$row = $sql->fetch();
|
||||
$row['thread_sef'] = eHelper::title2sef($row['thread_name'],'dashl');
|
||||
return $row;
|
||||
}
|
||||
|
Reference in New Issue
Block a user