Ticket #89: svn.ticket89.whish-change-welcome-to-phtagr-via-system-preference.patch

File svn.ticket89.whish-change-welcome-to-phtagr-via-system-preference.patch, 1.3 KB (added by sebastian, 2 years ago)

Quick solution which customizes the welcome header

  • views/system/admin_general.ctp

     
    66<fieldset><legend><?php __('General'); ?></legend> 
    77<?php 
    88  echo $form->input('general.title', array('label' => __('Gallery title', true))); 
     9  echo $form->input('home.welcomeText', array('label' => __('Welcome text', true))); 
    910?> 
    1011</fieldset> 
    1112 
  • views/home/index.ctp

     
    1 <h1><?php __("Welcome to phTagr"); ?></h1> 
     1<h1><?php echo h($option->get('home.welcomeText', __("Welcome to phTagr", true))); ?></h1> 
    22 
    33<div class="subcolumns"> 
    44  <div class="c50l"> 
  • controllers/system_controller.php

     
    4141    $this->requireRole(ROLE_SYSOP); 
    4242    if (isset($this->data)) { 
    4343      $this->_set(0, 'general.title', $this->data); 
     44      $this->_set(0, 'home.welcomeText', $this->data); 
    4445    } 
    4546    $this->data = $this->Option->getTree(0); 
    4647  }