[Embed Video] A simple module to embed youtube, google, or remote .flv videos
Barbrousse
Joined: 2007-05-22
Posts: 168
Posted: Mon, 2007-11-26 13:20
Hello,
In next version, could you replace for Dailymotion, in ItemAddEmbedVideo.inc:
preg_match('/<meta name="description" content="(.+?)" \/>/i', $contents, $matches);
with preg_match('/<div class="description foreground">(.+?)<\/div>/i', $contents, $matches); (Warning : 2 spaces between "description" and "foreground")
line 564
to have a better description field.
and
$title=$matches[1];
with $title=htmlentities($matches[1], ENT_QUOTES, "UTF-8");
line 569
to handle special characters (accents) correctly.
Thank you!
Barbrousse
apippin
Joined: 2007-06-11
Posts: 190
Posted: Mon, 2007-11-26 14:55
Barbrousse wrote:
Hello,
In next version, could you replace for Dailymotion, in ItemAddEmbedVideo.inc:
...
Sure thing. I'm just a day or two away from making another release, so this is well timed. Thanks for taking the time to figure out what code was needed to solve your problem with dailymotion, and for passing that along to me to get into the code base! Appreciated...
apippin
Joined: 2007-06-11
Posts: 190
Posted: Thu, 2007-11-29 05:58
I've just released a new version of embedvideo, version 1.0.8, and have attached it here.
Here are the release notes for 1.0.8:
- Added support for StickAm embedded videos
- Added support for Myspace embedded videos
- Added new wordwrap parameters for summary and description fields
- Added special character handling in titles of dailymotion videos
- Cleaned up description field parsing of dailymotion videos
apippin
Joined: 2007-06-11
Posts: 190
Posted: Thu, 2007-11-29 06:03
maffew12 wrote:
good god.. my random validation code to register was "mumsex"
..anyway!
great little module!
i just started with it, version 1.0.7
i want to edit the descriptions, but when i do the commenting fix on line 859 of the utilities class file, my gallery breaks instantly. just blank white pages. i take out the comment, and it's back. any idea what i'm doing wrong?
upgraded gallery just the other day - 2.2. raw HTML is enabled.
I'm not sure why you are having trouble. My line 859 of the GalleryUtilities.class looks like this:
Error Detail -
Error (ERROR_STORAGE_FAILURE) : Unable to copy thumbnail from url: -
* in modules/embedvideo/ItemAddEmbedVideo.inc at line 941 (gallerycoreapi::error)
* in modules/core/ItemAdd.inc at line 84 (itemaddembedvideo::handlerequest)
* in main.php at line 231 (itemaddcontroller::handlerequest)
* in main.php at line 94
* in main.php at line 83
ihave added youtube develpoers id
and installed module but problem is present???
Error Detail -
Error (ERROR_STORAGE_FAILURE) : Unable to copy thumbnail from url: -
* in modules/embedvideo/ItemAddEmbedVideo.inc at line 941 (gallerycoreapi::error)
* in modules/core/ItemAdd.inc at line 84 (itemaddembedvideo::handlerequest)
* in main.php at line 231 (itemaddcontroller::handlerequest)
* in main.php at line 94
* in main.php at line 83
ihave added youtube develpoers id
and installed module but problem is present???
I was able to add this youtube video with no problem. My guess is that your youtube developer id is not working for some reason, and the module is unable to get the video information from youtube properly. To get more insight on what the module is doing, you can follow the debug steps on the codex page for this module: http://codex.gallery2.org/Gallery2:Modules:embedvideo under the "What if it doesn't work, or I get an error?" section. With the latest version of the module, it is also possible to leave the youtubeDeveloperId blank in the module. It knows how to extract video information from youtube without this developer id now. You can also give that a try.
maffew12
Joined: 2007-11-18
Posts: 3
Posted: Tue, 2007-12-18 16:01
thanks, apippin, i figured it out.
i'm wondering if anyone has figured out how to use a different flash player for local videos in gallery? the one that comes with gallery i find is quite bad.
before i put in your excellent module can you confirm my understanding that embedding youtube vids this way means that i dont increase my bandwidth useage?
Thanks
iain
apippin
Joined: 2007-06-11
Posts: 190
Posted: Mon, 2007-12-24 16:09
iain sherriff wrote:
before i put in your excellent module can you confirm my understanding that embedding youtube vids this way means that i dont increase my bandwidth useage?
That is correct. Your bandwidth will not be used to stream the video. The only bandwidth required on your end is the bandwidth necessary to serve up the gallery2 interface to the remote web browser. All video content will be sent directly from the video hosting site to the remote web browser without going through your server, or using any of your bandwidth. That's the beauty of it!
iain sherriff
Joined: 2007-12-19
Posts: 6
Posted: Mon, 2007-12-24 17:58
thanks.............
nautiboy
Joined: 2007-04-20
Posts: 42
Posted: Wed, 2007-12-26 18:44
Hi, I'm trying to get this module to work and it looks like it's "mostly" working but not entirely. When I import a youtube video, it gets the description, title, creates the thumbnail, etc. and all looks good. However when I go to view it, I only get a static image, no video. Looking at the html source for the page it looks like not all of the description is getting outputted. In particular, this is what actually gets output:
"<p class="giDescription">
<param value="http://www.youtube.com/v/sSj7Zu-eWBs&autoplay=1&rel=0"></param><param value="transparent"></param><br />A most enjoyable dive at Pt Lobos, California. Visibility was up to 80 feet. Great time, great buddy, great location and first time doing video while scooter...
</p>"
However if you go to the "edit photo" page and look at the description, there's more there:
"<object width='320' height='240'><param name='movie' value='http://www.youtube.com/v/sSj7Zu-eWBs&autoplay=1&rel=0'></param><param name='wmode' value='transparent'></param><embed src='http://www.youtube.com/v/sSj7Zu-eWBs&autoplay=1&rel=0' type='application/x-shockwave-flash' wmode='transparent' width='320' height='240'></embed></object><br>A most enjoyable dive at Pt Lobos, California. Visibility was up to 80 feet. Great time, great buddy, great location and first time doing video while scooter..."
So it looks like the <object> and <embed> tags are getting stripped, which of course is why it's not showing any video. Any ideas why they'd be getting stripped? In case it helps, I'm running gallery 2.2.4 with a modified version of the floatrix theme.
My guess is it's something in the theme that's doing it, but I'm not sure what. Looking at the photo.tpl, it looks like it's just dumping the description:
BTW, I just tried the standard Matrix theme and that has the same problem. I wonder if this is an issue with the 2.2.4 release, since that's a "security" release? Maybe embedding objects in descriptions was considered a security hole?
nautiboy
Joined: 2007-04-20
Posts: 42
Posted: Wed, 2007-12-26 20:22
Just as an FYI, I tried doing the GalleryUtilities.class edit and that fixed the problem. I had been under the impression that that change was only necessary if you wanted to edit the information. But at least in my case, it's necessary for it to work at all.
Is anyone considering doing the work necessary to make it so that this module is no longer a "hack" (using the description field) and making embedded video an actual item type?
nicks0r
Joined: 2008-01-05
Posts: 3
Posted: Sat, 2008-01-05 21:17
Having trouble importing a google video, I'm in the debug mode, it seems to get the video/create thumbnail but then error's out:
Database Error
An error has occurred while interacting with the database.
The exact nature of database errors is not captured unless Gallery debug mode is enabled in config.php. Before seeking support for this error please enable buffered debug output and retry the operation. Look near the bottom of the lengthy debug output to find error details.
Back to the Gallery
Error Detail -
Error (ERROR_STORAGE_FAILURE) : Unable to copy watermark image from url: gallery/modules/embedvideo/images/G2video_watermark1.png - HTTP/1.1 401 Authorization Required
* in modules/embedvideo/ItemAddEmbedVideo.inc at line 1067 (GalleryCoreApi::error)
* in modules/core/ItemAdd.inc at line 84 (ItemAddEmbedVideo::handleRequest)
* in main.php at line 231 (ItemAddController::handleRequest)
* in main.php at line 94
* in main.php at line 83
apippin
Joined: 2007-06-11
Posts: 190
Posted: Sun, 2008-01-06 15:06
nicks0r wrote:
Having trouble importing a google video, I'm in the debug mode, it seems to get the video/create thumbnail but then error's out:
...
Error (ERROR_STORAGE_FAILURE) : Unable to copy watermark image from url: gallery/modules/embedvideo/images/G2video_watermark1.png - HTTP/1.1 401 Authorization Required
...
I believe your problem lies in the watermarkImage option. The default value for this option is "modules/embedvideo/images/G2video_watermark1.png". However, in your error output I see it set to the following "gallery/modules/embedvideo/images/G2video_watermark1.png". You can see the subtle difference of your path starting with "gallery/" and mine starting with "modules/". The value the "watermarkImage" has to be a full URL or a full path. My script will take the value of the gallery root url as given by "$gallery2_url = $urlGenerator->getCurrentUrlDir();" and append it to the front of the path I show above. This provides a full URL path that can be used to download the watermark. In your case, you aren't providing a URL, so the script will expect it to be a full path. However, you do not have a full path, hence the error. The embedvideo script is expecting a full path from root (a path starting with "/"). If you change your watermarkImage option to be a full path or a full URL, everything should work fine. If you haven't overridden or set this option, then the "urlGenerator->getCurrentUrlDir();" call in the module is not returning the right thing for you for some unknown reason. Since I can't reproduce this on my end (my call to that method works just fine, returning a URL path to the gallery installation), you'll have to play with it in the code on your end to track it down. Let me know what you find out.
apippin
Joined: 2007-06-11
Posts: 190
Posted: Sun, 2008-01-06 15:12
nautiboy wrote:
Just as an FYI, I tried doing the GalleryUtilities.class edit and that fixed the problem. I had been under the impression that that change was only necessary if you wanted to edit the information. But at least in my case, it's necessary for it to work at all.
Is anyone considering doing the work necessary to make it so that this module is no longer a "hack" (using the description field) and making embedded video an actual item type?
Thanks for the update on needing to edit the GalleryUtilities.class file to even "add" the video. That behavior definitely sounds different than in previous versions of Gallery where it was only needed to "edit". I've wanted to do the work for some time to remove the "hack" of using the description field. Time has not permitted me to do so. I've been able to service bug fixes and small enhancement requests, but not the major changeover. I'm open to help from anyone who is willing to help with this conversion. I too hope to get to it at some point, but am willing to work with others on this changeover as well.
nicks0r
Joined: 2008-01-05
Posts: 3
Posted: Sun, 2008-01-06 19:46
Quote:
I believe your problem lies in the watermarkImage option. The default value for this option is "modules/embedvideo/images/G2video_watermark1.png". However, in your error output I see it set to the following "gallery/modules/embedvideo/images/G2video_watermark1.png". You can see the subtle difference of your path starting with "gallery/" and mine starting with "modules/". The value the "watermarkImage" has to be a full URL or a full path. My script will take the value of the gallery root url as given by "$gallery2_url = $urlGenerator->getCurrentUrlDir();" and append it to the front of the path I show above. This provides a full URL path that can be used to download the watermark. In your case, you aren't providing a URL, so the script will expect it to be a full path. However, you do not have a full path, hence the error. The embedvideo script is expecting a full path from root (a path starting with "/"). If you change your watermarkImage option to be a full path or a full URL, everything should work fine. If you haven't overridden or set this option, then the "urlGenerator->getCurrentUrlDir();" call in the module is not returning the right thing for you for some unknown reason. Since I can't reproduce this on my end (my call to that method works just fine, returning a URL path to the gallery installation), you'll have to play with it in the code on your end to track it down. Let me know what you find out.
Hey man I apologize I manipulated that line not to reveal my url; Sorry to waste your time by doing that, here is where I am at:
I have gallery in debug mode and get this:
Notice: Undefined variable: requestBody in /home/mysite/public_html/www/mysite/gallery/modules/embedvideo/ItemAddEmbedVideo.inc on line 1253
Warning: Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/www/mysite/gallery/modules/embedvideo/ItemAddEmbedVideo.inc:46) in /home/mysite/public_html/www/mysite/gallery/modules/core/classes/GalleryPhpVm.class on line 142
-------- From here i went in and modified the function calling out "requestBody" and put:
function fetchWebFileHeaders($url, $requestHeaders=array()) {
global $gallery, $requestBody;
This did change the error output but still didn't solve the problem.
This did change the error output but still didn't solve the problem.
I pasted the full debug output here: http://rafb.net/p/Bk6DQE91.html
...
Error (ERROR_STORAGE_FAILURE) : Unable to copy watermark image from url: http://mysite/gallery/modules/embedvideo/images/G2video_watermark1.png - HTTP/1.1 401 Authorization Required
...
Thanks for your followup. I'm glad to know you DID change the variable, it certainly explains the root cause of your failure. Also, thanks for pointing out those 2 "Notice: Undefined variable:" messages. My PHP or apache must not be as strict about reporting those, so they went unnoticed. I've modified the module in a similiar fashion to eliminate those. As for your current error, I think you are closer than you think! If you try to navigate to the URL it is trying to get the watermark from:
You'll see why the embedvideo module is failing. You must be able to get to the URL without any authentication in your own web browser for the embedvideo to have a shot at doing the same thing. The URL gallery is returning is "http://mysite/gallery". It looks like you have an unconfigured variable somewhere in your gallery installation that is still set generically to "mysite". If you find that and fix that, you should be in business, having a correct URL path to work with at that point.
nicks0r
Joined: 2008-01-05
Posts: 3
Posted: Tue, 2008-01-08 00:01
Okay strike 2 on me I guess, I actually changed my toplevel url to 'mysite' ;/
BUT - your comments actually did help me figure this out, as is the case typically this was a lot easier than I made it out to be. I am protecting the gallery w/ .htaccess so when the script accesses the url associated with the watermark file it of course can't get to it.
Couple of thoughts, would it make sense to perform these functions server side if it's possible to avoid such issues? If the result is the same I don't see why not. Otherwise I was thinking of dropping this file into a public www directory and changing the url within the module - this isn't ideal and I am thinking what other functions rely on this? Am I opening a can of worms here? I don't have time to mess around with it right now, but just wanted to let you know this is solved.
In the meantime I just took off the .htaccess to add the files I need for now.
Thanks for your work here this is very useful for me.
apippin
Joined: 2007-06-11
Posts: 190
Posted: Tue, 2008-01-08 01:10
nicks0r wrote:
Couple of thoughts, would it make sense to perform these functions server side if it's possible to avoid such issues? If the result is the same I don't see why not. ... Am I opening a can of worms here? ...
In your case, I think it does make sense to utilize the internal path option of configuring this variable. By default, it does use the URL path provided by Gallery to obtain a path to the watermark. If you override it to be a full path to the watermark (/path/to/gallery/ style), it should avoid the htaccess altogether. The result is the same either way. I don't think you are opening a can of worms by doing it either way you choose. The watermark and the generic video thumbnails for .flv files that are uploaded use the $gallery2_url variable to form their base path to these files. I chose the URL method of getting these files, but a full path by default vs URL might be a safer to do here overall. I'll look into what I can do to get gallery to tell me its full path to the installation, and avoid the URL access via the gallery URL path altogether by default for these types of internal files.
nautiboy
Joined: 2007-04-20
Posts: 42
Posted: Thu, 2008-01-10 18:48
Does anyone know the right smarty code to put into the photo.tpl template for the theme that can be smart enough not to display the image if you're embedding video? I'm thinking if there's a way to do something like a substr in smarty, and do something like:
{if substr($theme.item.description, 0, 7) === "<object")
{* Then skip displaying the photo *}
I know that the syntax I have up there is wrong for smarty - I'm just giving the general idea. Basically, since all of the "display" happens with the description, the image itself is not only redundant but a bit annoying.
My first attempt was to create a theme that just never displays the image, and use that as my "video" theme and that worked fine. However now I want to be able to have both embedded videos and hosted videos in the same album so that doesn't work.
Ideas?
floridave
Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2008-01-11 04:52
I thought that there was a mod for this module that used JavaScript/DHTML to hide the image and move the movie in its place. I can't seem to find now.
Well, if you find the mod, let me know. In the mean-time I found a solution. I wouldn't necessarily argue it's the best solution, but it works. In the photo.tpl template, around the code that displays the image I put:
Note that if, like me, you are unfamiliar with the truncate syntax, if you don't put the :"" after the 7, then it automatically appends a "...". So truncate:7 would actually yield "<obj..." (because the appended string is included in the string count).
floridave
Joined: 2003-12-22
Posts: 27300
Posted: Fri, 2008-01-11 20:21
Quote:
Note that if, like me, you are unfamiliar with the truncate syntax,
Well, if you find the mod, let me know. In the mean-time I found a solution. I wouldn't necessarily argue it's the best solution, but it works. In the photo.tpl template, around the code that displays the image I put:
Note that if, like me, you are unfamiliar with the truncate syntax, if you don't put the :"" after the 7, then it automatically appends a "...". So truncate:7 would actually yield "<obj..." (because the appended string is included in the string count).
Clever work around! Attached is what I used to move the description into the image area if description starts with "<object".
I had the same failure described by rw712 but for an embeded remote flv. In my case, I have a htaccess protected repertory where gallery2 is. I had resolved this failure without developer ID : i have just written the embedvideo module parameters like this : flvThumbnail=myownthumbnailURL for the flv movie. Note : my own jpg thumbnail for movies is in free repertory out of my htaccess protected file.
But maybe i'd resolved the problem just because i've change the myownthumbnail directory and put it at the root of gallery2.
(sorry for my french-english... and tks a lot to apippin for this great job and support)
archive26
Joined: 2008-01-16
Posts: 10
Posted: Wed, 2008-01-23 10:59
Hye !
To bad that I couldn't have the same forum in french even Barbrousse does a great job for the frenchies like me.
Very happy to be able to use embed video of my little baby ! ;-) Bravo pour ce module !!!!
xlancealotx
Joined: 2007-03-30
Posts: 17
Posted: Mon, 2008-02-11 18:18
Hey guys, so far this module worked well. I read through the post and didn't see one thing so I apologize if it was answered. I have my own server, so I wish to keep the video's local (that and size might be a problem, well, the size of the video's).... anyway, looking at the sample page (http://www.pippins.net/gallery2/v/development/) I see both the .flv files which is the format I will be using.
1st question is the .flv support. I converted a file to .flv, plays fine locally. Moved it up to the server, add item, embed video, put the URL done. I see hte same thumbnail, when I click, it's just a blank white box. (almost seems like something is missing)
2nd is that you have 2 flv players I guess. I like the 1st one (the gallery one), with the grey, etc. Once I get the actual video to play, how to I use that player?
That does it .... still a great thing you have built, so anyone can reply if it's a simple one. . . and it's much appreciated.
Lr
suprsidr
Joined: 2005-04-17
Posts: 8339
Posted: Mon, 2008-02-11 22:34
Gallery has a built-in flashvideo module for playing local flvs.
Just upload to your gallery and they should be assigned that renderer if flashvideo module is active
That was it. Didn't think I needed a 'flash' module for the flv, but it worked like a charm. Thanks for the help.
megahappyman
Joined: 2008-02-13
Posts: 1
Posted: Wed, 2008-02-13 22:12
Hello,
first thank for this awesome module!
But i have a problem for editing a embedvideo even if i have modified the GalleryUtilities.class like you said. Video keep desappearing when i edit it.
Help!
spyro
Joined: 2008-02-14
Posts: 2
Posted: Thu, 2008-02-14 16:42
Dito. I've got the same problem. If I go to edit the "photo" (I mean the video) and press submit the changes...well...even if I didn't changed one thing...the result is, that the video is gone and you can only see the code.
I think it's a very good module and if you know of the bug you simply don't have to save the changes...But to me its still weird, that you don't change one thing and it seems that you DID change one thing, because the output changes.
If this problem can be solved by a few changes in the code then please let me/us know about it.
By the way: You said you would change the hack, that it won't use the description-field for the code any longer...Could you tell me/us, if we have to wait a long time till the change?
I'm looking forward to it =)
The new user -> spYro ^^
apippin
Joined: 2007-06-11
Posts: 190
Posted: Fri, 2008-02-15 03:41
megahappyman & spyro:
I'm unable to reproduce what you are describing on my end. However, when I didn't have the right "patch" modifications made, I got the exact behavior you are describing. Please make sure you have done the following:
1) comment out line 859 in modules/core/classes/GalleryUtilities.class like this: /* $html = $parser->parse($html); */
2) You also need to ensure that "Site Admin -> General -> Embedded Markup" is set to "Raw HTML"
I just updated the Codex page for this project with this information. I've followed the 2 steps mentioned above in Gallery 2.2.2 and 2.2.3. I have not tried this in 2.2.4. So, if you have followed the steps above, and are using 2.2.4, perhaps you are in new territory. Has anyone else tried this combination with success? If not, I'll need to upgrade my local version to 2.2.4, and figure out how to work around the issue, and update the patch requirements appropriately.
As for getting rid of the hack, oh yes, how I long to do that! My best estimate for doing the whole rewrite will be this summer. Unfortunatley, I don't have a good block of time to devote to it until then. So, hang in there! I am happy to accept help from others who are willing to lend a hand in the meantime...
spyro
Joined: 2008-02-14
Posts: 2
Posted: Fri, 2008-02-15 09:33
O.K. Now it works^^. I simply forgot the 2. Step *burn me*
Thanks anyway
spYro
nautiboy
Joined: 2007-04-20
Posts: 42
Posted: Fri, 2008-02-15 16:46
I'm running 2.2.4. The one thing I've noticed in 2.2.4 is that you need the GalleryUtilities modification for it to work at all, not just so that you can edit/update. Without the GalleryUtilities mod, you end up with the title, description, thumbnail and static image, but you don't get the video.
1st question is the .flv support. I converted a file to .flv, plays fine locally. Moved it up to the server, add item, embed video, put the URL done. I see hte same thumbnail, when I click, it's just a blank white box. (almost seems like something is missing)
2nd is that you have 2 flv players I guess. I like the 1st one (the gallery one), with the grey, etc. Once I get the actual video to play, how to I use that player?
...
embedding the third party player for local files is *exactly* what I am looking to do. How'd you do that, apippin? i find Gallery's included player unusable.
MORCVERT
Joined: 2008-02-17
Posts: 3
Posted: Sun, 2008-02-17 14:10
-------------------------------------------------------------------------
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
--------------------------------------------------------------------------
i am getting this error.. i think this appilication cant find our db .. but gallery2 can find our db i can upload image but when i clicked add embedvideo button i am getting this error what must i do ? please help
apippin
Joined: 2007-06-11
Posts: 190
Posted: Mon, 2008-02-18 14:16
nautiboy wrote:
I'm running 2.2.4. The one thing I've noticed in 2.2.4 is that you need the GalleryUtilities modification for it to work at all, not just so that you can edit/update. Without the GalleryUtilities mod, you end up with the title, description, thumbnail and static image, but you don't get the video.
Thanks for that insight. I've updated the codex page with this information.
apippin
Joined: 2007-06-11
Posts: 190
Posted: Mon, 2008-02-18 14:21
MORCVERT wrote:
-------------------------------------------------------------------------
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
--------------------------------------------------------------------------
i am getting this error.. i think this appilication cant find our db .. but gallery2 can find our db i can upload image but when i clicked add embedvideo button i am getting this error what must i do ? please help
I doubt this is a database problem. In fact, there must be a configuration issue on your server related to this module, vs a problem with the module itself. You'll need to look in the error logs for your webserver to see exactly what is amiss in your web server configuration for this module. Hopefully, whatever you find in those log files will point you to the problem.
apippin
Joined: 2007-06-11
Posts: 190
Posted: Mon, 2008-02-18 15:08
maffew12 wrote:
embedding the third party player for local files is *exactly* what I am looking to do. How'd you do that, apippin? i find Gallery's included player unusable.
I've never described this process before, so your question is a good one. Here's how I did the 3rd party flv player example that you saw on my development page:
1) Set useInternalFlvPlayer=false
2) Set externalFlvPlayer=<Full URL path to external_flv_player.swf file>
3) Set externalFlvPlayerVars=<flashvars= options for external flash player>
4) Add a .flv file, and it should be played back using the externalFlv player defined above instead of the internal player.
For my website, I set the variables to the above variables to the following values to get it to work right:
useInternalFlvPlayer=false
externalFlvPlayer=http://www.pippins.net/flvplayer.swf (you can download this .swf file, and store it on your own server)
externalFlvPlayerVars=autostart=true&showfsbutton=true&repeat=false&lightcolor=0x9999FF&backcolor=0x888888&frontcolor=0x000000
iain sherriff
Joined: 2007-12-19
Posts: 6
Posted: Mon, 2008-02-18 17:43
Quote:
There is an Admin Option page for this module that allows you to configure various options, including adding your own youtube Developer ID if you are embedding youtube URLs.
I cant find this page ........... [embarrasing!]
help
MORCVERT
Joined: 2008-02-17
Posts: 3
Posted: Mon, 2008-02-18 18:40
hi again i solved problem thanks for that but i have new problem i am getting this problem
Platform Error
An error has occurred while interacting with the platform.
The exact nature of the platform error is unknown. A common cause are insufficient file system permissions. This can happen if you or your webhost changed something in the file system, e.g. by restoring data from a backup.
Back to the Gallery
Error Detail -
Error (ERROR_TOOLKIT_FAILURE, ERROR_PLATFORM_FAILURE)
* in modules\gd\classes\GdFunctionality.class at line 213 (gallerycoreapi::error)
* in modules\gd\classes\GdFunctionality.class at line 273 (gdfunctionality::checkresource)
* in modules\gd\classes\GdToolkit.class at line 452 (gdfunctionality::imagecreatefrompng)
* in modules\gd\classes\GdToolkit.class at line 352 (gdtoolkit::_getimageresource)
* in modules\embedvideo\ItemAddEmbedVideo.inc at line 1139 (gdtoolkit::performoperation)
* in modules\core\ItemAdd.inc at line 84 (itemaddembedvideo::handlerequest)
* in main.php at line 231 (itemaddcontroller::handlerequest)
* in main.php at line 94
* in main.php at line 83
and the system information
System Information
Gallery version 2.2.4
PHP version 4.4.7 cgi-fcgi
Webserver Microsoft-IIS/6.0
Database mysqlt 5.0.37-community-nt
Toolkits Thumbnail, SquareThumb, Gd
Operating system Windows NT WIN2003-FD8A87F 5.2 build 3790
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12
apippin
Joined: 2007-06-11
Posts: 190
Posted: Mon, 2008-02-18 21:34
iain sherriff wrote:
Quote:
There is an Admin Option page for this module that allows you to configure various options, including adding your own youtube Developer ID if you are embedding youtube URLs.
I cant find this page ........... [embarrasing!]
help
Yes, that is a little embarrasing! It's really quite simple to find:
1) Click Site Admin
2) Look down left hand side of the screen called "Admin Options"
3) Look down under the "Import" heading
4) Click on the "Embed Video" link
apippin
Joined: 2007-06-11
Posts: 190
Posted: Mon, 2008-02-18 21:41
MORCVERT wrote:
hi again i solved problem thanks for that but i have new problem i am getting this problem
Platform Error
...
You do have a problem here. I don't know how to solve it for you. I can tell you what the EmbedVideo module is trying to do here, but I'll leave it in your hands to find the ultimate solution to your problem. In modules\embedvideo\ItemAddEmbedVideo.inc at line 1139, it is trying to perform a gdtoolkit operation. Specifically, it is trying to add a video watermark to the thumbnail. This watermark is what causes a thumbnail to look like a "video" thumbnail instead of a normal picture thumbnail. It's obviously having a problem doing this for some reason. Since I simply make calls into the gallery2 API, I don't know how to help you any further with the error it is experiencing. The code shouldn't even execute that line unless it can find a valid gallery toolkit installed that it can make a call to. Good luck!
nautiboy
Joined: 2007-04-20
Posts: 42
Posted: Mon, 2008-02-18 22:13
MORCVERT wrote:
* in modules\gd\classes\GdFunctionality.class at line 213 (gallerycoreapi::error)
This is the line in Gd that's failing for you:
if (!$this->isValidFile($filename))
Going higher in the callstack, it looks like the file in this case is the png image used as the watermark overlay. So you might want to check and make sure the file is there and has proper permissions, etc. (note that it's the png version of the file that it's trying to use)
If I recall, I had a similar problem on one of my installations. I started off "fixing" it by just disabling the watermarking, which you can do from the admin section for embed video. There's a watermarkVideos variable that you can set to false. If you don't care about the watermarking, this is probably the easiest fix.
I don't remember if I figured out exactly what Gd was unhappy about, I vaguely recall that for whatever reason the path to the watermark image ended up being incorrect for my installation. You might also try switching to a different image toolkit. Personally I primarily use the NetPBM toolkit.
apippin
Joined: 2007-06-11
Posts: 190
Posted: Tue, 2008-02-19 07:33
nautiboy wrote:
I don't remember if I figured out exactly what Gd was unhappy about, I vaguely recall that for whatever reason the path to the watermark image ended up being incorrect for my installation. You might also try switching to a different image toolkit. Personally I primarily use the NetPBM toolkit.
Thanks for your insight. I appreciate you taking the time to answer this question. I've never seen this failure on my end, so I didn't have any insight to offer. Your explanation makes sense, and walking the call stack agrees with your analysis. If any of you find another way for the embedvideo module to provide the toolkit with the path to the watermark, please let me know. The code that is in there should work in most installations. However, if there are exceptions, you can play around with the code in the ItemAddEmbedVideo.inc file around line 1115. You'll see I had to modify the watermark path in an attempt to hand the toolkit the right kind of path to the watermark. There's a chance this code isn't portable in all installations. Let me know if you try something else there that works, or find the problem with the code that is there today to do this. On a side note, I should have a similar "file exists" check on the final watermark image prior to calling the toolkit to catch the error sooner (if this is possible) and print a more readable, easier to debug, error message about it. In any case, your proposed workarounds appear sound.
nautiboy
Joined: 2007-04-20
Posts: 42
Posted: Tue, 2008-02-19 08:10
apippin wrote:
However, if there are exceptions, you can play around with the code in the ItemAddEmbedVideo.inc file around line 1115. You'll see I had to modify the watermark path in an attempt to hand the toolkit the right kind of path to the watermark.
Looking at the config info the poster included, he's running Microsoft IIS on NT. Maybe there's an issue with the forward vs backward slashes. I've never used IIS so I don't know how well it handles it. Your code looks like it's geared toward forward slashes.
I suppose something else the poster might try is to turn on debugging in the embed video module by setting the debugOutput variable to true. I see in the ItemAddEmbedVideo.inc file that it will print out the path to the watermark image, as well as other information, which might give some clue as to what's wrong.
iain sherriff
Joined: 2007-12-19
Posts: 6
Posted: Tue, 2008-02-19 14:19
thankyou............ [more embarassed now!]
You can tell my level of skill from the request I made!
BUT it is working now
initially the debug told me the youtube devid was invalid [dont know why] but when i left it blank [as you suggested to someone else] all was OK.
If I can do it it must be "simple" as you said in your first post
thankyou...........
eyalw
Joined: 2008-02-20
Posts: 5
Posted: Thu, 2008-02-28 13:56
Hey,
I have a small problem.
when I embed a .flv file from my server to my gallery it always comes out in 170X150.
but when i embed it in debug mode, it comes at the size I want.
what am I doing wrong?
Posts: 168
Hello,
In next version, could you replace for Dailymotion, in ItemAddEmbedVideo.inc:
preg_match('/<meta name="description" content="(.+?)" \/>/i', $contents, $matches);
with
preg_match('/<div class="description foreground">(.+?)<\/div>/i', $contents, $matches);
(Warning : 2 spaces between "description" and "foreground")line 564
to have a better description field.
and
$title=$matches[1];
with
$title=htmlentities($matches[1], ENT_QUOTES, "UTF-8");
line 569
to handle special characters (accents) correctly.
Thank you!
Barbrousse
Posts: 190
Sure thing. I'm just a day or two away from making another release, so this is well timed. Thanks for taking the time to figure out what code was needed to solve your problem with dailymotion, and for passing that along to me to get into the code base! Appreciated...
Posts: 190
I've just released a new version of embedvideo, version 1.0.8, and have attached it here.
Here are the release notes for 1.0.8:
- Added support for StickAm embedded videos
- Added support for Myspace embedded videos
- Added new wordwrap parameters for summary and description fields
- Added special character handling in titles of dailymotion videos
- Cleaned up description field parsing of dailymotion videos
Posts: 190
I'm not sure why you are having trouble. My line 859 of the GalleryUtilities.class looks like this:
/* $html = $parser->parse($html); */
And that is working great for me...
Posts: 154
I have select 'raw html' in the 'configuration gallery' and the module work perfectly http://www.alefoto.it/v/corso+alpinismo/nodi+imbragatura+corda/ .
For safety and others reasons I would want select bbcode.
Any solutions for select 'raw html' only for one album?
This is my suggestion to add in photo.tpl
{if $theme.parent.title == 'testnobbcode'} {literal} {$theme.item.description|nomarkup} {/literal} {/if}
I take this in http://gallery.menalto.com/node/70908
Posts: 1
Error Detail -
Error (ERROR_STORAGE_FAILURE) : Unable to copy thumbnail from url: -
* in modules/embedvideo/ItemAddEmbedVideo.inc at line 941 (gallerycoreapi::error)
* in modules/core/ItemAdd.inc at line 84 (itemaddembedvideo::handlerequest)
* in main.php at line 231 (itemaddcontroller::handlerequest)
* in main.php at line 94
* in main.php at line 83
ihave added youtube develpoers id
and installed module but problem is present???
http://www.youtube.com/watch?v=a71gPzjBZFY
was adding this
Posts: 190
I was able to add this youtube video with no problem. My guess is that your youtube developer id is not working for some reason, and the module is unable to get the video information from youtube properly. To get more insight on what the module is doing, you can follow the debug steps on the codex page for this module: http://codex.gallery2.org/Gallery2:Modules:embedvideo under the "What if it doesn't work, or I get an error?" section. With the latest version of the module, it is also possible to leave the youtubeDeveloperId blank in the module. It knows how to extract video information from youtube without this developer id now. You can also give that a try.
Posts: 3
thanks, apippin, i figured it out.
i'm wondering if anyone has figured out how to use a different flash player for local videos in gallery? the one that comes with gallery i find is quite bad.
i would love to use the JW FLV player in my gallery - http://www.jeroenwijering.com/?item=JW_FLV_Player
anybody know how that might be done?
Posts: 6
before i put in your excellent module can you confirm my understanding that embedding youtube vids this way means that i dont increase my bandwidth useage?
Thanks
iain
Posts: 190
That is correct. Your bandwidth will not be used to stream the video. The only bandwidth required on your end is the bandwidth necessary to serve up the gallery2 interface to the remote web browser. All video content will be sent directly from the video hosting site to the remote web browser without going through your server, or using any of your bandwidth. That's the beauty of it!
Posts: 6
thanks.............
Posts: 42
Hi, I'm trying to get this module to work and it looks like it's "mostly" working but not entirely. When I import a youtube video, it gets the description, title, creates the thumbnail, etc. and all looks good. However when I go to view it, I only get a static image, no video. Looking at the html source for the page it looks like not all of the description is getting outputted. In particular, this is what actually gets output:
"<p class="giDescription">
<param value="http://www.youtube.com/v/sSj7Zu-eWBs&autoplay=1&rel=0"></param><param value="transparent"></param><br />A most enjoyable dive at Pt Lobos, California. Visibility was up to 80 feet. Great time, great buddy, great location and first time doing video while scooter...
</p>"
However if you go to the "edit photo" page and look at the description, there's more there:
"<object width='320' height='240'><param name='movie' value='http://www.youtube.com/v/sSj7Zu-eWBs&autoplay=1&rel=0'></param><param name='wmode' value='transparent'></param><embed src='http://www.youtube.com/v/sSj7Zu-eWBs&autoplay=1&rel=0' type='application/x-shockwave-flash' wmode='transparent' width='320' height='240'></embed></object><br>A most enjoyable dive at Pt Lobos, California. Visibility was up to 80 feet. Great time, great buddy, great location and first time doing video while scooter..."
So it looks like the <object> and <embed> tags are getting stripped, which of course is why it's not showing any video. Any ideas why they'd be getting stripped? In case it helps, I'm running gallery 2.2.4 with a modified version of the floatrix theme.
My guess is it's something in the theme that's doing it, but I'm not sure what. Looking at the photo.tpl, it looks like it's just dumping the description:
" <div class="gbBlock gcBackground1">
<center>
{if !empty($theme.item.title)}
{* <h2> {$theme.item.title|markup} </h2> *}
{/if}
{if !empty($theme.item.description)}
<p class="giDescription">
{$theme.item.description|markup}
</p>
{/if}
"
Posts: 42
BTW, I just tried the standard Matrix theme and that has the same problem. I wonder if this is an issue with the 2.2.4 release, since that's a "security" release? Maybe embedding objects in descriptions was considered a security hole?
Posts: 42
Just as an FYI, I tried doing the GalleryUtilities.class edit and that fixed the problem. I had been under the impression that that change was only necessary if you wanted to edit the information. But at least in my case, it's necessary for it to work at all.
Is anyone considering doing the work necessary to make it so that this module is no longer a "hack" (using the description field) and making embedded video an actual item type?
Posts: 3
Having trouble importing a google video, I'm in the debug mode, it seems to get the video/create thumbnail but then error's out:
Database Error
An error has occurred while interacting with the database.
The exact nature of database errors is not captured unless Gallery debug mode is enabled in config.php. Before seeking support for this error please enable buffered debug output and retry the operation. Look near the bottom of the lengthy debug output to find error details.
Back to the Gallery
Error Detail -
Error (ERROR_STORAGE_FAILURE) : Unable to copy watermark image from url: gallery/modules/embedvideo/images/G2video_watermark1.png - HTTP/1.1 401 Authorization Required
* in modules/embedvideo/ItemAddEmbedVideo.inc at line 1067 (GalleryCoreApi::error)
* in modules/core/ItemAdd.inc at line 84 (ItemAddEmbedVideo::handleRequest)
* in main.php at line 231 (ItemAddController::handleRequest)
* in main.php at line 94
* in main.php at line 83
Posts: 190
I believe your problem lies in the watermarkImage option. The default value for this option is "modules/embedvideo/images/G2video_watermark1.png". However, in your error output I see it set to the following "gallery/modules/embedvideo/images/G2video_watermark1.png". You can see the subtle difference of your path starting with "gallery/" and mine starting with "modules/". The value the "watermarkImage" has to be a full URL or a full path. My script will take the value of the gallery root url as given by "$gallery2_url = $urlGenerator->getCurrentUrlDir();" and append it to the front of the path I show above. This provides a full URL path that can be used to download the watermark. In your case, you aren't providing a URL, so the script will expect it to be a full path. However, you do not have a full path, hence the error. The embedvideo script is expecting a full path from root (a path starting with "/"). If you change your watermarkImage option to be a full path or a full URL, everything should work fine. If you haven't overridden or set this option, then the "urlGenerator->getCurrentUrlDir();" call in the module is not returning the right thing for you for some unknown reason. Since I can't reproduce this on my end (my call to that method works just fine, returning a URL path to the gallery installation), you'll have to play with it in the code on your end to track it down. Let me know what you find out.
Posts: 190
Thanks for the update on needing to edit the GalleryUtilities.class file to even "add" the video. That behavior definitely sounds different than in previous versions of Gallery where it was only needed to "edit". I've wanted to do the work for some time to remove the "hack" of using the description field. Time has not permitted me to do so. I've been able to service bug fixes and small enhancement requests, but not the major changeover. I'm open to help from anyone who is willing to help with this conversion. I too hope to get to it at some point, but am willing to work with others on this changeover as well.
Posts: 3
Hey man I apologize I manipulated that line not to reveal my url; Sorry to waste your time by doing that, here is where I am at:
I have gallery in debug mode and get this:
Notice: Undefined variable: requestBody in /home/mysite/public_html/www/mysite/gallery/modules/embedvideo/ItemAddEmbedVideo.inc on line 1253
Warning: Cannot modify header information - headers already sent by (output started at /home/mysite/public_html/www/mysite/gallery/modules/embedvideo/ItemAddEmbedVideo.inc:46) in /home/mysite/public_html/www/mysite/gallery/modules/core/classes/GalleryPhpVm.class on line 142
-------- From here i went in and modified the function calling out "requestBody" and put:
function fetchWebFileHeaders($url, $requestHeaders=array()) {
global $gallery, $requestBody;
This did change the error output but still didn't solve the problem.
I pasted the full debug output here: http://rafb.net/p/Bk6DQE91.html
Posts: 190
Thanks for your followup. I'm glad to know you DID change the variable, it certainly explains the root cause of your failure. Also, thanks for pointing out those 2 "Notice: Undefined variable:" messages. My PHP or apache must not be as strict about reporting those, so they went unnoticed. I've modified the module in a similiar fashion to eliminate those. As for your current error, I think you are closer than you think! If you try to navigate to the URL it is trying to get the watermark from:
http://mysite/gallery/modules/embedvideo/images/G2video_watermark1.png
You'll see why the embedvideo module is failing. You must be able to get to the URL without any authentication in your own web browser for the embedvideo to have a shot at doing the same thing. The URL gallery is returning is "http://mysite/gallery". It looks like you have an unconfigured variable somewhere in your gallery installation that is still set generically to "mysite". If you find that and fix that, you should be in business, having a correct URL path to work with at that point.
Posts: 3
Okay strike 2 on me I guess, I actually changed my toplevel url to 'mysite' ;/
BUT - your comments actually did help me figure this out, as is the case typically this was a lot easier than I made it out to be. I am protecting the gallery w/ .htaccess so when the script accesses the url associated with the watermark file it of course can't get to it.
Couple of thoughts, would it make sense to perform these functions server side if it's possible to avoid such issues? If the result is the same I don't see why not. Otherwise I was thinking of dropping this file into a public www directory and changing the url within the module - this isn't ideal and I am thinking what other functions rely on this? Am I opening a can of worms here? I don't have time to mess around with it right now, but just wanted to let you know this is solved.
In the meantime I just took off the .htaccess to add the files I need for now.
Thanks for your work here this is very useful for me.
Posts: 190
In your case, I think it does make sense to utilize the internal path option of configuring this variable. By default, it does use the URL path provided by Gallery to obtain a path to the watermark. If you override it to be a full path to the watermark (/path/to/gallery/ style), it should avoid the htaccess altogether. The result is the same either way. I don't think you are opening a can of worms by doing it either way you choose. The watermark and the generic video thumbnails for .flv files that are uploaded use the $gallery2_url variable to form their base path to these files. I chose the URL method of getting these files, but a full path by default vs URL might be a safer to do here overall. I'll look into what I can do to get gallery to tell me its full path to the installation, and avoid the URL access via the gallery URL path altogether by default for these types of internal files.
Posts: 42
Does anyone know the right smarty code to put into the photo.tpl template for the theme that can be smart enough not to display the image if you're embedding video? I'm thinking if there's a way to do something like a substr in smarty, and do something like:
{if substr($theme.item.description, 0, 7) === "<object")
{* Then skip displaying the photo *}
I know that the syntax I have up there is wrong for smarty - I'm just giving the general idea. Basically, since all of the "display" happens with the description, the image itself is not only redundant but a bit annoying.
My first attempt was to create a theme that just never displays the image, and use that as my "video" theme and that worked fine. However now I want to be able to have both embedded videos and hosted videos in the same album so that doesn't work.
Ideas?
Posts: 27300
I thought that there was a mod for this module that used JavaScript/DHTML to hide the image and move the movie in its place. I can't seem to find now.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 42
Well, if you find the mod, let me know. In the mean-time I found a solution. I wouldn't necessarily argue it's the best solution, but it works. In the photo.tpl template, around the code that displays the image I put:
{if $theme.item.description|truncate:7:"" != "<object"}
{* display photo *}
{/if}
Note that if, like me, you are unfamiliar with the truncate syntax, if you don't put the :"" after the 7, then it automatically appends a "...". So truncate:7 would actually yield "<obj..." (because the appended string is included in the string count).
Posts: 27300
http://www.smarty.net/manual/en/language.modifier.truncate.php
I'll post here if I find it.
Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team
Posts: 20
Clever work around! Attached is what I used to move the description into the image area if description starts with "<object".
Not too pretty, but it gets the job done on the Photo page:
http://www.alyandgreg.com/main.php?g2_itemId=6436
Posts: 10
I had the same failure described by rw712 but for an embeded remote flv. In my case, I have a htaccess protected repertory where gallery2 is. I had resolved this failure without developer ID : i have just written the embedvideo module parameters like this : flvThumbnail=myownthumbnailURL for the flv movie. Note : my own jpg thumbnail for movies is in free repertory out of my htaccess protected file.
But maybe i'd resolved the problem just because i've change the myownthumbnail directory and put it at the root of gallery2.
(sorry for my french-english... and tks a lot to apippin for this great job and support)
Posts: 10
Hye !
To bad that I couldn't have the same forum in french even Barbrousse does a great job for the frenchies like me.
Very happy to be able to use embed video of my little baby ! ;-) Bravo pour ce module !!!!
Posts: 17
Hey guys, so far this module worked well. I read through the post and didn't see one thing so I apologize if it was answered. I have my own server, so I wish to keep the video's local (that and size might be a problem, well, the size of the video's).... anyway, looking at the sample page (http://www.pippins.net/gallery2/v/development/) I see both the .flv files which is the format I will be using.
1st question is the .flv support. I converted a file to .flv, plays fine locally. Moved it up to the server, add item, embed video, put the URL done. I see hte same thumbnail, when I click, it's just a blank white box. (almost seems like something is missing)
2nd is that you have 2 flv players I guess. I like the 1st one (the gallery one), with the grey, etc. Once I get the actual video to play, how to I use that player?
That does it .... still a great thing you have built, so anyone can reply if it's a simple one. . . and it's much appreciated.
Lr
Posts: 8339
Gallery has a built-in flashvideo module for playing local flvs.
Just upload to your gallery and they should be assigned that renderer if flashvideo module is active
-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2
Posts: 17
That was it. Didn't think I needed a 'flash' module for the flv, but it worked like a charm. Thanks for the help.
Posts: 1
Hello,
first thank for this awesome module!
But i have a problem for editing a embedvideo even if i have modified the GalleryUtilities.class like you said. Video keep desappearing when i edit it.
Help!
Posts: 2
Dito. I've got the same problem. If I go to edit the "photo" (I mean the video) and press submit the changes...well...even if I didn't changed one thing...the result is, that the video is gone and you can only see the code.
I think it's a very good module and if you know of the bug you simply don't have to save the changes...But to me its still weird, that you don't change one thing and it seems that you DID change one thing, because the output changes.
If this problem can be solved by a few changes in the code then please let me/us know about it.
By the way: You said you would change the hack, that it won't use the description-field for the code any longer...Could you tell me/us, if we have to wait a long time till the change?
I'm looking forward to it =)
The new user -> spYro ^^
Posts: 190
megahappyman & spyro:
I'm unable to reproduce what you are describing on my end. However, when I didn't have the right "patch" modifications made, I got the exact behavior you are describing. Please make sure you have done the following:
1) comment out line 859 in modules/core/classes/GalleryUtilities.class like this: /* $html = $parser->parse($html); */
2) You also need to ensure that "Site Admin -> General -> Embedded Markup" is set to "Raw HTML"
I just updated the Codex page for this project with this information. I've followed the 2 steps mentioned above in Gallery 2.2.2 and 2.2.3. I have not tried this in 2.2.4. So, if you have followed the steps above, and are using 2.2.4, perhaps you are in new territory. Has anyone else tried this combination with success? If not, I'll need to upgrade my local version to 2.2.4, and figure out how to work around the issue, and update the patch requirements appropriately.
As for getting rid of the hack, oh yes, how I long to do that! My best estimate for doing the whole rewrite will be this summer. Unfortunatley, I don't have a good block of time to devote to it until then. So, hang in there! I am happy to accept help from others who are willing to lend a hand in the meantime...
Posts: 2
O.K. Now it works^^. I simply forgot the 2. Step *burn me*
Thanks anyway
spYro
Posts: 42
I'm running 2.2.4. The one thing I've noticed in 2.2.4 is that you need the GalleryUtilities modification for it to work at all, not just so that you can edit/update. Without the GalleryUtilities mod, you end up with the title, description, thumbnail and static image, but you don't get the video.
Posts: 3
embedding the third party player for local files is *exactly* what I am looking to do. How'd you do that, apippin? i find Gallery's included player unusable.
Posts: 3
-------------------------------------------------------------------------
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
--------------------------------------------------------------------------
i am getting this error.. i think this appilication cant find our db .. but gallery2 can find our db i can upload image but when i clicked add embedvideo button i am getting this error what must i do ? please help
Posts: 190
Thanks for that insight. I've updated the codex page with this information.
Posts: 190
I doubt this is a database problem. In fact, there must be a configuration issue on your server related to this module, vs a problem with the module itself. You'll need to look in the error logs for your webserver to see exactly what is amiss in your web server configuration for this module. Hopefully, whatever you find in those log files will point you to the problem.
Posts: 190
I've never described this process before, so your question is a good one. Here's how I did the 3rd party flv player example that you saw on my development page:
1) Set useInternalFlvPlayer=false
2) Set externalFlvPlayer=<Full URL path to external_flv_player.swf file>
3) Set externalFlvPlayerVars=<flashvars= options for external flash player>
4) Add a .flv file, and it should be played back using the externalFlv player defined above instead of the internal player.
For my website, I set the variables to the above variables to the following values to get it to work right:
useInternalFlvPlayer=false
externalFlvPlayer=http://www.pippins.net/flvplayer.swf (you can download this .swf file, and store it on your own server)
externalFlvPlayerVars=autostart=true&showfsbutton=true&repeat=false&lightcolor=0x9999FF&backcolor=0x888888&frontcolor=0x000000
Posts: 6
I cant find this page ........... [embarrasing!]
help
Posts: 3
hi again i solved problem thanks for that but i have new problem i am getting this problem
Platform Error
An error has occurred while interacting with the platform.
The exact nature of the platform error is unknown. A common cause are insufficient file system permissions. This can happen if you or your webhost changed something in the file system, e.g. by restoring data from a backup.
Back to the Gallery
Error Detail -
Error (ERROR_TOOLKIT_FAILURE, ERROR_PLATFORM_FAILURE)
* in modules\gd\classes\GdFunctionality.class at line 213 (gallerycoreapi::error)
* in modules\gd\classes\GdFunctionality.class at line 273 (gdfunctionality::checkresource)
* in modules\gd\classes\GdToolkit.class at line 452 (gdfunctionality::imagecreatefrompng)
* in modules\gd\classes\GdToolkit.class at line 352 (gdtoolkit::_getimageresource)
* in modules\embedvideo\ItemAddEmbedVideo.inc at line 1139 (gdtoolkit::performoperation)
* in modules\core\ItemAdd.inc at line 84 (itemaddembedvideo::handlerequest)
* in main.php at line 231 (itemaddcontroller::handlerequest)
* in main.php at line 94
* in main.php at line 83
and the system information
System Information
Gallery version 2.2.4
PHP version 4.4.7 cgi-fcgi
Webserver Microsoft-IIS/6.0
Database mysqlt 5.0.37-community-nt
Toolkits Thumbnail, SquareThumb, Gd
Operating system Windows NT WIN2003-FD8A87F 5.2 build 3790
Browser Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12
Posts: 190
Yes, that is a little embarrasing! It's really quite simple to find:
1) Click Site Admin
2) Look down left hand side of the screen called "Admin Options"
3) Look down under the "Import" heading
4) Click on the "Embed Video" link
Posts: 190
You do have a problem here. I don't know how to solve it for you. I can tell you what the EmbedVideo module is trying to do here, but I'll leave it in your hands to find the ultimate solution to your problem. In modules\embedvideo\ItemAddEmbedVideo.inc at line 1139, it is trying to perform a gdtoolkit operation. Specifically, it is trying to add a video watermark to the thumbnail. This watermark is what causes a thumbnail to look like a "video" thumbnail instead of a normal picture thumbnail. It's obviously having a problem doing this for some reason. Since I simply make calls into the gallery2 API, I don't know how to help you any further with the error it is experiencing. The code shouldn't even execute that line unless it can find a valid gallery toolkit installed that it can make a call to. Good luck!
Posts: 42
This is the line in Gd that's failing for you:
Going higher in the callstack, it looks like the file in this case is the png image used as the watermark overlay. So you might want to check and make sure the file is there and has proper permissions, etc. (note that it's the png version of the file that it's trying to use)
If I recall, I had a similar problem on one of my installations. I started off "fixing" it by just disabling the watermarking, which you can do from the admin section for embed video. There's a watermarkVideos variable that you can set to false. If you don't care about the watermarking, this is probably the easiest fix.
I don't remember if I figured out exactly what Gd was unhappy about, I vaguely recall that for whatever reason the path to the watermark image ended up being incorrect for my installation. You might also try switching to a different image toolkit. Personally I primarily use the NetPBM toolkit.
Posts: 190
Thanks for your insight. I appreciate you taking the time to answer this question. I've never seen this failure on my end, so I didn't have any insight to offer. Your explanation makes sense, and walking the call stack agrees with your analysis. If any of you find another way for the embedvideo module to provide the toolkit with the path to the watermark, please let me know. The code that is in there should work in most installations. However, if there are exceptions, you can play around with the code in the ItemAddEmbedVideo.inc file around line 1115. You'll see I had to modify the watermark path in an attempt to hand the toolkit the right kind of path to the watermark. There's a chance this code isn't portable in all installations. Let me know if you try something else there that works, or find the problem with the code that is there today to do this. On a side note, I should have a similar "file exists" check on the final watermark image prior to calling the toolkit to catch the error sooner (if this is possible) and print a more readable, easier to debug, error message about it. In any case, your proposed workarounds appear sound.
Posts: 42
Looking at the config info the poster included, he's running Microsoft IIS on NT. Maybe there's an issue with the forward vs backward slashes. I've never used IIS so I don't know how well it handles it. Your code looks like it's geared toward forward slashes.
I suppose something else the poster might try is to turn on debugging in the embed video module by setting the debugOutput variable to true. I see in the ItemAddEmbedVideo.inc file that it will print out the path to the watermark image, as well as other information, which might give some clue as to what's wrong.
Posts: 6
thankyou............ [more embarassed now!]
You can tell my level of skill from the request I made!
BUT it is working now
initially the debug told me the youtube devid was invalid [dont know why] but when i left it blank [as you suggested to someone else] all was OK.
If I can do it it must be "simple" as you said in your first post
thankyou...........
Posts: 5
Hey,
I have a small problem.
when I embed a .flv file from my server to my gallery it always comes out in 170X150.
but when i embed it in debug mode, it comes at the size I want.
what am I doing wrong?