Wie und Wo mache ich das?
Mit dem Filetype editor plugin.
Äh, wie sichert man die denn?
Mit einem Tool für Datenbank Backups. Empfohlen wird mySqlDumper. PhpMyAdmin geht auch. Vergleiche
http://forum.coppermine-gallery.net/index.php/topic,31423.0.htmlIst aber nicht gerade Herzchirurgie, die da betrieben wird. Verschiebe das Datenbank-Backup einen Moment und gehe ein Problem nach dem anderen an.
Also:
1) Plugin "
Filetype Editor" herunterladen
2) Plugin installieren gemäß
Doku3) Auf "Filetype" im Admin-Menü klicken (ist neu hinzu gekommen nach der Installation des Plugins)
4) Auf der Seite ganz nach unten scrollen
5) "Add a new filetype" anklicken
6) Unter "File extension (lower case, no dot):" trägst Du "
flv" ein
7) Unter "MIME type (must be valid)" trägst Du "
application/x-shockwave-flash" ein
8) Unter "Content type" wählst Du "Movie"
9) Unter "Associated Player" wählst Du mal "Flash Player"
10) Klicke auf die Schaltfläche "Add" zum Speichern Deiner Eingaben
11) Gehe zu den Coppermine-Einstellungen
12) Unter "Erweiterte Bild/Datei- und Thumbnail-Einstellungen" -> "Zugelassene Video-Dateitypen" trägst Du sicherheitshalber nicht "
ALL" ein, sondern "
asf/asx/mpg/mpeg/wmv/avi/mov/swf/flv"
13) Speichern der Einstellungen
14) Erstelle eine Sicherheitskopie von themes/dein_theme/theme.php
15) Kopiere
// 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']) > 4) array_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']==0 || $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&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];
if ($mime_content['extension'] == "flv") {
$descript = $CURRENT_PIC_DATA['title'];
if ($CURRENT_PIC_DATA['pheight']==240) { // if no file information edit, use default width/height below
$CURRENT_PIC_DATA['pheight'] = 270; // default FLV height
$CURRENT_PIC_DATA['pwidth'] = 330; // default FLV width
}
$pic_html = '<script type="text/javascript" src="flashobject.js"></script><div id="flashcontent"></div><script type="text/javascript">var fo = new FlashObject("flvPlayer.swf", "animationName", "' . $CURRENT_PIC_DATA['pwidth'] . '", "' . $CURRENT_PIC_DATA['pheight'] . '", "8", "#FFFFFF"); fo.addParam("allowScriptAccess", "sameDomain"); fo.addParam("quality", "best");fo.addParam("FlashVars", "flvPath=' . $picture_url . '&flvTitle=' . $descript . '"); fo.addParam("allowFullScreen", "true"); fo.write("flashcontent");</script>';
} else {
$pic_html = '<object id="'.$player['id'].'" '.$player['clsid'].$player['codebase'].$player['mime'].$image_size['whole'].'>';
$pic_html .= '<param name="src" value="' . $picture_url . '" /><param name="ShowControls" value="1" /><param name="ShowStatusBar" value="1" /><param name="ShowDisplay" value="0" /><param name="DisplaySize" value="0" /><param name="allowFullScreen" value="true" /><param name="autostart" value="' . $autostart . '" />';
$pic_html .= '<embed '.$image_size['whole'].' src="' . $picture_url . '" allowFullScreen="true" '.' autostart="' . $autostart . '" ' . $player['mime'] . '></embed></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);
}
in eine neue Zeile vor
?>
in der Datei themes/dein_theme/theme.php (es handelt sich dabei um den aus themes/sample/theme.php kopierten Code, bereits ergänzt um die Modifikationen aus dem Beitrag "Another FLV player".
16) Lade die Dateien in der Anlage des Beitrags
Another FLV Player herunter
17) Entpacke die herunter geladenen Dateien
18) Kopiere die herunter geladenen Dateien ins Stammverzeichnis Deiner Coppermine-Galerie
19) Lade alle geänderten Dateien hoch (die beiden Dateien im Stammverzeichnis und themes/dein_theme/theme.php)
Detailierter geht es nun wirklich nicht.
Deine Fragen zeigen aber, dass Du Dich nicht wirklich intensiv mit der Sache beschäftigt hast. Manche Sachen kann man auch selbst drauf kommen, z.B. wie das Filetype Plugin benutzt wird. Wie ein Datenbank Backup gemacht wird kann man ergoogeln. Erwarte doch bitte nicht, dass Dir jeder Schritt immer und ständig vorgekaut wird. Ein bißchen eigener Hirnschmalz kann nicht schaden - den braucht's halt, wenn man ein OpenSource Projekt einsetzt.