NukeResources :: View topic - Porblem after upgrade 3dot5 phpnuke7.5
Porblem after upgrade 3dot5 phpnuke7.5
Posted: Tue Apr 01, 2008 3:09 pm
Oasis6886
Resource Seeker
Joined: Apr 01, 2008
Posts: 5
Hello...
Please Help me I was use Phpnuke 7.5 and I upgraded it to 3dot5 patched and everything is ok but I can't use the HTML tags:
Look in the config.php file:
Code:
$AllowableHTML = array("img"=>2,"tr"=>1,"td"=>2,"table"=>2,"div"=>2,"p"=>2,"hr"=>1,"b"=>1,"i"=>1,"strike"=>1,"u"=>1,"font"=>2,"a"=>2,"em"=>1,"br"=>1,"strong"=>1,"blockquote"=>1,"tt"=>1,"li"=>1,"ol"=>1,"ul"=>1,"center"=>1);
and look in the mainfile.php:
Code:
function check_html ($str, $strip="") {
/* The core of this code has been lifted from phpslash */
/* which is licenced under the GPL. */
include("config.php");
if ($strip == "nohtml") $AllowableHTML = array('');
$str = eregi_replace("<space>]*)[[:space:]]*>",'<1>', $str);
// Delete all spaces from html tags .
// Delete all attribs from Anchor, except an href, double quoted.
$str = eregi_replace("<space>]*)[[:space:]]*>", '', $str);
// Delete all img tags
$str = eregi_replace("<a>]*href[[:space:]]*=[[:space:]]*\"?javascript[[:punct:]]*\"?[^>]*>", '', $str);
// Delete javascript code from a href tags -- Zhen-Xjell @ http://nukecops.com
$tmp = "";
while (ereg("</alpha>]*)>",$str,$reg)) {
$i = strpos($str,$reg[0]);
$l = strlen($reg[0]);
if ($reg[1][0] == "/") $tag = strtolower(substr($reg[1],1));
else $tag = strtolower($reg[1]);
if ($a = (isset($AllowableHTML[$tag])) ? $AllowableHTML[$tag] : 0)
if ($reg[1][0] == "/") $tag = "</tag>";
elseif (($a == 1) || (empty($reg[2]))) $tag = "<tag>";
else {
# Place here the double quote fix function.
$attrb_list=delQuotes($reg[2]);
// A VER
$attrb_list = str_replace("&","&",$attrb_list);
$attrb_list = str_replace("&","&",$attrb_list);
$tag = "<tag>";
} # Attribs in tag allowed
else $tag = "";
$tmp .= substr($str,0,$i) . $tag;
$str = substr($str,$i+$l);
}
$str = $tmp . $str;
$str = str_replace("<br>", "<br>", $str);
return $str;
exit;
/* Squash PHP tags unconditionally */
$str = str_replace("<?","",$str);
return $str;
}
and I want to use only this code in every articles.:
What I can to do to use <img> tag ??!
Posted: Wed Apr 02, 2008 2:38 pm
Oasis6886
Resource Seeker
Joined: Apr 01, 2008
Posts: 5
Please help me
Posted: Thu Apr 10, 2008 2:30 pm
Oasis6886
Resource Seeker
Joined: Apr 01, 2008
Posts: 5
Posted: Sat Apr 12, 2008 4:21 pm
Oasis6886
Resource Seeker
Joined: Apr 01, 2008
Posts: 5
Posted: Mon Apr 14, 2008 4:53 pm
chatserv
Site Admin
Joined: Apr 21, 2002
Posts: 1732
Location: Puerto Rico
You would add the img tag to config.php under $AllowableHTML but it should already be there. Either way in which part are you trying to use the img tag, in Story Text or Extended Text?
Posted: Mon Apr 14, 2008 5:12 pm
chatserv
Site Admin
Joined: Apr 21, 2002
Posts: 1732
Location: Puerto Rico
Please send me your mainfile.php and modules/News/admin/index.php to chatserv at prtc dot net
Posted: Tue Apr 15, 2008 7:52 am
Oasis6886
Resource Seeker
Joined: Apr 01, 2008
Posts: 5
chatserv wrote: You would add the img tag to config.php under $AllowableHTML but it should already be there. Either way in which part are you trying to use the img tag, in Story Text or Extended Text?
Thanks chatserv...
I try to use the img tag in Story Text and I will send you now the files:
mainfile.php and config.php and modules/News/admin/index.php
to chatserv at prtc dot net.
NukeResources Forum Index -> Upgrading PHP-Nuke
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
All times are GMT - 4 Hours
Page 1 of 1