Welcome to Geeklog, Anonymous Friday, November 08 2024 @ 08:08 pm EST

Geeklog Forums

intergrate multiple geeklogs into the same username/password


Status: offline

Voge

Forum User
Newbie
Registered: 09/18/02
Posts: 6
What is the best way to integrate multiple geeklogs to use the same username and passwords accross multiple sites. I will have them all on the same server. Any suggestions would be great.
 Quote

Double_Pumper

Anonymous
Has anyone found a solution to this yet?

I have searched the forums and can't find one.

I would also like the group assignment to be the same across the sites.

Thanks in advance for any help.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Not sure if it is what you're looking for, but try this FAQ entry.

bye, Dirk
 Quote

Double_Pumper

Anonymous
The one thing the faq doesn't tell me is whether or not each site can have different content, menus, topics, etc. and to what degree, while only sharing the users and group_assignments (I believe) tables.

I have several sites and each one is specific in content. The only common thing for each should be username, password and group assignment. I am using a custom signup process that automatically populates the user and group assignment tables.

One thing I need to know is for example, if I create a topic on siteA in the sections area, will it automatically appear in the siteB sections area or do I have the choice of making it available on siteB (I am not using the Menus plugin yet)? Also, what about plugins like the chatterblock or forum... will an entry/submission appear on all sites or only the site it was submitted from?

All I want to do is use a shared username, password and group assignment. Everything else for the individual sites must be unique.
 Quote

Double_Pumper

Anonymous
I just checked my external script for the custom registration and the actual tables it populates are users, groups and group_assignments. These are the three that need to be shared. Everything else should probably be unique.

Hope this makes sense.
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
If you have all the sites in one database (but with different prefixes for the table names) then it's probably doable:

The table names are all defined in lib-database.php. You would need to change the lib-database.php for all the sites such that they use the same table names for the users, groups, and permissions tables (i.e. gl_users, gl_usercomment, gl_userindex, gl_userinfo, gl_userprefs, gl_groups, gl_group_assignments, gl_features, and gl_access).

Haven't tried that myself, though ...

bye, Dirk
 Quote

Status: offline

mysitemain

Forum User
Newbie
Registered: 08/11/03
Posts: 5
That almost sounds too easy... but that's why I chose Geeklog! It does make perfect sense though...

BTW, Double_Pumper is actually me... I just didn't remember the username I signed up with initially.

I'll give that a shot and let you know how it goes....

I have to try it on non-production first so if anything screws up it doesn't affect my live install. I'll get back to you in a day or two and let you know if it works.

Thanks again!
 Quote

Status: offline

TechSys

Forum User
Regular Poster
Registered: 12/02/03
Posts: 90
Let me/us know how it goes. I am looking for a way to have 2 or 3 sites, dealing almost with the same subject, but for differant vehicles. If this works for you, it'll probably work for what I need.
http://70.145.174.180/
 Quote

Status: offline

inspiremin

Forum User
Regular Poster
Registered: 01/07/04
Posts: 111
hopeful
Any luck sharing username/password with multiple sites?

I would like to be able to share username/password and forums among several Geeklog sites.

Looking for the best/easiest way to accomplish it.


Thanks,

inSPIREmin Big Grin
www.Scripturetoolkit.com www.inSPIREministries.com
 Quote

Meta

Anonymous
excited
I'm about to try this out on my site... hopefully it'll work Razz I'll let everyone know how it goes.
 Quote

bitstorm

Anonymous
I'm wanting to do this too...



My ISP only gives me one database, so I can't affort to have two databases to host two different sites. I can map different domain names to two different directories so ...


I noticed that in the config.php file there is a variable called DB_table_prefix which is used by the install and other functions. I think that just changing this variable will create a duplicate set of tables capable of hosting a different website on the same database.


Will try soon ... let you know later.

bitstorm

 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by bitstorm: I noticed that in the config.php file there is a variable called DB_table_prefix which is used by the install and other functions. I think that just changing this variable will create a duplicate set of tables capable of hosting a different website on the same database.

That's exactly what it's for. I used to run 5 independent Geeklog installs off of one database that way Cool

bye, Dirk
 Quote

Status: offline

kingboyk

Forum User
Newbie
Registered: 05/03/05
Posts: 3
Sorry for bringing up an old topic, but what's the latest on sharing user profiles and passwords between geeklog sites?

I have 2 sites, one for my personal news and chit chat (home.kingboyk.com) and one about poker (www.kingboyk.com). For various reasons I want to keep the content, syndication, styles etc of these sites entirely seperate. However, I'm already having problems with people being confused about this concept, trying to log in with the password from the wrong site, etc. I think it would be easier to share users and it would be best to do it now before more people sign up.

Thoughts or help please?

Steve

 Quote

Status: offline

ronack

Forum User
Full Member
Registered: 05/27/03
Posts: 612
I do things a bit different, I have multiple websites and one core Geeklog. Of course it means a different database for each as well and a different geeklog.cfg for each site. That's why sometimes I can't place things in lib-custom, instead I end up putting it in lib-common if it's site specific.

I guess I could point them all to one db in each geeklog.cfg if I wanted to allow everyone access on all sites.

 Quote

Status: offline

thelusiv

Forum User
Junior
Registered: 05/21/04
Posts: 23
Location:Clemson, SC
I did this a little differently on my site http://sqrville.org/ when I added the "sub-site" http://sp.sqrville.org/. The latter produces the same content as the former but it focuses on just a few (related) topics. Most of the blocks are customized for the sub-site. As you can see I haven't added much to it yet, but it works.

The way I set it up is very similar to the FAQ linked above, but I added a global variable $_SITE that gets set based on the requested hostname, which the individual php functions use to tell which type of content to serve. Instead of multiple config.php's I added this to my existing config.php:

Text Formatted Code
// +---------------------------------------------------------------------------+
// | (2.5) Multi-site hack by Chris                                            |
// +---------------------------------------------------------------------------+

if( $_SERVER['SERVER_NAME'] == 'sp.sqrville.org' ) {
   $_SITE = 'sp';
} else {
   $_SITE = 'default';
}

// +---------------------------------------------------------------------------+
// | (3) Site Settings                                                         |
// +---------------------------------------------------------------------------+

// Make sure this is the correct URL to your site, i.e. to where Geeklog's
// index.php file resides (no trailing slash).
if( $_SITE == 'sp' ) {
    $_CONF['site_url']          = 'http://sp.sqrville.org';
    // Some hosting services have a preconfigured admin directory. In that case,
    // you need to rename Geeklog's admin directory to something like "myadmin"
    // and change the following URL as well. Leave as is until you experience any
    // problems accessing Geeklog's admin menu.
    $_CONF['site_admin_url']    = $_CONF['site_url'] . '/admin';

    // This is the return address for all email sent by Geeklog:
    $_CONF['site_mail']         = 'sp-admin@sqrville.org';

    // Name and slogan of your site
    $_CONF['site_name']         = 'sp.sqrville.org';
    $_CONF['site_slogan']       = 'news about smashing pumpkins, billy corgan, jimmy chamberlin and friends';
} else {
    $_CONF['site_url']          = 'http://sqrville.org';
    // Some hosting services have a preconfigured admin directory. In that case,
    // you need to rename Geeklog's admin directory to something like "myadmin"
    // and change the following URL as well. Leave as is until you experience any
    // problems accessing Geeklog's admin menu.
    $_CONF['site_admin_url']    = $_CONF['site_url'] . '/admin';

    // This is the return address for all email sent by Geeklog:
    $_CONF['site_mail']         = 'admin@sqrville.org';

    // Name and slogan of your site
    $_CONF['site_name']         = 'sqrville.org';
    $_CONF['site_slogan']       = 'deader than red bats';
}

 

There is a similar if statement for the theme later on in the config.php but the rest of the changes are in other parts of the core code. Since the content was all coming from the same site I just used the same database and tables. I also left all the cookie settings the same, so that if a user logs in on one site they are logged in on the other site too.

The main reason for doing it this way is keeping it relatively easy to have one site that shows content from all the sub-sites, which would be difficult (correct me if I'm wrong) for separate databases or even separate table prefixes.

The next thing I'd like to do with this is to scale it so that you can add multiple site support for any number of sites and store the settings for how each one is layed out in the database.

Does anyone have any ideas on how to go about implementing this? I was thinking of adding columns to some of the geeklog tables that would specify which sites each row of information is visible on. For instance, blocks would have a selector box in the administration menu allowing the admin to select all, main only, subsite 1, subsite 2, etc. Similar settings would be avaible for forums. Stories can remain as I have them now - the sub-site displays a collection of topics, including the stories marked not to appear on the home page. In this way the sub-sites can 'syndicate' news from the main site, and vice-versa, while also having its custom topics. The main site would include all news from all sites that is not marked as show on main page.

Of course the farther i get into this the harder it is to backport Geeklog releases and updates into my codebase as well as my database. I haven't done much plugin coding yet, perhaps I need to look at the Documentation and try that...but something tells me there are too many changes to the core code to have a plugin that effectively does all this.

I am going to be implementing this on a larger scale on another site soon, actually I hope to be setting up a multi-site and then merging the databases of some existing sites into it, then adding some more. If I get far enough in my coding I'd like to release my work to the community, somehow...

So if any of you guys have some suggestions on how I should go about any of this, or if you think I'm a rambling lunatic, let me know what you think.
 Quote

SortaNewb

Anonymous
Using Dirks suggestion with the lib-database.php I had no problems setting up a site to use the same user database.

My question is can we go beyond that? Would it be possible to allow geeklog to filter topics and only show one topics news on a seperate install? Mainly the reason for doing this would be to give each topic its own design.

Also is it possible to share the login information but not admin status? Say I want one person to be able to post news only for one topic. Is this possible?
 Quote

All times are EST. The time is now 08:08 pm.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content