Displaying videos from Youtube in Coppermine. - Page 7 Displaying videos from Youtube in Coppermine. - Page 7
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Displaying videos from Youtube in Coppermine.

Started by Nibbler, October 31, 2006, 03:42:27 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

andyleery

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.

andyleery

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

TURRON

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

<?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

Nibbler

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';

TURRON

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: (

TURRON

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


thapame

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?

Pascal YAP

I,

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

PYAP

thapame

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

cong


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

Nibbler

It uses their own API and is perfectly legal.

gnp

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.

Nibbler

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

gnp

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.

gnp

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.

isloera

Quote from: olti on May 28, 2007, 11:28:51 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

               $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:
  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
$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 ;)

gnp

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)

Joachim Müller

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.

just_some_guy

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.
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

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!