X-Git-Url: http://git.cyclocoop.org/?p=velocampus%2Fweb%2Fwww.git;a=blobdiff_plain;f=www%2Fecrire%2Finc%2Fformater_article.php;fp=www%2Fecrire%2Finc%2Fformater_article.php;h=e49259901fe6783ac4f2bfc297ebf1a2eb72b631;hp=0000000000000000000000000000000000000000;hb=80b4d3e85f78d402ed2e73f8f5d1bf4c19962eed;hpb=aaf970bf4cdaf76689ecc10609048e18d073820c diff --git a/www/ecrire/inc/formater_article.php b/www/ecrire/inc/formater_article.php new file mode 100644 index 0000000..e492599 --- /dev/null +++ b/www/ecrire/inc/formater_article.php @@ -0,0 +1,98 @@ +", 26, 20); + } + } else $logo =''; + + $titre = sinon($row['titre'], _T('ecrire:info_sans_titre')); + $id_rubrique = $row['id_rubrique']; + $date = $row['date']; + $statut = $row['statut']; + $descriptif = $row['descriptif']; + $lang_dir = lang_dir(($lang = $row['lang']) ? changer_typo($lang):''); + + $lien = "
" + . "" + . (!$logo ? '' : + ("" . $logo . "")) + . (acces_restreint_rubrique($id_rubrique) ? $img_admin : '') + . typo(supprime_img($titre,'')) + . (!($afficher_langue AND $lang != $GLOBALS['meta']['langue_site'] AND strlen($lang)) ? '' : + (" (".traduire_nom_langue($lang).")")) + . (!$row['petition'] ? '' : + (" "._T('lien_petitions'))) + . "" + . "
"; + + if ($spip_display == 4) return array($lien); + + $puce = $puce_statut($id_article, $statut, $id_rubrique,'article'); + + $auteurs = auteurs_article($id_article); + foreach ($auteurs as $k => $r) { + list(, $mail, $nom,,) = $formater_auteur($r['id_auteur']); + $auteurs[$k]= "$mail $nom"; + } + + $date = affdate_jourcourt($date); + if (!$date) $date = ' '; + + $num = afficher_numero_edit($id_article, 'id_article', 'article'); + + // Afficher le numero (JMB) + + return array($puce, $lien, join('
', $auteurs), $date, $num); +} + +?>