Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

admin/forumlist.php
Go to the documentation of this file.
1 <?php
3 // $Id: forumlist.php 7428 2001-09-24 14:03:59Z jhe $
4 //
5 // Created on: Created on: <18-Jul-2000 08:56:19 lw>
6 //
7 // This source file is part of Exponential Basic, publishing software.
8 //
9 // Copyright (C) 1999-2001 eZ Systems. All rights reserved.
10 //
11 // This program is free software; you can redistribute it and/or
12 // modify it under the terms of the GNU General Public License
13 // as published by the Free Software Foundation; either version 2
14 // of the License, or (at your option) any later version.
15 //
16 // This program is distributed in the hope that it will be useful,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 // GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program; if not, write to the Free Software
23 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US
24 //
25
26 // include_once( "classes/INIFile.php" );
27 $ini =& eZINI::instance( 'site.ini' );
28
29 $Language = $ini->variable( "eZForumMain", "Language" );
30
31 // include_once( "classes/eztemplate.php" );
32 // include_once( "ezforum/classes/ezforumcategory.php" );
33 // include_once( "ezforum/classes/ezforum.php" );
34
35 require( "kernel/ezuser/admin/admincheck.php" );
36
37 $t = new eZTemplate( "kernel/ezforum/admin/" . $ini->variable( "eZForumMain", "AdminTemplateDir" ),
38 "kernel/ezforum/admin/" . "/intl", $Language, "forumlist.php" );
39
40 $t->setAllStrings();
41
42 $t->set_file(Array( "forum_page" => "forumlist.tpl"
43 ) );
44
45 $t->set_block( "forum_page", "forum_item_tpl", "forum_item" );
46
47 $t->set_var( "site_style", $SiteDesign );
48
49 // Forum list for current category
50 $forum = new eZForum();
51
52 $category = new eZForumCategory( $CategoryID );
53
54 $forumList = $category->forums();
55
56 $category = new eZForumCategory();
57 $category->get( $CategoryID );
58 $t->set_var( "category_name", $category->name() );
59
60 if ( !$forumList )
61 {
62 $languageIni = new eZINI( "kernel/ezforum/admin/" . "intl/" . $Language . "/forumlist.php.ini", false );
63 $noitem = $languageIni->variable( "strings", "noitem" );
64
65 $t->set_var( "forum_item", $noitem );
66 }
67 else
68 {
69 $i = 0;
70 foreach ( $forumList as $forumItem )
71 {
72 if ( ( $i %2 ) == 0 )
73 $t->set_var( "td_class", "bgdark" );
74 else
75 $t->set_var( "td_class", "bglight" );
76
77 $t->set_var( "forum_id", $forumItem->id() );
78 $t->set_var( "forum_name", $forumItem->name() );
79 $t->set_var( "forum_description", $forumItem->description() );
80
81 $t->parse( "forum_item", "forum_item_tpl", true);
82 $i++;
83 }
84 }
85
86 $t->set_var( "docroot", $_SERVER['DOCUMENT_ROOT'] );
87 $t->set_var( "category_id", $CategoryID );
88
89 $t->pparse( "output", "forum_page");
90 ?>
$i
$i
Definition: admin/adlist.php:91
$CategoryID
$CategoryID
Definition: admin/articleedit.php:53
$category
$category
Definition: admin/forumlist.php:52
$t
$t
Definition: admin/forumlist.php:37
$forum
$forum
Definition: admin/forumlist.php:50
$Language
$Language
Definition: admin/forumlist.php:29
$ini
$ini
Definition: admin/forumlist.php:27
$forumList
$forumList
Definition: admin/forumlist.php:54
eZForumCategory
Definition: ezforumcategory.php:44
eZForum
Definition: ezforum.php:44
eZINI
Reads and writes .ini style configuration files.
eZTemplate
Definition: eztemplate.php:107
$SiteDesign
$SiteDesign
Definition: ezbulkmail/user/datasupplier.php:31
$languageIni
$languageIni
Definition: pendinglist.php:43
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.