Details

      Description

      1. Event for adding new custom log mode
      FILE: includes\acp\info\acp_logs.php
      EVENT NAME: core.acp_log_add_new_mode
      CODE CHANGED:

      	function module()
      	{
      		global  $phpbb_dispatcher;
      		$modes = array(
      				'admin'		=> array('title' => 'ACP_ADMIN_LOGS', 'auth' => 'acl_a_viewlogs', 'cat' => array('ACP_FORUM_LOGS')),
      				'mod'		=> array('title' => 'ACP_MOD_LOGS', 'auth' => 'acl_a_viewlogs', 'cat' => array('ACP_FORUM_LOGS')),
      				'users'		=> array('title' => 'ACP_USERS_LOGS', 'auth' => 'acl_a_viewlogs', 'cat' => array('ACP_FORUM_LOGS')),
      				'critical'	=> array('title' => 'ACP_CRITICAL_LOGS', 'auth' => 'acl_a_viewlogs', 'cat' => array('ACP_FORUM_LOGS')),
      				);
      		
      		/**
      		* Add a new log mode / modify $modes
      		*
      		* @event core.acp_log_add_new_mode
      		* @var	array	modes		Array with modes
      		*
      		*/
      		$vars = array('modes');
      		extract($phpbb_dispatcher->trigger_event('core.acp_log_add_new_mode', compact($vars)));
      		
      		return array(
      			'filename'	=> 'acp_logs',
      			'title'		=> 'ACP_LOGGING',
      			'version'	=> '1.0.0',
      			'modes'		=> $modes,
      		);
      	}
      

      ----------------------------------------------------------------
      2. (Not relevant!) Event for inserting log (for phpBB 3.1.4 – done!)
      FILE: includes\ucp\ucp_register.php
      NAME: core.ucp_prefs_register_data
      CODE:
      FIND: global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx;
      REPLACE TO: global $config, $db, $user, $auth, $template, $phpbb_root_path, $phpEx, $phpbb_dispatcher;
      FIND: // Check and initialize some variables if needed
      INSERT BEFORE:

      		/**
      		* Add code before they are assigned to the template or submitted
      		*
      		* To assign data to the template, use $template->assign_vars()
      		*
      		* @event core.ucp_prefs_register_data
      		* @var	bool	submit	Do we display the form only
      		*							or did the user press submit
      		* @var	array	data		Array with current ucp options data
      		*
      		*/
      		$vars = array('submit', 'data');
      		extract($phpbb_dispatcher->trigger_event('core.ucp_prefs_register_data', compact($vars)));
      

        Attachments

          Activity

            People

            • Assignee:
              Marc Marc
              Reporter:
              Boris Berdichevski Boris Berdichevski
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: