2 /***********************************************************************/
4 /***********************************************************************/
5 /* Copyright (c) 2002-2010 */
6 /* Inclusive Design Institute */
9 /* This program is free software. You can redistribute it and/or */
10 /* modify it under the terms of the GNU General Public License */
11 /* as published by the Free Software Foundation. */
12 /***********************************************************************/
16 * doesn't allow this file to be loaded with a browser.
18 if (!defined('AT_INCLUDE_PATH')) { exit; }
24 require(AT_INCLUDE_PATH.'../mods/_standard/photos/include/constants.inc.php'); //load constant file right away.
25 //$savant->addPath('template', AT_PA_INCLUDE.'html/');
28 * this file must only be included within a Module obj
30 if (!isset($this) || (isset($this) && (strtolower(get_class($this)) != 'module'))) { exit(__FILE__ . ' is not a Module'); }
33 * assign the instructor and admin privileges to the constants.
35 define('AT_PRIV_PHOTO_ALBUM', $this->getPrivilege());
36 define('AT_ADMIN_PRIV_PHOTO_ALBUM', $this->getAdminPrivilege());
39 * create a side menu box/stack.
41 //$this->_stacks['pa_photo_gallery'] = array('title_var'=>'pa_photo_gallery', 'file'=>AT_PA_BASE.'side_menu.inc.php');
42 // ** possible alternative: **
43 // $this->addStack('social', array('title_var' => 'social', 'file' => './side_menu.inc.php');
46 * if this module is to be made available to students on the Home or Main Navigation.
48 //$_group_tool = $_student_tool = AT_PA_BASENAME.'index.php';
49 $_student_tool = AT_PA_BASENAME.'index.php';
50 $this->_list['pa_photo_gallery'] = array('title_var'=>'pa_photo_gallery','file'=>AT_PA_BASENAME.'sublinks.php');
51 $this->_pages[AT_PA_BASENAME.'index.php']['icon'] = 'images/home-directory_sm.png';
54 * add the admin pages when needed.
56 if (admin_authenticate(AT_ADMIN_PRIV_PHOTO_ALBUM, TRUE) || admin_authenticate(AT_ADMIN_PRIV_ADMIN, TRUE)) {
57 $this->_pages[AT_NAV_ADMIN] = array(AT_PA_BASENAME.'index_admin.php');
58 $this->_pages[AT_PA_BASENAME.'index_admin.php']['title_var'] = 'pa_photo_gallery';
59 $this->_pages[AT_PA_BASENAME.'index_admin.php']['parent'] = AT_NAV_ADMIN;
60 $this->_pages[AT_PA_BASENAME.'index_admin.php']['children'] = array(AT_PA_BASENAME.'admin/preferences.php');
61 $this->_pages[AT_PA_BASENAME.'admin/preferences.php']['title_var'] = 'pa_preferences';
62 $this->_pages[AT_PA_BASENAME.'admin/preferences.php']['parent'] = AT_PA_BASENAME.'index_admin.php';
64 $this->_pages[AT_PA_BASENAME.'admin/edit_album.php']['title_var'] = 'pa_edit_album';
65 $this->_pages[AT_PA_BASENAME.'admin/edit_album.php']['parent'] = AT_PA_BASENAME.'index_admin.php';
67 $this->_pages[AT_PA_BASENAME.'admin/edit_photos.php']['title_var'] = 'pa_edit_photos';
68 $this->_pages[AT_PA_BASENAME.'admin/edit_photos.php']['parent'] = AT_PA_BASENAME.'index_admin.php';
72 * instructor Manage section:
74 //$this->_pages[AT_SOCIAL_BASENAME.'index_instructor.php']['title_var'] = 'social';
75 //$this->_pages[AT_SOCIAL_BASENAME.'index_instructor.php']['parent'] = 'tools/index.php';
77 // ** possible alternative: **
78 // $this->pages['./index_instructor.php']['title_var'] = 'social';
79 // $this->pages['./index_instructor.php']['parent'] = 'tools/index.php';
85 $this->_pages[AT_SOCIAL_BASENAME.'index.php']['children'] = array(AT_PA_BASENAME.'index.php');
88 $this->_pages[AT_PA_BASENAME.'index.php']['title_var'] = _AT('test');
89 $this->_pages[AT_PA_BASENAME.'index.php']['parent'] = AT_SOCIAL_BASENAME.'index.php';
90 //$this->_pages[AT_SOCIAL_BASENAME.'index_mystart.php']['children'] = array_push($this->_pages[AT_SOCIAL_BASENAME.'index_mystart.php']['children'], AT_PA_BASENAME.'index.php');
93 $this->_pages[AT_PA_BASENAME.'index.php']['title_var'] = 'pa_photo_gallery';
94 $this->_pages[AT_PA_BASENAME.'index.php']['img'] = AT_PA_BASENAME.'images/photo_gallery.png';
96 if($_SESSION['course_id'] < 1){
97 $this->_pages[AT_PA_BASENAME.'index.php']['children'] = array(AT_PA_BASENAME.'profile_album.php', AT_PA_BASENAME.'create_album.php');
99 $this->_pages[AT_PA_BASENAME.'index.php']['children'] = array(AT_PA_BASENAME.'profile_album.php', AT_PA_BASENAME.'course_albums.php', AT_PA_BASENAME.'shared_albums.php', AT_PA_BASENAME.'create_album.php');
100 $this->_pages[AT_PA_BASENAME.'course_albums.php']['title_var'] = 'pa_course_albums';
101 $this->_pages[AT_PA_BASENAME.'course_albums.php']['parent'] = AT_PA_BASENAME.'index.php';
102 $this->_pages[AT_PA_BASENAME.'course_albums.php']['guide'] = 'general/?p=pa_index.php';
105 $this->_pages[AT_PA_BASENAME.'index.php']['guide'] = 'general/?p=pa_index.php';
106 $this->_pages[AT_PA_BASENAME.'index.php']['parent'] = AT_SOCIAL_BASENAME.'index_mystart.php';
107 $this->_pages[AT_SOCIAL_BASENAME.'index_mystart.php']['children'] = array_merge(isset($this->_pages[AT_SOCIAL_BASENAME.'index_mystart.php']['children']) ? $this->_pages[AT_SOCIAL_BASENAME.'index_mystart.php']['children'] : array(), array(AT_PA_BASENAME.'index.php'));
109 //$this->_pages[AT_PA_BASENAME.'my_albums.php']['title_var'] = 'pa_my_albums';
110 //$this->_pages[AT_PA_BASENAME.'my_albums.php']['parent'] = AT_PA_BASENAME.'index.php';
112 $this->_pages[AT_PA_BASENAME.'create_album.php']['title_var'] = 'pa_create_album';
113 $this->_pages[AT_PA_BASENAME.'create_album.php']['parent'] = AT_PA_BASENAME.'index.php';
114 $this->_pages[AT_PA_BASENAME.'create_album.php']['guide'] = 'general/?p=pa_index.php';
116 $this->_pages[AT_PA_BASENAME.'profile_album.php']['title_var'] = 'pa_profile_album';
117 $this->_pages[AT_PA_BASENAME.'profile_album.php']['parent'] = AT_PA_BASENAME.'index.php';
118 $this->_pages[AT_PA_BASENAME.'profile_album.php']['guide'] = 'general/?p=pa_albums.php';
120 $this->_pages[AT_PA_BASENAME.'shared_albums.php']['title_var'] = 'pa_shared_albums';
121 $this->_pages[AT_PA_BASENAME.'shared_albums.php']['parent'] = AT_PA_BASENAME.'index.php';
122 $this->_pages[AT_PA_BASENAME.'shared_albums.php']['guide'] = 'general/?p=pa_albums.php';
124 $this->_pages[AT_PA_BASENAME.'search.php']['title_var'] = 'search';
125 $this->_pages[AT_PA_BASENAME.'search.php']['parent'] = AT_PA_BASENAME.'index.php';
126 $this->_pages[AT_PA_BASENAME.'search.php']['guide'] = 'general/?p=pa_albums.php';
128 $this->_pages[AT_PA_BASENAME.'edit_album.php']['title_var'] = 'pa_edit_album';
129 $this->_pages[AT_PA_BASENAME.'edit_album.php']['parent'] = AT_PA_BASENAME.'index.php';
130 $this->_pages[AT_PA_BASENAME.'edit_album.php']['guide'] = 'general/?p=pa_albums.php';
132 $this->_pages[AT_PA_BASENAME.'delete_album.php']['title_var'] = 'pa_delete_album';
133 $this->_pages[AT_PA_BASENAME.'delete_album.php']['parent'] = AT_PA_BASENAME.'index.php';
135 $this->_pages[AT_PA_BASENAME.'albums.php']['title_var'] = 'pa_albums';
136 $this->_pages[AT_PA_BASENAME.'albums.php']['parent'] = AT_PA_BASENAME.'index.php';
137 $this->_pages[AT_PA_BASENAME.'albums.php']['guide'] = 'general/?p=pa_albums.php';
138 //$this->_pages[AT_PA_BASENAME.'albums.php']['children'] = array(AT_PA_BASENAME.'photo.php');
140 $this->_pages[AT_PA_BASENAME.'photo.php']['title_var'] = 'pa_photo';
141 $this->_pages[AT_PA_BASENAME.'photo.php']['parent'] = AT_PA_BASENAME.'albums.php';
142 $this->_pages[AT_PA_BASENAME.'photo.php']['guide'] = 'general/?p=pa_photo.php';
143 $this->_pages[AT_PA_BASENAME.'delete_photo.php']['title_var'] = 'pa_delete_photo';
144 $this->_pages[AT_PA_BASENAME.'delete_photo.php']['parent'] = AT_PA_BASENAME.'photo.php';
146 $this->_pages[AT_PA_BASENAME.'edit_photos.php']['title_var'] = 'pa_edit_photos';
147 $this->_pages[AT_PA_BASENAME.'edit_photos.php']['parent'] = AT_PA_BASENAME.'albums.php';
148 $this->_pages[AT_PA_BASENAME.'edit_photos.php']['guide'] = 'general/?p=pa_albums.php';
150 $this->_pages[AT_PA_BASENAME.'delete_comment.php']['title_var'] = 'pa_delete_comment';
151 $this->_pages[AT_PA_BASENAME.'delete_comment.php']['parent'] = AT_PA_BASENAME.'photo.php';