/** * **/ public function before_filter(&$action, &$args) { parent::before_filter($action, $args); # initialize Stud.IP-Session page_open(array('sess' => 'Seminar_Session', 'auth' => 'Seminar_Default_Auth', 'perm' => 'Seminar_Perm', 'user' => 'Seminar_User')); $this->set_layout(null); }
/** * Common code for all actions: set default layout and page title. * * @param type $action * @param type $args */ function before_filter(&$action, &$args) { $this->validate_args($args, array('option', 'option')); parent::before_filter($action, $args); // set correct encoding if this is an ajax-call if (Request::isAjax()) { header('Content-Type: text/html; charset=Windows-1252'); } $this->flash = Trails_Flash::instance(); // set default layout $layout = $GLOBALS['template_factory']->open('layouts/base'); $this->set_layout($layout); // Set help keyword for Stud.IP's user-documentation and page title PageLayout::setHelpKeyword('Basis.Forum'); PageLayout::setTitle($_SESSION['SessSemName']['header_line'] . ' - ' . _('Forum')); $this->AVAILABLE_DESIGNS = array('web20', 'studip'); if ($GLOBALS['CANONICAL_RELATIVE_PATH_STUDIP'] && $GLOBALS['CANONICAL_RELATIVE_PATH_STUDIP'] != '/') { $this->picturepath = $GLOBALS['CANONICAL_RELATIVE_PATH_STUDIP'] . '/' . $this->dispatcher->trails_root . '/img'; } else { $this->picturepath = '/' . $this->dispatcher->trails_root . '/img'; } // we want to display the dates in german setlocale(LC_TIME, 'de_DE@euro', 'de_DE', 'de', 'ge'); // the default for displaying timestamps $this->time_format_string = "%a %d. %B %Y, %H:%M"; $this->time_format_string_short = "%d.%m.%Y, %H:%M"; $this->template_factory = new Flexi_TemplateFactory(dirname(__FILE__) . '/../templates'); //$this->check_token(); ForumVisit::setVisit($this->getId()); if (Request::int('page')) { ForumHelpers::setPage(Request::int('page')); } $this->seminar_id = $this->getId(); }
/** * Callback function being called before an action is executed. */ function before_filter(&$action, &$args) { parent::before_filter($action, $args); // open session page_open(array('sess' => 'Seminar_Session', 'auth' => 'Seminar_Default_Auth', 'perm' => 'Seminar_Perm', 'user' => 'Seminar_User')); // set up user session include 'lib/seminar_open.php'; $this->set_content_type('text/html; charset=windows-1252'); $this->area_structure = ['global' => ['title' => _('Stud.IP (systemweit)'), 'icon' => 'home'], 'inst' => ['title' => _('Einrichtungen'), 'icon' => 'institute'], 'sem' => ['title' => _('Veranstaltungen'), 'icon' => 'seminar'], 'user' => ['title' => _('Profile'), 'icon' => 'person']]; }
/** * **/ public function before_filter(&$action, &$args) { parent::before_filter($action, $args); $GLOBALS['perm']->check('autor'); $layout = $GLOBALS['template_factory']->open('layouts/base'); $this->set_layout($layout); Navigation::activateItem('/links/settings/oauth'); PageLayout::setTabNavigation('/links/settings'); PageLayout::setTitle(_('Applikationen')); $this->store = new OAuthConsumer(); $this->types = array('website' => _('Website'), 'program' => _('Herkömmliches Desktopprogramm'), 'app' => _('Mobile App')); }
/** * common tasks for all actions */ public function before_filter(&$action, &$args) { $this->with_session = true; parent::before_filter($action, $args); // Siteinfo-Class is defined in models/siteinfo.php $this->si = new Siteinfo(); $this->populate_ids($args); $this->add_navigation($action); if (is_object($GLOBALS['perm']) && $GLOBALS['perm']->have_perm('root')) { $this->setupSidebar(); } else { $action = 'show'; } PageLayout::setTitle(_('Impressum')); PageLayout::setTabNavigation('/footer/siteinfo'); }
/** * **/ public function before_filter(&$action, &$args) { parent::before_filter($action, $args); $GLOBALS['perm']->check('root'); $layout = $GLOBALS['template_factory']->open('layouts/base'); $this->set_layout($layout); Navigation::activateItem('/admin/config/oauth'); PageLayout::setTitle(_('OAuth Administration')); $this->store = new OAuthConsumer(); $this->types = array('website' => _('Website'), 'program' => _('Herkömmliches Desktopprogramm'), 'app' => _('Mobile App')); // Infobox $this->setInfoboxImage('infobox/administration.jpg'); if ($action !== 'index') { $back = sprintf('<a href="%s">%s</a>', $this->url_for('admin'), _('Zurück zur Übersicht')); $this->addToInfobox('Aktionen', $back, 'icons/16/black/arr_1left'); } $new = sprintf('<a href="%s">%s</a>', $this->url_for('admin/edit'), _('Neue Applikation registrieren')); $this->addToInfobox('Aktionen', $new, 'icons/16/black/plus'); $new = sprintf('<a href="%s">%s</a>', $this->url_for('admin/permissions'), _('Globale Zugriffseinstellungen')); $this->addToInfobox('Aktionen', $new, 'icons/16/black/admin'); }
/** * After filter, closes the page. * * @param String $action Name of the action that has been invoked * @param Array $args Arguments that were passed to the action method */ public function after_filter($action, $args) { parent::after_filter($action, $args); if (Request::isXhr()) { $this->response->add_header('X-Title', PageLayout::getTitle()); } page_close(); }
function before_filter(&$action, &$args) { $this->set_layout($GLOBALS['template_factory']->open('layouts/base')); parent::before_filter($action, $args); }
public function __construct($dispatcher) { parent::__construct($dispatcher); $this->plugin = $dispatcher->plugin; }