main_menu.html on custom page

Current Version: 1.0.6
Released: 09.01.10
Forum rules
Before creating a new support thread, please take a look in the board3 Portal FAQ and use the search!
Many questions have already been answered.

Topic author
aliraj
Active Member
Posts: 10
Joined: 12. May 2010 20:28
phpBB.de User: aliraj
phpBB.com User: aliraj

main_menu.html on custom page

Post 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
User avatar

Marc
Dev
Posts: 2504
Joined: 17. July 2008 21:08
phpBB.de User: marc1706
phpBB.com User: Marc
Location: Clausthal-Zellerfeld / München
Contact:

Re: main_menu.html on custom page

Post 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); 

Topic author
aliraj
Active Member
Posts: 10
Joined: 12. May 2010 20:28
phpBB.de User: aliraj
phpBB.com User: aliraj

Re: main_menu.html on custom page

Post 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();

?>
User avatar

Marc
Dev
Posts: 2504
Joined: 17. July 2008 21:08
phpBB.de User: marc1706
phpBB.com User: Marc
Location: Clausthal-Zellerfeld / München
Contact:

Re: main_menu.html on custom page

Post by Marc »

Please add it before the page_header function.

Topic author
aliraj
Active Member
Posts: 10
Joined: 12. May 2010 20:28
phpBB.de User: aliraj
phpBB.com User: aliraj

Re: main_menu.html on custom page

Post 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();

?>
User avatar

Marc
Dev
Posts: 2504
Joined: 17. July 2008 21:08
phpBB.de User: marc1706
phpBB.com User: Marc
Location: Clausthal-Zellerfeld / München
Contact:

Re: main_menu.html on custom page

Post by Marc »

You need to add this:

Code: Select all

define('IN_PORTAL', true);
right after:

Code: Select all

define('IN_PHPBB', true);

Topic author
aliraj
Active Member
Posts: 10
Joined: 12. May 2010 20:28
phpBB.de User: aliraj
phpBB.com User: aliraj

Re: main_menu.html on custom page

Post 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();

?>
User avatar

Marc
Dev
Posts: 2504
Joined: 17. July 2008 21:08
phpBB.de User: marc1706
phpBB.com User: Marc
Location: Clausthal-Zellerfeld / München
Contact:

Re: main_menu.html on custom page

Post by Marc »

Please turn debug on in your config.php.

Topic author
aliraj
Active Member
Posts: 10
Joined: 12. May 2010 20:28
phpBB.de User: aliraj
phpBB.com User: aliraj

Re: main_menu.html on custom page

Post 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
User avatar

Marc
Dev
Posts: 2504
Joined: 17. July 2008 21:08
phpBB.de User: marc1706
phpBB.com User: Marc
Location: Clausthal-Zellerfeld / München
Contact:

Re: main_menu.html on custom page

Post by Marc »

What do you need this line for:

Code: Select all

      if ($help_ary[1] == '--')
It's totally useless.

Where is this defined:

Code: Select all

   'SWITCH_COLUMN_MANUALLY'   => (!$found_switch) ? true : false,
And what about $l_title here:

Code: Select all

page_header($l_title, false);
But that doesn't have anything to do with the porta. I recommend you ask about your problems on phpBB.com.

Topic author
aliraj
Active Member
Posts: 10
Joined: 12. May 2010 20:28
phpBB.de User: aliraj
phpBB.com User: aliraj

Re: main_menu.html on custom page

Post 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
User avatar

Marc
Dev
Posts: 2504
Joined: 17. July 2008 21:08
phpBB.de User: marc1706
phpBB.com User: Marc
Location: Clausthal-Zellerfeld / München
Contact:

Re: main_menu.html on custom page

Post by Marc »

Well you still have to include main_menu.html in your HTML file.

Topic author
aliraj
Active Member
Posts: 10
Joined: 12. May 2010 20:28
phpBB.de User: aliraj
phpBB.com User: aliraj

Re: main_menu.html on custom page

Post 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 pagehttp://shiatv.pk/europe.php

Topic author
aliraj
Active Member
Posts: 10
Joined: 12. May 2010 20:28
phpBB.de User: aliraj
phpBB.com User: aliraj

Re: main_menu.html on custom page

Post by aliraj »

any news???
User avatar

Marc
Dev
Posts: 2504
Joined: 17. July 2008 21:08
phpBB.de User: marc1706
phpBB.com User: Marc
Location: Clausthal-Zellerfeld / München
Contact:

Re: main_menu.html on custom page

Post by Marc »

I think you still have to include _block_config.html like in portal_body.html.
Locked

Return to “board3 Portal 1.0.x - English Support”