Forum Moderators: coopster

Message Too Old, No Replies

Intergrating a PHP Forum

         

thing3b

8:54 am on Jun 16, 2005 (gmt 0)

10+ Year Member



I have created a simple PHP CMS for myself, but do not want to design my own PHP based forum.

My CMS has its own user login, registration and validation system. This means that I do not want the user to be able to register / edit profile / login using the forum script.

I could intergrate a forum like PhpBB but this would require so many hacks that upgrading would be nearly impossible.

[I also really do not like the way PhpBB2 uses the globals command]

Does anyone know any PHP Forum scripts that are fully Object Orentatied and can use custom user management classes (even if my user object needs to implment an interface)

anshul

7:07 am on Jun 17, 2005 (gmt 0)

10+ Year Member



Why? 'PHPBB2' uses object-based code.
vBulletin is the best ( but: non-free ) forum, I've seen.

'bbcaffe' and 'phorum' are simplest PHP examples.

thing3b

8:48 am on Jun 17, 2005 (gmt 0)

10+ Year Member



Why? 'PHPBB2' uses object-based code.

I would say that PHPBB2 is generally object-based code. Here is a small snippet

class session
{
var $session_id = '';
var $data = array();
var $browser = '';
var $ip = '';
var $page = '';
var $current_page_filename = '';
var $load;
function start()
{
global $phpEx, $SID, $db, $config;

If I was to include the main index.php file of PHPBB2 into a customised class the "global" in the class above screws me up.... $db ends up null.

This is because PhpBB2 takes any variables set in its main index.php as a global. By including the index.php into a class, $db is no longer global.

One question I have is:
Can object-based code really have Global variables?

Global variables in PHP are Evil. PhpBB2 has Global variables. The possiblity of trying to fix it with eval() is a greater evil.