Embedding part of phpBB3 onto WebPage

Discussion forum for MOD Writers regarding MOD Development.
TeknoAXE
Registered User
Posts: 28
Joined: Sun Sep 08, 2013 2:36 am

Re: Embedding part of phpBB3 onto WebPage

Post by TeknoAXE »

Lumpy Burgertushie wrote:the jumpbox part looks ok , however, this part is not:
include "MenuBar.html";

also, are you saying that the code I posted above is at the very top of this Home3.php file?

it would help if we could see the whole file.



robert
Actually, that little piece of code has no effect on the phpbb3 code. I just put it there as a placeholder for what I want. Also, showing the entire webpage code would be a little tedious because I've broken the site up into little parts in much the same way phpBB3 breaks up their board...just not as complicated.

So yes, most pages on my site has the code you posted at the very top, along with other things I need, such as a nifty piece of code that parses a csv file that builds the rest of the site.

I'm thinking though, that it would be just easier if I could extract the information from the code you posted:

Code: Select all

<?php
    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();
....and just code the php to build the html myself. Can you extract the $user-data and $user->setup() so you can get information like last visit and messages?
TeknoAXE
Registered User
Posts: 28
Joined: Sun Sep 08, 2013 2:36 am

Re: Embedding part of phpBB3 onto WebPage

Post by TeknoAXE »

Okay, so I figured this one out. And now it's been applied to my entire website. :)

http://www.teknoaxe.com/Home.php

The answer is to not try to implement any of the html from the php templates. Instead, use the user class to extract the information you need to build your own community bar.

So at the top, I have a login and register link for those people who are not logged into my website, but when they are logged in, it will show their username, new and unread messages, and the last time they logged in.

It's simple, but it does show that you can have one login for the entire site.
atoirtap
Registered User
Posts: 63
Joined: Thu Aug 01, 2013 8:34 pm

Re: Embedding part of phpBB3 onto WebPage

Post by atoirtap »

Hi buddies, I found this topic searching how to embed phpbb search box in a html/php non-phpbb page, but it's not clear to me how to get it. Could please anyone tell me how? Thanks.

Return to “[3.0.x] MOD Writers Discussion”