Not signed in (Sign In)

Vanilla 1.1.10 is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthortbk
    • CommentTimeNov 30th 2009
     
    To allow video files to be 'viewable' (in the most minor sense here of course) in your plogger you will need to do the following.

    1) Add the video file types to be allowed.
    Edit the file "plog-functions.php" located in the plog-includes directory.
    Look for the line of code below and change it to include the file types that you want. You can also just copy/paste the new line of code below and it 'should' have the file type in there.

    -----EXISTING LINES OF CODE-----

    return in_array(strtolower($ext), array('jpg', 'jpeg', 'gif', 'png', 'bmp'));


    -----MODIFIED LINES OF CODE-----

    return in_array(strtolower($ext), array('jpg', 'jpeg', 'gif', 'png', 'bmp', 'm2v', 'avi', 'mov', 'mp4', 'divx', 'rmvb', 'wmv', 'mpeg', 'mpg', 'flv', 'vob', 'wmv', 'mp4'));


    2) Tell plogger to use a static "video" thumbnail image.
    In the same file "plog-functions.php" you will need to remove the comment marks for a single line.

    -----EXISTING LINES OF CODE-----

    if (!$imgdata) {
    // Unknown image format, bail out
    // Do we want to have video support in the Plogger core?
    //return 'plog-graphics/thumb-video.gif';


    -----MODIFIED LINES OF CODE-----

    if (!$imgdata) {
    // Unknown image format, bail out
    // Do we want to have video support in the Plogger core?
    return 'plog-graphics/thumb-video.gif';


    -----EXISTING LINES OF CODE-----

    if (!is_readable($thumbpath)) {
    // Again, do we want to support video in the Plogger core?
    // $image_info = getimagesize($config['basedir'].'plog-graphics/thumb-video.gif');


    -----MODIFIED LINES OF CODE-----

    if (!is_readable($thumbpath)) {
    // Again, do we want to support video in the Plogger core?
    $image_info = getimagesize($config['basedir'].'plog-graphics/thumb-video.gif');


    Notice all we did was remove the "//" from the last line

    3) Put some form of a 'video' image file inside the directory plog-graphics called "thumb-video-gif". Example: Thumb-Video.gif
    • CommentAuthordkmfirefly
    • CommentTimeJan 11th 2010
     
    @tbk: I did all of the above. I did not get any errors while uploading the wmv file and the video thumbnail displayed correctly.

    The issue occurred when instead of the wmv file playing on the image page all I got was the thumb-video.gif displayed. Any idea why?

    Is there an example gallery where this code has been successfully used for me to look at?
    • CommentAuthordkmfirefly
    • CommentTimeJan 11th 2010
     
    I think I got it... I probably have to edit the plog-import.php file to make sure it actually gets uploaded
    • CommentAuthorchewbears
    • CommentTimeJan 19th 2010
     
    dkmfirefly could you post a link to the gallery you have got this working on. I too am beginning to work on video support for my gallery and would love to see what you have going.