Author |
Message |
daltoniko
Regular


Joined: Dec 19, 2004
Posts: 61
|
Posted:
Fri Dec 22, 2006 10:47 am |
|
I use nuke8.0 patch (no sentinel).
I need to post some img in my news but some fxxx script block this posibility.
In my config.php i have
Code:$AllowableHTML = array("img"=>2,"src"=>2, ...
|
The preview with is ok and i can see the image but when i post it the story is broken and i can't edit it too...
Some suggestion?
sorry for my eng.  |
|
|
|
 |
hitwalker
Sells PC To Pay For Divorce

Joined:
Posts: 5661
|
Posted:
Fri Dec 22, 2006 5:23 pm |
|
|
|
 |
daltoniko

|
Posted:
Sat Dec 23, 2006 4:33 am |
|
mm... it's a confused post...
I try here for some help and suggestions
without editor and
Code:$AllowableHTML = array("img"=>2,"src"=>2, ...
|
not work
without editor and
Code:$AllowableHTML = array("img"=>2, ...
|
work the img tag with attribute but if i put 'border' not work...
with the editor don't work in each case. |
|
|
|
 |
daltoniko

|
Posted:
Sat Dec 23, 2006 10:54 am |
|
found the problem.... border="0" don't work
need to be fix this. If i use border="1" it's ok.
the editor automatically add the border at 0 (if we leave border tag) and crash the news.
I think it's the same problem with all tag with attribute set to 0
help help  |
|
|
|
 |
daltoniko

|
Posted:
Sat Dec 23, 2006 7:00 pm |
|
|
|
 |
daltoniko

|
Posted:
Sun Dec 24, 2006 10:09 am |
|
|
|
 |
bukovski
New Member


Joined: Nov 15, 2006
Posts: 16
|
Posted:
Sun Dec 24, 2006 9:29 pm |
|
i need help with this problem to, i post image on news and i see it on prewiev then on front page its empty, also when i try to put in block html code its display picturre or baner but after i enter ok its again empty...
any help ? |
|
|
|
 |
daltoniko

|
Posted:
Tue Dec 26, 2006 2:25 pm |
|
if i use the original phpnuke 8.0 mainfile.php work correctly.
I think some bugs in the function check_html ($str, $strip="") {
for now i use the original function from mainfile.php (phpnuke 8.0 no patch)
wait some suggestion from the boss
 |
|
|
|
 |
bukovski

|
Posted:
Tue Dec 26, 2006 4:03 pm |
|
whell i use original and patched and still have same problem ( both place nuke is upgreded from 7.6 )
p.s. i try downgrade but i faild so i stop it ! script from forum for downgrade dosnt work whell 50% of my modules and blocks dosnt work
so any help for 8.0 ? |
|
|
|
 |
daltoniko

|
Posted:
Tue Dec 26, 2006 4:39 pm |
|
this my mainfile.php (the function)
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 = stripslashes($str);
$str = eregi_replace("<[[:space:]]*([^>]*)[[:space:]]*>",'<\\1>', $str);
// Delete all spaces from html tags .
$str = eregi_replace("<a[^>]*href[[:space:]]*=[[:space:]]*\"?[[:space:]]*([^\" >]*)[[:space:]]*\"?[^>]*>",'<a href="\\1">', $str);
// Delete all attribs from Anchor, except an href, double quoted.
$str = eregi_replace("<[[:space:]]* img[[: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:]]*)[[:space:]]*([^>]*)>",$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 = $AllowableHTML[$tag])
if ($reg[1][0] == "/") $tag = "</$tag>";
elseif (($a == 1) || ($reg[2] == "")) $tag = "<$tag>";
else {
# Place here the double quote fix function.
$attrb_list=delQuotes($reg[2]);
// A VER
//$attrb_list = ereg_replace("&","&",$attrb_list);
$tag = "<$tag" . $attrb_list . ">";
} # Attribs in tag allowed
else $tag = "";
$tmp .= substr($str,0,$i) . $tag;
$str = substr($str,$i+$l);
}
$str = $tmp . $str;
return $str;
exit;
/* Squash PHP tags unconditionally */
$str = ereg_replace("<\?","",$str);
return $str;
}
|
and my config.php (the allowed tags)
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,"div"=>2,"a"=>2,"em"=>1,"br"=>1,"strong"=>1,"blockquote"=>1,"tt"=>1,"li"=>1,"ol"=>1,"ul"=>1,"center"=>1);
|
|
|
|
|
 |
bukovski

|
Posted:
Tue Dec 26, 2006 5:05 pm |
|
main
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 = stripslashes($str);
$str = eregi_replace("<[[:space:]]*([^>]*)[[:space:]]*>",'<\\1>', $str);
// Delete all spaces from html tags .
$str = eregi_replace("<a[^>]*href[[:space:]]*=[[:space:]]*\"?[[:space:]]*([^\" >]*)[[:space:]]*\"?[^>]*>",'<a href="\\1">', $str);
// Delete all attribs from Anchor, except an href, double quoted.
$str = eregi_replace("<[[:space:]]* img[[: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:]]*)[[:space:]]*([^>]*)>",$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 = $AllowableHTML[$tag])
if ($reg[1][0] == "/") $tag = "</$tag>";
elseif (($a == 1) || ($reg[2] == "")) $tag = "<$tag>";
else {
# Place here the double quote fix function.
$attrb_list=delQuotes($reg[2]);
// A VER
//$attrb_list = ereg_replace("&","&",$attrb_list);
$tag = "<$tag" . $attrb_list . ">";
} # Attribs in tag allowed
else $tag = "";
$tmp .= substr($str,0,$i) . $tag;
$str = substr($str,$i+$l);
}
$str = $tmp . $str;
return $str;
exit;
/* Squash PHP tags unconditionally */
$str = ereg_replace("<\?","",$str);
return $str;
}
function filter_text($Message, $strip="") {
global $EditedMessage;
check_words($Message);
$EditedMessage=check_html($EditedMessage, $strip);
return ($EditedMessage);
}
function filter($what, $strip="", $save="", $type="") {
if ($strip == "nohtml") {
$what = check_html($what, $strip);
$what = htmlentities(trim($what), ENT_QUOTES);
// If the variable $what doesn't comes from a preview screen should be converted
if ($type != "preview" AND $save != 1) {
$what = html_entity_decode($what, ENT_QUOTES);
}
}
if ($save == 1) {
$what = check_words($what);
$what = check_html($what, $strip);
$what = addslashes($what);
} else {
$what = stripslashes(FixQuotes($what));
$what = check_words($what);
$what = check_html($what, $strip);
}
return($what);
}
|
cofig:
Code:$AllowableHTML = array("b"=>1,"i"=>1,"strike"=>1,"div"=>2,"u"=>1,"a"=>2,"em"=>1,"br"=>1,"strong"=>1,"blockquote"=>1,"tt"=>1,"li"=>1,"ol"=>1,"ul"=>1);
/
|
|
|
|
|
 |
daltoniko

|
Posted:
Tue Dec 26, 2006 5:25 pm |
|
you need to put img tag in allowable html var.. try to use my code. |
|
|
|
 |
bukovski

|
Posted:
Tue Dec 26, 2006 5:37 pm |
|
|
|
 |
bukovski

|
Posted:
Tue Dec 26, 2006 5:43 pm |
|
BROOO ty now i can use img in news but still i miss pic from blocks DONT isntall 8.0 its BIG pain! |
|
|
|
 |
bukovski

|
Posted:
Tue Dec 26, 2006 5:50 pm |
|
grr i cant use img in footer like :
Code:<a href='http://host-tracker.com/website-uptime-statistics/226023/'><img alt='web site monitoring' width=88 height=31 border=0 src="http://ext.host-tracker.com/uptime-img/?s=31&t=226023&m=00.09&p=Total" ></a><noscript><a href='http://host-tracker.com/'>uptime</a></noscript>
|
i see pic but when i klick ok and when relod pic isnt showing and all code was deleted in setings
if you need SS i can post it for problem :
site is www.vlasotince.com/nuke |
|
|
|
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Tue Dec 26, 2006 8:51 pm |
|
I can honestly say that very few of us moderators / admins even touch anything above 7.6 due to many different reasons, but mostly FB's garbage and security holes. Sorry that we have not been much help to you.
If you are just starting out with nuke, I'd given RavenNuke a chance. |
_________________ Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! |
|
|
 |
bukovski

|
Posted:
Wed Dec 27, 2006 2:38 am |
|
hell bro i know thet but maybe some of you can help us. I try to downgrade ! but its faild to many times i cant aford to lose my database ! its not a option. Yes i know its my problem, im one big stupid head but from now i will use 7.6 or some modede version like reven nuke... but for this site i cant
Ty all for your time and keep working , bot forum and reven team you do a very nice job ppl |
|
|
|
 |
kguske
Site Admin

Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Wed Dec 27, 2006 5:44 am |
|
Remove the noscrip t from the footer - that's not in the allowed HTML, and you don't want to add it there. If you remove that, you should be able to save your footer. |
_________________ I search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
 |
|