Log in

View Full Version : How can I allow HTML and VB code without allowing pictures?


pahbi
09-28-2001, 02:04 PM
I have certain forums I'd like to allow HTML and VB code so users can make lists, colors and such, but I want to disallow them from making inline pictures.

Is this possible?

- Pahbi

Admin
09-28-2001, 02:06 PM
Forums and Moderators => Modify => Edit => Allow BB IMG Code in posts: NO.

pahbi
09-28-2001, 02:10 PM
What about if they try to use HTML to include images?

- Pahbi

Freddie Bingham
09-28-2001, 02:24 PM
Turn off HTML using the same steps.

Admin
09-28-2001, 03:46 PM
If you want to keep HTML but remove <img> tags, add this to your functions.php:
// remove all <img> tags from post
$bbcode=str_replace("<img","&lt;img",$bbcode);
right before
//smilies
if($dosmilies) {
That should do the trick.

pahbi
09-28-2001, 03:55 PM
Freddie,

I don't want to turn off all HTML, just the HTML that allows inline images to be put in posts.

I still want users to be able to make bold/color or whatever text, just no pictures.

- Pahbi

Admin
09-28-2001, 04:05 PM
...then do what I said...

Sinecure
09-28-2001, 04:20 PM
Listen to the man!

Palmer ofShinra
09-29-2001, 09:10 AM
Ummm... you can get colors, font size, font change, ordered lists... most anything, through VB codes.

If your forum doesn't already have them, do some looking and add them yourself. The "Add VB Code" function exists for just that reason.

We have several different ones availiable on our site: http://130.94.171.148/board/showthread.php?s=&threadid=9584

See an example of several of them in action.

We have glow text, marquee text, Flash support... you name it.

pahbi
10-01-2001, 04:28 PM
Today, someone used inline html to include java applets in their signature. I'm pretty sure I can use the same code to remove applet code, and any other offending html code.

My question is if I put in 5-6 or of those kinds of statements to substitute those strings with other things, will I hit any kind of performance barrier? Will it slow my forums down significantly?

- Pahbi

Justice
10-02-2001, 11:09 PM
the easiest way would be to make img or src a censored word

that way, they can still use all the html codes they want, but trying to post a picture would result in *** ***="image.gif

I have html turned on in my board, but I've made several tags censored to prevent people from messing up tables, embedding images and sound backgrounds, meta tags, etc.