4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Requests & Discussions) => Topic started by: live@ct on June 30, 2006, 04:53:02 AM
-
I like to add videos from google, how can I made the tamplate ?!?!?!
thanks for your help!!
-
There is a problem with google addresses, they are longer then 255 characters, so they might not work in 4images :(
-
You could download the file from google and add it to your site
-
There is a problem with google addresses, they are longer then 255 characters, so they might not work in 4images :(
there is a way :idea:
movie id is only several characters long
we need only save movie id to DB and later in code add automaticaly whole embed code with constans width and hight
<embed style="width:400px; height:326px;" id="VideoPlayback" align="middle" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=-here_movie_id" allowScriptAccess="sameDomain" quality="best" bgcolor="#ffffff" scale="noScale" salign="TL" FlashVars="playerMode=embedded"> </embed>
-
There is a problem with google addresses, they are longer then 255 characters, so they might not work in 4images :(
there is a way :idea:
movie id is only several characters long
we need only save movie id to DB and later in code add automaticaly whole embed code with constans width and hight
<embed style="width:400px; height:326px;" id="VideoPlayback" align="middle" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=-here_movie_id" allowScriptAccess="sameDomain" quality="best" bgcolor="#ffffff" scale="noScale" salign="TL" FlashVars="playerMode=embedded"> </embed>
you could do something like this:
add google_id to your 4images_images sql table. And add {google_id} where you want to show the ID. The only problem I can't figure out is how to allow {google_id} in the media template
-
(http://www.bran.dk/google_test.jpg) :wink:
It works BUT nothing really coded, just used some work arounds :)
-
Can u write all template code?
-
It's no template code :(
Open: your theme/details.html
Find {image}
Add before (or after)
{if google_id}<embed style="width:400px; height:326px;" id="VideoPlayback" align="middle" type="application/x-shockwave-flash" src="http://video.google.com/googleplayer.swf?docId=-{google_id}" allowScriptAccess="sameDomain" quality="best" bgcolor="#ffffff" scale="noScale" salign="TL" FlashVars="playerMode=embedded"> </embed>{endif google_id}
add:
google_id to your 4images_images (mysql)
Add:
$additional_image_fields['google_id'] = array($lang['google_video'], "text", 0);
to db_field_definitions.php
Now upload this image http://www.bran.dk/google_video.gif (right click save as) to your 4image site.
When you have done that. Click edit image and add the google ID video in the last field. Click save check if it is working.
You can add some text to your language file, so it says what the field is when you edit the image.
And you could propely also add something to the upload template so you don't have to add the ID via edit.
-
Guys, you dont need to add any fields in the database, just use it as remote image and at the end of the url add: &.swf thats all.
-
Guys, you dont need to add any fields in the database, just use it as remote image and at the end of the url add: &.swf thats all.
Can u explain how to make it and what to change? im bad on english :roll:
-
just add it at the end of the google video url, like so: [qcode]http://video.google.com/googleplayer.swf?docId=here_movie_id&.swf[/qcode]
This way 4images will think this is a flash file and will use swf.html template
-
Thanks, its working :D
-
Just one thing... when im adding thumbnail, it saves "googleplayer.swf?docID=-MOVIE_ID&.jpg" name... and dont show it. :oops:
-
well, you could still use my workaround. It does not really slow down the site or anything :)
-
there are many changes needs to be done...
In includes/functions.php at the end, above closing ?> insert:function _basename($text)
{
if (stristr(PHP_OS, "WIN")) $text = str_replace("\\", "/", $text);
$name = substr(strrchr($text,"/"), 1);
$name = ($name) ? $name : $text;
ereg("(.+)\?(.+)", $name, $regs);
return ($regs[1]) ? $regs[1] : $name;
}
Then search for basename in that file, member.php and admin/images.php and replace all instances with _basename (make sure you dont replace the new function _basename to __basename ;))
-
I made the changes but it showme a file not found in all the gallery images! 8O
what im doing wrong?!
-
omg...what's wrong with me...I posted a wrong function...post updated, sorry about that.
-
v@no
I made the changes but nothing happend the swf or video files didnt show, it show a blanc box
:?: :?: :?: :?:
-
Now I get this error
Template Error: Couldn't open Template ./templates/default/media/.html
-
Now I get this error
Template Error: Couldn't open Template ./templates/default/media/.html
Same problem with mine. It must have something to do with the thumbnail display on index under "new images" since it happes in the thumnail view..
How do we fix it?
EDIT:
OK, I copied swf.html and uploaded a copy as .html (blank.html) so it works, the home page and thumbs work, however when I click on it, it doesn't display anything. Is there any other way of adding google video to the 4images :(
-
Is there any other way of adding google video to the 4images :(
http://www.4homepages.de/forum/index.php?topic=13557.0
-
Yeah but that's pretty complicated for a simple task. I thought V@no's description above was pretty easy and straight forward, but I assume google changed their structure so now it doesn't let you use the &.swf to use them as flash? :(