Source for file UserCategory.php
Documentation is available at UserCategory.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 Category l'oggetto corrispondente a questa pagina */
* @param Site $site il sito a cui questa pagina appartiene
* @param Category $category l'oggetto corrispondente a questa pagina
* Ritorna il titolo (in XHTML) di questa pagina.
* @return string una stringa XHTML rappresentante il titolo della pagina
$home = $this->site->getHomepage();
* 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();
$menuEntries = array(p("Torna alla ". a(
foreach ($articles as $i) {
$articleID = $i->getID();
$articleTitle = $i->getTitle();
$menuEntries []= p("Articoli di questa sezione:". br().
* Ritorna il contenuto (XHTML) del corpo di questa pagina.
* @return string la stringa XHTML rappresentante il corpo della pagina
//Crea il contenuto della pagina
foreach ($articles as $i) {
$author = $i->getAuthor();
$articleID = $i->getID();
$articleTitle = $i->getTitle();
$contents .= p($i->getDescription());
* 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
if (is_a($category,"Category")== false){
// print var_dump($category);
'___'. $category->getID();
return "/$catName/index.html";
* Ritorna il nome del file in cui questa pagina deve essere salvata
* @return string il nome del file
|