Advertisement:

Author Topic: Fix: Message Empty Error For Embed Video Mods  (Read 12979 times)

Offline SMFHacks.com Team

  • Jr. Member
  • **
  • Posts: 228
    • smfhacks on Facebook
    • @smfhacks on Twitter
    • SMFHacks.com
Fix: Message Empty Error For Embed Video Mods
« on: October 22, 2007, 10:40:42 PM »
Link to Mod


FIX MESSAGE EMPTY ERROR FOR EMBED VIDEO MODS v1.0
By Karl Benson


Introduction
This simple mod fixes a problem/bug in SMF for embedding video/clip mods.
Bug: If a user tries to post a message with ONLY a bbcode for a video clip in it, it will fail and will show the error message "The message body was left empty."
Fix: The fix adds <object> and <embed> to a list of html tags which can appear on their own in a post without any other content.

If you've got ANY of the videoclip type mods installed, you will want to install this.

Hopefully this fix will get added to a future SMF release.

Installation
Installation affects source files only (2 minor changes/additions to Post.php)
No manual theme/language edits will be required.

This mod is compatible with SMF 1.1.x and
with SMF 2.0 Beta 1 (which is currently available to Charter Members).

Support
Please use the modification thread for support with this modification.

Changelog
1.0 - 18th October 2007
o Initial release
« Last Edit: October 24, 2007, 05:21:25 PM by karlbenson »
Disclaimer: SMFHacks.com Team is not affiliated with the SMF Team or the SimpleMachines NPO.

http://ForumRankings.net - Get Forum Ranked!
SMFHacks.com -  Paid Modifications for SMF
Latest Mods:
Community Suite
Newsletter Pro SMF Gallery Pro SMF Classifieds SMF Store

Offline forty

  • Semi-Newbie
  • *
  • Posts: 38
Re: Fix: Message Empty Error For Embed Video Mods
« Reply #1 on: October 23, 2007, 11:14:18 PM »
hi karl
do we really need to install this? why not update the EMBED VIDEO MOD code?
why i dont experience this?
i tried to post the youtube link and it embed the video(no space and no enter key what so ever just the link)

Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,584
  • Gender: Male
    • @mortonssols on Twitter
    • Mortons Solicitors
Re: Fix: Message Empty Error For Embed Video Mods
« Reply #2 on: October 24, 2007, 02:34:36 PM »
This fix is for all video embed mods, not just mine.  Basically any mod which adds embedded objects.

The same generic fix does it for all.
It is not practical to include this fix in any one modification (or them all) because if you uninstalled one mod, it would remove the fix and so any more mods you had installed would be affected.
The error doesnt always seem to happen for some mods, but always does for others.

In this respect its more of an smf bug than a bug related to indivdual mods.
After speaking to some SMF team members it was decided that posting it as a separate mod was the best course in the short-term.

sipko

  • Guest
Re: Fix: Message Empty Error For Embed Video Mods
« Reply #3 on: October 24, 2007, 05:23:33 PM »
I installed this and still get "The message body was left empty."  Could another mod block the effects?

Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,584
  • Gender: Male
    • @mortonssols on Twitter
    • Mortons Solicitors
Re: Fix: Message Empty Error For Embed Video Mods
« Reply #4 on: October 24, 2007, 05:40:45 PM »
The only mod I know which alters the same area but differently is the streaming 3 mod by 1948pal.

Please can you post
a) a list of ALL mods installed
b) a sample copy of the type of embedding you are trying to do eg
[youtube]http://www.youtube.com/watch/?v=gduiygdbyui[/youtube]
(and which mod adds that functionality)

sipko

  • Guest
Re: Fix: Message Empty Error For Embed Video Mods
« Reply #5 on: October 24, 2007, 05:50:32 PM »
1.     Streaming 3      4.2.2b  <-Left this on for vids already posted with that don't show up when this is deleted. But could delete it if this is the problem.     
2.    Auto Embed Video Clips    1.2    
3.    SMF Shoutbox    1.16b    
4.    Chatroom Button    1.01    
5.    SMF 1.1.4 Search "brd" Bug Fix
6.    Location Mod    1.2    
7.    Users Online Today Mod    1.4.0    
8.    Fix Message Empty Error For Embed Video Mods    1.0    
9.    RSS Feed Poster    1.0.4    
10.    GoEar BBCode by Mike Menendez    0.4    
11.    SMF Gallery Lite    1.8.1.1    
12.    E-Arcade    2.4.2    
13.    Custom Profile Field Mod

I just dropped a Youtube video in the message box and have tried this with several YT videos and still get that message necessitating putting a period in the box to post minus text.  Otherwise the mod works great eliminating the need for the Youtube brackets.

Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,584
  • Gender: Male
    • @mortonssols on Twitter
    • Mortons Solicitors
Re: Fix: Message Empty Error For Embed Video Mods
« Reply #6 on: October 24, 2007, 06:55:10 PM »
It appears that this is a bug with the streaming mod.

I'm going to contact 1948pal about it.

If your uninstall that the streaming mod, the fix will work. Although you might need to uninstall this mod first to be able to uninstall the streaming mod, then reinstalling this one.

sipko

  • Guest
Re: Fix: Message Empty Error For Embed Video Mods
« Reply #7 on: October 24, 2007, 06:57:59 PM »
Okay. Thanks!

sipko

  • Guest
Re: Fix: Message Empty Error For Embed Video Mods
« Reply #8 on: October 24, 2007, 09:37:07 PM »
Unfortunately, removing the streaming mod and the fix mod and reinstalling the fix mod didn't work. I still get "The message body was left empty."


sipko

  • Guest
Re: Fix: Message Empty Error For Embed Video Mods
« Reply #9 on: October 24, 2007, 09:41:24 PM »
I think I see the problem. The uninstall didn't remove all of the streaming mod. My post buttons are screwed up. 

I get text where the buttons were. See example below:

 Insert FlashInsert GoEar DataAdd Windows media sound or movies to your posts!Add Real media sound or movies to your posts!Add QuickTime media sound or movies to your posts!Add Google video to your posts!Add YouTube stream to your posts!Insert ImageInsert HyperlinkInsert EmailInsert FTP Link|Insert TableInsert Table RowInsert Table Column|SuperscriptSubscriptTeletype|Insert CodeInsert Quote|Insert List

Offline Chriss Cohn

  • Full Member
  • ***
  • Posts: 493
  • Gender: Male
  • who does not go with the time, goes with the time
Re: Fix: Message Empty Error For Embed Video Mods
« Reply #10 on: November 01, 2007, 05:34:30 PM »
I hope that the Developers have already took notice of it..... :-\

Thanks for that Karl!
Great Job!

Regards, Christian

Offline 2pac

  • Jr. Member
  • **
  • Posts: 235
  • Gender: Male
  • Str8 Ballin'
Re: Fix: Message Empty Error For Embed Video Mods
« Reply #11 on: January 14, 2008, 08:02:55 PM »
awesome! it does get annoying, thanks for the fix! ;D

Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,584
  • Gender: Male
    • @mortonssols on Twitter
    • Mortons Solicitors
Re: Fix: Message Empty Error For Embed Video Mods
« Reply #12 on: January 18, 2008, 11:42:07 PM »
I have reuploaded this mod and screenshots for it.

I am in the process of doing it for ALL my other mods aswell.  Please bear with me.

Offline gordo

  • Semi-Newbie
  • *
  • Posts: 78
  • Gender: Male
Re: Fix: Message Empty Error For Embed Video Mods
« Reply #13 on: March 08, 2008, 06:43:21 AM »
excellent, takes away a very annoying thing, how would I do this for the img tag ?   
I don't fully understand the code and what it does in post.php

any clues appreciated

Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,584
  • Gender: Male
    • @mortonssols on Twitter
    • Mortons Solicitors
Re: Fix: Message Empty Error For Embed Video Mods
« Reply #14 on: March 08, 2008, 07:15:56 AM »
SMF by default should allow <img> image only posts.

Offline gordo

  • Semi-Newbie
  • *
  • Posts: 78
  • Gender: Male
Re: Fix: Message Empty Error For Embed Video Mods
« Reply #15 on: March 08, 2008, 07:24:19 AM »
is there a switch in admin that I have missed then because mine doesn't ver 1.1.4

Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,584
  • Gender: Male
    • @mortonssols on Twitter
    • Mortons Solicitors
Re: Fix: Message Empty Error For Embed Video Mods
« Reply #16 on: March 08, 2008, 08:07:44 AM »
no there isnt a switch, it should be automatic.

Are you using the streaming 3 mod?  i remember that was a bug with it.

Offline MissyNL

  • Full Member
  • ***
  • Posts: 643
  • Gender: Female
Re: Fix: Message Empty Error For Embed Video Mods
« Reply #17 on: April 29, 2008, 04:10:45 PM »
ehm.. maybe a stupid question, but the only video mod i have installed is yours andif i remember.. it doesnt use bbcode.. so, should ik isntall it anyway then?
Sorry for my poor English, but i think it's probably better then your Dutch :)

Offline karlbenson

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 15,584
  • Gender: Male
    • @mortonssols on Twitter
    • Mortons Solicitors
Re: Fix: Message Empty Error For Embed Video Mods
« Reply #18 on: April 29, 2008, 05:48:13 PM »
No.

It shouldn't be needed for AutoEmbedVideo mod.

It might be needed for other bbcode mods (of which I've got a few ;) )

Offline MissyNL

  • Full Member
  • ***
  • Posts: 643
  • Gender: Female
Re: Fix: Message Empty Error For Embed Video Mods
« Reply #19 on: April 30, 2008, 07:08:48 AM »
oh.. oke.. thanks for the answhere :D

But.. why need a nother mod.. when your mod does it all?
Sorry for my poor English, but i think it's probably better then your Dutch :)