Module: Movie overlay
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
New module to add a play button over the thumb of a movie to signify that the thumb is not a photo. http://codex.gallery2.org/Gallery3:Modules:movie_overlay Dave |
|
windracer
Joined: 2007-03-05
Posts: 113 |
![]() |
Thanks for a cool module! I wanted to point out, however, that the top and left settings don't work because the value of '80px' is hard-coded into movie_overlay_theme.php. I was able to fix this by changing the following lines: top:80px; left:80px; to top:".$top."px; left:".$left."px; |
|
klinion
Joined: 2009-02-26
Posts: 180 |
![]() |
Works like a dream thanks |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
windracer, Dave |
|
windracer
Joined: 2007-03-05
Posts: 113 |
![]() |
I took a shot at cleaning up the ones without transparent backgrounds (2, 3, 4, 5, and 7). I'm by no means a graphic artist, but I think they look a little better. |
|
windracer
Joined: 2007-03-05
Posts: 113 |
![]() |
There's also a typo in the module name in the theme.info file. |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Fixed the typo and added your images. Dave |
|
jnash
![]()
Joined: 2004-08-02
Posts: 814 |
![]() |
Just a few notes: 1) The top and left 80px's are still hard coded in movie_overlay_theme.php pseudo center code: Think I have the logic close... Just a thought. EDIT: Perhaps not quite that simple since it's in the stylesheet... |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
I thought I fixed that up. At any rate I will see about fixing it when I get home later today. Dave |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Fixed the top and left being 80 issue and moved the zip file to the codex. Dave |
|
jnash
![]()
Joined: 2004-08-02
Posts: 814 |
![]() |
That's true with the video dimensions... I use the videothumbnail module to create a thumbnail, so I know that they are a fixed size... I think timeoverlay would be cool. +1 here |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
I'm no UI expert and certainly not a designer, but here is movie time if you have ffmpeg installed. Not sure what the results are if ffmpeg is not available. I think the best way to do this is with some JS and replace the image with a <div> or tow that can be styled a bit better in the view. Dave _____________________________________________ |
|
suprsidr
![]()
Joined: 2005-04-17
Posts: 8339 |
![]() |
Dave, did you see my jQuery canvas/overlay example? -s |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
suprsidr, Yes I did see those and look cool. I have decided to go for a css method to fix a couple of issues I was having and perhaps go the <canvas> route in the future. Dave |
|
cchiappa
![]()
Joined: 2008-08-11
Posts: 101 |
![]() |
Hi Dave, when I try to deactivate the module, I get this in my logs: 2012-05-08 21:50:53 -04:00 --- error: Kohana_PHP_Exception [ 1 ]: Call to undefined method module::delete() /usr/local/src/gallery3-support/modules/movie_overlay/helpers/movie_overlay_installer.php [ 30 ] #0 [internal function]: Kohana_PHP_Exception_Core::shutdown_handler(NULL) #1 /av/gallery3/system/core/Event.php(208): call_user_func_array(Array, Array) #2 /av/gallery3/system/core/Kohana.php(549): Event_Core::run('system.shutdown') #3 [internal function]: Kohana_Core::shutdown() #4 {main} Just judging from other modules, perhaps helpers/movie_overlay_installer.php:deactivate() wants to be uninstall() instead? It's not clear to me if htere's anything that should actually go into a deactive() routine. |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Got a url to show the behaviour/behavior? intaller.php was most likely a typo on my part or some beer consumption. I will fix that. Dave |
|
cchiappa
![]()
Joined: 2008-08-11
Posts: 101 |
![]() |
Sure, sent PM with a URL. Thanks a ton! |
|
windracer
Joined: 2007-03-05
Posts: 113 |
![]() |
cchiappa wrote:
Fixing that, I can verify that the module seems to cause some layout problems with the gray dragon theme. Specifically, it shifts movie frames over by about 1/3 (screenshot attached). Any thoughts about what might be going wrong? Hmmm ... I'm using GreyDragon 3.2.2 in two different galleries and don't see that shift in the thumbnail. |
|
cchiappa
![]()
Joined: 2008-08-11
Posts: 101 |
![]() |
windracer wrote:
Hmmm ... I'm using GreyDragon 3.2.2 in two different galleries and don't see that shift in the thumbnail. Interesting...I haven't customized GD all that much although I do have a couple of CSS tweaks and a fair number of modules. Wonder if there's a bad interaction with something. |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
cchiappa, Remove: windracer, can you PM the URL to one so I can see the source? Dave |
|
windracer
Joined: 2007-03-05
Posts: 113 |
![]() |
It looks like I'm still using v1 of the Movie Overlay module. As for other modules, I am using Square Thumbnails in both galleries, so that could be a factor. I've PM'ed you a link to a page that has a few videos on it. |
|
cchiappa
![]()
Joined: 2008-08-11
Posts: 101 |
![]() |
Thanks, that does fix the problem. The overlay is still not quite right, since it looks like the positioning is relative to the frame rather than the thumb nail, but I can hack that up pretty easily. |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Yah its that the theme adds the frame between the the thumb_top and thumb_bottom calls. I think it should call those functions before and after the thumbnail image. I have not instigated closely, perhaps you and Serge can come up with some consensus. you could use V1 of the module but with different aspect ratios it does not work right. Dave |
|
Rockbär
![]()
Joined: 2012-04-22
Posts: 76 |
![]() |
That module doesn't work on my website. I do also use the watermark-plugin - could this be a problem? If I include a youtube-clip the "old" movieoverlay-button appears instead the new one I've chosen in the admin-settings. |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
I have created a ticket: Dave |
|
Serge D
![]()
Joined: 2009-06-11
Posts: 2466 |
![]() |
Thank you Dave Serge |
|
inchains
Joined: 2012-04-19
Posts: 18 |
![]() |
I've installed the module, but now I want to uninstall it, and when I unpick it form the modules list the update button wont work. How can I uninstall the module? Thanks. |
|
windracer
Joined: 2007-03-05
Posts: 113 |
![]() |
After inactivating the module you can just delete its folder under the modules sub-directory in your G3 install. |
|
inchains
Joined: 2012-04-19
Posts: 18 |
![]() |
Problem is that when I unpick (inactivate) the module the update button don't work, so it doesn't save that change, keeping the module activated. I manage to inactivate the module by changing the status to 0 in the database, but that's not a practical solution for disabling a module. |
|
cchiappa
![]()
Joined: 2008-08-11
Posts: 101 |
![]() |
inchains - you need the fix I posted in http://gallery.menalto.com/node/101387#comment-391309 , ie you need to rename deactivate in helpers/movie_overlay_installer.php to uninstall. |
|
inchains
Joined: 2012-04-19
Posts: 18 |
![]() |
Thank you! |
|
Stan T
Joined: 2011-04-27
Posts: 52 |
![]() |
Hi, |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Try again, I uploaded a new version. Dave |
|
Stan T
Joined: 2011-04-27
Posts: 52 |
![]() |
Thank you. |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
Updated the codex with a new version. Fixed some css with GreyDragon theme. Only load the css if the page is a album. Dave |
|
floridave
![]()
Joined: 2003-12-22
Posts: 27300 |
![]() |
mzibo, in a private message wrote:
hi, edit the image block view file to look like: <?php defined("SYSPATH") or die("No direct script access.") ?> <? foreach ($items as $item): ?> <div class="g-image-block"> <? if ($item->type == "movie") { ?> <?= $theme->thumb_top($item) ?> <? } ?> <a href="<?= url::site("image_block/random/" . $item->id); ?>"> <?= $item->thumb_img(array("class" => "g-thumbnail")) ?> </a> <? if ($item->type == "movie") { ?> <?= $theme->thumb_bottom($item) ?> <? } ?> </div> <? endforeach ?> Not tested much Dave |
|
mzibo
Joined: 2008-03-30
Posts: 12 |
![]() |
thanks, works like a charm! in order for the overlay to be positioned properly, I had to also change the following in movie_overlay_theme.php: static function head($theme, $child) { |
|
cchiappa
![]()
Joined: 2008-08-11
Posts: 101 |
![]() |
The module always invokes ffmpeg on movies even if the time isn't going to be displayed. This can slow things down noticably. Trivial fix: {~,} --- helpers/movie_overlay_theme.php~ 2012-08-10 10:02:52.000000000 -0400 +++ helpers/movie_overlay_theme.php 2013-11-08 12:00:21.183362516 -0500 @@ -85,7 +85,8 @@ $view->images_url = url::file("modules/movie_overlay/images"); $view->icon = module::get_var("movie_overlay", "icon"); $view->trans = module::get_var("movie_overlay", "trans"); - $view->movie_time = number_format(movie_overlay_theme_Core::get_movie_time($child), 2); + if (module::get_var("movie_overlay", "time")) + $view->movie_time = number_format(movie_overlay_theme_Core::get_movie_time($child), 2); return $view; } } |
|