» Log in
User Name:

Password:

Not a member yet?
Register Now!
» Online Users: 65
0 members and 65 guests
No Members online
Most users ever online was 611, 03-21-2008 at 10:10 PM.
» .::.
Web Hosting - web hosting, dedicated servers and web design services
Online Degree - search for 1000+ online degrees, online colleges & online universities.
tattoo - we are a group of tattoo enthusiasts
Gexa Energy - your absolute best choice in electric service
Texas electricity - save on electric rates
buy Rimonabant - Help dieters achieve significant weight loss without having to slog in the gym

Register Now! Contact Us

About this Page
This is a discussion on config.php help within the Nuke 7.x - General forums, part of the PHP-Nuke 7.x category; I want to be able to paste YouTube video and link of pics from other site. Actually i would like ...



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

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-27-2006, 06:18 PM
Junior Member
 
Join Date: Dec 2006
Posts: 3
config.php help
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
  #2 (permalink)  
Old 12-29-2006, 09:37 AM
Member
 
Join Date: Nov 2004
Location: UK Derby
Posts: 481
Send a message via MSN to killerbee
Re: config.php help
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
__________________
www.MoWarez.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 12-30-2006, 02:10 PM
Junior Member
 
Join Date: Nov 2006
Location: The Abyss.....
Posts: 56
Send a message via AIM to gamecharmer Send a message via MSN to gamecharmer Send a message via Yahoo to gamecharmer
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 11:46 AM
Config DB as @Host PsyDesign Site design 1 05-09-2003 02:59 PM
Forums config... haekke1 Open topics 5 05-05-2003 05:53 PM
config.php PsyDesign Purged Topics 1 04-26-2003 08:41 PM
CONFIG.PHP ehsan Purged Topics 1 11-20-2002 08:21 AM


All times are GMT -5. The time now is 04:36 PM.


Design by Vjacheslav Trushkin, color scheme by ColorizeIt!.

LinkBacks Enabled by vBSEO 3.1.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