how do i allow more html ?

Started by sAce, May 23, 2009, 07:51:48 AM

Previous topic - Next topic

sAce

hi guys, i need some help.

the thing is i want to allow a few more html tags like <ul> , <li> span, n stuff like that, can anyone tell me, how do i do this ?

i am running smf 1.1.9

[SiNaN]

./Sources/Subs.php

Code (Find) Select
$closable_tags = array('b', 'u', 'i', 's', 'em', 'ins', 'del', 'pre', 'blockquote');

Code (Replace) Select
$closable_tags = array('b', 'u', 'i', 's', 'em', 'ins', 'del', 'pre', 'blockquote');
$closable_tags = array_merge($closable_tags, array('ul', 'ol', 'li'));


However, I wouldn't add many things there. Adding something wrong may allow people to brake your page easily.

Also, as an admin you can use [html] tags. It accepts *everything*.
Former SMF Core Developer | My Mods | SimplePortal

sAce

Quote from: Blue Dream on May 23, 2009, 10:07:38 AM

Also, as an admin you can use [html] tags. It accepts *everything*.

thanks , n i didnt know that, buts thanks

ElectricSquid

#3
Thanks, I just used that code to add 'h1', 'h2', 'h3', 'h4', 'h5', 'h6' and 'p'
It all works, Thanks.

... but beware, if you use the  <p></p> tags OUTSIDE the BBcode quote tags, it'll add this text/code above the quote instead of the word Quote...



[

aevac]



... but if you remember to always use the <p></p> tags INSIDE the BBcode quote tags, everything will show up normal.



I've decided to try to take this a step further and add buttons for these new tags on the reply page next to the BBcode buttons.
Here's the topic for that...
http://www.simplemachines.org/community/index.php?topic=315584.msg2095116#msg2095116

ElectricSquid





$closable_tags = array_merge($closable_tags, array('ul', 'ol', 'li'));



For adding other tags like h1 and p, just add to or replace 'ul', 'ol', 'li' with your other tags.

Advertisement: