Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.9
Author Message
pcnuke
Hangin' Around



Joined: Feb 21, 2005
Posts: 39
Location: Cybertoria

PostPosted: Thu Feb 09, 2006 11:22 am Reply with quote

Messages - images showing borders

Ok does anybody have the trick here to fix this image border problem for the Messages area?

BORDERS around images cannot be set to 0 (zero) because when you then POST the MESSAGE the border drops from the submitted imput text, even though you have adjusted the $AllowableHTML to include it. So all images in the messages section still end up showing borders

example of text imput to the Messages area:
-----------------------------------------------------
I put it in as so: <img src="image.gif" border="0">
It ends up as so: <img src="image.gif">

Current config file adjusted as so:
-------------------------------------------
$AllowableHTML = array("table"=>2,"td"=>2,"tr"=>2,"img"=>2,"border"=>2,"img border"=>2,
"font color"=>2,"bgcolor"=>2,"font"=>2,"color"=>2,"embed"=>2,
"p"=>2,"hr"=>2,"width"=>2,"b"=>2,"i"=>2,"u"=>2,"div"=>2,
"a"=>2,"em"=>2,"br"=>2,"strong"=>2,"blockquote"=>2,
"tt"=>2,"li"=>2,"ol"=>2,"ul"=>2);


thanks in advance for the help

_________________
www.pcnuke.com - currently in LIMBO 
View user's profile Send private message
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Thu Feb 09, 2006 12:52 pm Reply with quote

"img"=>2 should work.

Get rid of
,"img border"=>2
 
View user's profile Send private message
pcnuke







PostPosted: Thu Feb 09, 2006 1:27 pm Reply with quote

Raven

thanks, but thats how it was at first, all I used was:

"img"=>2

but a border still shows with that in v7.9, thats why I added and tried these extras:

"border"=>2,"img border"=>2,

pcn
 
Raven







PostPosted: Thu Feb 09, 2006 5:27 pm Reply with quote

Well that won't work, what you added. Are we talking forums or base nuke?
 
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Thu Feb 09, 2006 5:34 pm Reply with quote

There's no specific code in check_html that would strip that from the img tag. Perhaps it is the WYSIWYG editor that is stripping it

_________________
- Only registered users can see links on this board! Get registered or login! -

Need help? Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
pcnuke







PostPosted: Thu Feb 09, 2006 6:44 pm Reply with quote

Basic Nuke coding for that Message section, No, no extra editor added, Running Nuke v7.9.0.3.1c

I enter this line in the message for my top image: <a href="http://pcnuke.vstoremarket.com"><img src="sigs.jpg" border="0"></a>

It always ends up dropping the: border="0" from the above line

You can see the results of this here in the top message section: http://www.max.pcnuke.com/

Ive changed the config.php back to what Raven suggested, by dropping the "border" I had inserted in the above example, here is the current:

Code:


$AllowableHTML = array("table"=>2,"td"=>2,"tr"=>2,"img"=>2,"font color"=>2,"bgcolor"=>2,"font"=>2,"color"=>2,"embed"=>2,"p"=>2,"hr"=>2,"width"=>2,
"b"=>2,"i"=>2,"u"=>2,"div"=>2,"a"=>2,"em"=>2,"br"=>2,"strong"=>2,"blockquote"=>2,"tt"=>2,"li"=>2,"ol"=>2,"ul"=>2);


What is the code for the numbers

1=off
2=on ...?

I saw this in another post here, but havent tried it yet, does anyone see any changes that need to be done to it, before I give it a shot...

Code:
$AllowableHTML = array(

"a" => array("href" => 1, "target" => 1, "title" => array("minlen" => 4, "maxlen" => 120)),
"b" => array(),
"blockquote" => array(),
"br" => array(),
"center" => array(),
"div" => array("align" => 1),
"em" => array(),
"font" => array("face" => 1, "style" => 1, "color" => 1, "size" => array("minval" => 1, "maxval" => 7)),
"h1"=>array(),
"h2"=>array(),
"h3"=>array(),
"h4"=>array(),
"h5"=>array(),
"h6"=>array(),
"hr" => array(),
"i" => array(),
"img" => array("alt" => 1, "scr" => 1, "hspace" => 1, "vspace" => 1, "border" => 1, "align" => 1),
"li" => array(),
"ol" => array(),
"p" => array("align" => 1),
"pre" => array("align" => 1),
"span" =>array("class" => 1, "style" => array("font-family" => 1, "color" => 1)),
"strong" => array(),
"table" => array("align" => 1, "border" => 1, "cell" => 1),
"td" => array(),
"tr" => array("align" => 1),
"tt"=>array(),
"u" => array(),
"ul" => array(),
);


---------------------------

Another problem in the Messages area is this, it auto inserts extra characters, for example this is part of a LINK I insert

modules.php?name=Advertising&op=plans

Messages changes it to this on the forst save:

modules.php?name=Advertising&amp;op=plans

If I edit that same message again and save it, it will now be this:

modules.php?name=Advertising&amp;amp;op=plans

and so on...


thanks
pcn
 
evaders99







PostPosted: Thu Feb 09, 2006 7:57 pm Reply with quote

$AllowedHTML does not work that way.
Yours was fine. I have tested it on the Patched files and there is no problem with the border.

Pretty sure that problem is fixed in the Patched post-release thread.
See: http://www.nukefixes.com/ftopic-1779-45.html
 
Raven







PostPosted: Thu Feb 09, 2006 9:10 pm Reply with quote

Quote:
What is the code for the numbers

1=off
2=on ...?


No, the numbers are for the number of parameters that are allowed with that tag.
 
pcnuke







PostPosted: Thu Feb 09, 2006 9:40 pm Reply with quote

thanks to both of you,

evaders99 - I will reveiw that link

pcn
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.9

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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©