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: Metalink für Facebook  (Read 2669 times)

0 Members and 1 Guest are viewing this topic.

sylvia.r

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 98
Metalink für Facebook
« on: March 31, 2014, 09:58:56 pm »

Abend zusammen,
einer Zeit hat Andre ein Plugin geschrieben, der quasi die Eingabe und Position bei Facebook verfeinert...
Code: [Select]
<?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.
--

 
Logged
Pages: [1]   Go Up
 

Page created in 0.024 seconds with 19 queries.