Custom thumbs for embedded video

doceave

Joined: 2009-01-20
Posts: 176
Posted: Fri, 2010-04-02 20:44

Hi guys

I'm using the embed video module to upload swf files to my gallery. The module assigns the swfs a terrible generic video thumbnail which I want to substitute for a still of the swf-video.

So I installed thumbnail manager module ~ When i attempt to change the icon of the swf, the swf no longer works...

Any ideas? How can I manually change the thumbnail?

See ugly thumbs - http://www.doceave.com/panoramicafrica/index.php?q=gallery&g2_itemId=15939

 
doceave

Joined: 2009-01-20
Posts: 176
Posted: Sat, 2010-04-03 13:57

Still battling here... Everything else is coming together now except this thumbnail bother!

 
doceave

Joined: 2009-01-20
Posts: 176
Posted: Sat, 2010-04-03 14:17

...

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2010-04-03 14:33

The thumbnail mngr let you add a custom thumb foreach gallery item.
edit item -> custom thumb

The embed video module is a hack that uses the item description area to embed the video.

Gallery allows for upload and display of flash animations(swf) in the normal fashion, why use embed video module for that?
Sample uploaded swf.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
doceave

Joined: 2009-01-20
Posts: 176
Posted: Sat, 2010-04-03 14:40

Ok will try upload in normal fashion... I just recall it not working 1st time so I assumed no support for swfs... thanks.

 
doceave

Joined: 2009-01-20
Posts: 176
Posted: Sat, 2010-04-03 18:53

I would actually like to attempt embedding for now as I have modified my photo.tpl to show the description only, and I like the way the embedded swf behaves as opposed to the full screen one.

Perhaps you can help me Suprsidr... I add my swf using embed video module and I see the description is modified to hold the embedding of the swf... Issue is, if the entry is edited in any way the embedded swf no longer is displayed, and the description will read:

<embed src="http://www.doceave.com/pano/chapel.swf"><br>chapel

How can I manually embed my swf into the description? I could use the code below for example, but it is entered into the description as regular text. How can I make G2 interpret this as code and embed the swf as instructed? (a link to the problem: http://www.doceave.com/gallery2/main.php?g2_itemId=16002 )

<object width="550" height="400">
<param name="movie" value="http://www.doceave.com/pano/chapel.swf">
<embed src="http://www.doceave.com/pano/chapel.swf" width="550" height="400">
</embed>
</object>

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2010-04-03 19:16

Gallery Admin -> General -> Markup -> Raw HTML

/gallery2/modules/core/classes/GalleryUtilities.class
function htmlSafe
have it return the text passed to it untouched.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
doceave

Joined: 2009-01-20
Posts: 176
Posted: Sat, 2010-04-03 19:28

Could you explain the second part in some more detail please... what exactly must I do?

(set embed to RawHtml)

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sat, 2010-04-03 20:00
    function htmlSafe($html, $decode=false) {
	GalleryCoreApi::requireOnce('lib/pear/Safe.php');
	static $parser;
	if (!isset($parser)) {
	    $parser =& new HTML_Safe();
	}
	if ($decode) {
	    GalleryUtilities::unsanitizeInputValues($html, false);
	}
	$html = $parser->parse($html);
	if ($decode) {
	    GalleryUtilities::sanitizeInputValues($html, false);
	}
	return $html;
    }

to:

    function htmlSafe($html, $decode=false) {
	return $html;
    }

But I would disable comments as users could post malicious code.

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
doceave

Joined: 2009-01-20
Posts: 176
Posted: Sat, 2010-04-03 21:15

How do you know this stuff!!! Absolutely amazing! Many many thanks (solved)