[Register]
Powered by Elgg

Plugins :: Blog :: Media Gallery - no flash in blog entry...FIXED (v0.8 issue only)

June 14, 2007

I have installed the plugin and (I think!) followed the instructions. The media folder is fine - it plays mp3,flv and swf files. But when I insert an flv file into a blog entry it just stays as a link. I've added the code in the README to the two files. (Note: the instructions on the plugin page are not correct as there is part of a line missing). I have also modified it to make sure there are no extra line breaks, etc. - but I don't think it is even being read as looking at the page source the flash movie is not in an embed tag - unlike the swf one which is.

Any suggestions?

Keywords: flash, mediagallery

Posted by John Hackett @ Plugins


Comments

  1. Is /units/files/files_links_make.php deprecated? I have tried modifying it to debug the problem above but nothing seems to change the output! From what I can see this function should deal with files added to blog posts. Is this still correct in v0.8? I've tried changing the switch statement but nothing changes in the blog post. Even with the whole statement commented out I stil get the swf and mp3 files loaded as normal but no flv.

    As noted above there is no embed tag for the flv files even though I have added the mediagallery case statement. I've tried changing this to return just some plain HTML but I still get same code appearing in the page source.

    What am I missing?

    user iconJohn Hackett on Monday, 18 June 2007, 13:06 UTC # |

  2. Managed to fix it. The problem is with internal changes from v0.7 to v0.8 which means that the installation instructions in the README for adding flash movie to a blog entry are wrong (for v0.8).

    It appears that the file units/files/files_links_make.php is deprecated and that this fuctionality has moved to /mod/file/lib/files_links_make.php

    The actual code to be added is the same - while testing I changed it to make sure there were no extra breaks so I have used the following after line 26 (the "audio/mp3" case code block):

    /* ====================== FLASH - MEDIAGALLERY ================ */
       case "video/x-flv":
            $filetitle = urlencode(stripslashes($file->title));
            $run_result .= "<embed src=\"" . $CFG->wwwroot . "mod/mediagallery/mediaplayer.swf\" width=\"480\" height=\"380\" allowfullscreen=\"true\" ";
            $run_result .= "type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" ";
            $run_result .= "flashvars=\"file=".$filepath."&enablejs=true&overstretch=false&displayheight=360\" />";
            break; 
    /* ====================== FLASH - MEDIAGALLERY - END =========== */

    I have not checked but I aasume that the third change should be made here as well if requried.

    user iconJohn Hackett on Monday, 18 June 2007, 20:14 UTC # |

You must be logged in to post a comment.

Site supported by Curverider Ltd - powered by the awesome Elgg