Changeset 86799 in spip-zone


Ignore:
Timestamp:
Dec 21, 2014, 3:44:54 PM (5 years ago)
Author:
gouz@…
Message:

ajout ratingCount dans les microdata du plugin notation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • _plugins_/notation/trunk/inc/notation_balises.php

    r86798 r86799  
    2020        $nb = round($nb);
    2121        if($microdatas){           
    22             // TODO : $res .= '<meta itemprop="ratingCount" class="best" content="'.$row['nombre_votes'].'" />'; (?)
     22            $id_objet = filter_var($id, FILTER_SANITIZE_NUMBER_INT);
     23            $objet = objet_type(substr($id,0,-(strlen($id_objet))));
     24            $ret .= '<meta itemprop="ratingCount" class="count" content="'.notation_generer_info($id_objet,$objet,'nombre_votes').'" />';
    2325            $ret .= '<meta itemprop="bestRating" class="best" content="'.$max_note.'" />';
    2426            $ret .= '<meta itemprop="worstRating" class="worst" content="0" />';
Note: See TracChangeset for help on using the changeset viewer.