mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
Bugtracker #3893 - final 'TITLEs' areas
This commit is contained in:
@@ -1,10 +1,18 @@
|
|||||||
<?php
|
<?php
|
||||||
/*
|
/*
|
||||||
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
* Copyright e107 Inc e107.org, Licensed under GNU GPL (http://www.gnu.org/licenses/gpl.txt)
|
||||||
* $Id: news_shortcodes.php,v 1.32 2009-12-03 20:46:39 bugrain Exp $
|
* $Id: news_shortcodes.php,v 1.33 2009-12-30 21:04:11 e107steved Exp $
|
||||||
*
|
*
|
||||||
* News shortcode batch
|
* News shortcode batch
|
||||||
*/
|
*/
|
||||||
|
/**
|
||||||
|
* @package e107
|
||||||
|
* @subpackage shortcodes
|
||||||
|
* @version $Id: news_shortcodes.php,v 1.33 2009-12-30 21:04:11 e107steved Exp $;
|
||||||
|
*
|
||||||
|
* Shortcodes for news item display
|
||||||
|
*/
|
||||||
|
|
||||||
if (!defined('e107_INIT')) { exit; }
|
if (!defined('e107_INIT')) { exit; }
|
||||||
//include_once(e_HANDLER.'shortcode_handler.php');
|
//include_once(e_HANDLER.'shortcode_handler.php');
|
||||||
|
|
||||||
@@ -268,13 +276,13 @@ class news_shortcodes
|
|||||||
|
|
||||||
function sc_captionclass()
|
function sc_captionclass()
|
||||||
{
|
{
|
||||||
$news_title = $this->e107->tp->toHTML($this->news_item['news_title'], TRUE,'no_hook,emotes_off, no_make_clickable');
|
$news_title = $this->e107->tp->toHTML($this->news_item['news_title'], TRUE,'TITLE');
|
||||||
return "<div class='category".$this->news_item['news_category']."'>".($this->news_item['news_render_type'] == 1 ? "<a href='".e107::getUrl()->create('core:news', 'main', 'action=extend&id='.$this->news_item['news_id'].'&sef='.$this->news_item['news_rewrite_string'])."'>".$news_title."</a>" : $news_title)."</div>";
|
return "<div class='category".$this->news_item['news_category']."'>".($this->news_item['news_render_type'] == 1 ? "<a href='".e107::getUrl()->create('core:news', 'main', 'action=extend&id='.$this->news_item['news_id'].'&sef='.$this->news_item['news_rewrite_string'])."'>".$news_title."</a>" : $news_title)."</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
function sc_admincaption()
|
function sc_admincaption()
|
||||||
{
|
{
|
||||||
$news_title = $this->e107->tp->toHTML($this->news_item['news_title'], TRUE,'no_hook,emotes_off, no_make_clickable');
|
$news_title = $this->e107->tp->toHTML($this->news_item['news_title'], TRUE,'TITLE');
|
||||||
return "<div class='".(defined('ADMINNAME') ? ADMINNAME : "null")."'>".($this->news_item['news_render_type'] == 1 ? "<a href='".e107::getUrl()->create('core:news', 'main', 'action=extend&id='.$this->news_item['news_id'].'&sef='.$this->news_item['news_rewrite_string'])."'>".$news_title."</a>" : $news_title)."</div>";
|
return "<div class='".(defined('ADMINNAME') ? ADMINNAME : "null")."'>".($this->news_item['news_render_type'] == 1 ? "<a href='".e107::getUrl()->create('core:news', 'main', 'action=extend&id='.$this->news_item['news_id'].'&sef='.$this->news_item['news_rewrite_string'])."'>".$news_title."</a>" : $news_title)."</div>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
23
news.php
23
news.php
@@ -9,10 +9,17 @@
|
|||||||
* News frontend
|
* News frontend
|
||||||
*
|
*
|
||||||
* $Source: /cvs_backup/e107_0.8/news.php,v $
|
* $Source: /cvs_backup/e107_0.8/news.php,v $
|
||||||
* $Revision: 1.25 $
|
* $Revision: 1.26 $
|
||||||
* $Date: 2009-12-12 16:40:39 $
|
* $Date: 2009-12-30 21:04:11 $
|
||||||
* $Author: secretr $
|
* $Author: e107steved $
|
||||||
*/
|
*/
|
||||||
|
/**
|
||||||
|
* @package e107
|
||||||
|
* @subpackage user
|
||||||
|
* @version $Id: news.php,v 1.26 2009-12-30 21:04:11 e107steved Exp $;
|
||||||
|
*
|
||||||
|
* News front page display
|
||||||
|
*/
|
||||||
|
|
||||||
require_once("class2.php");
|
require_once("class2.php");
|
||||||
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/lan_'.e_PAGE);
|
include_lan(e_LANGUAGEDIR.e_LANGUAGE.'/lan_'.e_PAGE);
|
||||||
@@ -163,7 +170,7 @@ if ($action == 'cat' || $action == 'all')
|
|||||||
if($action == 'cat') setNewsFrontMeta($newsList[1], 'category');
|
if($action == 'cat') setNewsFrontMeta($newsList[1], 'category');
|
||||||
elseif($category_name)
|
elseif($category_name)
|
||||||
{
|
{
|
||||||
define("e_PAGETITLE", $tp->toHTML($category_name,FALSE,"TITLE"));
|
define('e_PAGETITLE', $tp->toHTML($category_name,FALSE,'TITLE'));
|
||||||
}
|
}
|
||||||
|
|
||||||
require_once(HEADERF);
|
require_once(HEADERF);
|
||||||
@@ -212,11 +219,11 @@ if ($action == 'cat' || $action == 'all')
|
|||||||
|
|
||||||
if(!$NEWSLISTTITLE)
|
if(!$NEWSLISTTITLE)
|
||||||
{
|
{
|
||||||
$NEWSLISTTITLE = LAN_NEWS_82." '".$tp->toHTML($category_name,FALSE,"TITLE")."'";
|
$NEWSLISTTITLE = LAN_NEWS_82." '".$tp->toHTML($category_name,FALSE,'TITLE')."'";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$NEWSLISTTITLE = str_replace("{NEWSCATEGORY}",$tp->toHTML($category_name,FALSE,"TITLE"),$NEWSLISTTITLE);
|
$NEWSLISTTITLE = str_replace("{NEWSCATEGORY}",$tp->toHTML($category_name,FALSE,'TITLE'),$NEWSLISTTITLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
@@ -522,7 +529,7 @@ $frows = $sql -> db_Fetch();
|
|||||||
|
|
||||||
//echo "<br />Total ".$news_total." items found, ".count($newsAr)." displayed, Interval = {$interval}<br /><br />";
|
//echo "<br />Total ".$news_total." items found, ".count($newsAr)." displayed, Interval = {$interval}<br /><br />";
|
||||||
|
|
||||||
$p_title = ($action == "item") ? $newsAr[1]['news_title'] : $tp->toHTML($newsAr[1]['category_name'],FALSE,"TITLE");
|
$p_title = ($action == "item") ? $newsAr[1]['news_title'] : $tp->toHTML($newsAr[1]['category_name'],FALSE,'TITLE');
|
||||||
|
|
||||||
switch($action)
|
switch($action)
|
||||||
{
|
{
|
||||||
@@ -792,7 +799,7 @@ function renderCache($cache, $nfp = FALSE){
|
|||||||
function render_newscats(){ // -- CNN Style Categories. ----
|
function render_newscats(){ // -- CNN Style Categories. ----
|
||||||
global $pref,$ns,$tp;
|
global $pref,$ns,$tp;
|
||||||
if (isset($pref['news_cats']) && $pref['news_cats'] == '1') {
|
if (isset($pref['news_cats']) && $pref['news_cats'] == '1') {
|
||||||
$text3 = $tp->toHTML("{NEWS_CATEGORIES}", TRUE, 'parse_sc,nobreak,emotes_off,no_make_clickable');
|
$text3 = $tp->toHTML("{NEWS_CATEGORIES}", TRUE, 'TITLE');
|
||||||
$ns->tablerender(LAN_NEWS_23, $text3, 'news_cat');
|
$ns->tablerender(LAN_NEWS_23, $text3, 'news_cat');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user