Module: Movie overlay
floridave
Joined: 2003-12-22
Posts: 27300 |
Posted: Tue, 2011-03-22 03:34 |
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 |
|
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:
to
Posts: 180
Works like a dream thanks
www.talkingwalk.com/gallerywalk
Posts: 27300
windracer,
Thanks for that. It must have been a Monday or a Friday
I just downloaded this module again and find that some of the icons are not well done.
Anybody care to help out and develop some better ones with proper transparency and not clugeged together?
Just post them here or send them in a PM and I will add them to the module. You will get credit as well on the codex, is that enough incentive?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
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.
Posts: 113
There's also a typo in the module name in the theme.info file.
Posts: 27300
Fixed the typo and added your images.
Cheers!
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 814
Just a few notes:
1) The top and left 80px's are still hard coded in movie_overlay_theme.php
2) I was looking in to this and haven't tried to mod it yet, but is there a way to say 'center' the icon?
pseudo center code:
top = ($imageheight/2 - $iconheight/2)
left = ($imagewidth/2 - $iconwidth/2)
Think I have the logic close...
Just a thought.
EDIT: Perhaps not quite that simple since it's in the stylesheet...
Posts: 27300
I thought I fixed that up. At any rate I will see about fixing it when I get home later today.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 27300
Fixed the top and left being 80 issue and moved the zip file to the codex.
the issue with using $imageheight/2 and $imagewidth/2 is that the thumbs for movies can be and often are of differing sizes.
I suppose it could be done giving each overlay a unique ID and then some calculation to get the thumb height and width.
Seems like a lot of work for little benefit.
If there is more call for it I might work on that.
Some HTML5 overlay might be a better option.
I think that displaying the time of the movie would be cool as well.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
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
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.
overwrite the file with the one below removing the _.txt extension.
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
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 8339
Dave, did you see my jQuery canvas/overlay example?
Same method for watermark.
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
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.
I have updated the module on the codex.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 101
Hi Dave, when I try to deactivate the module, I get this in my logs:
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.
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?
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
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 101
Sure, sent PM with a URL. Thanks a ton!
Posts: 113
Hmmm ... I'm using GreyDragon 3.2.2 in two different galleries and don't see that shift in the thumbnail.
Posts: 101
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.
Posts: 27300
cchiappa, Remove:
margin: auto;
from helpers/movie_overlay_theme.php as a temporary measure.
Seems that the GD theme overrides the core theme_view code.
Perhaps Serge can look at his override and make some adjustments for the thumb_bottom function placement.
windracer, can you PM the URL to one so I can see the source?
It could be some other module or thumb size that has some other interaction that is causing this issue.
Are you using version 2?
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
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.
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.
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
_____________________________________________
Blog & G2 || floridave - Gallery Team
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.
Posts: 27300
I have created a ticket:
https://sourceforge.net/apps/trac/gallery/ticket/1861
then it should be a lot easier for this to be cross theme compatible.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 2466
Thank you Dave
It would be great approach
Serge
_____________________________________________
Photo Gallery | GreyDragon Theme | Follow on Twitter
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.
No error related in the log.
How can I uninstall the module?
Thanks.
________________________________
API:
- Gallery 3.0.3
Server:
- Apache 2.2.22
- PHP 5.2.17
- MySQL 5.1.61-community-log
- OS linux x86_64
Posts: 113
After inactivating the module you can just delete its folder under the modules sub-directory in your G3 install.
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.
________________________________
API:
- Gallery 3.0.3
Server:
- Apache 2.2.22
- PHP 5.2.17
- MySQL 5.1.61-community-log
- OS linux x86_64
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.
Posts: 18
Thank you!
________________________________
API:
- Gallery 3.0.3
Server:
- Apache 2.2.22
- PHP 5.2.17
- MySQL 5.1.61-community-log
- OS linux x86_64
Posts: 52
Hi,
Is there a version 3? The one I uploaded shows version 2. Thanks
Posts: 27300
Try again, I uploaded a new version.
I did some minor fixes to work better with the GD theme and some position of the movie duration if you have ffmpeg installed.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 52
Thank you.
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
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 27300
edit the image block view file to look like:
Not tested much
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
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:
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: