Source for file UserNews.php
Documentation is available at UserNews.php
/* vim: set expandtab tabstop=4 shiftwidth=4: */
// +----------------------------------------------------------------------+
// | MCMS: a PHP Content Management System for creating accessible sites. |
// | Copyright (C) 2005 Silvio Moioli |
// | This program is free software; you can redistribute it and/or modify |
// | it under the terms of the GNU General Public License as published by |
// | the Free Software Foundation; either version 2 of the License, or |
// | (at your option) any later version. |
// | This program is distributed in the hope that it will be useful, |
// | but WITHOUT ANY WARRANTY; without even the implied warranty of |
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
// | GNU General Public License for more details. |
// | You should have received a copy of the GNU General Public License |
// | along with this program; if not, write to the Free Software |
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
// +----------------------------------------------------------------------+
// | Authors: Silvio Moioli <silvio at moioli dot net> www.moioli.net |
// +----------------------------------------------------------------------+
require_once $_SERVER["DOCUMENT_ROOT"]. "/admin/lib/view/UserPage.php";
require_once $_SERVER["DOCUMENT_ROOT"]. "/admin/lib/view/Tagger.php";
* Rappresenta l'elenco completo delle notizie di un sito.
* @author Silvio Moioli <silvio at moioli dot net>
/** @var Homepage l'oggetto corrispondente alla home del sito */
* @param Site $site il sito a cui questa pagina appartiene
* Ritorna il titolo (in XHTML) di questa pagina.
* @return string una stringa XHTML rappresentante il titolo della pagina
$siteID = $this->site->getID();
$this->homepage->getTitle()). " > Elenco completo delle notizie";
* Ritorna una breve descrizione (solo testo) di questa pagina.
* @return string una stringa rappresentante la descrizione della pagina
return "Notizie del sito ". $this->site->getShortURL();
* Ritorna un array di stringhe XHTML relative al menu (barra di navigazione)
* @return array vettore di stringhe XHTML rappresentante il menu della pagina
return array(p("Torna alla ". a(
* Ritorna il contenuto (XHTML) del corpo di questa pagina.
* @return string la stringa XHTML rappresentante il corpo della pagina
$siteID = $site->getID();
$homepage = $site->getHomepage();
$categories = $site->getCategories();
$contents = h1("Torna alla ". a(
//Aggiunge tutte le notizie
$news = $site->getNews();
$newsTitle = $i->getTitle();
$content = $i->getContents();
$author = $i->getAuthor();
$contents .= h2("$date - $newsTitle","notizia$newsID");
//Aggiunge gli articoli correlati
$correlati = $i->getCorrelatedArticles();
$ncorrelati = count($correlati);
foreach ($correlati as $correlato) {
$idCorrelato = $correlato->getID();
$titleCorrelato = $correlato->getTitle();
$contents .= p("Articoli correlati a questa notizia: $temp");
$contents .= p($content. br(). $authorString);
* Ritorna una stringa di parole chiave (solo testo, separate da virgole)
* @return string la stringa rappresentante le parole chiave della pagina
$home = $this->site->getHomepage();
return $home->getKeywords();
* Ritorna il nome del file in cui questa pagina deve essere salvata.
* @return string il nome del file
* Versione statica del metodo precedente: ritorna il nome del
* file in cui questa pagina deve essere salvata.
* @return string il nome del file
return "/notizie___". $site->getID(). ".html";
* Ritorna il nome del file in cui questa pagina deve essere salvata
* @return string il nome del file
return "news". $this->site->getID(). ".html";
|