mirror of
https://github.com/e107inc/e107.git
synced 2025-04-15 10:02:02 +02:00
Use news_class on print page.
This commit is contained in:
parent
be8ebe6850
commit
c2048c1c2f
@ -1511,6 +1511,8 @@ class e_model extends e_object
|
||||
*/
|
||||
public function load($id = null, $force = false)
|
||||
{
|
||||
|
||||
|
||||
if(!$force && $this->getId())
|
||||
{
|
||||
return $this;
|
||||
@ -1566,6 +1568,7 @@ class e_model extends e_object
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
$this->_setCacheData();
|
||||
}
|
||||
|
||||
@ -2578,6 +2581,8 @@ class e_front_model extends e_model
|
||||
// already done by the parent
|
||||
//$this->addMessageDebug('SQL Error #'.$this->_db_errno.': '.$sql->getLastErrorText());
|
||||
}
|
||||
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
@ -563,7 +563,7 @@ class e_news_item extends e_front_model
|
||||
{
|
||||
protected $_db_table = 'news';
|
||||
protected $_field_id = 'news_id';
|
||||
protected $_cache_string = 'news_item_';
|
||||
protected $_cache_string = 'news_item_{ID}';
|
||||
|
||||
/**
|
||||
* Shortcodes - simple field getter (basic formatting)
|
||||
|
@ -48,7 +48,7 @@ e107::css('inline',$CSS);
|
||||
|
||||
define('e_IFRAME', true);
|
||||
|
||||
$source = $qs[0];
|
||||
$source = e107::getParser()->filter($qs[0],'wds');
|
||||
$parms = varset($qs[1],'');
|
||||
unset($qs);
|
||||
|
||||
@ -70,13 +70,18 @@ if(strpos($source,'plugin:') !== FALSE)
|
||||
else
|
||||
{
|
||||
//$con = new convert;
|
||||
|
||||
// $id = intval($parms);
|
||||
$nws = e107::getObject('e_news_item');
|
||||
$row = $nws->load($parms)->toArray();
|
||||
/*
|
||||
$query = "SELECT n.*, c.*, u.user_id, u.user_name FROM `#news` AS n LEFT JOIN `#news_category` AS c ON n.news_category = c.category_id LEFT JOIN `#user` AS u ON n.news_author = u.user_id WHERE n.news_id = " . intval($parms);
|
||||
|
||||
//$sql->db_Select("news", "*", "news_id='{$parms}'");
|
||||
$sql = e107::getDb();
|
||||
$sql->gen($query);
|
||||
$row = $sql->fetch();
|
||||
*/
|
||||
|
||||
$newsUrl = e107::getUrl()->create('news/view/item', $row, 'full=1');
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user