News:

Wondering if this will always be free?  See why free is better.

Main Menu

Help: avoid "no content" when using html tag

Started by wjhdiz, May 01, 2008, 11:11:49 PM

Previous topic - Next topic

wjhdiz

Hi,

As an admin, using HTML tag to add some pure HTML content. I am trying to avoid the error message "no content." Is there a way to make the whole post within the HTML tag without stopped by the error message?

Thanks in advance.
Jimmy
Freedom of speech? It is freer if not speaking out.
Believing in God? Yes, talk with God every day through God creations.
Coding is poem and a way of keeping away from the troubled world.

karlbenson

SMF does some checks to make sure that besides html tags, there are some actual content to the posts.

I got the same issue with some Video mods, which only wanted a video.
Sources/Post.php
There are TWO instances of
if ($func['htmltrim'](strip_tags(parse_bbc($_POST['message'], false), '<img>')) === '')

Basically that line strips all html except <img> tag and checks, is this empty?
Somehow you'd have to get around it

Possibly with replacing the line with
if (!$user_info['is_admin'] && $func['htmltrim'](strip_tags(parse_bbc($_POST['message'], false), '<img>')) === '')

wjhdiz

Freedom of speech? It is freer if not speaking out.
Believing in God? Yes, talk with God every day through God creations.
Coding is poem and a way of keeping away from the troubled world.

Advertisement: