SMF Support > SMF 2.0.x Support

Help: avoid "no content" when using html tag

(1/1)

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

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

--- Code: ---if ($func['htmltrim'](strip_tags(parse_bbc($_POST['message'], false), '<img>')) === '')
--- End code ---

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

--- Code: ---if (!$user_info['is_admin'] && $func['htmltrim'](strip_tags(parse_bbc($_POST['message'], false), '<img>')) === '')
--- End code ---

wjhdiz:
Thanks Karl and I will try this tonight.

Navigation

[0] Message Index

Go to full version