1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-30 19:30:25 +02:00

remove incompatible hook= code; replace w/ new support for "SuperModifiers" as designed

by team
This commit is contained in:
mrpete
2007-01-20 16:19:43 +00:00
parent d631950d19
commit 091e68526f
8 changed files with 188 additions and 67 deletions

View File

@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_files/shortcode/batch/download_shortcodes.php,v $
| $Revision: 1.7 $
| $Date: 2007-01-17 21:29:28 $
| $Author: e107steved $
| $Revision: 1.8 $
| $Date: 2007-01-20 16:09:53 $
| $Author: mrpete $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
@@ -155,7 +155,7 @@ SC_END
SC_BEGIN DOWNLOAD_CATEGORY_DESCRIPTION
global $tp,$dl;
$text = $tp -> toHTML($dl['download_category_description'], TRUE,'hook=description');
$text = $tp -> toHTML($dl['download_category_description'], TRUE,'description');
if($parm){
return substr($text,0,$parm);
}else{
@@ -204,7 +204,7 @@ SC_END
SC_BEGIN DOWNLOAD_VIEW_DESCRIPTION
global $tp, $dl;
$maxlen = ($parm ? intval($parm) : 0);
$text = ($dl['download_description'] ? $tp->toHTML($dl['download_description'], TRUE, 'hook=description') : "");
$text = ($dl['download_description'] ? $tp->toHTML($dl['download_description'], TRUE, 'description') : "");
if($maxlen){
return substr($text, 0, $maxlen);
}else{

View File

@@ -11,9 +11,9 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_files/shortcode/batch/news_shortcodes.php,v $
| $Revision: 1.3 $
| $Date: 2007-01-17 21:29:28 $
| $Author: e107steved $
| $Revision: 1.4 $
| $Date: 2007-01-20 16:09:53 $
| $Author: mrpete $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
@@ -24,16 +24,16 @@ SC_BEGIN NEWSTITLE
global $tp;
$news_item = getcachedvars('current_news_item');
$param = getcachedvars('current_news_param');
return $tp -> toHTML($news_item['news_title'], TRUE, 'parse_sc,no_hook,emotes_off, no_make_clickable,hook=title');
return $tp -> toHTML($news_item['news_title'], TRUE, 'TITLE');
SC_END
SC_BEGIN NEWSBODY
global $tp;
$news_item = getcachedvars('current_news_item');
$param = getcachedvars('current_news_param');
$news_body = $tp -> toHTML($news_item['news_body'], TRUE, 'parse_sc, fromadmin,hook=content', $news_item['news_author']);
$news_body = $tp -> toHTML($news_item['news_body'], TRUE, 'BODY, fromadmin', $news_item['news_author']);
if($news_item['news_extended'] && (isset($_POST['preview']) || strpos(e_QUERY, 'extend') !== FALSE)) {
$news_extended = $tp -> toHTML($news_item['news_extended'], TRUE, 'parse_sc, fromadmin,hook=content', $news_item['news_author']);
$news_extended = $tp -> toHTML($news_item['news_extended'], TRUE, 'BODY, fromadmin', $news_item['news_author']);
$news_body .= "<br /><br />".$news_extended;
}
return $news_body;

View File

@@ -1,4 +1,4 @@
// $Id: wmessage.sc,v 1.3 2007-01-17 21:29:28 e107steved Exp $
// $Id: wmessage.sc,v 1.4 2007-01-20 16:10:32 mrpete Exp $
$prefwmsc = isset($pref['wmessage_sc']) && $pref['wmessage_sc'];
if (($prefwmsc && $parm == "header") || (!$prefwmsc && ($parm !='header')) ){
return;
@@ -59,9 +59,9 @@ if (($prefwmsc && $parm == "header") || (!$prefwmsc && ($parm !='header')) ){
{
while ($row = $sql->db_Fetch())
{
$wmessage .= $tp->toHTML($row['gen_chardata'], TRUE, 'parse_sc, defs, hook=content', 'admin')."<br />";
$wmessage .= $tp->toHTML($row['gen_chardata'], TRUE, 'BODY, defs', 'admin')."<br />";
if(!$wmcaption){
$wmcaption = $tp->toHTML($row['gen_ip'], TRUE, 'defs, hook=title');
$wmcaption = $tp->toHTML($row['gen_ip'], TRUE, 'TITLE');
}
}
}