[Tutorial] Integrate your website around phpBB3

How-to's, little tricks, tutorials, code examples (snippets) and read-me's.

Re: [Tutorial] Integrate your website around phpBB3

Postby Dodo187 » 27 Sep 2008, 06:57

Thanks for the Tutorial.

I have some problems getting These Sidebars integrating in to the website.
I have copied this code in the "root/theme/stylesheet.css" file:
Code: Select all
/**
*
* @package STG
* @version $Id$
* @copyright (c) 2007 Star Trek Guide Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

/* Some CSS styles for your website (specifically) */

/* =page-sidebar
   ----------------------------------------------------*/
.page-sidebar{
   float: left;
   margin-top: 0px;
   margin-bottom: 4px;
   width: 20%;
}


I have tried doing it al in the original template directory and then it works fine, but not when I put it the custom stylesheet.css. And I dont want the sidebar on the the forum to be shown.

common.php
Code: Select all
<?php
/**
*
* @author David Lewis ( http://startrekguide.com ) Highway of Life
* @package STG
* @version $Id: common.php 165 2007-12-23 05:21:41Z Highway of Life $
* @copyright (c) 2007 Star Trek Guide Group
*
*/

if (!defined('IN_PHPBB') || !defined('ROOT_PATH'))
{
   exit;
}

/**
* @ignore
*/
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : ROOT_PATH . 'phpBB3/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include(ROOT_PATH . 'includes/functions_website.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);

// void setup ([ $lang_set = false], [ $style = false])
// language and style setup, we?ll use $style = 1 (prosilver)
$user->setup(false, 5);

// set your custom template path
// void set_custom_template ( $template_path,  $template_name)
$template->set_custom_template(ROOT_PATH . 'template', 'website');

// Set some basic (global) template variables
$template->assign_vars(array(
   'U_WEBSITE_STYLESHEET'   => ROOT_PATH . 'theme/stylesheet.css',
   'U_HOME'            => append_sid(ROOT_PATH),
   'U_FORUM'            => append_sid($phpbb_root_path),
));

?>


Am I doing someting wrong or do I need to do something to activate the "root/theme/stylesheet.css" file.
Thanks in advance

Update: Nevermind its got fixed, I just needed to put <link href="{U_WEBSITE_STYLESHEET}" rel="stylesheet" type="text/css" /> in the overall_header.html with the other script links.
User avatar
Dodo187
Crewman
Crewman
 
Posts: 2
Joined: 17 Feb 2008, 13:54
Location: Netherlands, the
Gender: Male


Re: [Tutorial] Integrate your website around phpBB3

Postby BoyKat » 04 Nov 2008, 12:29

I am new to phpbb3 and also php for that matter. I have tried to follow the steps and just cant seem to get it to all work. " I am sure it is b/c I am not a master of php and I installed my phpbb3 in a folder called "forum". Well I wanted to ask if someone could help me out and create a demo site of all this in action and also have a zip or rar file to download. Then I could upload this to my server and see for myself what I did not understand. After that I can make edits and changes on it and simulate the rest of my site.

Thank you,
BK
BoyKat    
Crewman
Crewman
 
Posts: 6
Joined: 03 Nov 2008, 12:37
Gender: Male

Re: [Tutorial] Integrate your website around phpBB3

Postby Mr_Bond » 04 Nov 2008, 12:57

BoyKat wrote:I am new to phpbb3 and also php for that matter. I have tried to follow the steps and just cant seem to get it to all work. " I am sure it is b/c I am not a master of php and I installed my phpbb3 in a folder called "forum". Well I wanted to ask if someone could help me out and create a demo site of all this in action and also have a zip or rar file to download. Then I could upload this to my server and see for myself what I did not understand. After that I can make edits and changes on it and simulate the rest of my site.

Thank you,
BK

You may want to try the 'phpBB Work for Hire' forum if that's what you are looking for. Keep in mind though, this tutorial is meant for people that do have a decent knowledge of php / phpBB3's internal framework otherwise you'll have a tough time taking this and expanding on it ;)
User avatar
Mr_Bond    
Lieutenant
Lieutenant
 
Posts: 246
Joined: 14 Feb 2008, 14:45
Location: localhost
Favorite Team: Chicago Bears
Gender: Male
phpBB Knowledge: 7

Re: [Tutorial] Integrate your website around phpBB3

Postby BoyKat » 04 Nov 2008, 13:22

I understand but If someone could help me out I would be so thank full.
BoyKat    
Crewman
Crewman
 
Posts: 6
Joined: 03 Nov 2008, 12:37
Gender: Male

Re: [Tutorial] Integrate your website around phpBB3

Postby Yourii » 24 Nov 2008, 11:27

When I try this, i get this error up:
Code: Select all
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3729: Cannot modify header information - headers already sent by (output started at /home/c7443ern/domains/fireshot.nl/public_html/7lor/errordocs/404error.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3731: Cannot modify header information - headers already sent by (output started at /home/c7443ern/domains/fireshot.nl/public_html/7lor/errordocs/404error.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3732: Cannot modify header information - headers already sent by (output started at /home/c7443ern/domains/fireshot.nl/public_html/7lor/errordocs/404error.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3733: Cannot modify header information - headers already sent by (output started at /home/c7443ern/domains/fireshot.nl/public_html/7lor/errordocs/404error.php:1)


Help me please?
Yourii
Crewman
Crewman
 
Posts: 4
Joined: 25 Sep 2008, 12:37
Gender: Male
phpBB Knowledge: 3

Re: [Tutorial] Integrate your website around phpBB3

Postby topdown » 24 Nov 2008, 18:26

@Yourii Open the errordocs/404error.php and see if there is a space or BOM character on line 1 before the <?php
Do not PM me for Support unless I give permission in a post......PM's only help one, posts help everyone !
User avatar
topdown    
STG Styles Leader
STG Styles Leader
 
Posts: 3021
Joined: 01 Oct 2007, 22:56
Location: Handyman's harddrive
Favorite Team: STG Teams
Gender: Male
phpBB Knowledge: 9

Re: [Tutorial] Integrate your website around phpBB3

Postby Yourii » 25 Nov 2008, 08:48

Thank, it was in evey file :( . But thank you :D .
Yourii
Crewman
Crewman
 
Posts: 4
Joined: 25 Sep 2008, 12:37
Gender: Male
phpBB Knowledge: 3

Re: [Tutorial] Integrate your website around phpBB3

Postby blacrobous » 08 Jan 2009, 19:26

Code: Select all
[phpBB Debug] PHP Notice: in file /includes/session.php on line 990: Cannot modify header information - headers already sent by (output started at /f1/content/krazygundaz/public/includes/functions_website.php:1)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 990: Cannot modify header information - headers already sent by (output started at /f1/content/krazygundaz/public/includes/functions_website.php:1)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 990: Cannot modify header information - headers already sent by (output started at /f1/content/krazygundaz/public/includes/functions_website.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3764: Cannot modify header information - headers already sent by (output started at /f1/content/krazygundaz/public/includes/functions_website.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3766: Cannot modify header information - headers already sent by (output started at /f1/content/krazygundaz/public/includes/functions_website.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3767: Cannot modify header information - headers already sent by (output started at /f1/content/krazygundaz/public/includes/functions_website.php:1)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3768: Cannot modify header information - headers already sent by (output started at /f1/content/krazygundaz/public/includes/functions_website.php:1)


i removed the spaces but still i get this error some one help me :blackeye:
blacrobous    
Crewman
Crewman
 
Posts: 3
Joined: 14 Apr 2008, 07:33
Gender: Male
phpBB Knowledge: 1

Re: [Tutorial] Integrate your website around phpBB3

Postby Ash-Smith » 09 Feb 2009, 14:40

I'm a little confused with this so I need some help if people can answer my questions!

What I'm trying to do is be able to create a page just like the FAQ page within my site. That way I can add lots of different parts into my site. Here's a link to my FAQ page on my site (CLICKY) which is what I want to have but with my own content within the box and obviously my own title at the top of the box where it now says "Frequently Asked Questions".

My problem is I don't want to replace the "common.php" file in the root of my site unless I'm 100% it'll all work. And as you may be able to tell from my site, it's a customised version of the AeroBlueX template, just in case that makes any difference (other than the fact that I'd need to use that templates overall_header and overall_footer files.

I've been looking at different parts of the faq files all day and I just can't figure out how to do it! lol! I did trial this step-by-step guide in its own directory (http://www.fiestaownersclub.com/5/) but it just didn't work and all I got was the unformatted index.php page.

Thanks in advance for any help anyone can give me,
Ash
Ash-Smith    
Crewman
Crewman
 
Posts: 1
Joined: 09 Feb 2009, 13:33
Gender: Male
phpBB Knowledge: 7

Re: [Tutorial] Integrate your website around phpBB3

Postby Highway of Life » 09 Feb 2009, 15:02

I?m a little vague as to what exactly you are after, but let me see if I can help.
First, have you tried the phpBB3 Website Integration Framework? Might give that a try, but if your forums are actually the root of your site, you can put the framework in it?s own directory -- for further questions regarding that framework, if you have any, ask in that topic.

If you want to create a page just like the FAQ, first you have to understand how the FAQ page works. It?s language driven, and uses arrays from the /language/en/help_faq.php file.
You can duplicate the /faq.php file to whatever new page you need, and change the following:
  1. Remove the switch and use something like $user->add_lang('my_page', false, true);
  2. Change the $template->set_filenames body template to: 'body' => 'my_page_body.html') And ensure you create or duplicate the faq_body.html template file.
That?s all you have to change in that file, but here are some additional changes you can make:
  • faq_block.faq_row, FAQ_QUESTION, FAQ_ANSWER can be whatever you wish to match your content, just make sure you change those respective blocks in the template file.

Once you reply with additional questions or if it worked, please let us know of your PHP and/or phpBB expertise level so we can tailor the questions to fit your skill level. Please be honest as it will help us best determine how to help you. :)
Watch out! I might do a code wheelie!

User avatar
Highway of Life    
STG Jedi Master
STG Jedi Master
 
Posts: 10458
Joined: 08 May 2006, 05:23
Location: Beware of Programmers carrying screwdrivers
Gender: Male
phpBB Knowledge: 10

PreviousNext

Return to Tutorials and How-Tos

Who is online

Users browsing this forum: Google [Bot] and 6 guests