Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

messagesearch.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: messagesearch.php 7420 2001-09-24 11:53:43Z 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 ( $ShowSearch == 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 $MessageTopic = $msg->topic();
44 $ForumID = $msg->forumId();
45 }
46
47 $forum = new eZForum( $ForumID );
48 $ForumName = $forum->name();
49 $categories = $forum->categories();
50
51 if ( 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 }
60 else
61 {
62 // include_once( "ezarticle/classes/ezarticle.php" );
63
64 $ArticleID = eZArticle::articleIDFromForum( $ForumID );
65
66 $article = new eZArticle( $ArticleID );
67 $ArticleID = $article->id();
68 $ArticleName = $article->name();
69
70 $isArticle = true;
71 }
72
73 $t->set_var( "message_topic", $MessageTopic );
74 $t->set_var( "message_id", $MessageID );
75
76 $t->set_var( "category_name", $ForumCategoryName );
77 $t->set_var( "category_id", $ForumCategoryID );
78
79 $t->set_var( "forum_id", $ForumID );
80 $t->set_var( "forum_name", $ForumName );
81
82 $t->set_var( "article_id", $ArticleID );
83 $t->set_var( "article_name", $ArticleName );
84
85 $t->set_var( "article_message_item", "" );
86 $t->set_var( "article_topic_item", "" );
87 $t->set_var( "forum_message_item", "" );
88 $t->set_var( "forum_topic_item", "" );
89
90 if ( $isArticle == true )
91 {
92 if ( $isPreview == false )
93 {
94 $t->parse( "article_topic_item", "article_topic_tpl" );
95 }
96 $t->parse( "article_message_item", "article_message_tpl" );
97 }
98 else
99 {
100 if ( $isPreview == false )
101 {
102 $t->parse( "forum_topic_item", "forum_topic_tpl" );
103 }
104 $t->parse( "forum_message_item", "forum_message_tpl" );
105 }
106
107 if ( $doPrint == true )
108 {
109 $t->pparse( "message_path_file", "message_path" );
110 }
111 else
112 {
113 $t->parse( "message_path_file", "message_path" );
114 }
115 }
116 else
117 {
118 $t->set_var( "message_path_file", "" );
119 }
120
121 ?>
$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
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.