Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

messagepath.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: messagepath.php 8627 2001-11-26 08:33:56Z jhe $
5 //
6 // Created on: <21-Feb-2001 18:00:00 pkej>
7 //
8 // This source file is part of Exponential Basic, publishing software.
9 //
10 // Copyright (C) 1999-2001 eZ Systems. All rights reserved.
11 //
12 // This program is free software; you can redistribute it and/or
13 // modify it under the terms of the GNU General Public License
14 // as published by the Free Software Foundation; either version 2
15 // of the License, or (at your option) any later version.
16 //
17 // This program is distributed in the hope that it will be useful,
18 // but WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 // You should have received a copy of the GNU General Public License
23 // along with this program; if not, write to the Free Software
24 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, US
25 //
26
27 if ( isset( $ShowPath ) && $ShowPath == true )
28 {
29 $t->set_file( "message_path", "messagepath.tpl" );
30 $t->set_block( "message_path", "article_message_tpl", "article_message_item" );
31 $t->set_block( "article_message_tpl", "article_topic_tpl", "article_topic_item" );
32 $t->set_block( "message_path", "forum_message_tpl", "forum_message_item" );
33 $t->set_block( "forum_message_tpl", "forum_topic_tpl", "forum_topic_item" );
34
35 $t->set_var( "article_message_item", "" );
36 $t->set_var( "article_topic_item", "" );
37 $t->set_var( "forum_message_item", "" );
38 $t->set_var( "forum_topic_item", "" );
39
40 if ( !is_object( $msg ) )
41 {
42 $msg = new eZForumMessage( $MessageID );
43 }
44
45 $MessageTopic = $msg->topic();
46 $ForumID = $msg->forumId();
47 $forum = new eZForum( $ForumID );
48 $ForumName = $forum->name();
49 $categories = $forum->categories();
50
51 if ( isset( $categories[0] ) && is_object( $categories[0] ) )
52 {
53 $ForumCategory = new eZForumCategory( $categories[0]->id() );
54 $ForumCategoryID = $ForumCategory->id();
55 if ( empty( $ForumCategoryName ) || $MessagePathOverride == true )
56 {
57 $ForumCategoryName = $ForumCategory->name();
58 }
59 // $ArticleID = false;
60 // $ArticleName = false;
61 // $isArticle = false;
62 // $doPrint = false;
63 // $ReplyToID = false;
64 // $PreviewID = false;
65 // $OriginalID = false;
66 $RedirectURL = '/forum/messagelist/' . $ForumID;
67 }
68 else
69 {
70 // include_once( "ezarticle/classes/ezarticle.php" );
71
72 $ArticleID = eZArticle::articleIDFromForum( $ForumID );
73
74 $article = new eZArticle( $ArticleID );
75 $ArticleID = $article->id();
76 $ArticleName = $article->name();
77 $isArticle = true;
78 }
79
80 $t->set_var( "message_topic", isset( $MessageTopic ) ? $MessageTopic : false );
81 $t->set_var( "message_id", isset( $MessageID ) ? $MessageID : false );
82
83 $t->set_var( "category_name", isset( $ForumCategoryName ) ? $ForumCategoryName : false );
84 $t->set_var( "category_id", isset( $ForumCategoryID ) ? $ForumCategoryID : false );
85
86 $t->set_var( "forum_id", isset( $ForumID ) ? $ForumID : false );
87 $t->set_var( "forum_name", isset( $ForumName ) ? $ForumName : false );
88
89 $t->set_var( "article_id", isset( $ArticleID ) ? $ArticleID : false );
90 $t->set_var( "article_name", isset( $ArticleName ) ? $ArticleName : false );
91
92 $t->set_var( "article_message_item", "" );
93 $t->set_var( "article_topic_item", "" );
94 $t->set_var( "forum_message_item", "" );
95 $t->set_var( "forum_topic_item", "" );
96
97 if ( isset( $isArticle ) && $isArticle == true )
98 {
99 if ( $isPreview == false )
100 {
101 $t->parse( "article_topic_item", "article_topic_tpl" );
102 }
103 $t->parse( "article_message_item", "article_message_tpl" );
104 }
105 else
106 {
107 if ( isset( $isPreview ) && $isPreview == false )
108 {
109 $t->parse( "forum_topic_item", "forum_topic_tpl" );
110 }
111 $t->parse( "forum_message_item", "forum_message_tpl" );
112 }
113
114 if ( isset( $doPrint ) && $doPrint == true )
115 {
116 $t->pparse( "message_path_file", "message_path" );
117 }
118 else
119 {
120 $t->parse( "message_path_file", "message_path" );
121 }
122 }
123 else
124 {
125 $t->set_var( "message_path_file", "" );
126 }
127
128 ?>
$forum
$forum
Definition: admin/forumlist.php:50
$article
$article
Definition: articlelog.php:45
eZArticle
Definition: ezarticle.php:82
eZArticle\articleIDFromForum
static articleIDFromForum( $ForumID)
Definition: ezarticle.php:2689
eZForumCategory
Definition: ezforumcategory.php:44
eZForumMessage
Definition: ezforummessage.php:42
eZForum
Definition: ezforum.php:44
$t
foreach( $Modules as $module) if(isset( $ItemInsert)) $t
Definition: classes/admin/linklist.php:168
$msg
$msg
Definition: editmessage.php:47
$ArticleID
$ArticleID
Definition: export.php:48
$categories
$categories
Definition: ezarticle/admin/categoryedit.php:636
$RedirectURL
$RedirectURL
Definition: ezforum/user/userlogin.php:91
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.