[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 mtotheikle » 01 Mar 2008, 01:42

How do I get rid of the error saying cannot modify header infomation?

You can see it here Here

Never Mind I got it fixed
"You have a lifetime to learn technique. But I can teach you what is more important than technique: How to see. Learn that and all you have to do afterwards is press the shutter." - Garry Winogrand

I have turned into a Military Sergeant and Highway of Life and Handyman are my newest privates under my command. Don't be scared anyone, this is all for your good!

Image
User avatar
mtotheikle    
Supporter
Supporter
 
Posts: 1054
Joined: 10 Oct 2007, 22:43
Location: Washington
Favorite Team: Seahawks
Gender: Male
phpBB Knowledge: 10




phpBB Academy at StarTrekGuide
Support STG
Using PayPal Donate

Re: [Tutorial] Integrate your website around phpBB3

Postby Corgi » 01 Apr 2008, 14:16

How would I do this in reverse? E.g, the site be located at http://zyetendo.com/ssbb/index.php and the forum located at http://zyetendo.com ?
I can see this is being done here at STG, so it shouldn't be hard to explain how.
Play classic video games online at Zyetendo. Registering to use it takes under a minute, and you get access to tons of classic games like Pacman, Donkey Kong, Zelda, etc.
Corgi    
Crewman
Crewman
 
Posts: 8
Joined: 12 Mar 2008, 19:11
Favorite Team: Dolphins
Gender: Male
phpBB Knowledge: 6

Re: [Tutorial] Integrate your website around phpBB3

Postby Obsidian » 01 Apr 2008, 14:18

Try the ../../ trick...

Should do it. ;)
うるさいうるさいうるさい!

StopForumSpam Spam Reporting Database
Giving xrumer and friends a great big "screw you" since 2007.
User avatar
Obsidian    
Supporter
Supporter
 
Posts: 2250
Joined: 04 Mar 2008, 23:35
Gender: Male
phpBB Knowledge: 10

Re: [Tutorial] Integrate your website around phpBB3

Postby Corgi » 01 Apr 2008, 14:30

This is the code I did in my file:
Code: Select all
<?PHP
/**
*
* @name about.php
* @version 1.11.26
* @package phpBB WEBMASTERS CMS -custompages.php
* @copyright (c) 2007 topdownARTS, Webmasters United.org
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/

// Note: If you would like to have a page in a different location than in the main phpBB3 directory
// You must change the following variable, and change the 'U_PORTAL' template variable in functions.php
$phpbb_root_path = '../../';
define('IN_PHPBB', true);
$phpEx = substr(strrchr(__FILE__, '.'), 1);
// Lets make sure we have all of the variables loaded up for custom pages
include($phpbb_root_path/ . 'common.' . $phpEx);


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


// Output page
page_header($user->lang['Game Reviews']);

$template->set_filenames(array(
'body' => 'review_body.html')
// ENSURE THAT THE ABOVE FILENAME MATCHES THE FILENAME IN phpBB3/styles/subSilver/template
// dirrectory! (or subBlack whatever template you are using
);

make_jumpbox(append_sid("{$phpbb_root_path}viewforum.$phpEx"));

page_footer();

?>

I get this error:
Code: Select all
Parse error: syntax error, unexpected '.' in /home/wildw10/public_html/zyetendo/ssbb/game-reviews.php on line 18
Play classic video games online at Zyetendo. Registering to use it takes under a minute, and you get access to tons of classic games like Pacman, Donkey Kong, Zelda, etc.
Corgi    
Crewman
Crewman
 
Posts: 8
Joined: 12 Mar 2008, 19:11
Favorite Team: Dolphins
Gender: Male
phpBB Knowledge: 6

Re: [Tutorial] Integrate your website around phpBB3

Postby South 40 » 01 Apr 2008, 19:42

David,

First let me say "Thank You" for this tutorial. :good: :clapping:

I have been able to work my way thru alot more with it than without it.

Now I am ready to move to the next level I think and I am not sure how to procede.

I have my main site set to the root, and using Index.php for the dafault file, and the BB is in /phpBB3/.

I have everything working right, I can login in from my main site and get redirected back to the main site from the BB once login is complete and it is appending the sid as it should.

Now to the problem or situation I am trying to figure out.

I have everythinig but the BB as body content in Index.php, basically index.php cpntains the header and footer, and the only thing that changes with the click of a link is the body.

If you go to the BB it actuall goes to /phpBB3/ I will work on that part later but can live with it for now.

So how do I make the body part of index.php dynamic using the append sid(root_path).

I have that part working on another version of index.php by using the switch function, and setting the <A tag to use ?id=$pagename, but since we are able to declare vars with what you have how do I use that to change body content?

I hope I explained that right... :confused:

Thanks
Paul
South 40    
Crewman
Crewman
 
Posts: 8
Joined: 24 Feb 2008, 22:41
Gender: Male
phpBB Knowledge: 2

Re: [Tutorial] Integrate your website around phpBB3

Postby Claude Gagné » 08 May 2008, 20:28

Hi,

Thanks for the great tutorial. However I have a problem; instead of getting the custom error page, I get a general error from phpbb3: "Could not get style data".

Could it be due to my forum having a custom template based on prosilver assigned to it, or that the only language installed is French?

Here's my common.php file:

Code: Select all
<?php

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

    /**
     * @ignore
     */
    $phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : ROOT_PATH . 'forums/';
    $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, 2);

    // 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),
    ));

    ?>
Claude Gagné
Crewman
Crewman
 
Posts: 6
Joined: 08 May 2008, 20:23
Gender: Male

Re: [Tutorial] Integrate your website around phpBB3

Postby Highway of Life » 08 May 2008, 20:56

You?re specifying style_id = 2, do you have a style associated with style_id 2?

Paul (South 40), you lost me completely, can you provide the bit of code that you?re referencing so I can have a look at it?

Corgi: find this line: include($phpbb_root_path/ . 'common.' . $phpEx);
It should be: include($phpbb_root_path . 'common.' . $phpEx);
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

Re: [Tutorial] Integrate your website around phpBB3

Postby Claude Gagné » 09 May 2008, 04:33

Highway of Life wrote:You?re specifying style_id = 2, do you have a style associated with style_id 2?
Yes, I do. I was getting a blank page before, when I left the value at 1 (prosilver), so I checked the id of my custom template in the db (phpp_styles_template) and changed the value accordingly (2).

However when I check in the db, the phpbb_styles_template_data table is empty, can it be that the page is looking for the style data in the DB? The template is set to be saved in the system files, not the DB.

EDIT: In fact, I guess I mixed up the template_id with the style_id. My custom style_id is 3. I changed it in the common.php file but I get the same results.

EDIT2: OK disregard the last comment. I did some testing, and the REAL problem I'm having is that I get a blank page; the "Couldn't load style data" error is normal and appears only when I specify a style_id that doesn't exist.

EDIT3: Ok disregard the whole thing. My 404_error.html error page sohehow had the 404error.php code in it instead... :blush:
Claude Gagné
Crewman
Crewman
 
Posts: 6
Joined: 08 May 2008, 20:23
Gender: Male

Re: [Tutorial] Integrate your website around phpBB3

Postby ofi » 02 Jun 2008, 05:24

Hi
Before i start, my forum is here http://www.almennt.com/phpBB3 and i want to integrate this site http://www.almennt.com/nytt.php around the forum, can i do it with this tutorial.?
User avatar
ofi    
Crewman
Crewman
 
Posts: 3
Joined: 13 Jan 2008, 05:42
Location: Iceland
Favorite Team: Liverpool
Gender: Male

Re: [Tutorial] Integrate your website around phpBB3

Postby Davethegreat » 02 Jun 2008, 09:12

Well, without boring you guys, I have a very nice website theme. I am wondering how to grab the Groups Membership tables without the whole page So I can intergrate it into my site. (Sick of waiting to accept someone and then having to add them in manually, much prefere to do it once and be done with it.)

So my question is if I wished to call four groups, (I can give you names of the groups from the sql table), add each one to a seperate table, and only call for three coloumns of information would it be possible? While having the table grow and shrink while being populated.
User avatar
Davethegreat    
Supporter
Supporter
 
Posts: 163
Joined: 21 May 2008, 10:05
Location: Widnes UK
Favorite Team: Liverpool
Gender: Male
phpBB Knowledge: 5

PreviousNext

Return to Tutorials and How-Tos

Who is online

Users browsing this forum: MSNbot Media and 9 guests