Metalink für Facebook Metalink für Facebook
 

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]

Main Menu

Metalink für Facebook

Started by sylvia.r, March 31, 2014, 09:58:56 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sylvia.r

Abend zusammen,
einer Zeit hat Andre ein Plugin geschrieben, der quasi die Eingabe und Position bei Facebook verfeinert...
<?php

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

if (
defined('DISPLAYIMAGE_PHP')) {
    
$thisplugin->add_filter('page_html','fb_meta_link');
}

function 
fb_meta_link($html) {
    global 
$CONFIG$CURRENT_PIC_DATA$album_name;
    
    
$fb "<fb:share-button class=\"meta\">";
    
$fb .= "\n <meta name=\"medium\" content=\"image\" />";
    
$fb .= "\n <meta name=\"title\" content=\"$album_name\" />";
    
$fb .= "\n <meta name=\"description\" content=\"".$CONFIG['gallery_description']."\" />";
    
$fb .= "\n <link rel=\"image_src\" href=\"";
    
$fb .= urlencode($CONFIG['fullpath'] . $CURRENT_PIC_DATA['filepath'] . $CONFIG['thumb_pfx'] . $CURRENT_PIC_DATA['filename']);
    
$fb .= "\" />";
    
$fb .= "\n</fb:share-button>";

    
$html str_replace("</head>"$fb."\n</head>"$html);

    return 
$html;
}

?>

Funktioniert alles wie gewünscht, links ist Bildwechsel zu sehen, rechts der Albumname und Domain.
Meine frage dazu...Kann man das um Beschreibung des Albums unterhalb Namens noch ergänzen ? Falls ja, wie.
--