Nukemods Forum  
» Log in
User Name:

Password:

Not a member yet?
Register Now!
» .::.
tattoo fonts
http://www.checkoutmyink.com/category/tattoo-fonts-tattoo

Go Back   Nukemods Forum > PHP-Nuke 7.x > Nuke 7.x - General

Reply
 
LinkBack Thread Tools Display Modes
config.php help
Old
  (#1 (permalink))
Junior Member
 
Status: Offline
Posts: 3
Join Date: Dec 2006
config.php help - 12-27-2006, 07:18 PM

I want to be able to paste YouTube video and link of pics from other site.

Actually i would like to enable ALL HTML

thats what I got right now

$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);


what else do I need?
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Re: config.php help
Old
  (#2 (permalink))
Member
 
Status: Offline
Posts: 484
Join Date: Nov 2004
Location: UK Derby
Re: config.php help - 12-29-2006, 10:37 AM

Quote:
Originally Posted by krimax
I want to be able to paste YouTube video and link of pics from other site.

Actually i would like to enable ALL HTML

thats what I got right now

$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);


what else do I need?
Try this

Code:
$AllowableHTML = array("b"=>1,
                    "i"=>1,
                    "a"=>2,
                    "em"=>1,
                    "br"=>1,
                    "strong"=>1,
                    "blockquote"=>1,
                    "tt"=>1,
                    "li"=>1,
                    "ol"=>1,
                    "H1"=>1,
                    "H2"=>1,
                    "H3"=>1,
                    "H4"=>1,
                    "center"=>1,
                    "img"=>2,
                    "alt"=>1,
                    "table"=>2,
                    "tr"=>2,
                    "td"=>2,
                    "p"=>2,
                    "div"=>2,
                    "font"=>2,
                    "p"=>1,
                    "p"=>1,
                    "ul"=>1);
The meaning of "1" and "2" is whether the tag accepts attributes or not. For example, if you want the

tag to NOT accept attributes (i.e. you accept

but you don't accept

) the you put "1", otherwise (i.e., if attributes like "align" etc. are accepted) you put "2". That this is indeed so, can be seen from the check_html() function of mainfile.php

Code:
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>";
                        } # Attribs in tag allowed
                else $tag = "";
The code checks if the associated value to the given tag ($tag) in the $AllowableHTML array is "1" or empty. If this is the case, the value of $tag is only "<tag>". Otherwise a set of replacements takes place on the attribute list:

The delQuotes() function deletes duplicate space and adds escaped quotes around each attribute value.

The ereg_replace() function replaces the ampersand (&) with its HTML entity "&amp;".

If the tag is not in the $AllowableHTML array, the line in the code above shows that it is replaced by the empty string, i.e. it is not echoed at all. Thus, if there is an HTML tag that you are missing, you should enter it in the $AllowableHTML array and take care to enter correctly a "1" or a "2" according to your needs


Peace Killerbee
  Send a message via MSN to killerbee  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old
  (#3 (permalink))
Junior Member
 
Status: Offline
Posts: 57
Join Date: Nov 2006
Location: The Abyss.....
12-30-2006, 03:10 PM

Can you set allowable HTML per module?

I have been working on a special "Profile" upgrade, almost like a myspace (in hopes of getting some users back), yet half of the HTML isn't allowed. I don't want it to be allowed throught the whole site though...
   
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
config.php help frostman179 Nuke 6.5 to 6.9 - Themes 1 07-17-2003 12:46 PM
Config DB as @Host PsyDesign Site design 1 05-09-2003 03:59 PM
Forums config... haekke1 Open topics 5 05-05-2003 06:53 PM
config.php PsyDesign Purged Topics 1 04-26-2003 09:41 PM
CONFIG.PHP ehsan Purged Topics 1 11-20-2002 09:21 AM




vBulletin Skin developed by: vBStyles.com


LinkBacks Enabled by vBSEO 3.3.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31