Une autre modif sur ce blog
Par Tibo, mercredi 1 mars 2006 à 19:03 :: Blogue :: #97 :: rss
En plus des liens vers les tags Technorati, je viens d'ajouter la même fonctionnalité vers del.icio.us .
De petits
sont donc apparus à côté des
pour chaque billet.
Pour faire la même modification : ouvrez le fichier /ecrire/tools/twtags/functions.php (il faut bien sûr que vous ayez installé le plugin twtag ).
et modifier la fonction show() comme suit :
function show($separator = ', ', $technorati = false, $delicious = false)
{
$tags = twPostMeta::field('tag', TWPM_F_ALL);
if (!$tags || count($tags) == 0)
return;
uasort ($tags, array('twTags','_strcmp'));
$str = '';
foreach ($tags as $tag)
{
if ($technorati)
$str .= $separator . '<a href="http://technorati.com/tag/' . $tag . '" rel="tag" class="technorati">'.
'<img src="http://static.technorati.com/pix/icn-talkbubble.gif" alt="[T]" /></a> ';
if ($delicious)
$str .= '<a href="http://del.icio.us/tag/' . $tag . '" rel="tag" class="technorati">'.
'<img src="http://del.icio.us/static/img/delicious.small.gif" alt="[D]" /></a> ';
$str .='<a href="' . twTags::_url($tag) . '" rel="tag">' . htmlspecialchars($tag) . '</a>';
}
echo substr($str, strlen($separator));
}
Tags :
del.icio.us
DotClear
Technorati
Soumettre :
::
::
::
::
::
le rédateur est online











gmail
Commentaires
1. Le samedi 4 mars 2006 à 20:57, par philippe
2. Le dimanche 5 mars 2006 à 02:56, par Tibo
3. Le dimanche 5 mars 2006 à 03:18, par philippe
Ajouter un commentaire