Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.
Not a member yet? Click here to register.
Forgot Password?

Subsites and Shared DB

Asked Modified Viewed 7,887 times
F
FlancitoW
F
  • Member, joined since
  • Contributed 115 posts on the community forums.
  • Started 36 threads in the forums
  • Started this discussions
asked
Member

Hi people. I am asking about create a site with subsites like

Domain.com (Main site)
Cs.Domain.com
Dota.Domain.com
Wow.Domain.com
Cod4.Domain.com

The thing is i want to share the users and administrators and when you logged in at one of the sites ( Main or sub ) you are logged in to all the sites. The things i dont want to share between main and subsites are the articles, downloads, news, gallerys, polls, etc. Only i want to share users information between sites.

There is a way to do this?
0 replies

23 posts

Y
Yodix
Y
Yodix 10
Happy Hunger Games! And may the odds be ever in your favor.
  • Member, joined since
  • Contributed 62 posts on the community forums.
  • Started 20 threads in the forums
answered
Member

It could have been done for some groups, corresponding to redirect the login and then just call the appropriate functions of PHPFusion by using multisite_include.php
0 replies
F
FlancitoW
F
  • Member, joined since
  • Contributed 115 posts on the community forums.
  • Started 36 threads in the forums
  • Started this discussions
answered
Member

Thanks Yodix i am trying to do it. For now i have the same users for the network. But i can done with loggin in all the sites at the same time. I have change in multisite_include.php the prefix of sessions and online users. But still not work :( What i missing ?
0 replies
F
FlancitoW
F
  • Member, joined since
  • Contributed 115 posts on the community forums.
  • Started 36 threads in the forums
  • Started this discussions
answered
Member

Any help?
0 replies
G
GMUDuckman
G
  • Senior Member, joined since
  • Contributed 266 posts on the community forums.
  • Started 6 threads in the forums
answered
Senior Member

what you can do is setup separate mysql databases for each site as if they are separate fusion sites... at the footer of each php-fusion site put in a mysql call which synchronizes the user table of each site. Not sure what the query is but i'm sure if you play around enough you can figure it out. You'll have to modify the way the cookies are stored in order to keep a person logged in on all sites.
0 replies
F
FlancitoW
F
  • Member, joined since
  • Contributed 115 posts on the community forums.
  • Started 36 threads in the forums
  • Started this discussions
answered
Member

I tried the query but i am a little horrible for coding xD I tried the thing you told me but i dont know how to syncro the DBs.

An aclarattion The whole site is A main site. With info about the subsites. There are not separate Sites. All the sites are connected. Each subsite is a different game. and the main site a Gaming comunnity.

Can you help me with the query thing?

Thanks in advance
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

Hey Bigfoot,

I am surprised no one has been able to solve this for you yet.

OK, I myself do not know how to use multisite include, but lets ask some info anyway and maybee we will get one stage further to resolving this for you.

Does anyone know where there is an existing thread on multi site that might help us with using it?

Does anyone know if anyone from DEV has written a guide or documentation about Multisite?

Has anyone else here managed to get multisite working before?
If so please speak up and help us.

Does anyone have any other info or advice regarding Multisite include?
0 replies
M
MarcusG
M
Ex Senior Dev.
  • Member, joined since
  • Contributed 182 posts on the community forums.
  • Started 5 threads in the forums
answered
Member

The issue with login on all subsites is that you have different cookie path on every subsite.

Quick tutorial on how to use multisites:

Install every subsite into the same database, but use different prefix for every installation.

In multisite_include.php you can specify which tables have to be shared and which not.
0 replies
S
Structor
S
  • Member, joined since
  • Contributed 116 posts on the community forums.
  • Started 11 threads in the forums
answered
Member

you may take a look at this topic, maybe could be useful...
that is, of course, if you have not already read it.

http://www.php-fusion.co.uk/forum/viewthread.php?thread_id=22560
0 replies
F
FlancitoW
F
  • Member, joined since
  • Contributed 115 posts on the community forums.
  • Started 36 threads in the forums
  • Started this discussions
answered
Member

Quote

MarcusG wrote:
The issue with login on all subsites is that you have different cookie path on every subsite.

Quick tutorial on how to use multisites:

Install every subsite into the same database, but use different prefix for every installation.

In multisite_include.php you can specify which tables have to be shared and which not.



Still not working. Check your Pms MarcusG
0 replies
F
FlancitoW
F
  • Member, joined since
  • Contributed 115 posts on the community forums.
  • Started 36 threads in the forums
  • Started this discussions
answered
Member

A little question. I have installed both sites and then i changed the multisite_include.php but when i see the multisite file i see the old fusion_ prefix hardcoded no the "DB_PREFIX" so there is a problem with that?
0 replies
C
Craig
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
answered
Fusioneer

No Idea Bigfoot, perhaps one of the DEVS can help you with this.

I don't know why or how multi-site works.
0 replies
M
MarcusG
M
Ex Senior Dev.
  • Member, joined since
  • Contributed 182 posts on the community forums.
  • Started 5 threads in the forums
answered
Member

The PREFIX is defined in the config.php of every subsite. The DB_PREFIX in multisite_include.php has to stay as it is, only for the tables which you want to share for both subsites has to be changed to the hardcoded PREFIX of the shared tables.
0 replies
F
FlancitoW
F
  • Member, joined since
  • Contributed 115 posts on the community forums.
  • Started 36 threads in the forums
  • Started this discussions
answered
Member

Yeah that things i know but in multsite file the Cookie prefix is defined like fusion_
Thats is the problem. i think i must modify that file before i install my site but its only a question if i have to do that.
0 replies
M
MarcusG
M
Ex Senior Dev.
  • Member, joined since
  • Contributed 182 posts on the community forums.
  • Started 5 threads in the forums
answered
Member

Cookie-prefix should be the same on all subsites, also the cookie-path to get the settings identical for all subsites. If there are differences, the users will not stay logged in when they switch between the subsites.
0 replies
F
FlancitoW
F
  • Member, joined since
  • Contributed 115 posts on the community forums.
  • Started 36 threads in the forums
  • Started this discussions
answered
Member

I tried and only done with the Info about users registered panels appears my user logged but in user_info_panel still remain logged out :(
0 replies
M
MarcusG
M
Ex Senior Dev.
  • Member, joined since
  • Contributed 182 posts on the community forums.
  • Started 5 threads in the forums
answered
Member

Cookie-path? Are the tables "PREFIX_online", PREFIX_sessions, PREFIX_new_users shared?
0 replies
P
PolarFox
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
answered
Veteran Member

it works fine if you share PREFIX_users and PREFIX_user_groups - I have done it same way.
0 replies
F
FlancitoW
F
  • Member, joined since
  • Contributed 115 posts on the community forums.
  • Started 36 threads in the forums
  • Started this discussions
answered
Member

Please tell me what tables must be shared. I try and then i say if its working or not
0 replies
P
PolarFox
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
answered
Veteran Member

Labels

None yet

Statistics

  • Views 0 views
  • Posts 23 posts
  • Votes 0 votes
  • Topic users 8 members

8 participants

C
C
Craig 14
  • Fusioneer, joined since
  • Contributed 4,462 posts on the community forums.
  • Started 212 threads in the forums
W
W
Wanabo 10
www.probemyip.com/probe-my-ip-80x15.png
pHp-Fusion.Asia & pHp-Fusion.Fr & pHp-Fusion.Cn are available for a localized support community. Send PB for info.
  • Senior Member, joined since
  • Contributed 598 posts on the community forums.
  • Started 94 threads in the forums
S
S
  • Member, joined since
  • Contributed 116 posts on the community forums.
  • Started 11 threads in the forums
P
P
  • Veteran Member, joined since
  • Contributed 1,633 posts on the community forums.
  • Started 29 threads in the forums
F
F
  • Member, joined since
  • Contributed 115 posts on the community forums.
  • Started 36 threads in the forums
  • Started this discussions
G
G
  • Senior Member, joined since
  • Contributed 266 posts on the community forums.
  • Started 6 threads in the forums
M
M
Ex Senior Dev.
  • Member, joined since
  • Contributed 182 posts on the community forums.
  • Started 5 threads in the forums
Y
Y
Yodix 10
Happy Hunger Games! And may the odds be ever in your favor.
  • Member, joined since
  • Contributed 62 posts on the community forums.
  • Started 20 threads in the forums

Notifications

Track thread

You are not receiving notifications from this thread.

Related Questions

Not yet