Advanced search  

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

Pages: 1 ... 9 10 11 12 [13] 14 15 16 17 ... 22   Go Down

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

0 Members and 2 Guests are viewing this topic.

Nibbler

  • Guest
Re: Displaying videos from Youtube in Coppermine.
« Reply #240 on: April 06, 2008, 09:40:55 pm »

Post a link to an example.
Logged

jeffamm

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Displaying videos from Youtube in Coppermine.
« Reply #241 on: April 08, 2008, 01:36:20 am »

OK, here's the link for one of the videos that now shows unavailable:

http://www.musictoots.com/displayimage.php?album=random&cat=0&pos=-3

Here's the link to youtube of the source video  http://www.youtube.com/watch?v=mHNvUkeREKM

thanks for any help
Logged

Nibbler

  • Guest
Re: Displaying videos from Youtube in Coppermine.
« Reply #242 on: April 08, 2008, 01:38:11 am »

That video has embedding disabled.
Logged

jeffamm

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: Displaying videos from Youtube in Coppermine.
« Reply #243 on: April 08, 2008, 04:02:23 am »

Thanks Nibbler, I didn't know videos could be blocked from embedding, and my search on that question through google didn't lead to an answer.  thanks again.
Logged

kraftworkz

  • Coppermine newbie
  • Offline Offline
  • Posts: 5
Re: Displaying videos from Youtube in Coppermine.
« Reply #244 on: April 09, 2008, 08:55:10 pm »

Hi.

I have installed this mod in my cpg with the Lightbox mod also.

In firefox everything works perfect but in IE explorer when i try to acces to the displayimage page of the youtube video i have this error message:
Internet Explorer cannot open the site http://www.grabadosplaza.es/displayimage.php?album=8&pos=2.
Operation aborted.

And when i press the ok button, it goes to a error page.

I have read on internet about this problem with IE, and i have found a lot of webs about this issue, but i am not sure what to change in the code to fix it.
One of the forums: http://channel9.msdn.com/ShowPost.aspx?PostID=215369

I need help. Thanks



This is still an issue. Has anybody gotten this to work?
Logged

Paul-RDG

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Displaying videos from Youtube in Coppermine.
« Reply #245 on: April 29, 2008, 01:23:08 pm »

I have the same problem mensioned here before. I have installed the modification and also made the modifaction to my theme.php, still the video is only shown as a small jpeg. How can I fix this?
Logged

Nibbler

  • Guest
Re: Displaying videos from Youtube in Coppermine.
« Reply #246 on: April 29, 2008, 01:29:19 pm »

Means you didn't edit your theme.php properly or you might have another plugin interfering.
Logged

Paul-RDG

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Displaying videos from Youtube in Coppermine.
« Reply #247 on: April 29, 2008, 01:45:44 pm »

I can't fint what's wrong:

Code: [Select]
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2007 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 version 3
  as published by the Free Software Foundation.
  
  ********************************************
  Coppermine version: 1.4.14
  $Source$
  $Revision: 3966 $
  $Author: gaugau $
  $Date: 2007-09-17 08:53:13 +0200 (Mo, 17 Sep 2007) $
**********************************************/

define('THEME_HAS_RATING_GRAPHICS'1);
define('THEME_IS_XHTML10_TRANSITIONAL',1); // Remove this if you edit this template until
                                           // you have validated it. See docs/theme.htm.

// HTML template for template sys_menu spacer
$template_sys_menu_spacer ='<img src="themes/AnimeZone/images/cellnav.gif" width="7" height="7" border="0" alt="" />';

// HTML template for the image navigation bar
$template_img_navbar = <<<EOT
        <tr>
                <td class="navmenu" align="left" style="padding-left:5px;"> <a href="{THUMB_TGT}" title="{THUMB_TITLE}">terug naar dit album</a> <b>|</b> <a href="javascript:;" onclick="blocking('picinfo','yes', 'block'); location.href='#fileinfo';return false;" title="{PIC_INFO_TITLE}">details</a> <b>|</b> <a href="{SLIDESHOW_TGT}" title="{SLIDESHOW_TITLE}">slideshow </a> <b>|</b> <a href="{ECARD_TGT}" title="{ECARD_TITLE}">eCard</a>
</a></td>
                <td class="navmenu" align="right" style="padding-right:5px;">&laquo; <a href="{PREV_TGT}" title="{PREV_TITLE}">vorige</a> <b>|</b> <a href="{NEXT_TGT}" title="{NEXT_TITLE}">volgende</a> &raquo;</td>
        </tr>
<tr>
<td colspan="2" align="center">
<strong><br />{PIC_POS}</strong> 
</td>
</tr>

<!-- BEGIN report_file_button -->
<!-- END report_file_button --><!-- BEGIN ecard_button -->
<!-- END ecard_button -->

EOT;

// HTML template for the display of comments

$template_add_your_comment = <<<EOT
</table>
<table align="center" width="{WIDTH}" cellspacing="1" cellpadding="0" class="maintable">

<tr>
                <td class="tableh2_compact"><a name="respond"></a><span style="float: left;"><b>{ADD_YOUR_COMMENT}</b></span></td>
        </tr>
        <tr>
        <!-- BEGIN smilies -->
        <tr>
                <td width="100%" class="tableb_compact">
                        {SMILIES}
                </td>
        </tr>
<!-- END smilies -->
                <td colspan="3">
                <form method="post" name="post" action="db_input.php">
                        <table width="100%" cellpadding="0" cellspacing="0">

<!-- BEGIN user_name_input -->
                                <tr><td class="tableb_compact">
                                        {NAME}
                                </td>
                                <td class="tableb_compact">
                                        <input type="text" class="textinput" name="msg_author" size="10" maxlength="20" value="{USER_NAME}" />
                                </td></tr><tr>
<!-- END user_name_input -->
<!-- BEGIN input_box_smilies -->
                                <td class="tableb_compact"><br />
                                {COMMENT}:&nbsp;&nbsp; </td>
                                <td width="100%" class="tableb_compact">
                                <textarea class="textinput" id="message" name="msg_body" onselect="storeCaret_post(this);" onclick="storeCaret_post(this);" onkeyup="storeCaret_post(this);" style="width: 95%;" rows="3" cols=""></textarea></td></tr></table>                                       
<!-- END input_box_smilies -->
<!-- BEGIN input_box_no_smilies -->
                                <td class="tableb_compact">
                                <textarea class="textinput" id="message" name="msg_body" style="width: 95%;" rows="3" cols=""></textarea></td></tr></table>
<!-- END input_box_no_smilies -->
                                <table align="center"><tr><td>
                                <input type="hidden" name="event" value="comment" />
                                <input type="hidden" name="pid" value="{PIC_ID}" />
                                <input type="submit" class="comment_button" name="submit" value="Bevestig" />&nbsp;
</td></tr></table>

                </form>
                </td>
        </tr>


EOT;

// HTML template for title row of the thumbnail view (album title + sort options)
$template_thumb_view_title_row = <<<EOT

                        <table width="100%" cellpadding="0" cellspacing="0">
                        <tr>
<td width="100%" align="left" valign="middle" class="tableh1_compact" style="white-space: nowrap"><b>{ALBUM_NAME}</b></td>
</tr>
                        </table>
EOT;

// Displays a picture
function theme_html_picture()
{
    global 
$CONFIG$CURRENT_PIC_DATA$CURRENT_ALBUM_DATA$USER;
    global 
$album$comment_date_fmt$template_display_media;
    global 
$lang_display_image_php$lang_picinfo;

    
$pid $CURRENT_PIC_DATA['pid'];
    
$pic_title '';

    if (!isset(
$USER['liv']) || !is_array($USER['liv'])) {
        
$USER['liv'] = array();
    }
    
// Add 1 to hit counter
    
if (!USER_IS_ADMIN && !in_array($pid$USER['liv']) && isset($_COOKIE[$CONFIG['cookie_name'] . '_data'])) {
        
add_hit($pid);
        if (
count($USER['liv']) > 4array_shift($USER['liv']);
        
array_push($USER['liv'], $pid);
    }

    if(
$CONFIG['thumb_use']=='ht' && $CURRENT_PIC_DATA['pheight'] > $CONFIG['picture_width'] ){ // The wierd comparision is because only picture_width is stored
      
$condition true;
    }elseif(
$CONFIG['thumb_use']=='wd' && $CURRENT_PIC_DATA['pwidth'] > $CONFIG['picture_width']){
      
$condition true;
    }elseif(
$CONFIG['thumb_use']=='any' && max($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight']) > $CONFIG['picture_width']){
      
$condition true;
    }else{
     
$condition false;
    }

    if (
$CURRENT_PIC_DATA['title'] != '') {
        
$pic_title .= $CURRENT_PIC_DATA['title'] . "\n";
    }
    if (
$CURRENT_PIC_DATA['caption'] != '') {
        
$pic_title .= $CURRENT_PIC_DATA['caption'] . "\n";
    }
    if (
$CURRENT_PIC_DATA['keywords'] != '') {
        
$pic_title .= $lang_picinfo['Keywords'] . ": " $CURRENT_PIC_DATA['keywords'];
    }

    if (!
$CURRENT_PIC_DATA['title'] && !$CURRENT_PIC_DATA['caption']) {
        
template_extract_block($template_display_media'img_desc');
    } else {
        if (!
$CURRENT_PIC_DATA['title']) {
            
template_extract_block($template_display_media'title');
        }
        if (!
$CURRENT_PIC_DATA['caption']) {
            
template_extract_block($template_display_media'caption');
        }
    }

    
$CURRENT_PIC_DATA['menu'] = html_picture_menu(); //((USER_ADMIN_MODE && $CURRENT_ALBUM_DATA['category'] == FIRST_USER_CAT + USER_ID) || ($CONFIG['users_can_edit_pics'] && $CURRENT_PIC_DATA['owner_id'] == USER_ID && USER_ID != 0) || GALLERY_ADMIN_MODE) ? html_picture_menu($pid) : '';

    
if ($CONFIG['make_intermediate'] && $condition ) {
        
$picture_url get_pic_url($CURRENT_PIC_DATA'normal');
    } else {
        
$picture_url get_pic_url($CURRENT_PIC_DATA'fullsize');
    }

    
$image_size compute_img_size($CURRENT_PIC_DATA['pwidth'], $CURRENT_PIC_DATA['pheight'], $CONFIG['picture_width']);

    
$pic_title '';
    
$mime_content cpg_get_type($CURRENT_PIC_DATA['filename']);


    if (
$mime_content['content']=='movie' || $mime_content['content']=='audio') {

        if (
$CURRENT_PIC_DATA['pwidth']==|| $CURRENT_PIC_DATA['pheight']==0) {
            
$CURRENT_PIC_DATA['pwidth']  = 320// Default width

            // Set default height; if file is a movie
            
if ($mime_content['content']=='movie') {
                
$CURRENT_PIC_DATA['pheight'] = 240// Default height
            
}
        }

        
$ctrl_offset['mov']=15;
        
$ctrl_offset['wmv']=45;
        
$ctrl_offset['swf']=0;
        
$ctrl_offset['rm']=0;
        
$ctrl_offset_default=45;
        
$ctrl_height = (isset($ctrl_offset[$mime_content['extension']]))?($ctrl_offset[$mime_content['extension']]):$ctrl_offset_default;
        
$image_size['whole']='width="'.$CURRENT_PIC_DATA['pwidth'].'" height="'.($CURRENT_PIC_DATA['pheight']+$ctrl_height).'"';
    }

    if (
$mime_content['content']=='image') {
        if (isset(
$image_size['reduced'])) {
            
$winsizeX $CURRENT_PIC_DATA['pwidth']+5;  //the +'s are the mysterious FF and IE paddings
            
$winsizeY $CURRENT_PIC_DATA['pheight']+3//the +'s are the mysterious FF and IE paddings
            
$pic_html "<a href=\"javascript:;\" onclick=\"MM_openBrWindow('displayimage.php?pid=$pid&amp;fullsize=1','" uniqid(rand()) . "','scrollbars=yes,toolbar=no,status=no,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
            
$pic_title $lang_display_image_php['view_fs'] . "\n==============\n" $pic_title;
            
$pic_html .= "<img src=\"" $picture_url "\" class=\"image\" border=\"0\" alt=\"{$lang_display_image_php['view_fs']}\" /><br />";
            
$pic_html .= "</a>\n";
        } else {
            
$pic_html "<img src=\"" $picture_url "\" {$image_size['geom']} class=\"image\" border=\"0\" alt=\"\" /><br />\n";
        }
    } elseif (
$mime_content['content']=='document') {
        
$pic_thumb_url get_pic_url($CURRENT_PIC_DATA,'thumb');
        
$pic_html "<a href=\"{$picture_url}\" target=\"_blank\" class=\"document_link\"><img src=\"".$pic_thumb_url."\" border=\"0\" class=\"image\" /></a>\n<br />";
    } else {
        
$autostart = ($CONFIG['media_autostart']) ? ('true'):('false');

        
$players['WMP'] = array('id' => 'MediaPlayer',
                                
'clsid' => 'classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" ',
                                
'codebase' => 'codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701" ',
                                
'mime' => 'type="application/x-mplayer2" ',
                               );
        
$players['RMP'] = array('id' => 'RealPlayer',
                                
'clsid' => 'classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA" ',
                                
'codebase' => '',
                                
'mime' => 'type="audio/x-pn-realaudio-plugin" '
                               
);
        
$players['QT']  = array('id' => 'QuickTime',
                                
'clsid' => 'classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" ',
                                
'codebase' => 'codebase="http://www.apple.com/qtactivex/qtplugin.cab" ',
                                
'mime' => 'type="video/x-quicktime" '
                               
);
        
$players['SWF'] = array('id' => 'SWFlash',
                                
'clsid' => ' classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" ',
                                
'codebase' => 'codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" ',
                                
'mime' => 'type="application/x-shockwave-flash" '
                               
);
        
$players['UNK'] = array('id' => 'DefaultPlayer',
                                
'clsid' => '',
                                
'codebase' => '',
                                
'mime' => ''
                               
);

        if (isset(
$_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'])) {
            
$user_player $_COOKIE[$CONFIG['cookie_name'].'_'.$mime_content['extension'].'player'];
        } else {
            
$user_player $mime_content['player'];
        }

                
// There isn't a player selected or user wants client-side control
        
if (!$user_player) {
            
$user_player 'UNK';
        }

        
$player $players[$user_player];

        
$pic_html  '<object id="'.$player['id'].'" '.$player['clsid'].$player['codebase'].$player['mime'].$image_size['whole'].'>';
        
$pic_html .= "<param name=\"autostart\" value=\"$autostart\" /><param name=\"src\" value=\""$picture_url "\" />";
        
$pic_html .= '<embed '.$image_size['whole'].' src="'$picture_url '" autostart="'.$autostart.'" '.$player['mime'].'></embed>';
        
$pic_html .= "</object><br />\n";
    }

    
$CURRENT_PIC_DATA['html'] = $pic_html;
    
$CURRENT_PIC_DATA['header'] = '';
    
$CURRENT_PIC_DATA['footer'] = '';

    
$CURRENT_PIC_DATA CPGPluginAPI::filter('file_data',$CURRENT_PIC_DATA);

    
$params = array('{CELL_HEIGHT}' => '100',
        
'{IMAGE}' => $CURRENT_PIC_DATA['header'].$CURRENT_PIC_DATA['html'].$CURRENT_PIC_DATA['footer'],
        
'{ADMIN_MENU}' => $CURRENT_PIC_DATA['menu'],
        
'{TITLE}' => bb_decode($CURRENT_PIC_DATA['title']),
        
'{CAPTION}' => bb_decode($CURRENT_PIC_DATA['caption']),
        );

    return 
template_eval($template_display_media$params);
}

?>
Logged

Nibbler

  • Guest
Re: Displaying videos from Youtube in Coppermine.
« Reply #248 on: April 29, 2008, 01:48:45 pm »

It's obvious - you didn't make the change atall. Read the instructions.
Logged

Paul-RDG

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: Displaying videos from Youtube in Coppermine.
« Reply #249 on: April 29, 2008, 01:57:41 pm »

I showed the wrong theme.php, but I already find what I was doing wrong. Changed the wrong part of the code  ;D Stupid! Thanks anyway!
Logged

orTubes

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Displaying videos from Youtube in Coppermine.
« Reply #250 on: May 09, 2008, 01:41:16 am »

 ???
You are showing an error:

The previous file could not be placed.

site = http:www.ortubes2.com
Logged

orTubes

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Displaying videos from Youtube in Coppermine.
« Reply #251 on: May 09, 2008, 03:27:58 am »

 ;D ;D ;D
This error was happening because of "Method for resizing images" was "Image Magic".

After the exchange worked perfectly ;)
Logged

orTubes

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Displaying videos from Youtube in Coppermine.
« Reply #252 on: May 09, 2008, 04:33:35 pm »

I added the code in upload.php, and worked perfectly.

See http://www.ortubes.com

Code: [Select]
<?
ini_set("allow_url_fopen", 1);
ini_set("allow_url_include", 1);

...

ini_set("allow_url_fopen", 0);
ini_set("allow_url_include", 0);
?>



Nice scripts, however when uploading I got this message
Code: [Select]
0 uploads were successful.
What's wrong with that?



___________edit____________
OMG! I just realized, I can't upload images/photos from the url as well, as I'm never use this one before (always using batch add)

_________________________
My bad, allow_url_fopen is off, I'll ask my hosting provider to change it.
Logged

Nibbler

  • Guest
Re: Displaying videos from Youtube in Coppermine.
« Reply #253 on: May 09, 2008, 04:35:33 pm »

allow_url_include is a security risk. You don't need it.
Logged

orTubes

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: Displaying videos from Youtube in Coppermine.
« Reply #254 on: May 15, 2008, 01:18:57 am »

Users are coming to the area to add the album, then drop. Is there any way to make an album as standard?
Logged

Nibbler

  • Guest
Re: Displaying videos from Youtube in Coppermine.
« Reply #255 on: May 15, 2008, 10:04:54 am »

That's not related to this mod.
Logged

Royal_VII

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 2
Re: Displaying videos from Youtube in Coppermine.
« Reply #256 on: May 27, 2008, 10:18:22 pm »

Hi Nibbler!

My name is Roy van Gom Neumann from Amsterdam, The Netherlands.
Thanks for your great work man, I really appreciate this beautifull mod!
I've got everything working except that I can't get all the themes to function properly.
The only theme that works fine is the classic theme.
I've just edited the upload.php and copied the entire theme.php file from the sample theme to the classic theme, and it works fine (with the classic theme!).
I did this because I din't know wich part of the code from the theme.php I schould copy
I know that I should edit the theme.php of the theme in question..
 
This is your instruction: "theme.php (if you can't find this code, copy theme_html_picture() over from sample theme and then apply the change)"!

Actually I'm wondering wich part of the code from the sample.php I should copy, and where should I paste it?  ???
I would really appreciate it if you could answer my former question.
Thanks in advance.

Peace,  :)
Roy


Logged

LeaX

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 96
    • Lost Jack and Kate
Re: Displaying videos from Youtube in Coppermine.
« Reply #257 on: June 10, 2008, 12:55:09 pm »

Quote
upload.php, add this code near the top of the file after the comments
Please can you explain this phrase...
"after the comments" - what does it mean? After what phrase?
Logged

Royal_VII

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 2
Re: Displaying videos from Youtube in Coppermine.
« Reply #258 on: June 10, 2008, 02:42:51 pm »

The comments are the explanations before the scripting. When you use Notepad++ as your favorite text editor these symbols are (default) displayed in the color green! these symbols (or sentences) are no part of the actual programming and contains the signs //
I suggest you upgrade to PHP5 (if possible) so don't have to go through this!
Logged

LeaX

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 96
    • Lost Jack and Kate
Re: Displaying videos from Youtube in Coppermine.
« Reply #259 on: June 11, 2008, 09:52:53 am »

Thanks. Yeah I've just seen that I have PHP Version 5.2.6 ))

Ok... but I can't understand this too
Quote
if you can't find this code, copy theme_html_picture() over from sample theme and then apply the change

What is "theme_html_picture"? And how can I "apply" it? To what apply?
Logged
Pages: 1 ... 9 10 11 12 [13] 14 15 16 17 ... 22   Go Up
 

Page created in 0.033 seconds with 20 queries.