config/routing.yml
. There the {name}
variable is set. So what ever is put there is the name.controller/main.php
there is this function.
Code: Select all
public function handle($name)
{
$l_message = !$this->config['acme_demo_goodbye'] ? 'DEMO_HELLO' : 'DEMO_GOODBYE';
$this->template->assign_var('DEMO_MESSAGE', $this->user->lang($l_message, $name));
return $this->helper->render('demo_body.html', $name);
}
$l_message
checks if we're saying "Hello" or "Goodbye", set from the ACP.'DEMO_MESSAGE'
.$this->user->lang($l_message, $name)
. Note that coding it like this is pretty much the same as: sprintf($this->user->lang['DEMO_HELLO'], $name)
, it's just easier as you don't have to use the sprintf
part.return
'sets' the template. First parameter is the template file and the second is the Page Title.Code: Select all
<?php
/**
*
* This file is part of the phpBB Forum Software package.
*
* @copyright (c) phpBB Limited <https://www.phpbb.com>
* @license GNU General Public License, version 2 (GPL-2.0)
*
* For full copyright and license information, please see
* the docs/CREDITS.txt file.
*
*/
namespace acme\demo\migrations;
use phpbb\db\migration\migration;
class add_module extends migration
{
public function effectively_installed()
{
return isset($this->config['acme_demo_goodbye']);
}
static public function depends_on()
{
return array('\phpbb\db\migration\data\v31x\v314');
}
public function update_data()
{
return array(
array('config.add', array('acme_demo_goodbye', 0)),
array('module.add', array(
'acp',
'ACP_CAT_DOT_MODS',
'ACP_DEMO_TITLE'
)),
array('module.add', array(
'acp',
'ACP_DEMO_TITLE',
array(
'module_basename' => '\acme\demo\acp\main_module',
'modes' => array('settings'),
),
)),
);
}
}
Code: Select all
mod_fcgid: stderr: PHP Fatal error: Cannot redeclare class acme\\demo\\migrations\\add_module in /var/www/clients/client0/web2/web/forum/ext/acme/demo/migrations/migration.php on line 51
after SubmitFatal error: Class 'Symfony\Component\Finder\Finder' not found in C:\xampp\htdocs\phpBB32\ext\phpbb\skeleton\helper\packager.php on line 201
Known issue - see viewtopic.php?f=64&t=2366391mike2003 wrote:does not work?after SubmitFatal error: Class 'Symfony\Component\Finder\Finder' not found in C:\xampp\htdocs\phpBB32\ext\phpbb\skeleton\helper\packager.php on line 201
If you do not know about "Composer" then I would suggest that you Google it.mike2003 wrote:About which "composer" you talking about?
I have this EXT and phpbb 3.1.8