Problem with new pages!

This is an archive of the phpBB 2.0.x support forum. Support for phpBB2 has now ended.
Forum rules
Following phpBB2's EoL, this forum is now archived for reference purposes only.
Please see the following announcement for more information: viewtopic.php?f=14&t=1385785
Locked
sidewinder
Registered User
Posts: 55
Joined: Wed Dec 31, 2003 1:20 pm
Location: England
Contact:

Problem with new pages!

Post by sidewinder »

hey guys,
i was wondering how easy it is to just add a new page to the foryuums containing anything you like it to? is it possible and if so is it easy? I mean to create like a link just next to "usergroups" that goes to a new blank page. please help me
Last edited by sidewinder on Sat Feb 14, 2004 7:20 pm, edited 1 time in total.

User avatar
Drexion
Former Team Member
Posts: 8892
Joined: Sat Jan 25, 2003 9:54 pm
Location: City 17

Post by Drexion »

Your main focus is how to add a link , or how to add a page using your forum look ?

To add a link, you insert the HTML for it in overall_header.tpl (which is in your template folder). The base of that file has the HTML for the phpBB menu links.
See this article,
Editing Headers and Footers.

To add a page which uses your "forum look", you can pase the following code into a file, and save it as <filename>.php , and place it in your forum folder.

Code: Select all

<?php 

define('IN_PHPBB', true); 
$phpbb_root_path = './'; 
include($phpbb_root_path . 'extension.inc'); 
include($phpbb_root_path . 'common.'.$phpEx); 

// 
// Start session management 
// 
$userdata = session_pagestart($user_ip, PAGE_INDEX); 
init_userprefs($userdata); 
// 
// End session management 
// 
// 
// Start output of page 
// 
$page_title = "www.your-url.com"; 
include($phpbb_root_path . 'includes/page_header.'.$phpEx); 
?> 


<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline"> 
<tr> 
<th class="catHead" height="25"> 
<b>Title Whatever</b></th> 
</tr> 
<tr> 
<td class="row1" align="center"> 
<span class="genmed"> 

HTML OR TEXT GOES HERE 
<br>

</span> 
</td> 
</tr> 
</table> 

<br /> 


<?php 

include($phpbb_root_path . 'includes/page_tail.'.$phpEx); 
?> 
Where it says "HTML OR TEXT GOES HERE", you can place your own info.

sidewinder
Registered User
Posts: 55
Joined: Wed Dec 31, 2003 1:20 pm
Location: England
Contact:

Post by sidewinder »

thanks a lot man, thats a great help :D

sidewinder
Registered User
Posts: 55
Joined: Wed Dec 31, 2003 1:20 pm
Location: England
Contact:

Post by sidewinder »

ok i have added the page but now i have an error that i have no idea how to fix, if you find the time please take a look http://forums.XEclan.co.uk . and on my header how do i have the link i added not underlined?

Cheers

User avatar
Drexion
Former Team Member
Posts: 8892
Joined: Sat Jan 25, 2003 9:54 pm
Location: City 17

Post by Drexion »

Well you simply have to place the link in the same class as the other links.
This is usually the mainmenu class.
Place

Code: Select all

class="mainmenu"
in the 'a' tag of the link.
(ie <a href="whatever.." class="mainmenu"> )

This will vary depending on your style. Check the other links and see what class they are in.

sidewinder
Registered User
Posts: 55
Joined: Wed Dec 31, 2003 1:20 pm
Location: England
Contact:

Post by sidewinder »

i still have the underline and it is in the same class as the tohers. also do you know what the error at the top is?

User avatar
Drexion
Former Team Member
Posts: 8892
Joined: Sat Jan 25, 2003 9:54 pm
Location: City 17

Post by Drexion »

open the 'stats.php' file.

The last line should have

Code: Select all

?>
The '>' should be the UTTER LAST character in the file. ie, NO whitespaces, carraige returns, tabs etc. Delete anything after the last '>'.
Save/upload etc.

sidewinder
Registered User
Posts: 55
Joined: Wed Dec 31, 2003 1:20 pm
Location: England
Contact:

Post by sidewinder »

it still had made no difference. it says there is a problem with the page header, it says

Code: Select all

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/psa/home/vhosts/xeclan.co.uk/httpdocs/forums/stats.php:2) in /usr/local/psa/home/vhosts/xeclan.co.uk/httpdocs/forums/includes/page_header.php on line 474

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/psa/home/vhosts/xeclan.co.uk/httpdocs/forums/stats.php:2) in /usr/local/psa/home/vhosts/xeclan.co.uk/httpdocs/forums/includes/page_header.php on line 476

Warning: Cannot modify header information - headers already sent by (output started at /usr/local/psa/home/vhosts/xeclan.co.uk/httpdocs/forums/stats.php:2) in /usr/local/psa/home/vhosts/xeclan.co.uk/httpdocs/forums/includes/page_header.php on line 477
any more ideas about what could be wrong?

User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Post by A_Jelly_Doughnut »

Also, the <?php should have no characters before it :)
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish

sidewinder
Registered User
Posts: 55
Joined: Wed Dec 31, 2003 1:20 pm
Location: England
Contact:

Post by sidewinder »

thanks man, that was my problem, i had a whole line infront of my
"<?php" thanks alot!

Locked

Return to “2.0.x Support Forum”