[vanillin commit] r291 - in trunk: appg themes

0 views
Skip to first unread message

codesite...@google.com

unread,
Sep 30, 2007, 9:22:05 PM9/30/07
to vanilli...@googlegroups.com
Author: helgith
Date: Sun Sep 30 18:21:02 2007
New Revision: 291

Modified:
trunk/appg/init_vanilla.php
trunk/themes/foot.php

Log:
I hated that bloody "this is lalalalala and docs and whatnot" on the right side, lets keep the powered by at the bottom, no docs or such, for now anyway.

Modified: trunk/appg/init_vanilla.php
==============================================================================
--- trunk/appg/init_vanilla.php (original)
+++ trunk/appg/init_vanilla.php Sun Sep 30 18:21:02 2007
@@ -41,8 +41,8 @@
// - Define global variables relative to the current context (SelfUrl

$Context = Context::getInstance();
-$Context->DatabaseTables = &$DatabaseTables;
-$Context->DatabaseColumns = &$DatabaseColumns;
+$Context->DatabaseTables = $DatabaseTables;
+$Context->DatabaseColumns = $DatabaseColumns;

// Start the session management
$Context->StartSession();
@@ -66,12 +66,12 @@
$Page->FireEvent('Page_Init');

// DEFINE THE MASTER PAGE CONTROLS
-$Head = $of->CreateControl('Head');
-$Menu = $of->CreateControl('Menu');
-$Panel = $of->CreateControl('Panel');
+$Head = $of->CreateControl('Head');
+$Menu = $of->CreateControl('Menu');
+$Panel = $of->CreateControl('Panel');
$NoticeCollector = $of->CreateControl('NoticeCollector');
-$Foot = $of->CreateControl('Filler', 'foot.php');
-$PageEnd = $of->CreateControl('PageEnd');
+$Foot = $of->CreateControl('Filler', 'foot.php');
+$PageEnd = $of->CreateControl('PageEnd');

// BUILD THE PAGE HEAD
// Every page will require some basic definitions for the header.
@@ -88,33 +88,33 @@
$Menu->AddTab($Context->GetDefinition('Search'), 'search', GetUrl($Configuration, 'search.php'), '', $Configuration['TAB_POSITION_SEARCH']);
$session = Session::getInstance();
if ($session->UserID > 0) {
- // Make sure they should be seeing the settings tab
- $RequiredPermissions = array('PERMISSION_CHECK_FOR_UPDATES',
- 'PERMISSION_APPROVE_APPLICANTS',
- 'PERMISSION_MANAGE_REGISTRATION',
- 'PERMISSION_ADD_ROLES',
- 'PERMISSION_EDIT_ROLES',
- 'PERMISSION_REMOVE_ROLES',
- 'PERMISSION_ADD_CATEGORIES',
- 'PERMISSION_EDIT_CATEGORIES',
- 'PERMISSION_REMOVE_CATEGORIES',
- 'PERMISSION_SORT_CATEGORIES',
- 'PERMISSION_CHANGE_APPLICATION_SETTINGS',
- 'PERMISSION_MANAGE_EXTENSIONS',
- 'PERMISSION_MANAGE_LANGUAGE',
- 'PERMISSION_MANAGE_STYLES',
- 'PERMISSION_MANAGE_THEMES');
-
- $RequiredPermissionsCount = count($RequiredPermissions);
- for ($i = 0; $i < $RequiredPermissionsCount; $i++) {
- if ($session->User->Permission($RequiredPermissions[$i])) {
- $Menu->AddTab($Context->GetDefinition('Settings'), 'settings', GetUrl($Configuration, 'settings.php'), '', $Configuration['TAB_POSITION_SETTINGS']);
- break;
- }
- }
+ // Make sure they should be seeing the settings tab
+ $RequiredPermissions = array('PERMISSION_CHECK_FOR_UPDATES',
+ 'PERMISSION_APPROVE_APPLICANTS',
+ 'PERMISSION_MANAGE_REGISTRATION',
+ 'PERMISSION_ADD_ROLES',
+ 'PERMISSION_EDIT_ROLES',
+ 'PERMISSION_REMOVE_ROLES',
+ 'PERMISSION_ADD_CATEGORIES',
+ 'PERMISSION_EDIT_CATEGORIES',
+ 'PERMISSION_REMOVE_CATEGORIES',
+ 'PERMISSION_SORT_CATEGORIES',
+ 'PERMISSION_CHANGE_APPLICATION_SETTINGS',
+ 'PERMISSION_MANAGE_EXTENSIONS',
+ 'PERMISSION_MANAGE_LANGUAGE',
+ 'PERMISSION_MANAGE_STYLES',
+ 'PERMISSION_MANAGE_THEMES');
+
+ $RequiredPermissionsCount = count($RequiredPermissions);
+ for ($i = 0; $i < $RequiredPermissionsCount; $i++) {
+ if ($session->User->Permission($RequiredPermissions[$i])) {
+ $Menu->AddTab($Context->GetDefinition('Settings'), 'settings', GetUrl($Configuration, 'settings.php'), '', $Configuration['TAB_POSITION_SETTINGS']);
+ break;
+ }
+ }

- // Add the account tab
- $Menu->AddTab($Context->GetDefinition('Account'), 'account', GetUrl($Configuration, 'account.php'), '', $Configuration['TAB_POSITION_ACCOUNT']);
+ // Add the account tab
+ $Menu->AddTab($Context->GetDefinition('Account'), 'account', GetUrl($Configuration, 'account.php'), '', $Configuration['TAB_POSITION_ACCOUNT']);
}

// Define the context object's passthru variables
@@ -123,8 +123,6 @@
// INCLUDE EXTENSIONS
include $Configuration['APPLICATION_PATH'].'conf/extensions.php';

-$Panel->AddString($Context->GetDefinition('PanelFooter'), 500);
-
// Make sure to get all delegates from the extensions into objects which were
// constructed before the extensions were loaded.
$Head->GetDelegatesFromContext();
@@ -137,5 +135,10 @@
// If the sign-in and sign-out urls have not been modified from their default
// values, concatenate them with the web root so that they link correctly if
// mod_rewrite is on.
-if ($Configuration['SIGNIN_URL'] == 'people.php') $Configuration['SIGNIN_URL'] = $Configuration['WEB_ROOT'].$Configuration['SIGNIN_URL'];
-if ($Configuration['SIGNOUT_URL'] == 'people.php?PostBackAction=SignOutNow') $Configuration['SIGNOUT_URL'] = $Configuration['WEB_ROOT'].$Configuration['SIGNOUT_URL'];
\ No newline at end of file
+if ($Configuration['SIGNIN_URL'] == 'people.php') {
+ $Configuration['SIGNIN_URL'] = $Configuration['WEB_ROOT'].$Configuration['SIGNIN_URL'];
+}
+
+if ($Configuration['SIGNOUT_URL'] == 'people.php?PostBackAction=SignOutNow') {
+ $Configuration['SIGNOUT_URL'] = $Configuration['WEB_ROOT'].$Configuration['SIGNOUT_URL'];
+}
\ No newline at end of file

Modified: trunk/themes/foot.php
==============================================================================
--- trunk/themes/foot.php (original)
+++ trunk/themes/foot.php Sun Sep 30 18:21:02 2007
@@ -3,6 +3,10 @@

echo '</div>
<a id="pgbottom" name="pgbottom">&nbsp;</a>
+ <div id="powered_by">';
+echo $this->Context->GetDefinition('PanelFooter');
+echo '
+ </div>
</div>
</div>';

Reply all
Reply to author
Forward
0 new messages