trying to add forum (style a forum or session)

axel

2011-02-07 02:02:17

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

2011-02-07 08:53:28

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

2011-02-07 10:09:17

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

2011-02-07 13:25:12

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

2011-02-07 15:12:40

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

2011-02-07 16:23:31

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

2011-02-07 16:58:11

hmmmm that sounds interesting ... no clue how to do that >< could you point me in the right direction :mrgreen:

Tony Barnes

2011-02-07 17:34:59

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

2011-02-07 18:05:32

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

2011-02-08 10:05:52

...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.

axel

2011-02-08 18:06:57

hi,



martin do you think isc will allow phpbb to run a session the way i was trying or similar ?



I got it to ignore that and another after that and got this Fatal error: Cannot redeclare class template in C:\wamp\www\phpBB3\includes\template.php on line 24

maybe its better to just make the phpbb3 template look like the shops... i guess the only thing i need in the forum is a big button in the header "return to shop"

but I will still have the problem or multiple sign ups required..

I lost an entire day to day got no work done on this yet (just sat down :-P )



i will look into the external authentication on the phpbb side that sounds like a viable option if it works :mrgreen:



one way or another i will have to make something work. :ugeek:



Thanks



Axel.

axel

2011-02-12 01:50:57

any idea where i could find someone to do some of the coding for me i am striking out on this one ><

axel

2011-02-25 20:02:26

ok so i got the entire forum looking the way i want the only thing left to do is when someone signs up on the store side to get the info into phpbb sql as well :?

i was thinking to mod the create account form add a few fields and somehow make it send the info to phpbb and then disable the registrations on phpbb its self... any ideas

chicton

2011-06-20 08:40:02

I have used beans to handle such cases isc using php. You have to tailor it a bit though as they could pose some security threats with possible malfunction on the bean file. You just have to play around with the session bean for you to arrive at your chosen style. I would then implement breadcrumbs as an andded feature.

LSMonline

2011-10-17 09:01:21

hmmmm it sounds interesting. no idea how to do it> <you can point me in the right direction



LSM Silk Mills