Results 1 to 6 of 6

Thread: phpBB3 Integration into Site

  1. #1
    (。◕‿‿◕。) Recognized Member Jojee's Avatar
    Join Date
    Dec 1999
    Posts
    9,611
    Contributions
    • Former Cid's Knight

    Moogle phpBB3 Integration into Site

    I want to have a Login option as well as the latest posts of the forum on my site sidebar. I looked up how to do this and it seems people use Joomla or something? I don't really know, but I downloaded that and I don't get it at all. o_o

    Can someone tell me, in really simple terms xD, how to accomplish what I'm trying to do?


    Wat
    is
    going
    on
    wtf
    rawr

  2. #2
    Draw the Drapes Recognized Member rubah's Avatar
    Join Date
    Dec 2004
    Location
    Now Destiny is done.
    Posts
    30,653
    Blog Entries
    21
    Contributions
    • Former Administrator
    • Former Cid's Knight

    Default

    You need to use php to make calls to your forum's database.

  3. #3
    (。◕‿‿◕。) Recognized Member Jojee's Avatar
    Join Date
    Dec 1999
    Posts
    9,611
    Contributions
    • Former Cid's Knight

    Default

    Yes, but how?


    Wat
    is
    going
    on
    wtf
    rawr

  4. #4
    i n v i s i b l e Tech Admin o_O's Avatar
    Join Date
    Jun 2001
    Location
    New Zealand
    Posts
    2,957
    Blog Entries
    1

    FFXIV Character

    Humphrey Squibbles (Sargatanas)

    Default

    I've never tried to do it with phpBB, but you basically need to have a script that handles making a connection to the database which you can include in your page code to grab the latest posts. You can make a connection with the following code:
    PHP Code:
    <?php
        
    // The $conf array holds the configuration data for the db
        
    $conf = Array('host' => 'real_host''user' => 'real_username''pass' => 'real_password''db' => 'real_database');

        function 
    connect() {
            return 
    mysql_pconnect($conf['host'], $conf['user'], $conf['pass']);
        }
    ?>
    And call it like this:
    PHP Code:
    <?php
        $con 
    connect();
        
    mysql_select_db($conf['db']);
    ?>
    Then when you want to make a query:
    PHP Code:
    <?php
        $sql 
    'select * from post limit 5';        // You'll need to change this query to reflect the actual db structure.
        
    $result mysql_fetch_array(mysql_query($sql$con));
        echo 
    '<pre>'print_r($result); echo '</pre>';
    ?>
    Obviously you'd have to write some sort of code to deal with connection failures, but that's pretty straightforward with php.net and a bit of googling.

    This is nowhere near as object-oriented as it should be, I think, but it's easy to code and deal with.

  5. #5
    (。◕‿‿◕。) Recognized Member Jojee's Avatar
    Join Date
    Dec 1999
    Posts
    9,611
    Contributions
    • Former Cid's Knight

    Default

    Thanks Face ^.^

    And I found a good tutorial for it too. :3

    I think I'll just skip the login thing I wanted cos' I can't find a tutorial for that. xD


    Wat
    is
    going
    on
    wtf
    rawr

  6. #6

    Default

    I dunno if this is the easiest way to do it, but its the way I do it one some of my pages, and that's to fully integrate your site with the phpBB system.

    This tutorial illustrates what's needed to use the phpBB system in custom pages: phpBB &bull; Add a New Custom Page to phpBB &bull; 3.0

    Then use a mod such as phpBB &bull; Modifications database as as long as you've the overall_header template on each of your custom pages you'll be able to login anywhere on your site. I'm not sure about adding it to a sidebar though, but I suppose you can use the login box html in a sidebar template and it should still work...

    Hope that's of some help...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •