| [ Index ] |
PHP Cross Reference of Joomla 1.5.26 DE |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * @version $Id: view.html.php 14401 2010-01-26 14:10:00Z louis $ 4 * @package Joomla 5 * @subpackage Registration 6 * @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved. 7 * @license GNU/GPL, see LICENSE.php 8 * Joomla! is free software. This version may have been modified pursuant 9 * to the GNU General Public License, and as distributed it includes or 10 * is derivative of works licensed under the GNU General Public License or 11 * other free or open source software licenses. 12 * See COPYRIGHT.php for copyright notices and details. 13 */ 14 15 // Check to ensure this file is included in Joomla! 16 defined( '_JEXEC' ) or die( 'Restricted access' ); 17 18 jimport( 'joomla.application.component.view'); 19 20 /** 21 * HTML View class for the Registration component 22 * 23 * @package Joomla 24 * @subpackage Registration 25 * @since 1.0 26 */ 27 class UserViewRegister extends JView 28 { 29 function display($tpl = null) 30 { 31 global $mainframe; 32 33 // Check if registration is allowed 34 $usersConfig = &JComponentHelper::getParams( 'com_users' ); 35 if (!$usersConfig->get( 'allowUserRegistration' )) { 36 JError::raiseError( 403, JText::_( 'Access Forbidden' )); 37 return; 38 } 39 40 $pathway =& $mainframe->getPathway(); 41 $document =& JFactory::getDocument(); 42 $params = &$mainframe->getParams(); 43 44 // Page Title 45 $menus = &JSite::getMenu(); 46 $menu = $menus->getActive(); 47 48 // because the application sets a default page title, we need to get it 49 // right from the menu item itself 50 if (is_object( $menu )) { 51 $menu_params = new JParameter( $menu->params ); 52 if (!$menu_params->get( 'page_title')) { 53 $params->set('page_title', JText::_( 'Registration' )); 54 } 55 } else { 56 $params->set('page_title', JText::_( 'Registration' )); 57 } 58 $document->setTitle( $params->get( 'page_title' ) ); 59 60 $pathway->addItem( JText::_( 'New' )); 61 62 // Load the form validation behavior 63 JHTML::_('behavior.formvalidation'); 64 65 $user =& JFactory::getUser(); 66 $this->assignRef('user', $user); 67 $this->assignRef('params', $params); 68 parent::display($tpl); 69 } 70 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Wed Mar 28 15:54:07 2012 | Cross-referenced by PHPXref 0.7.1 |