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.

main_menu.html on custom page

Postby aliraj » 23. May 2010 18:54

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
aliraj
Active Member
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

Postby Marc » 24. May 2010 11:55

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); 
User avatar
Marc
Dev
Dev
 
Posts: 1495
Joined: 17. July 2008 21:08
Location: Clausthal-Zellerfeld / München
phpBB.de User: marc1706
phpBB.com User: marc1706

Re: main_menu.html on custom page

Postby aliraj » 25. May 2010 15:29

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

?>
aliraj
Active Member
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

Postby Marc » 25. May 2010 20:06

Please add it before the page_header function.
User avatar
Marc
Dev
Dev
 
Posts: 1495
Joined: 17. July 2008 21:08
Location: Clausthal-Zellerfeld / München
phpBB.de User: marc1706
phpBB.com User: marc1706

Re: main_menu.html on custom page

Postby aliraj » 25. May 2010 22:57

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

?>
aliraj
Active Member
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

Postby Marc » 25. May 2010 23:15

You need to add this:
Code: Select all
define('IN_PORTAL', true);


right after:
Code: Select all
define('IN_PHPBB', true);
User avatar
Marc
Dev
Dev
 
Posts: 1495
Joined: 17. July 2008 21:08
Location: Clausthal-Zellerfeld / München
phpBB.de User: marc1706
phpBB.com User: marc1706

Re: main_menu.html on custom page

Postby aliraj » 26. May 2010 03:59

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

?>
aliraj
Active Member
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

Postby Marc » 26. May 2010 16:43

Please turn debug on in your config.php.
User avatar
Marc
Dev
Dev
 
Posts: 1495
Joined: 17. July 2008 21:08
Location: Clausthal-Zellerfeld / München
phpBB.de User: marc1706
phpBB.com User: marc1706

Re: main_menu.html on custom page

Postby aliraj » 26. May 2010 17:57

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
aliraj
Active Member
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

Postby Marc » 26. May 2010 21:21

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.
User avatar
Marc
Dev
Dev
 
Posts: 1495
Joined: 17. July 2008 21:08
Location: Clausthal-Zellerfeld / München
phpBB.de User: marc1706
phpBB.com User: marc1706

Re: main_menu.html on custom page

Postby aliraj » 26. May 2010 21:39

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
aliraj
Active Member
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

Postby Marc » 27. May 2010 10:20

Well you still have to include main_menu.html in your HTML file.
User avatar
Marc
Dev
Dev
 
Posts: 1495
Joined: 17. July 2008 21:08
Location: Clausthal-Zellerfeld / München
phpBB.de User: marc1706
phpBB.com User: marc1706

Re: main_menu.html on custom page

Postby aliraj » 28. May 2010 06:47

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
aliraj
Active Member
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

Postby aliraj » 31. May 2010 03:54

any news???
aliraj
Active Member
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

Postby Marc » 31. May 2010 13:21

I think you still have to include _block_config.html like in portal_body.html.
User avatar
Marc
Dev
Dev
 
Posts: 1495
Joined: 17. July 2008 21:08
Location: Clausthal-Zellerfeld / München
phpBB.de User: marc1706
phpBB.com User: marc1706

Next

Return to board3 Portal - English Support

Who is online

Users browsing this forum: CommonCrawl [Bot] and 1 guest