Dans votre fichier /coppermine/themes/your_theme/theme.php cherchez :
<td width="100%" valign="top" align="left" class="tableb tableb_alternate">
{ADMIN_MENU}
<p>{ALB_DESC}</p>
<p class="album_stat">{ALB_INFOS}<br />{ALB_HITS}</p>
et juste en dessous ajoutez :
<p><iframe src="http://www.facebook.com/plugins/like.php?href={$CONFIG['ecards_more_pic_target']}{ALB_LINK_TGT}&layout=standard&show_faces=true&width=450&action=like&colorscheme=light&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100%; height:80px;" allowTransparency="true"></iframe></p>
exemple :
<!-- BEGIN album_cell -->
<td width="{COL_WIDTH}%" valign="top">
<table width="100%" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3" height="1" align="left" valign="top" class="tableh2">
<span class="alblink"><a href="{ALB_LINK_TGT}">{ALBUM_TITLE}</a></span>
</td>
</tr>
<tr>
<td colspan="3">
<img src="images/spacer.gif" width="1" height="1" border="0" alt="" /><br />
</td>
</tr>
<tr>
<td align="center" valign="middle" class="thumbnails">
<img src="images/spacer.gif" width="{THUMB_CELL_WIDTH}" height="1" style="margin-top: 0px; margin-bottom: 0px; border: none;" alt="" /><br />
<a href="{ALB_LINK_TGT}" class="albums">{ALB_LINK_PIC}<br /></a>
</td>
<td>
<img src="images/spacer.gif" width="1" height="1" border="0" alt="" />
</td>
<td width="100%" valign="top" align="left" class="tableb tableb_alternate">
{ADMIN_MENU}
<p>{ALB_DESC}</p>
<p class="album_stat">{ALB_INFOS}<br />{ALB_HITS}</p>
<p><iframe src="http://www.facebook.com/plugins/like.php?href={$CONFIG['ecards_more_pic_target']}{ALB_LINK_TGT}&layout=standard&show_faces=true&width=450&action=like&colorscheme=light&height=80" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100%; height:80px;" allowTransparency="true"></iframe></p>
</td>
</tr>
</table>
</td>
<!-- END album_cell -->
Cela affichera le bouton J'aime et la photo de tous ceux qui ont cliqué.
J'espère que de Hack vous plaira.
Bonne journée. ;)
merci pour ce partage, il serait toutefois intéressant d'en faire un plugin plutôt qu'un hack, ça éviterait d'avoir à le refaire lors des mises à jour dans le cas ou on effacerait le thème courant ou si on voulait changer de thème
Effectivement, il faudra que je m'attarde à la création de plugins. Je n'en ai jamais fait alors il faut que je me renseigne !
@ Francois,
J'ai bien compris comment l'on pouvait ajouter un texte en haut de la page :
$thisplugin->add_filter('gallery_header','helloworld_header');
function helloworld_header($html) {
$html = '<p style="color:red"><b>Hello, world.</b> (tutorial 2.1)</p>'
.$html;
return $html;
}
Mais par quoi dois-je remplacer "gallery_header" pour faire apparaitre mon texte sous la description d'un album ?
regarde dans la documentation les points d'entrées possibles pour les plugins http://documentation.coppermine-gallery.net/en/dev_plugin_hooks.htm#plugin_hooks_filename (http://documentation.coppermine-gallery.net/en/dev_plugin_hooks.htm#plugin_hooks_filename)
tu devrais y trouver ton bonheur (il y a toute une partie de la doc qui est relative à l'écriture des plugins et qui devrait t'aider)