mirror of
https://github.com/e107inc/e107.git
synced 2025-01-17 04:38:27 +01:00
PHP Notice and BC Fixes.
This commit is contained in:
parent
8023a87aa1
commit
716678a3b7
@ -35,6 +35,8 @@ class news_shortcodes extends e_shortcode
|
||||
|
||||
private $imageItem;
|
||||
|
||||
public $param = array();
|
||||
|
||||
|
||||
function __construct($eVars = null)
|
||||
{
|
||||
@ -81,6 +83,9 @@ class news_shortcodes extends e_shortcode
|
||||
$tp = e107::getParser();
|
||||
e107::getBB()->setClass("news"); // For automatic bbcode image resizing.
|
||||
|
||||
|
||||
$news_body = '';
|
||||
|
||||
if($parm != 'extended')
|
||||
{
|
||||
$news_body = $tp->toHTML($this->news_item['news_body'], true, 'BODY, fromadmin', $this->news_item['news_author']);
|
||||
@ -90,7 +95,9 @@ class news_shortcodes extends e_shortcode
|
||||
{
|
||||
$news_body .= $tp->toHTML($this->news_item['news_extended'], true, 'BODY, fromadmin', $this->news_item['news_author']);
|
||||
}
|
||||
|
||||
e107::getBB()->clearClass();
|
||||
|
||||
return $news_body;
|
||||
}
|
||||
|
||||
@ -511,7 +518,8 @@ class news_shortcodes extends e_shortcode
|
||||
{
|
||||
$tp = e107::getParser();
|
||||
$text = $tp->toHtml($this->news_item['news_body'],true);
|
||||
$text = str_replace("<br />","\n",$text);
|
||||
$breaks = array('<br />','<br>');
|
||||
$text = str_replace($breaks,"\n",$text);
|
||||
$text = strip_tags($text);
|
||||
$tmp = preg_split('/(\.\s|!|\r|\n|\?)/i', trim($text));
|
||||
$tmp = array_filter($tmp);
|
||||
@ -597,16 +605,21 @@ 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')
|
||||
if(!empty($parms[2]) || $parms[1] == 'placeholder')
|
||||
{
|
||||
// $srcset = "srcset='".$tp->thumbSrcSet($src,'all')."' size='100vw' ";
|
||||
$src = e107::getParser()->thumbUrl($src, $parms[2]);
|
||||
$attr = !empty($parms[2]) ? $parms[2] : null;
|
||||
$src = e107::getParser()->thumbUrl($src, $attr);
|
||||
$dimensions = e107::getParser()->thumbDimensions();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(empty($parms[1]))
|
||||
{
|
||||
$parms = array(1 => null);
|
||||
}
|
||||
|
||||
|
||||
switch($parms[1])
|
||||
|
@ -20,6 +20,24 @@ if (!e107::isInstalled('download'))
|
||||
|
||||
e107::lan('download',false, true); // Loads e_PLUGIN.'download/languages/'.e_LANGUAGE.'/English_front.php'
|
||||
|
||||
$bcList = array(
|
||||
'LAN_dl_19' => 'LAN_CATEGORY',
|
||||
'LAN_dl_17' => 'LAN_FILES',
|
||||
"LAN_dl_20" => "LAN_FILES",
|
||||
"LAN_dl_21" => "LAN_SIZE",
|
||||
"LAN_dl_22" => "LAN_DATE",
|
||||
"LAN_dl_23" => "LAN_FILE",
|
||||
"LAN_dl_24" => "LAN_AUTHOR",
|
||||
"LAN_dl_25" => "LAN_ASCENDING",
|
||||
"LAN_dl_26" => "LAN_DESCENDING",
|
||||
"LAN_dl_27" => "LAN_GO",
|
||||
"LAN_dl_28" => "LAN_NAME"
|
||||
);
|
||||
|
||||
e107::getLanguage()->bcDefs($bcList);
|
||||
|
||||
|
||||
|
||||
require_once(e_PLUGIN.'download/handlers/download_class.php');
|
||||
require_once(e_PLUGIN.'download/handlers/category_class.php');
|
||||
|
||||
|
@ -23,10 +23,12 @@ if(isset($parms['caption'][e_LANGUAGE]))
|
||||
|
||||
$limit = vartrue($parms['count'],5);
|
||||
$tp = e107::getParser();
|
||||
$template = e107::getTemplate('news', 'news_menu', 'carousel');
|
||||
$template = e107::getTemplate('news', 'news_menu', 'carousel', false, true);
|
||||
|
||||
$nobody_regexp = "'(^|,)(".str_replace(",", "|", e_UC_NOBODY).")(,|$)'";
|
||||
|
||||
e107::getDebug()->log("News Carousel Menu ".print_a($parms,true));
|
||||
|
||||
$query = "
|
||||
SELECT n.*, nc.category_id, nc.category_name, nc.category_sef, nc.category_icon,
|
||||
nc.category_meta_keywords, nc.category_meta_description
|
||||
|
@ -39,7 +39,11 @@ if(!$OTHERNEWS2_STYLE)
|
||||
{
|
||||
if(deftrue('BOOTSTRAP')) // v2.x
|
||||
{
|
||||
define("OTHERNEWS_COLS",false);
|
||||
if(!defined("OTHERNEWS_COLS"))
|
||||
{
|
||||
define("OTHERNEWS_COLS",false);
|
||||
}
|
||||
|
||||
$template = e107::getTemplate('news', 'news_menu', 'other2');
|
||||
$OTHERNEWS2_STYLE = $template['item'];
|
||||
|
||||
|
@ -51,7 +51,10 @@ if(!$OTHERNEWS_STYLE)
|
||||
{
|
||||
if(deftrue('BOOTSTRAP')) // v2.x
|
||||
{
|
||||
define("OTHERNEWS_COLS",false);
|
||||
if(!defined("OTHERNEWS_COLS"))
|
||||
{
|
||||
define("OTHERNEWS_COLS",false);
|
||||
}
|
||||
$template = e107::getTemplate('news', 'news_menu', 'other');
|
||||
|
||||
$item_selector = '<div class="btn-group pull-right"><a class="btn btn-mini btn-xs btn-default" href="#otherNews" data-slide="prev">‹</a>
|
||||
|
@ -387,7 +387,7 @@ class newsfeedClass
|
||||
|
||||
if($which == 'all')
|
||||
{
|
||||
$ret['title'] = $NEWSFEED_MENU_CAPTION;
|
||||
$ret['title'] = (!empty($NEWSFEED_MENU_CAPTION)) ? $NEWSFEED_MENU_CAPTION : '';
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user