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

Author Topic: Metalink für Facebook  (Read 2756 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.016 seconds with 20 queries.