Code Search for Developers
 
 
  

AboutController.php from Brim at Krugle


Show AboutController.php syntax highlighted

<?php

require_once ('framework/Controller.php');

/**
 * This controller regulates the about information, nothing more ;-)
 *
 * This file is part of the Brim project.
 * The brim-project is located at the following
 * location: {@link http://www.brim-project.org/ http://www.brim-project.org/}
 *
 * <pre> Enjoy :-) </pre>
 *
 * @author Barry Nauta - March 2003
 * @package org.brim-project.framework
 *
 * @copyright [brim-project.org] - Copyright (c) 2003 - 2007 Barry Nauta
 *
 * @license http://opensource.org/licenses/gpl-license.php
 * The GNU Public License
 */
class AboutController extends Controller
{
	/**
	 * Default constructor.
	 */
	function AboutController ()
	{
		parent::Controller ();
		$this->title = 'Brim - About';
		$this->pluginName = 'about';
		$this->itemName = 'About';
	}

	/**
	 * Get the actions for the about page. Since this is
	 * a static information page, no actions are defined
	 */
	function getActions ()
	{
	}

	/**
	 * Activates this page which in this case means retrieving
	 * the about information from the dictionary and passing
	 * it on as renderObject to the renderEngine
	 */
	function activate ()
	{
		$dictionary = $this->getDictionary ();
		$this->renderer = 'show'.$this->getItemName();
		$this->renderObjects = '<h1>Brim - '.$dictionary['version'].'</h1>';
		$this->renderObjects .= $dictionary['about_page'];
	}

	/**
	 * Returns the filename that will be given to the template for
	 * display
	 *
	 * @return string the filename of the template file to show.
	 */
	function getTemplateFile ()
	{
		//
		// Allow the template to override a specific file.
		// If this file exist (the file in the template directory),
		// it will be loaded, otherwise the default (in the plugin
		// directory) will be loaded
		//
		$renderer = 'templates/'.$this->getTemplate ().'/'.
			$this->getRenderer ();
		if (!(file_exists ($renderer)))
		{
			$renderer = 'framework/view/'.$this->getRenderer ();
		}
		return $renderer;
	}

	/**
	 * Retrieves the dictionary file by first tryin the language specific
	 * dictionary file, defaulting to the english version if the language
	 * specific file for the item does not exist and returns the contents
	 * as an array
	 *
	 * @return array the dictionary
	 */
	function getDictionary ()
	{
		include ('framework/i18n/dictionary_en.php');
		if (file_exists ('framework/i18n/dictionary_'.
			$_SESSION['brimLanguage'] . '.php'))
		{
			include ('framework/i18n/dictionary_'.
				$_SESSION['brimLanguage'].'.php');
		}
		$dictionary['item_title']=$dictionary['about'];
		return $dictionary;
	}
}
?>




See more files for this project here

Brim

BRIM is a MVC framework, written in PHP and based on items with a hierarchical relationship. The list of plugins make BRIM a Information Manager with plugins like bookmarks, a calendar, contacts tasks, notes, RSS etc. The application is multilingual.

Project homepage: http://sourceforge.net/projects/brim
Programming language(s): JavaScript,PHP,SQL
License: other

  configuration/
    databaseConfiguration.example.php
    index.php
    languages.php
    ldapConfiguration.example.php
    menuItems.php
    plugins.php
    preferenceConfiguration.php
    realmConfiguration.php
    templates.php
  i18n/
    common.php
    dictionary_cs.php
    dictionary_da.php
    dictionary_de.php
    dictionary_en.php
    dictionary_eo.php
    dictionary_es.php
    dictionary_es_CO.php
    dictionary_fr.php
    dictionary_gr_GR.php
    dictionary_he.php
    dictionary_hu.php
    dictionary_it.php
    dictionary_it_IT.php
    dictionary_nl.php
    dictionary_no.php
    dictionary_pl.php
    dictionary_pt.php
    dictionary_pt_BR.php
    dictionary_ro.php
    dictionary_ru.php
    dictionary_sv.php
    dictionary_zh_TW.php
    index.php
    messages_da.php
    messages_de.php
    messages_en.php
    messages_es_CO.php
    messages_fr.php
    messages_it.php
    messages_nl.php
    messages_pt_BR.php
    tips_da.php
    tips_en.php
    tips_fr.php
    tips_it.php
    tips_nl.php
  model/
    AdminServices.php
    Information.php
    InformationFactory.php
    InformationServices.php
    Item.php
    ItemFactory.php
    ItemParticipation.php
    ItemParticipationFactory.php
    ItemParticipationServices.php
    PluginServices.php
    PluginSetting.php
    PluginSettingFactory.php
    Preference.php
    PreferenceFactory.php
    PreferenceServices.php
    Services.php
    User.php
    UserFactory.php
    UserServices.php
    index.php
  realm/
    DatabaseRealm.php
    LdapRealm.php
    Realm.php
    RealmFactory.php
  sql/
    adminQueries.php
    authQueries.php
    create.mysql.brim_admin.sql
    create.mysql.brim_item_participation.sql
    create.mysql.brim_plugin_settings.sql
    create.mysql.brim_temp_users.sql
  test/
  util/
  view/
  AboutController.php
  AdminController.php
  AdminInstaller.php
  AjaxController.php
  Controller.php
  DashboardController.php
  HelpController.php
  Installer.php
  ItemController.php
  ItemParticipationInstaller.php
  PluginController.php
  PluginInstaller.php
  PreferenceController.php
  PreferenceInstaller.php
  RightsManager.php
  RightsManagerImpl.php
  TempUserInstaller.php
  UserController.php
  UserInstaller.php
  checkLogin.php
  index.php