Advertisement:

Author Topic: Help: avoid "no content" when using html tag  (Read 2394 times)

Offline wjhdiz

  • Jr. Member
  • **
  • Posts: 363
Help: avoid "no content" when using html tag
« on: May 01, 2008, 11:11:49 PM »
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.

Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,629
  • Gender: Male
    • Criminal Brief UK
Re: Help: avoid "no content" when using html tag
« Reply #1 on: May 01, 2008, 11:24:01 PM »
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: [Select]
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
Code: [Select]
if (!$user_info['is_admin'] && $func['htmltrim'](strip_tags(parse_bbc($_POST['message'], false), '<img>')) === '')

Offline wjhdiz

  • Jr. Member
  • **
  • Posts: 363
Re: Help: avoid "no content" when using html tag
« Reply #2 on: May 02, 2008, 09:41:48 AM »
Thanks Karl and I will try this tonight.
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.