Author Topic: [MOD] Integrar Google VIDEO y YouTube  (Read 182566 times)

0 Members and 2 Guests are viewing this topic.

Offline jaimecb

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
[MOD] Integrar Google VIDEO y YouTube
« on: July 02, 2006, 10:35:33 PM »
Buenas a todos, buscando por ahi he terminado de completar una modificacion para poder integrar los videos de Google Video y de YouTube en 4images:

Archivos a modificar:

template/details.html
includes/db_field_definitions.php

Tambien se ha de modificar la Base de Datos.    http://www.4homepages.de/forum/index.php?action=dlattach;topic=13557.0;id=909

-----------------------

Empezamos con la base de datos:

Subimos video_install.php al raiz de la web y lo ejecutamos   http://yoursite/video_install.php

Vamos ahora con los archivos:

Abrimos db_field_definitions.php:

y al final añadimos: (antes de ?> )

Code: [Select]
$additional_image_fields['google_id'] = array($lang['google_video'], "text", 0);
$additional_image_fields['youtube_id'] = array($lang['youtube_video'], "text", 0);

Abrimos details.html

Detras de {image} añadimos

Code: [Select]
{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}

{if youtube_id}
<object width="476" height="392"><param name="movie" value="http://www.youtube.com/v/{youtube_id}"></param><embed src="http://www.youtube.com/v/{youtube_id}" type="application/x-shockwave-flash" width="476" height="392"></embed></object>
{endif youtube_id}

en lang/spanish/main.php añadimos al final:

Code: [Select]
$lang['google_video'] = "Google ID";
$lang['youtube_video'] = "YouTube ID";

------------------------------
Funcionamiento:

De esta manera obtendremos estos resultados http://www.misimagenes.net/details.php?image_id=992

He añadido los archivos IMAGEN y THUMBAIL como Attachs, para mayor facilidad

Saludos y espero que os parezca interesante esta modificacion. (siento ser un poco complicado explicandome)

www.misimagenes.net


-------------------------------------------------------------------------------------------

Good to all, looking for that way I have finished completing a modification to be able to integrate the videos of Google Video and YouTube in 4images:

Archives to modify:

template/details.html
includes/db_field_definitions.php

Also it is had to modify Base de Datos.   http://www.4homepages.de/forum/index.php?action=dlattach;topic=13557.0;id=909


-----------------------

We began with the data base:

Upload video_install.php to your web site, and execute it.   http://yoursite/video_install.php

We go now with the archives:

We opened db_field_definitions.php:

and in the end we add before ?>
Code: [Select]
$additional_image_fields['google_id'] = array($lang['google_video'], "text", 0);
$additional_image_fields['youtube_id'] = array($lang['youtube_video'], "text", 0);

We opened details.html

Behind {image} we added
Code: [Select]
{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}

{if youtube_id}
<object width="476" height="392"><param name="movie" value="http://www.youtube.com/v/{youtube_id}"></param><embed src="http://www.youtube.com/v/{youtube_id}" type="application/x-shockwave-flash" width="476" height="392" ></embed></object>
{endif youtube_id}

in lang/YOUR_LANGUAJE/main.php we added in the end:

Code: [Select]
$lang['google_video']="Google ID";
$lang ['youtube_video']="YouTube ID";

------------------------------
Operation:

This way we will obtain these http://www.misimagenes.net/details.php?image_id=992 results

I have added to the archives IMAGE and THUMBAIL like Attachs, for greater facility

Greetings and I hope that this modification seems to you interesting. (I feel to be a little complicated explicandome)

www.misimagenes.net
« Last Edit: September 12, 2006, 06:10:56 PM by jaimecb »

Offline benzo

  • Moderator
  • Hero Member
  • *****
  • Posts: 748
  • El que nada duda, nada sabe. :-)
    • View Profile
Re: [MOD] Integrar Google VIDEO y YouTube
« Reply #1 on: July 04, 2006, 09:47:48 AM »
Buen MOD.

Muchas gracias por tu aporte jaimecb.  :D

Recuerda añadirlo en la lista

¡ Antes de actualizar o modificar el script, realiza una copia de seguridad de todos los archivos y datos !

Tenemos una pequeña faq en español, también la faq oficial ( en inglés  ) y un buscador muy hermoso

Offline vodkame

  • Pre-Newbie
  • Posts: 1
    • View Profile
Re: [MOD] Integrar Google VIDEO y YouTube
« Reply #2 on: July 21, 2006, 04:04:49 PM »
Would you be so kind and translate it in ENGLISH  :roll:


Offline masterred

  • Sr. Member
  • ****
  • Posts: 494
    • View Profile
Re: [MOD] Integrar Google VIDEO y YouTube
« Reply #3 on: July 22, 2006, 12:28:36 AM »
hola

como es que puedo pasarlo para mirarlo en la galeria, como poner las urls

http://www.youtube.com/watch?v=flkBxZwtuLA
<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/flkBxZwtuLA"></param><embed src="http://www.youtube.com/v/flkBxZwtuLA" type="application/x-shockwave-flash" width="425" height="350"></embed></object>

gracias
Apache/2.2.21 (Win32)
PHP/5.3.5
Mysql Version: 5.5.19
4images Version: 1.7.?



Offline adizlaja

  • Newbie
  • *
  • Posts: 31
    • View Profile
Re: [MOD] Integrar Google VIDEO y YouTube
« Reply #4 on: July 22, 2006, 07:24:00 AM »
english please!!! I really would like this!

thank you.

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Integrar Google VIDEO y YouTube
« Reply #5 on: July 22, 2006, 07:37:21 AM »
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline Flo2005

  • Full Member
  • ***
  • Posts: 237
  • Copy & Paste Profi :)
    • View Profile
    • snuup.de! - Bilder - Sounds - Videos - fun4FREE!
Re: [MOD] Integrar Google VIDEO y YouTube
« Reply #6 on: July 23, 2006, 02:35:06 PM »
Quote
template/details.php

you mean details.html!???

I don´t see the video on details page, only the link and source code of embed, datafields added and db_field_definitions are okay *I think*

PLZ help me :(

Edit: Ok I´ve have forgotten, there is only to set the ID! this videos are not counted from 4images? What about the downloadbutton, filesize, klicks?
« Last Edit: July 23, 2006, 02:47:15 PM by Flo2005 »

Project offline

Offline masterred

  • Sr. Member
  • ****
  • Posts: 494
    • View Profile
Re: [MOD] Integrar Google VIDEO y YouTube
« Reply #7 on: July 24, 2006, 09:28:14 PM »
entonces nadie sabe

como es que puedo hacer, para que los videos se miren en otra parte , es decir, poder insertar un promo o demo, en la galeria pagina principal,
en cualquier reproductor
gracias
Apache/2.2.21 (Win32)
PHP/5.3.5
Mysql Version: 5.5.19
4images Version: 1.7.?



Offline tdkpaul

  • Full Member
  • ***
  • Posts: 205
    • View Profile
Re: [MOD] Integrar Google VIDEO y YouTube
« Reply #8 on: July 29, 2006, 12:00:45 AM »
cant find {image} in details.php
does it care where to post or can i post it on any line i want to?

Offline jaimecb

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: [MOD] Integrar Google VIDEO y YouTube
« Reply #9 on: July 29, 2006, 10:37:30 PM »
it´s details.html

Offline tdkpaul

  • Full Member
  • ***
  • Posts: 205
    • View Profile
Re: [MOD] Integrar Google VIDEO y YouTube
« Reply #10 on: July 29, 2006, 10:48:26 PM »
yeah
i found out later by myself
i might be very tired, working all the night


thanks very much of answering to my problem
 :D

aussum mod; it works properly with youtube
it works with youtube but unfortunately i cant get it work with googlevideo  :cry:
i want
http://video.google.com/videoplay?docid=520525968651833317
to insert id (520525968651833317), after upload i can see googleskin but no video


is it possoble, that your googlevideo does not work ,too?
check it out
http://www.misimagenes.net/details.php?image_id=984&sessionid=75298de6248c5c62d6ba7d0a1a0f8018
« Last Edit: July 30, 2006, 12:14:41 AM by tdkpaul »

Offline tdkpaul

  • Full Member
  • ***
  • Posts: 205
    • View Profile
Re: [MOD] Integrar Google VIDEO y YouTube
« Reply #11 on: July 30, 2006, 12:15:11 AM »
got answered

Offline __G__

  • Sr. Member
  • ****
  • Posts: 286
    • View Profile
Re: [MOD] Integrar Google VIDEO y YouTube
« Reply #12 on: August 21, 2006, 05:13:31 AM »
i get this errror


DB Error: Bad SQL Query: SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, i.“google_id”, i.“youtube_id”, c.cat_name, u.user_name FROM (4images_images i, 4images_categories c) LEFT JOIN 4images_users u ON (u.user_id = i.user_id) WHERE i.image_active = 1 AND c.cat_id = i.cat_id AND i.cat_id NOT IN (0) ORDER BY i.image_date DESC LIMIT 3
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '“google_id”, i.“youtube_id”, c.cat_name, u.user_name FROM (4images_image' at line 1

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home3/mehsus/public_html/includes/db_mysql.php on line 116

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Integrar Google VIDEO y YouTube
« Reply #13 on: August 21, 2006, 05:43:44 AM »
1) you get error WHERE?
2) If you do more then its instructed in the instructions, then you are on your own ;)
There is no changes needed in the mysql queries, so why would you get that error - I have no clue...
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline __G__

  • Sr. Member
  • ****
  • Posts: 286
    • View Profile
Re: [MOD] Integrar Google VIDEO y YouTube
« Reply #14 on: August 21, 2006, 05:51:44 AM »
i have done as it said on the thing i get it on the home page on top of it i dont know why