Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: 1 ... 3 4 5 6 [7] 8 9 10 11 ... 22   Go Down

Author Topic: Displaying videos from Youtube in Coppermine.  (Read 432396 times)

0 Members and 2 Guests are viewing this topic.

andyleery

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 78
Re: Displaying videos from Youtube in Coppermine.
« Reply #120 on: June 16, 2007, 01:29:05 pm »

Cant you edit own posts here?
I have now unterstand how I have to do the theme modifications but why is there no Videotitle displayed?
http://www.bollybilder.de/displayimage.php?album=lastup&cat=0&pos=0

In the title there is only this "youtube 9DFCUAjH0G8", which is also not nice named *g*
THX 4 helping.
Logged

andyleery

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 78
Re: Displaying videos from Youtube in Coppermine.
« Reply #121 on: June 16, 2007, 01:41:27 pm »

Ok I even could fix this problem, so just delete my posts, I'm sorry, see u next time :-)
Logged

TURRON

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Displaying videos from Youtube in Coppermine.
« Reply #122 on: July 12, 2007, 07:52:42 am »

I weigh enough time treating to install and it is not to me, in which estare failing? if they can help me (they excuse the English, I speak Spanish)


http://img297.imageshack.us/img297/3177/coppermineyoutubeerrorhs2.jpg

http://img484.imageshack.us/img484/2775/dibujonl9.jpg

   
this says in theme.php

Code: [Select]
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2006 Coppermine Dev Team
  v1.1 originally written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.
  ********************************************
  Coppermine version: 1.4.9
  $Source$
  $Revision: 3125 $
  $Author: gaugau $
  $Date: 2006-06-16 08:48:03 +0200 (Fr, 16 Jun 2006) $
**********************************************/

// ------------------------------------------------------------------------- //
// This theme has all CORE items removed                                     //
// ------------------------------------------------------------------------- //
define('THEME_IS_XHTML10_TRANSITIONAL',1);

?>


THNK
Logged

Nibbler

  • Guest
Re: Displaying videos from Youtube in Coppermine.
« Reply #123 on: July 12, 2007, 09:09:33 pm »

Follow the instructions. You need to add the code I posted into your theme.php so that the video will be displayed. To add videos - 'Note: YouTube videos must be added in the form http://www.youtube.com/watch?v=xxxxxxxxxxx'
Logged

TURRON

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Displaying videos from Youtube in Coppermine.
« Reply #124 on: July 13, 2007, 01:14:01 am »

I even follow without understanding, which I publish is theme.php but as I leave it? that is my great doubt, of the form that modifies theme is with errors. AS IT MUST BE LEFT THEME.PHP?


   
I have leido everything but profit without understanding, really I feel it: (
Logged

TURRON

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Displaying videos from Youtube in Coppermine.
« Reply #125 on: July 16, 2007, 08:20:24 am »

excuse that it writes again but for my this is very important, if somebody were amiable and could stick a configuration of his theme.php and his upload.php I thank for much PS: excuse my English, is bad

Logged

thapame

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 72
Re: Displaying videos from Youtube in Coppermine.
« Reply #126 on: July 20, 2007, 04:16:38 pm »

I have installed this mod and working fine. But some times the youtube videos will be removed from the youtube site so in that case I need to replace it with another video. how can I do this?
Logged

Pascal YAP

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: fr
  • Offline Offline
  • Gender: Male
  • Posts: 13833
  • Hello World :-)
    • CPG 1.5.x ExperiMental website
Re: Displaying videos from Youtube in Coppermine.
« Reply #127 on: July 20, 2007, 10:53:30 pm »

I,

2 solutions :
1/ Delete this old video !
2/ Try to use PhpMyAdmin and change the video name and ID...

PYAP
Logged

thapame

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 72
Re: Displaying videos from Youtube in Coppermine.
« Reply #128 on: July 20, 2007, 11:01:13 pm »

as the youtube video is not hosted with my hosting so i think it's better to edit from the phpmyadmin.
anyone please let me know if there is any mod or releasing on future

thx
Logged

cong

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 49
Re: Displaying videos from Youtube in Coppermine.
« Reply #129 on: July 21, 2007, 06:20:57 am »


First i want to thank you Mr.Nibbler  you are great   :-*

I installed your mod and it is work perfect 

And i have a question. >>> how can description and title and keywords taken automatically from you tube site ?? ??

Another question . >>> are this legal to run you tube videos on my site ( outside you tube site ) ?? ??

Thank you in advance
Logged

Nibbler

  • Guest
Re: Displaying videos from Youtube in Coppermine.
« Reply #130 on: July 21, 2007, 06:02:07 pm »

It uses their own API and is perfectly legal.
Logged

gnp

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Displaying videos from Youtube in Coppermine.
« Reply #131 on: July 31, 2007, 08:50:30 pm »

Everything seems to be working accept I too am only getting the images thumb and not the video. I have read over all 7 pages and made needed changes to upload and theme files.
I am however using coppermine bridged with e107 cms if that may be part of the problem. I do have php 5.2.2 and url_fopen enabled.
I have uploaded my theme and upload files to this post and you can view a yt video at this link http://mmaworldwidemagazine.net/gallery/displayimage.php?album=12&pos=0
Any and all help is greatly appreciated and Thanks! in advance.
Logged

Nibbler

  • Guest
Re: Displaying videos from Youtube in Coppermine.
« Reply #132 on: July 31, 2007, 09:04:52 pm »

I don't provide support for people who don't have the 'powered by coppermine' footer.
Logged

gnp

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Displaying videos from Youtube in Coppermine.
« Reply #133 on: July 31, 2007, 11:34:29 pm »

Hmmm, any idea how to ad it? I see it on a couple other coppermine sites (including my other website) but dont see an option in admin settings to add it. I have no problem supporting the makers of coppermine. I use it on my other site (and it shows up on it) http://www.groundnpound.org/gallery/ but it is an earlier version then the one Im using on this site.
I have not removed it myself but am more than happy to add it in there somehow, just dont know how.
Logged

gnp

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Displaying videos from Youtube in Coppermine.
« Reply #134 on: August 01, 2007, 12:10:27 am »

I reuploaded the files but this time got them from coppermine instead of using the files that I got with the bridge and while I do have coppermine powered by in the footer I dont know what file caused it not to show up and I still have the problem with it only showing the video thumbnail and not the video playing.
Logged

isloera

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 22
    • Calvilloweb.com
Re: Displaying videos from Youtube in Coppermine.
« Reply #135 on: August 01, 2007, 07:35:50 am »

I have exactly the same problem here! Plz help me to fix this problem.

I had the same problem when I installed this mod, but I found the fix and here it is ;)

The problem exist with the following instruction:

MAke sure you find  this code at around line #916 in the upload.php file
Code: [Select]

               $form_array = array(
        sprintf($lang_upload_php['max_fsize'], $CONFIG['max_upl_size']),
        array($lang_upload_php['album'], 'album', 2),
        array('MAX_FILE_SIZE', $max_file_size, 4),
        array($lang_upload_php['picture'], 'userpicture', 1, 1),
        array($lang_upload_php['pic_title'], 'title', 0, 255, 1),
        array($captionLabel, 'caption', 3, $CONFIG['max_img_desc_length']),
        array($lang_upload_php['keywords'], 'keywords', 0, 255, 1),
        array('event', 'picture', 4)
        );

Then replace with:
Code: [Select]
  if (preg_match('/^youtube_(.*)\.jpg$/', $file_set[0], $ytmatches)){

         $vid = $ytmatches[1];

$xdata = file_get_contents($CONFIG['fullpath'] . "edit/yt_$vid.xml");


// todo: parse the xml properly
preg_match('/<description>(.*)<\/description>/', $xdata, $xmatches);
$description = substr($xmatches[1], 0, $CONFIG['max_img_desc_length']);

// todo: parse the xml properly
preg_match('/<tags>(.*)<\/tags>/', $xdata, $xmatches);
$keywords = $xmatches[1];

// todo: parse the xml properly
preg_match('/<title>(.*)<\/title>/', $xdata, $xmatches);
$title = substr($xmatches[1], 0, 255);


                $form_array = array(
        array($lang_upload_php['album'], 'album', 2),
        array($lang_upload_php['pic_title'], 'title', 0, 255, 1, $title),
        array($captionLabel, 'caption', 3, $CONFIG['max_img_desc_length'], $description),
        array($lang_upload_php['keywords'], 'keywords', 0, 255, 1, $keywords),
    array('control', 'phase_2', 4),
    array('unique_ID', $_POST['unique_ID'], 4),
        );
       
   
    } else {

                $form_array = array(
        sprintf($lang_upload_php['max_fsize'], $CONFIG['max_upl_size']),
        array($lang_upload_php['album'], 'album', 2),
        array('MAX_FILE_SIZE', $max_file_size, 4),
        array($lang_upload_php['picture'], 'userpicture', 1, 1),
        array($lang_upload_php['pic_title'], 'title', 0, 255, 1),
        array($captionLabel, 'caption', 3, $CONFIG['max_img_desc_length']),
        array($lang_upload_php['keywords'], 'keywords', 0, 255, 1),
        array('event', 'picture', 4)
        );

}

I had exactly the same problem as you did and it was because I was finding and replacing the code really fast and I did't pay attention on this step and I ended up replacing the following section of code instead of the correct one.

This code is found at around line # 2526 : make sure you don't change this code
Code: [Select]
$form_array = array(

    array($lang_upload_php['album'], 'album', 2),

    array($lang_upload_php['pic_title'], 'title', 0, 255, 1, $title),

    array($captionLabel, 'caption', 3, $CONFIG['max_img_desc_length'], (isset($iptc['Caption'])) ? $iptc['Caption'] : ''),

    array($lang_upload_php['keywords'], 'keywords', 0, 255, 1,(isset($iptc['Keywords'])) ? implode(' ',$iptc['Keywords']): ''),

    array('control', 'phase_2', 4),

    array('unique_ID', $_POST['unique_ID'], 4),

    );

As you can see it looks a little similar and by changing this wrong section of code you can get the same problem that you have.

I hope this helps ;)
Logged

gnp

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Displaying videos from Youtube in Coppermine.
« Reply #136 on: August 02, 2007, 12:47:30 am »

Thanks Nibbler! Great plugin that I now have working :)
Note to self and others to follow, sometimes its a good idea to read through twice, just to make sure there is something you didnt miss (like I did)
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Displaying videos from Youtube in Coppermine.
« Reply #137 on: August 02, 2007, 09:28:01 am »

Thank you for the review. Just a clarification though: this is a mod, not a plugin. A plugin uses per difinition the plugin API of Coppermine and doesn't need edits of core code. The youtube mod by Nibbler doesn't use the plugin API. Hacking the code is mandatory if you want to use it.
Logged

just_some_guy

  • Supporter
  • Coppermine addict
  • ****
  • Offline Offline
  • Posts: 539
  • I am currently on holiday, back in a few weeks. :D
Re: Displaying videos from Youtube in Coppermine.
« Reply #138 on: August 11, 2007, 06:30:54 pm »

Sorry for being dumb, i use the classic theme and when i come to the last step i get confused. theme.php dosent have that coding. and i dont under stand the other option, can you explain please.
Logged
Tambien, Hablo Español      PHP - Achieve Anything
"The Internet is becoming the town square for the global village of tomorrow. " - Bill Gates
Windows 7 Forums

gnp

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Displaying videos from Youtube in Coppermine.
« Reply #139 on: August 11, 2007, 06:38:55 pm »

In the theme.php of the theme named sample is where you find the code you need to add to your theme but dont make the mistake I did. After you add the code to your theme.php be sure to make the modification explained in the first post. Another member posted the code on page 2 of this thread http://forum.coppermine-gallery.net/index.php?topic=37962.msg181126#msg181126
BUT! Again even using that code you need to apply the mod explained in the very first post of this thread.
Good luck!
Logged
Pages: 1 ... 3 4 5 6 [7] 8 9 10 11 ... 22   Go Up
 

Page created in 0.028 seconds with 20 queries.