Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: SMFHacks.com Team on October 22, 2007, 10:40:42 PM

Title: Fix: Message Empty Error For Embed Video Mods
Post by: SMFHacks.com Team on October 22, 2007, 10:40:42 PM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=987)



FIX MESSAGE EMPTY ERROR FOR EMBED VIDEO MODS v1.0


Donate (https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=W43RKPPZ2KGYE) | Comment On This Mod (http://www.simplemachines.org/community/index.php?topic=201852.0)

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
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: forty 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)
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: karlbenson 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.
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: sipko 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?
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: karlbenson 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

(and which mod adds that functionality)
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: sipko 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.
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: karlbenson 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.
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: sipko on October 24, 2007, 06:57:59 PM
Okay. Thanks!
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: sipko 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."

Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: sipko 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
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: Chriss Cohn 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
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: 2pac on January 14, 2008, 08:02:55 PM
awesome! it does get annoying, thanks for the fix! ;D
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: karlbenson 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.
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: gordo 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
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: karlbenson on March 08, 2008, 07:15:56 AM
SMF by default should allow <img> image only posts.
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: gordo 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
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: karlbenson 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.
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: MissyNL 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?
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: karlbenson 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 ;) )
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: MissyNL 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?
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: karlbenson on April 30, 2008, 11:31:50 AM
Indeed.

Some people would rather have bbcoded version than my auto embed version.
This mod is just to fix an issue i identified.

Bbcode for video is so 2005.  Auto embedding is the future ;)
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: Scratching my Head on April 18, 2010, 06:04:13 PM
Quote from: 2pac on January 14, 2008, 08:02:55 PM
awesome! it does get annoying, thanks for the fix! ;D

Awesome! Thanks!
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: sharks on July 27, 2011, 03:34:34 AM
My question is: I have SMF 1.1.14 and SMF 2.0 final, so do i need to install this mod?
What is mean is, has SMF 1.1.14 and SMF 2.0 final already integrated that embed video fix?

I also have to ask about another of vgmaer's mod: Simple Audio Video Embedder 2.0.1
If i install the Simple Audio Video Embedder 2.0.1, then do i have to install this embed video fix mod additionally?
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: vbgamer45 on July 27, 2011, 09:34:19 AM
No you do not install the mod if you use SAVE
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: mikedijital on September 18, 2015, 10:45:49 PM
Quick question on this one

the 2 edits im the  /sources/post.php are find the 2 '<img>'  and replace with  '<img><object><embed>'


but ive installed a few mods so it looks like this on my post.php instead of '<img>' 

'<img><iframe><iframe><div><div>'       and     '<object><embed><iframe><img><iframe><iframe>'

can someone help me on where to drop the edits in, or if they have to be written in differently
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: vbgamer45 on September 18, 2015, 11:03:48 PM
I would replace both with just
'<img><iframe><div><object><embed>'   
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: mikedijital on September 18, 2015, 11:23:30 PM
Thanks!
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: Dwev on March 15, 2018, 07:36:21 PM
Quote from: karlbenson on April 29, 2008, 05:48:13 PMIt shouldn't be needed for AutoEmbedVideo mod.

Which mod is this?

Searched for it, but couldn't find it, does anybody have a link?

The only one that might be it seems to be the Simple Audio Video Embedder (https://custom.simplemachines.org/mods/index.php?mod=2681), but that appears to be from another author.
Title: Re: Fix: Message Empty Error For Embed Video Mods
Post by: vbgamer45 on March 15, 2018, 08:35:27 PM
That's the same one.