trying to add forum (style a forum or session)

Tips, Tricks, How To Guides, etc..
axel
Posts: 12
Joined: Mon Feb 07, 2011 2:45 am
Location: earth!

trying to add forum (style a forum or session)

Post by axel »

hi,

first post seems this is the best place to get abit of help :-)

anyway i am wanting to add a forum to my store.

so i have created a new page like http://xxx.com/forum.php looks like this

include(dirname(__FILE__)."/init.php");
$GLOBALS['ISC_CLASS_ORDER'] = GetClass('ISC_forum');
$GLOBALS['ISC_CLASS_ORDER']->HandlePage();

and added this to the init.php

),
"sitemap" => array(
"class" => "class.forum.php",
"name" => "ISC_FORUM",
"global" => "ISC_CLASS_FORUM"


i then made a class.forum.php in the includes/classes
looks like this (i think i am lost here now)

<?php
define('IN_PHPBB', true);
$phpbb_root_path = (defined('PHPBB_ROOT_PATH')) ? PHPBB_ROOT_PATH : './phpbb3/';
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);

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

now basically it gives an error

Fatal error: Cannot redeclare redirect() (previously declared in xxx\lib\general.php:3505) in xxx\phpBB3\includes\functions.php on line 2473

those lines are
3505: function redirect($url, $status = 303)

2473:
// Behave as per HTTP/1.1 spec for others
header('Location: ' . $url);
exit;
}

do you think this will work somehow or is there another better way to get a forum into my site..
at this point i don't mind duel log ins, the store will be email and the forum screen names.?

hope you can help :D
thanx,

Axel.
Tony Barnes
Posts: 744
Joined: Thu Jun 18, 2009 8:59 am

Re: trying to add forum (style a forum or session)

Post by Tony Barnes »

I think that ISC sandboxes php to just its own files, or something like that? php includes used to work on earlier versions, but got nerfed for 'security' reasons.

I've never managed to get anything to integrate, did a wordpress blog on a couple, just ended up styling the blog like the rest of the site.
axel
Posts: 12
Joined: Mon Feb 07, 2011 2:45 am
Location: earth!

Re: trying to add forum (style a forum or session)

Post by axel »

meh so its kinda a mission then >< maybe ill have to just style it then what a pity.

i was plying with the lines that were giving errors and
what i did find was it tries to load phpbb and it has a template clash so i don't know if i am on the right path or just walking into walls :?
so maybe i need to mod isc template to work on phpbb.. ouch my head is starting to hurt >< hehehe
Tony Barnes
Posts: 744
Joined: Thu Jun 18, 2009 8:59 am

Re: trying to add forum (style a forum or session)

Post by Tony Barnes »

Personally I'd just make the BB look like your ISC cart - you probably wouldn't want to have any 'live' panels from the cart in your forum anyway, as they would get in the way of forum stuff.

Will save you a lot of time!!!
axel
Posts: 12
Joined: Mon Feb 07, 2011 2:45 am
Location: earth!

Re: trying to add forum (style a forum or session)

Post by axel »

yes I think I am gonna move onto doing that now, tho full integration would be awesome so customers wouldn't have to sign up twice hmmm, 8-)
i don't think I know enough about sql to start that...

Thank you for the reply's will post back what i decide. :-)


Axel.
Tony Barnes
Posts: 744
Joined: Thu Jun 18, 2009 8:59 am

Re: trying to add forum (style a forum or session)

Post by Tony Barnes »

Ah, so you're thinking from a sign in point of view... sorry, didn't think of that.

You could perhaps hi-jack the cookie that ISC uses?
axel
Posts: 12
Joined: Mon Feb 07, 2011 2:45 am
Location: earth!

Re: trying to add forum (style a forum or session)

Post by axel »

hmmmm that sounds interesting ... no clue how to do that >< could you point me in the right direction :mrgreen:
Tony Barnes
Posts: 744
Joined: Thu Jun 18, 2009 8:59 am

Re: trying to add forum (style a forum or session)

Post by Tony Barnes »

Haha - jolly good question!!

You'd have to go through the ISC code, find out how it declares/stores the cookies, and hack it into the BB code. Probably not very quick and or easy...

Alternatively, you could try and lock into the customer account functions, to create a BB user on the back of the ISC code... again, not pretty.

Hmmmmm, ah, this may be good, you could set the BB to look at the ISC database for login credentials for customers - you'd need to copy across the obfuscation bits, but at least that would mean that a customer would only have 1 log in generated. You could then use the BB cookie system as stands, and if they make changes to passwords, etc, change it in the cart.

That might not be too tricky? Not a quick option though, none are!
axel
Posts: 12
Joined: Mon Feb 07, 2011 2:45 am
Location: earth!

Re: trying to add forum (style a forum or session)

Post by axel »

I was thinking about them sharing db for log ins hmmm, I will take a look in the morning maybe i can make something work :mrgreen:
the only this was setting up moderators and admins for the forum may have to give them access rights to the store aswell >< not always the best idea

Thanks

Axel.
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: trying to add forum (style a forum or session)

Post by Martin »

axel wrote:...now basically it gives an error

Fatal error: Cannot redeclare redirect() (previously declared in xxx\lib\general.php:3505) in xxx\phpBB3\includes\functions.php on line 2473
Just to get back to the original problem...

The reason it wasn't letting you integrate with the error above was because the function redirect() has been defined in both the phpBB3 and the ISC code so it just borks and sulks with that error.

I'm pretty sure the phpBB3 code has some form of hook system that allows external authentication from another system so your first port of call might be to look at how other auth' systems have been written in or mod'd for phpBB3 and then see how you can apply the lessons from those into this project.
Post Reply