PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
daltoniko
Regular
Regular


Joined: Dec 19, 2004
Posts: 61

PostPosted: Fri Dec 22, 2006 10:47 am Reply with quote Back to top

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. Wink
View user's profile Send private message Visit poster's website
persona_non_grata



Joined:
Posts: 0

PostPosted: Fri Dec 22, 2006 5:23 pm Reply with quote Back to top

see if this helps..
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message
daltoniko
Regular
Regular


Joined: Dec 19, 2004
Posts: 61

PostPosted: Sat Dec 23, 2006 4:33 am Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website
daltoniko
Regular
Regular


Joined: Dec 19, 2004
Posts: 61

PostPosted: Sat Dec 23, 2006 10:54 am Reply with quote Back to top

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.
Smile
I think it's the same problem with all tag with attribute set to 0

help help Smile
View user's profile Send private message Visit poster's website
daltoniko
Regular
Regular


Joined: Dec 19, 2004
Posts: 61

PostPosted: Sat Dec 23, 2006 7:00 pm Reply with quote Back to top

help...
View user's profile Send private message Visit poster's website
daltoniko
Regular
Regular


Joined: Dec 19, 2004
Posts: 61

PostPosted: Sun Dec 24, 2006 10:09 am Reply with quote Back to top

...some news about it?
View user's profile Send private message Visit poster's website
bukovski
New Member
New Member


Joined: Nov 15, 2006
Posts: 16

PostPosted: Sun Dec 24, 2006 9:29 pm Reply with quote Back to top

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 ?
View user's profile Send private message
daltoniko
Regular
Regular


Joined: Dec 19, 2004
Posts: 61

PostPosted: Tue Dec 26, 2006 2:25 pm Reply with quote Back to top

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
Smile
View user's profile Send private message Visit poster's website
bukovski
New Member
New Member


Joined: Nov 15, 2006
Posts: 16

PostPosted: Tue Dec 26, 2006 4:03 pm Reply with quote Back to top

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 Sad


so any help for 8.0 ?
View user's profile Send private message
daltoniko
Regular
Regular


Joined: Dec 19, 2004
Posts: 61

PostPosted: Tue Dec 26, 2006 4:39 pm Reply with quote Back to top

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("&","&amp;",$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);
View user's profile Send private message Visit poster's website
bukovski
New Member
New Member


Joined: Nov 15, 2006
Posts: 16

PostPosted: Tue Dec 26, 2006 5:05 pm Reply with quote Back to top

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("&","&amp;",$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);
/
View user's profile Send private message
daltoniko
Regular
Regular


Joined: Dec 19, 2004
Posts: 61

PostPosted: Tue Dec 26, 2006 5:25 pm Reply with quote Back to top

you need to put img tag in allowable html var.. try to use my code.
View user's profile Send private message Visit poster's website
bukovski
New Member
New Member


Joined: Nov 15, 2006
Posts: 16

PostPosted: Tue Dec 26, 2006 5:37 pm Reply with quote Back to top

ok i will try
View user's profile Send private message
bukovski
New Member
New Member


Joined: Nov 15, 2006
Posts: 16

PostPosted: Tue Dec 26, 2006 5:43 pm Reply with quote Back to top

BROOO ty now i can use img in news but still i miss pic from blocks Sad DONT isntall 8.0 its BIG pain!
View user's profile Send private message
bukovski
New Member
New Member


Joined: Nov 15, 2006
Posts: 16

PostPosted: Tue Dec 26, 2006 5:50 pm Reply with quote Back to top

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&amp;t=226023&amp;m=00.09&amp;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 Sad

if you need SS i can post it for problem :

site is
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message
montego
Site Admin


Joined: Aug 29, 2004
Posts: 7236
Location: Arizona

PostPosted: Tue Dec 26, 2006 8:51 pm Reply with quote Back to top

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.
View user's profile Send private message Visit poster's website
bukovski
New Member
New Member


Joined: Nov 15, 2006
Posts: 16

PostPosted: Wed Dec 27, 2006 2:38 am Reply with quote Back to top

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 Sad


Ty all for your time and keep working , bot forum and reven team you do a very nice job ppl
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 4620

PostPosted: Wed Dec 27, 2006 5:44 am Reply with quote Back to top

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.
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic

View next topic
View previous topic
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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2008 by Raven
Proud to be listed at Lobo Links Web Directory

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::

:: fisubice Theme Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum