Recent Topics

About dealing a single users database with multiple websites

Started by on Mar 15, 2007 – Contents updated: Mar 15, 2007

Mar 15, 2007 15:21    

My friends,
Hi! As Im a newbie in this sys, I had a theory in order to handle posts with different langs... and I want u to help me confirm (or at least, a propper guidance to the right path!) Mostly, this is to list the "blog #1" posts on just one lang, and make the searchs "on just one lang" (but the concept could be applied to "different types of contents in one lang that u dont want to mix") Yet, all with one login (mostly, to comment stuff on the diff site)

I think that the best way to to handle a single database of users of a comunity in different langs would be to install diff b2e (one per lang), exept that each lang installation should share the users database, thru modif <htsrv/login.php>, and guiding it to a the "central" installation. This way, my guess is that there should be ONE users database, yet would be different sites sharing those users (it could be diff langs or diff sites, the basic idea is to "share" the users)

Am I wrong in my theory? Should I need "more" modifs to get it work? (I guess I should deal with the "cookies" thing... a common cookie login for all of those... oh boy, where I gonna end... ;-) ) Thanks in advance! :D

PS1: Yep, I know, theres a plugin that *kinda* helps with this thing of displaying contents in diff langs (PoliglotX), but I guess it does a diff thing (plus the fact that list to be just compatible to the 1.6-alpha version)
PS2: Be kind... I use b2evo since... monday? (I cant learn it the whole deal in just a day... but its fun to try to do it ;-) )

Mar 15, 2007 15:42

Instead of installing multiple b2evos in multiple databases and then trying to hack a shared login, what you might like to do is install multiple evos in the same database ( by changing the $tableprefix in conf/_basic_config.php ) and then setting the following tables in each install to use the same prefix ( in /conf/_advanced.php ), which *should* result in a shared login/blacklist/stats system

PHP

'T_antispam'           => $tableprefix.'antispam',
        'T_basedomains'        => $tableprefix.'basedomains',
        'T_groups'             => $tableprefix.'groups',
        'T_hitlog'             => $tableprefix.'hitlog',
        'T_sessions'           => $tableprefix.'sessions',
        'T_users'              => $tableprefix.'users',
        'T_useragents'         => $tableprefix.'useragents',

¥

Mar 15, 2007 21:35

#1: Hi ¥åßßå, thanks for reply! :D
#2: I guess I gonna end doing what u end up advicing me (me rookie in b2evo, u Killer Expert), yet, and just thinking loud, I want to ask u if this of putting all the eggs (lang sites/content sites) in a single basket (one database) would affect the "stamina" of my crappy server. In my proffessional life, I might agree upon this point, but in my hobbist websites that uses lousy servers? Woudnt be better to aglutinate into diff langs/contents upon the expected results (in plain english, I expect more usage of the site in spanish in english and spanish than the french or german versions; and I wonder if the server could work slower) The fact is that I read arround the expectations that u know that a "10000 users websites with 10 users and 2 posts per day" against a "100 daily users with 5 posts per day" I shouldnt be that much worried, as so far, I manage to have a hobbists site with pagerank 6 (under postnuke, a tool that manages a lot of langs in the same install... and I do it with an installation with over 200tables!), with no much problems with the "stamina factor" of the mysql.

Also, another doubt Ive got, is about the "domain management" of a messy site as the one I planning, due if u've got:

<www.communtyname.com> that leads to
<subdir1.communtyname.com> and
<subdir1.communtyname.com>

Plus another ones called <www.communtyname1.com> and <www.communtyname2.com> So I wanna know what should be done (if possible, u know, I still dont know the full capacities of the sys) to make all that work with a single cookie (hey, if u ask, u ask for the whole nine yards! ;) )

I guess that the last 2 wouldnt be "possible" (unless u sent all thru a ip instead a domain?) Oh yes, btw, I did the apache thing of pointing *whatever* and make it work under that domain (thats why i choose to make a lang installation under the "es", "en", "de", etc.)

Yet, in the case of working several installations in a single domain (under a subdomain), I think it might work (but this is a rookies opinion! ;) )

However, as far as it might doesnt work in other domains, it could have the beneffit of a "single login" (which is not a minor thing)

Sorry for thinking in loud voice, and reasking this pal, but as Im planning my community, I want to be tidy on the "moment zero" (and trust me: I try to do my homework before askin'anything :D ) Thanks in advance pal, best regards, Gabriel.

PS: Are you the ¥åßßå from the game boy advance community? :P

Mar 19, 2007 03:09

Hi pal, what's up? Well, I tried what u told me, and it *WORKS* perfectly (at least so far, so good! ;) ) Yet, I have a couple of questions (beyond the ones posted in the previous post):

* Which other tables could be "shared" (or which ones u think they should) I think this topic could be kinda intresting to others (I would comment it, yet Im kinda new in this sys ;) )

Also, with the experience of testing your tip, using the "autoblogger" plugin (under this structure of multiple b2evos), gives me an "odd behaviour", but I kinda solve it (and I gonna comment just in case anyone finds this post intresting) If I install just one regular b2evo, I have no problem; but if I do it with your leads, I get a "500" error while accessing the autoblogs generated. Yet, if I change the original chmod permissons set in the "_autoblog.plugin.php" file (originally setted up to 0777) to 0755, this plugin works. Of course, it generates the blog in the proper instalation where its generated (and not in the other languages sites), but beyond that (obvious thing), this thing works perfectly (and beyond this, the autoblogger plugin tells where the blog is generated; so no much big deals are arround this poing)

Of course, it generates automatically in a structure like <lang.domain.tld/blog/AUTOMATICBLOG> I mention this point, due I read [url=http://forums.b2evolution.net/viewtopic.php?t=10553]here[/url] on this forum that's not posible to generate <AUTOMATICBLOG.domain.tld> (knowing a little bit about how dns systems works, I could say that I also dont find this is a "good idea" -if its possible- to do on an automatic way)

Anyway, thanks to Yabba, who makes possible the integration across diff installations of b2evo! :D Now I need to integrate my b2evo users with the mediawiki... please, ideas! (I read the links u sent me in another post in this forum, yet Im kinda lost, as I still dont fully know the b2evo sys)

Mar 19, 2007 10:11

Killer Expert just means I post to much ;)

Ok, I don't think you need worry about your sql to much. If your sites get to a point where the server *tilts* then the chances are you'd be looking at a dedi box anyway, but don't quote me on that because I've never used shared hosting :P

Cookies for domain.com and sub.domain.com can easily be shared by changing the cookie settings in conf/_advanced.php
$cookie_domain = '.domain.com';
$cookie_path = '/';

You wouldn't (afaik) be able to share cookies over multiple domains.

I think the list of tables I'd share is the one that I originally posted, at least, no others spring to mind at the moment.

For anything to do with the autoblogPlugin you'd be better of talking to [url=http://forums.b2evolution.net/profile.php?mode=viewprofile&u=5214]fralenuvol[/url] as they'd obviously be in a better position to give you a correct answer.

I've posted some links on your other thread about integrating logins, they should give you a better idea of where you need to be heading.

I'm from several place, but the gameboy advance community isn't one of them :p

¥

Nov 08, 2009 14:56

¥åßßå,
Hi! Id like to ask you about the updating of this "strange"
feature under the new table structure (I didnt found
anything about the new DB schema, only about the last
one, http://doc.b2evo.net/DB_schema/b2evo0922.png)

So basically, Id like to ask you about how to deal with the
new tables that did appear in the B2Evo 3 Series.

At inc/sessions/_sessions.init.php

Code

$db_config['aliases']['T_track__keyphrase'] = $tableprefix.'track__keyphrase';
$db_config['aliases']['T_track__goal'] = $tableprefix.'track__goal';
$db_config['aliases']['T_track__goalhit'] = $tableprefix.'track__goalhit';
I bet these last ones from inc/sessions/_sessions.init.php
should be shared among different sites with same users, right?
(it seems obvious... but... with lack of documentation + db doubt,
if you dont ask... you might be suicidal! ;-)

And at inc/_core/__core.init.php

Code

'T_items__type'         => $tableprefix.'items__type',
'T_users__fielddefs'    => $tableprefix.'users__fielddefs',
'T_users__fields'       => $tableprefix.'users__fields',
I have no idea how to deal with this ones: should be shared
by many sites? Or should be depending on each installation?
(as they belong to the "users world", and I share a common
pool of users among diferent sites, well... I dont have space
to doubt! ;-)

And of course, with the rest of the tables that did exist on the
2 Series, I treat them in the same way they were treated when
they shared that common base of users, right? (or things did
changed?)

Thanks in advance! :D

Nov 08, 2009 18:21

Gabriel1980 wrote:

At inc/sessions/_sessions.init.php

Code

$db_config['aliases']['T_track__keyphrase'] = $tableprefix.'track__keyphrase';
$db_config['aliases']['T_track__goal'] = $tableprefix.'track__goal';
$db_config['aliases']['T_track__goalhit'] = $tableprefix.'track__goalhit';
I bet these last ones from inc/sessions/_sessions.init.php
should be shared among different sites with same users, right?

Well, these tables store data for the new tracking feature: Somebody follows a link to an URL like http://yoursite.com/htsrv/track.php?params_i_cannot_remember=here&goalname=foo and that shows up as a hit for the goal "foo" in your statistics. Since you only appear to have shared user tables, this data should probably be kept separate for each of your sites.

And at inc/_core/__core.init.php

Code

'T_items__type'         => $tableprefix.'items__type',
'T_users__fielddefs'    => $tableprefix.'users__fielddefs',
'T_users__fields'       => $tableprefix.'users__fields',
I have no idea how to deal with this ones: should be shared
by many sites? Or should be depending on each installation?

The first table contains item types (e. g. podcast, link, post) and thus should not be shared. The last two tables contain data for user fields and therefore should be shared, I think.

And of course, with the rest of the tables that did exist on the
2 Series, I treat them in the same way they were treated when
they shared that common base of users, right? (or things did
changed?)

I think you can treat them the same way you did in the past.

Nov 09, 2009 18:12

Absolutely no idea since evo gained more tables than a popular bistro ;)

Try Tblues answer .... then I can blame him if it goes tits up :D

¥


Form is loading...

powered by b2evolution – This forum is powered by b2evolution CMS, a complete engine for your website.