Page 1 of 2
main_menu.html on custom page
Posted: 23. May 2010 18:54
by aliraj
Your Portal Version: 1.0.0RC3
Your phpBB Type: Standard phpBB3
MODs installed: Yes
Your knowledge: Beginner
Boardlink: http://shitv.pk
What have you done before the problem was there?
What have you already tryed to solve the problem?
Description and Message
I add a new custom page on my site, i want to show main_menu.html on that custom page, i try to include that file like overhall_header.html But it wont show properly, any help will really apriciated
Re: main_menu.html on custom page
Posted: 24. May 2010 11:55
by Marc
You will have to add this code to the php file of your custom page:
Code: Select all
include($phpbb_root_path . 'portal/block/main_menu.' . $phpEx);
Re: main_menu.html on custom page
Posted: 25. May 2010 15:29
by aliraj
i did but now all page is blank, below is my custom page php file
Code: Select all
<?php
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'portal/block/main_menu.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
$mode = request_var('mode', '');
if ($help_ary[1] == '--')
// Lets build a page ...
$template->assign_vars(array(
'L_BACK_TO_TOP' => $user->lang['BACK_TO_TOP'],
'SWITCH_COLUMN_MANUALLY' => (!$found_switch) ? true : false,
));
page_header($l_title, false);
$template->set_filenames(array(
'body' => 'europe.html')
);
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
?>
Re: main_menu.html on custom page
Posted: 25. May 2010 20:06
by Marc
Please add it before the page_header function.
Re: main_menu.html on custom page
Posted: 25. May 2010 22:57
by aliraj
i did but no working, this is my code, please if somthing is wrong paste it with wright code, really thankxa lot
Code: Select all
<?php
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @ignore
*/
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
$mode = request_var('mode', '');
if ($help_ary[1] == '--')
// Lets build a page ...
include($phpbb_root_path . 'portal/block/main_menu.' . $phpEx);
$template->assign_vars(array(
'L_BACK_TO_TOP' => $user->lang['BACK_TO_TOP'],
'SWITCH_COLUMN_MANUALLY' => (!$found_switch) ? true : false,
));
page_header($l_title, false);
$template->set_filenames(array(
'body' => 'europe.html')
);
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
?>
Re: main_menu.html on custom page
Posted: 25. May 2010 23:15
by Marc
You need to add this:
right after:
Re: main_menu.html on custom page
Posted: 26. May 2010 03:59
by aliraj
still not working:S
Code: Select all
<?php
/**
*
* @package phpBB3
* @version $Id$
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
/**
* @ignore
*/
define('IN_PHPBB', true);
define('IN_PORTAL', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
$mode = request_var('mode', '');
if ($help_ary[1] == '--')
// Lets build a page ...
include($phpbb_root_path . 'portal/block/main_menu.' . $phpEx);
$template->assign_vars(array(
'L_BACK_TO_TOP' => $user->lang['BACK_TO_TOP'],
'SWITCH_COLUMN_MANUALLY' => (!$found_switch) ? true : false,
));
page_header($l_title, false);
$template->set_filenames(array(
'body' => 'europe.html')
);
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
?>
Re: main_menu.html on custom page
Posted: 26. May 2010 16:43
by Marc
Please turn debug on in your config.php.
Re: main_menu.html on custom page
Posted: 26. May 2010 17:57
by aliraj
i turn on debug like this
Code: Select all
@define('PHPBB_INSTALLED', true);
@define('DEBUG', true);
@define('DEBUG_EXTRA', true);
?>
but now im getting this error
Code: Select all
[phpBB Debug] PHP Notice: in file /europe.php on line 29: Undefined variable: help_ary
[phpBB Debug] PHP Notice: in file /europe.php on line 36: Undefined variable: found_switch
[phpBB Debug] PHP Notice: in file /europe.php on line 39: Undefined variable: l_title
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4326: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3483)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4328: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3483)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4329: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3483)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4330: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3483
i posted above my custom page php file
Re: main_menu.html on custom page
Posted: 26. May 2010 21:21
by Marc
What do you need this line for:
It's totally useless.
Where is this defined:
Code: Select all
'SWITCH_COLUMN_MANUALLY' => (!$found_switch) ? true : false,
And what about $l_title here:
But that doesn't have anything to do with the porta. I recommend you ask about your problems on phpBB.com.
Re: main_menu.html on custom page
Posted: 26. May 2010 21:39
by aliraj
sorry i was using wrong php file this is my wright file
Code: Select all
<?php
define('IN_PHPBB', true);
define('IN_PORTAL', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
// Start session management
$user->session_begin();
$auth->acl($user->data);
$user->setup();
include($phpbb_root_path . 'portal/block/main_menu.' . $phpEx);
page_header('Europe Azadari');
$template->set_filenames(array(
'body' => 'europe.html',
));
make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));
page_footer();
?>
now im not getting any error but main_menu.html not showing on my custom page
Re: main_menu.html on custom page
Posted: 27. May 2010 10:20
by Marc
Well you still have to include main_menu.html in your HTML file.
Re: main_menu.html on custom page
Posted: 28. May 2010 06:47
by aliraj
i include
Code: Select all
<!-- INCLUDE portal/block/main_menu.html -->
in custom page html file, now its showing main_menu but not in proper formate, link below is my custom page
http://shiatv.pk/europe.php
Re: main_menu.html on custom page
Posted: 31. May 2010 03:54
by aliraj
any news???
Re: main_menu.html on custom page
Posted: 31. May 2010 13:21
by Marc
I think you still have to include _block_config.html like in portal_body.html.