Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

ezimagecatalogue/user/menubox.php
Go to the documentation of this file.
1 <?php
3 //
4 // $Id: menubox.php 7462 2001-09-25 17:37:52Z fh $
5 //
6 // Created on: <16-Jan-2001 13:23:02 ce>
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 // include_once( "classes/INIFile.php" );
28
29 $ini =& eZINI::instance( 'site.ini' );
30
31 $Language = $ini->variable( "eZImageCatalogueMain", "Language" );
32
33
34 // include_once( "classes/eztemplate.php" );
35 // include_once( "classes/ezdb.php" );
36 // include_once( "ezuser/classes/ezpermission.php" );
37 // include_once( "ezuser/classes/ezobjectpermission.php" );
38
39 $t = new eZTemplate( "kernel/ezimagecatalogue/user/" . $ini->variable( "eZImageCatalogueMain", "TemplateDir" ),
40 "kernel/ezimagecatalogue/user/intl", $Language, "menubox.php" );
41
42 $t->setAllStrings();
43
44 $t->set_file( array(
45 "menu_box_tpl" => "menubox.tpl"
46 ) );
47
49 // BEGIN random image block added by admin [at] riderhaus [dot] com
50
51 $RandImageCategory =& $ini->variable( "eZImageCatalogueMain", "RandImageCategory" );
52 $width =& $ini->variable( "eZImageCatalogueMain", "ThumbnailViewWidth" );
53 $height =& $ini->variable( "eZImageCatalogueMain", "ThumbnailViewHight" );
54 $randimage = eZImage::randomImage( $RandImageCategory );
55 $variation =& $randimage->requestImageVariation( $width, $height );
56 $t->set_var( "image_src", "/" . $variation->imagePath() );
57 $t->set_var( "image_file_name", $randimage->name() );
58 $t->set_var( "image_category", $RandImageCategory );
59 $t->set_var( "image_caption", $randimage->caption() );
60 $t->set_var( "image_width", $variation->width() );
61 $t->set_var( "image_height", $variation->height() );
62
63 // END random image block added by admin [at] riderhaus [dot] com
65
66
67 $t->set_block( "menu_box_tpl", "user_login_tpl", "user_login" );
68
69 if ( $user && ( eZObjectPermission::getObjects( "imagecatalogue_category", 'w', true ) > 0 ||
70 eZObjectPermission::getObjects( "imagecatalogue_category", 'u', true ) > 0 ||
71 eZPermission::checkPermission( $user, "eZImageCatalogue", "WriteToRoot" ) ) )
72 {
73 $t->parse( "user_login", "user_login_tpl" );
74 }
75 else
76 {
77 $t->set_var( "user_login", "" );
78 }
79
80 $t->set_var( "sitedesign", $GlobalSiteDesign );
81
82 $t->pparse( "output", "menu_box_tpl" );
83
84 ?>
eZImage\randomImage
static randomImage( $categoryID=0)
Definition: ezimage.php:1371
eZObjectPermission\getObjects
static getObjects( $moduleTable, $permission, $count=false, $user=false)
Definition: ezobjectpermission.php:425
eZPermission\checkPermission
static checkPermission( $user, $moduleName, $permissionName)
Definition: ezpermission.php:430
eZTemplate
Definition: eztemplate.php:107
$height
$height
Definition: ezimagecatalogue/user/menubox.php:53
$t
$t
Definition: ezimagecatalogue/user/menubox.php:39
$variation
$variation
Definition: ezimagecatalogue/user/menubox.php:55
$width
$width
Definition: ezimagecatalogue/user/menubox.php:52
$RandImageCategory
$RandImageCategory
Definition: ezimagecatalogue/user/menubox.php:51
$randimage
$randimage
Definition: ezimagecatalogue/user/menubox.php:54
$Language
$Language
Definition: ezimagecatalogue/user/menubox.php:31
$ini
$ini
Definition: ezimagecatalogue/user/menubox.php:29
$GlobalSiteDesign
global $GlobalSiteDesign
Definition: latestmessages.php:52
$user
$user
Definition: user/adlist.php:39
Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.