1 (edited by Belgian_Freebee 2012-05-21 08:48)

Topic: Simple site integration

I'm testing this forum, and I have to say I like it. Now I would like to integrate the forum engine into my site.

The idea is to let the forum worry about login / logout / register of users. So I can concentrate on functionality of the site.

My first test: following code is from the documentation page 1.3 (1.4 is non existent on this topic).

 if(!defined('FORUM_ROOT')) {
                    define('FORUM_ROOT', 'forum/');
                }
          require FORUM_ROOT.'include/common.php';

This is straightforward, but still I get this message

Fatal error: Call to a member function escape() on a non-object in /home/a8552167/public_html/forum/include/functions.php on line 1498

, is this only meant to work in 1.3?

2

Re: Simple site integration

Hum what are you trying to do? You must use .TPL files in /include/template for site integration. Just copy these files into your /style/theme folder and start modifying them.

3 (edited by Belgian_Freebee 2012-06-12 11:16)

Re: Simple site integration

Maybe site-integration, was not the best word to describe my problem. (ENG not my main language..)

I am trying to access the php functions (punbb forum) from my own php scripts (my website).

I actually want to use the intelligence from the pun php lib, for my site. Like login, last visit, ect...
No need to code something that already exists on my server (points to the forum)...

4 (edited by toni0 2012-06-12 17:08)

Re: Simple site integration

I barely know anything about PHP, but it seems that you're blocking on the first call of the "get_remote_address();" function in functions.php.

Create a little file called test.php at the root of your site and copy this:

<?php

if (!defined('FORUM_ROOT'))
    define('FORUM_ROOT', 'forum/');
require FORUM_ROOT.'include/common.php';

$remote_addr = get_remote_address();
echo $remote_addr

?>

What does this function return for you? It must return YOUR ip address.
This is what it returns for me >> test page

Check include/functions.php and try to determine why this function does not work (PHP version?)