diff --git a/e107_files/shortcode/batch/news_shortcodes.php b/e107_files/shortcode/batch/news_shortcodes.php index 646d74b03..458e316a4 100644 --- a/e107_files/shortcode/batch/news_shortcodes.php +++ b/e107_files/shortcode/batch/news_shortcodes.php @@ -11,8 +11,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_files/shortcode/batch/news_shortcodes.php,v $ -| $Revision: 1.8 $ -| $Date: 2008-07-25 19:26:46 $ +| $Revision: 1.9 $ +| $Date: 2008-09-04 20:07:19 $ | $Author: e107steved $ +----------------------------------------------------------------------------+ */ @@ -45,7 +45,7 @@ $news_item = getcachedvars('current_news_item'); $param = getcachedvars('current_news_param'); $category_icon = $tp -> parseTemplate('{NEWSHEADER}', FALSE, $news_shortcodes); if (!$category_icon) return ''; -return ""; +return ""; SC_END SC_BEGIN NEWSHEADER @@ -54,9 +54,9 @@ $param = getcachedvars('current_news_param'); $category_icon = str_replace("../", "", trim($news_item['category_icon'])); if (!$category_icon) return ''; if ($category_icon && strstr("images", $category_icon)) { - return THEME.$category_icon; + return THEME_ABS.$category_icon; } else { - return e_IMAGE."icons/".$category_icon; + return e_IMAGE_ABS."icons/".$category_icon; } SC_END @@ -65,7 +65,7 @@ global $tp; $news_item = getcachedvars('current_news_item'); $param = getcachedvars('current_news_param'); $category_name = $tp -> toHTML($news_item['category_name'],FALSE,"defs"); -return "".$category_name.""; +return "".$category_name.""; SC_END SC_BEGIN NEWSAUTHOR @@ -79,7 +79,7 @@ if($news_item['user_id']) } else { - return "".$news_item['user_name']."{$parm}"; + return "".$news_item['user_name']."{$parm}"; } } return "e107"; @@ -131,14 +131,14 @@ if ($news_item['news_comment_total']) { } else { $NEWIMAGE = $param['image_nonew_small']; } -return ($news_item['news_allow_comments'] ? $param['commentoffstring'] : "".($pref['comments_icon'] ? $NEWIMAGE : "")." ".$param['commentlink'].$news_item['news_comment_total'].""); +return ($news_item['news_allow_comments'] ? $param['commentoffstring'] : "".($pref['comments_icon'] ? $NEWIMAGE : "")." ".$param['commentlink'].$news_item['news_comment_total'].""); SC_END SC_BEGIN NEWSCOMMENTLINK global $pref, $sql; $news_item = getcachedvars('current_news_item'); $param = getcachedvars('current_news_param'); -return ($news_item['news_allow_comments'] ? $param['commentoffstring'] : " ".$param['commentlink'].""); +return ($news_item['news_allow_comments'] ? $param['commentoffstring'] : " ".$param['commentlink'].""); SC_END SC_BEGIN NEWSCOMMENTCOUNT @@ -180,8 +180,8 @@ global $imode; $news_item = getcachedvars('current_news_item'); $param = getcachedvars('current_news_param'); if (ADMIN && getperms("H")) { - $adop_icon = (file_exists(THEME."images/newsedit.png") ? THEME."images/newsedit.png" : e_IMAGE."packs/".$imode."/generic/newsedit.png"); - return " \n"; + $adop_icon = (file_exists(THEME."images/newsedit.png") ? THEME_ABS."images/newsedit.png" : e_IMAGE_ABS."packs/".$imode."/generic/newsedit.png"); + return " \n"; } else { return ''; } @@ -200,7 +200,7 @@ if ($news_item['news_extended'] && (strpos(e_QUERY, 'extend') === FALSE || $parm if (isset($_POST['preview'])) { return $es1.EXTENDEDSTRING.$es2."
".$news_item['news_extended']; } else { - return $es1."".EXTENDEDSTRING."".$es2; + return $es1."".EXTENDEDSTRING."".$es2; } } else { return ""; @@ -212,7 +212,7 @@ global $tp; $news_item = getcachedvars('current_news_item'); $param = getcachedvars('current_news_param'); $news_title = $tp -> toHTML($news_item['news_title'], TRUE,'no_hook,emotes_off, no_make_clickable'); -return "
".($news_item['news_render_type'] == 1 ? "".$news_title."" : $news_title)."
"; +return "
".($news_item['news_render_type'] == 1 ? "".$news_title."" : $news_title)."
"; SC_END SC_BEGIN ADMINCAPTION @@ -220,7 +220,7 @@ global $tp; $news_item = getcachedvars('current_news_item'); $param = getcachedvars('current_news_param'); $news_title = $tp -> toHTML($news_item['news_title'], TRUE,'no_hook,emotes_off, no_make_clickable'); -return "
".($news_item['news_render_type'] == 1 ? "".$news_title."" : $news_title)."
"; +return "
".($news_item['news_render_type'] == 1 ? "".$news_title."" : $news_title)."
"; SC_END SC_BEGIN ADMINBODY @@ -240,13 +240,13 @@ SC_END SC_BEGIN NEWSTHUMBNAIL $news_item = getcachedvars('current_news_item'); $param = getcachedvars('current_news_param'); -return (isset($news_item['news_thumbnail']) && $news_item['news_thumbnail']) ? "" : ""; +return (isset($news_item['news_thumbnail']) && $news_item['news_thumbnail']) ? "" : ""; SC_END SC_BEGIN NEWSIMAGE $news_item = getcachedvars('current_news_item'); $param = getcachedvars('current_news_param'); -return (isset($news_item['news_thumbnail']) && $news_item['news_thumbnail']) ? "" : ""; +return (isset($news_item['news_thumbnail']) && $news_item['news_thumbnail']) ? "" : ""; SC_END SC_BEGIN STICKY_ICON @@ -258,7 +258,7 @@ SC_END SC_BEGIN NEWSTITLELINK $news_item = getcachedvars('current_news_item'); $param = getcachedvars('current_news_param'); -return "".$news_item['news_title'].""; +return "".$news_item['news_title'].""; SC_END SC_BEGIN NEWSCATICON @@ -268,7 +268,7 @@ $param = getcachedvars('current_news_param'); $category_icon = $tp -> parseTemplate('{NEWSHEADER}', FALSE, $news_shortcodes); if (!$category_icon) return ''; if($param['caticon'] == ""){$param['caticon'] = "border:0px";} -return ""; +return ""; SC_END SC_BEGIN TRACKBACK @@ -276,7 +276,7 @@ global $pref; if(!varsettrue($pref['trackbackEnabled'])) return ''; $news_item = getcachedvars('current_news_item'); $param = getcachedvars('current_news_param'); -return ($param['trackbackbeforestring'] ? $param['trackbackbeforestring'] : "")."".$param['trackbackstring'].$news_item['tb_count']."".($param['trackbackafterstring'] ? $param['trackbackafterstring'] : ""); +return ($param['trackbackbeforestring'] ? $param['trackbackbeforestring'] : "")."".$param['trackbackstring'].$news_item['tb_count']."".($param['trackbackafterstring'] ? $param['trackbackafterstring'] : ""); SC_END SC_BEGIN NEWSINFO diff --git a/e107_files/shortcode/email_item.sc b/e107_files/shortcode/email_item.sc index 5acaba65b..0480222da 100644 --- a/e107_files/shortcode/email_item.sc +++ b/e107_files/shortcode/email_item.sc @@ -2,12 +2,12 @@ global $imode; if (defined("ICONMAIL") && file_exists(THEME."images/".ICONMAIL)) { - $icon = THEME."images/".ICONMAIL; + $icon = THEME_ABS."images/".ICONMAIL; } else { - $icon = e_IMAGE."packs/".$imode."/generic/email.png"; + $icon = e_IMAGE_ABS."packs/".$imode."/generic/email.png"; } $parms = explode("^",$parm); // message^source^other_parms -return "{$parms[0]}"; +return "{$parms[0]}"; diff --git a/e107_files/shortcode/print_item.sc b/e107_files/shortcode/print_item.sc index e60cccd34..7d5d6cf26 100644 --- a/e107_files/shortcode/print_item.sc +++ b/e107_files/shortcode/print_item.sc @@ -2,11 +2,11 @@ global $imode; if (defined("ICONPRINT") && file_exists(THEME."images/".ICONPRINT)) { - $icon = THEME."images/".ICONPRINT; + $icon = THEME_ABS."images/".ICONPRINT; } else { - $icon = e_IMAGE."packs/".$imode."/generic/printer.png"; + $icon = e_IMAGE_ABS."packs/".$imode."/generic/printer.png"; } $parms = explode("^",$parm); -return "{$parms[0]}"; \ No newline at end of file +return "{$parms[0]}"; \ No newline at end of file diff --git a/e107_handlers/emailprint_class.php b/e107_handlers/emailprint_class.php index 4856109e5..4881e9bc9 100644 --- a/e107_handlers/emailprint_class.php +++ b/e107_handlers/emailprint_class.php @@ -11,21 +11,23 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_handlers/emailprint_class.php,v $ -| $Revision: 1.2 $ -| $Date: 2006-12-07 15:41:50 $ -| $Author: sweetas $ +| $Revision: 1.3 $ +| $Date: 2008-09-04 20:07:27 $ +| $Author: e107steved $ +----------------------------------------------------------------------------+ */ if (!defined('e107_INIT')) { exit; } -@include_once(e_LANGUAGEDIR.e_LANGUAGE."/lan_print.php"); -@include_once(e_LANGUAGEDIR."English/lan_print.php"); -@include_once(e_LANGUAGEDIR.e_LANGUAGE."/lan_email.php"); -@include_once(e_LANGUAGEDIR."English/lan_email.php"); +@include_lan(e_LANGUAGEDIR.e_LANGUAGE."/lan_print.php"); +//@include_once(e_LANGUAGEDIR."English/lan_print.php"); +@include_lan(e_LANGUAGEDIR.e_LANGUAGE."/lan_email.php"); +//@include_once(e_LANGUAGEDIR."English/lan_email.php"); -class emailprint { - function render_emailprint($mode, $id, $look = 0) { +class emailprint +{ + function render_emailprint($mode, $id, $look = 0) + { // $look = 0 --->display all icons // $look = 1 --->display email icon only // $look = 2 --->display print icon only @@ -35,17 +37,24 @@ class emailprint { $text_emailprint = ""; //new method emailprint_class : (only news is core, rest is plugin: searched for e_emailprint.php which should hold $email and $print values) - if($mode == "news"){ + if($mode == "news") + { $email = "news"; $print = "news"; - }else{ + } + else + { //load the others from plugins $handle = opendir(e_PLUGIN); - while (false !== ($file = readdir($handle))) { - if ($file != "." && $file != ".." && is_dir(e_PLUGIN.$file)) { + while (false !== ($file = readdir($handle))) + { + if ($file != "." && $file != ".." && is_dir(e_PLUGIN.$file)) + { $plugin_handle = opendir(e_PLUGIN.$file."/"); - while (false !== ($file2 = readdir($plugin_handle))) { - if ($file2 == "e_emailprint.php") { + while (false !== ($file2 = readdir($plugin_handle))) + { + if ($file2 == "e_emailprint.php") + { require_once(e_PLUGIN.$file."/".$file2); } } @@ -53,13 +62,15 @@ class emailprint { } } - if ($look == 0 || $look == 1) { - $ico_mail = (file_exists(THEME."images/email.png") ? THEME."images/email.png" : e_IMAGE."packs/".$imode."/generic/email.png"); - $text_emailprint .= "".LAN_EMAIL_7." "; + if ($look == 0 || $look == 1) + { + $ico_mail = (file_exists(THEME."images/".ICONMAIL) ? THEME_ABS."images/".ICONMAIL : e_IMAGE_ABS."packs/".$imode."/generic/email.png"); + $text_emailprint .= "".LAN_EMAIL_7." "; } - if ($look == 0 || $look == 2) { - $ico_print = (file_exists(THEME."images/printer.png") ? THEME."images/printer.png" : e_IMAGE."packs/".$imode."/generic/printer.png"); - $text_emailprint .= "".LAN_PRINT_1.""; + if ($look == 0 || $look == 2) + { + $ico_print = (file_exists(THEME."images/".ICONPRINT) ? THEME_ABS."images/".ICONPRINT : e_IMAGE_ABS."packs/".$imode."/generic/printer.png"); + $text_emailprint .= "".LAN_PRINT_1.""; } return $text_emailprint; } diff --git a/e107_plugins/pdf/pdf.sc b/e107_plugins/pdf/pdf.sc index 85676434b..bc4ed13b8 100644 --- a/e107_plugins/pdf/pdf.sc +++ b/e107_plugins/pdf/pdf.sc @@ -1,14 +1,19 @@ +/* + * e107 website system (c) 2001-2008 Steve Dunstan (e107.org) + * $Id: pdf.sc,v 1.2 2008-09-04 20:07:34 e107steved Exp $ +*/ + if (defined("ICONPRINTPDF") && file_exists(THEME."images/".ICONPRINTPDF)) { - $icon = THEME."images/".ICONPRINTPDF; + $icon = THEME_ABS."images/".ICONPRINTPDF; } else { - $icon = e_PLUGIN."pdf/images/pdf_16.png"; + $icon = e_PLUGIN_ABS."pdf/images/pdf_16.png"; } $parms = explode("^",$parm); //core //return "{$parms[0]}"; //plugin //return "{$parms[0]}"; -return " {$parms[0]}"; +return " {$parms[0]}";