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]   Go Down

Author Topic: CPG BB Code embed for FLV files  (Read 5763 times)

0 Members and 1 Guest are viewing this topic.

ligerzero

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
CPG BB Code embed for FLV files
« on: February 07, 2010, 05:09:12 am »

ive got the flv player thing going. but now im trying to embed the actual video, so i can post it on my main new page of my site.

currently, it reads as

Code: [Select]
<?php
/**************************************************
  CPG BB Code Plugin for Coppermine Photo Gallery
  *************************************************
  Copyright (c) 2006 Thomas Lange <stramm@gmx.net>
  *************************************************
  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
  BB Code Plugin version: 1.2
  $Revision: 1.0 $
  $Author: stramm $
***************************************************/


if (!defined('IN_COPPERMINE')) die('Not in Coppermine...');

// Add a filter
$thisplugin->add_filter('file_data','bbcode_add_data');


function 
bbcode_add_data($pic_data){ //$pic_data
global $CONFIG;

//here we define a var that holds the copy to clipboard javascript 
//unfortunately the Firefox security settings do not allow clipboard copy to work without modifying prefs... 
//therefore only a msg pops up if a user uses netscape/ firefox and presses the copy button
$script_data = <<< EOT

<script language="javascript" type="text/javascript">
<!--
function copy_clip(bb_text)
{
 if (window.clipboardData) 
   {
    window.clipboardData.setData("Text", bb_text);
   }
   else if (window.netscape) 
   { 
    alert("Due to Firefox secutrity settings it is not possible to use the copy button. Please manually copy the bb code with 3 fast left clicks into the textara. Then press ctrl+c");
   }
   return false;
}
//-->
</script>
EOT;

$fullsize_url get_pic_url($pic_data);  //here we grab the url to the fullsized pic
$thumb_url get_pic_url($pic_data'thumb'); //thumb url

$pic_data['title'] ? $name $pic_data['title'] : $name 'No Title'//chcking if the pic has a title, if not we set it to 'No title'

//here we define the actual bbcode coppermine path + the path to the pic $img_url is for the version that displays the thumb, $name_url is for a txt link with the ikmage title
$img_url '[url='.$CONFIG['ecards_more_pic_target'].$fullsize_url.'][IMG]'.$CONFIG['ecards_more_pic_target'].$thumb_url.'[/IMG][/url]';
$name_url '[url='.$CONFIG['ecards_more_pic_target'].$fullsize_url.']'.$name.'[/url]';
$embed_url '<object width="425" height="344"><param name="movie" value="' $fullsize_url '"></param><param name="allowFullScreen" value="true"></param><param name="allowScriptAccess" value="always"></param><embed src="' $fullsize_url '" type="application/x-shockwave-flash" allowfullscreen="true" allowScriptAccess="always" width="425" height="344"></embed></object>';


//this just brings everything in form... we create a table etc.
$bbcode_data '<table align="center" width="'.$CONFIG['picture_width'].'">'.$script_data.'<tr>';
$bbcode_data .= '<td>[img]</td>';
$bbcode_data .= '<td><textarea name="bbcode" rows="1" cols="40" style="overflow:off;">'.$img_url.'</textarea><input type="button" value="Copy" onclick='copy_clip("'.$img_url.'")'></td>';

$bbcode_data .= '</tr><tr>';

$bbcode_data .= '<td>title</td>';
$bbcode_data .= '<td><textarea name="bbcode" rows="1" cols="40">'.$name_url.'</textarea><input type="button" value="Copy" onclick='copy_clip("'.$name_url.'")'></td>';

$bbcode_data .= '</tr><tr>';

$bbcode_data .= '<td>embed</td>';
$bbcode_data .= '<td><textarea name="bbcode" rows="1" cols="40">'.$embed_url.'</textarea><input type="button" value="Copy" onclick='copy_clip("'.$embed_url.'")'></td>';


$bbcode_data .= '</tr></table>';

//finally we add the created stuff to the picture data and return it to coppermine
$pic_data['html'] = $pic_data['html'].$bbcode_data

return $pic_data
}
?>


see $embed_url
It really won't embed, it just has a white box, and when i right-click it, it shows as "movie not loaded"

Am i missing something here?
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page
Re: CPG BB Code embed for FLV files
« Reply #1 on: February 07, 2010, 12:26:12 pm »

Yes you are missing the Board Rules.

Posting a link to your Coppermine is required when requesting support.

The people + experts who volunteer their time here don't want to spend their time guessing whet you have got and have done!

ligerzero

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: CPG BB Code embed for FLV files
« Reply #2 on: February 07, 2010, 12:32:14 pm »

my bad.
here is a test link for it. The Embed link has been taken out as some people were annoyed at it being there in the first place.
http://www.ligerzero.net/coppermine/displayimage.php?album=4&pos=0
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page
Re: CPG BB Code embed for FLV files
« Reply #3 on: February 07, 2010, 02:10:32 pm »

Try this post - http://forum.coppermine-gallery.net/index.php/topic,36302.msg286030.html#msg286030

*However, I must advise you and future readers to....

1) Post your question in the thread for the plugin you are referring to. That might get the author's attention more quickly.

2) Be a bit more descriptive in your request ("I have done A and B with C but now I am getting Z....")

3) Attach a screenshot to your post of what looks to be wrong


(* I say this because I am only guessing what exactly your issue/problem/plugins are)
Pages: [1]   Go Up
 

Page created in 0.035 seconds with 19 queries.