Source for file UserArticle.php
Documentation is available at UserArticle.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 un articolo di un sito.
* @author Silvio Moioli <silvio at moioli dot net>
/** @var Homepage l'oggetto corrispondente alla home del sito */
/** @var Article l'oggetto corrispondente a questa pagina */
* @param Site $site il sito a cui questa pagina appartiene
* @param Article $article l'oggetto corrispondente a questa pagina
* Ritorna il titolo (in XHTML) di questa pagina.
* @return string una stringa XHTML rappresentante il titolo della pagina
* Ritorna una breve descrizione (solo testo) di questa pagina.
* @return string una stringa rappresentante la descrizione della pagina
* Ritorna un array di stringhe XHTML relative al menu (barra di navigazione)
* @return array vettore di stringhe XHTML rappresentante il menu della pagina
$siteID = $this->site->getID();
//Crea il menu per gli articoli correlati, quelli della
//stessa categoria e il ritorno alla home
$menuEntries = array(p("Torna alla ". a(
//Se ci sono articoli correlati, li inserisco nel menu
foreach ($correlated as $i) {
$articleTitle = $i->getTitle();
//Se ci sono altri articoli nella stessa categoria, li inserisco nel menu
foreach ($neighbours as $i) {
$articleTitle = $i->getTitle();
$menuEntries[] = p("Articoli della stessa categoria ".
* Ritorna il contenuto (XHTML) del corpo di questa pagina.
* @return string la stringa XHTML rappresentante il corpo della pagina
$articleID = $this->article->getID();
$siteID = $site->getID();
$homepage = $site->getHomepage();
//Crea il contenuto della pagina
$author = $this->article->getAuthor();
* Ritorna una stringa di parole chiave (solo testo, separate da virgole)
* @return string la stringa rappresentante le parole chiave della pagina
* 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
$category = $article->getCategory();
return "/$catName/$artName.html";
* Ritorna il nome del file in cui questa pagina deve essere salvata
* @return string il nome del file
return "art". $this->article->getID(). ".html";
|