vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Shared user database for multiple forums, same server (https://vborg.vbsupport.ru/showthread.php?t=98233)

justindwhite 02-28-2006 03:14 AM

Quote:

Originally Posted by psalzmann
I don't think you guys realize... that this is a general hack that is not just for vb 3.. it can be used in ANY vb version, it's the "guts" behind the hack/info that defines how or what should be done.

Keep in mind, even with the proper info above for the "set" version he is writing this hack for, still does not work out of the box. Well, it does kinda, if you use the exact version the author is using. However, even the instructions I had to work with, I was missing some strikes table and a few others.. I just skipped them. No harm done.

The only problem I've had with this hack is very minor --

When you have a Running board, with say 1000 members or posts and then begin this hack to a fresh board, the new board statistics do not reflect the old board.

ie: 1 Thread, 1 Post, 1 Members

Then I made a tweak to at least show who's online (I made old board and the new board look at the same `sessions` table, so now if there are 5 users on the old board, there is 5 users + how many users are on the new board. That works.

The problem we have is the "new fresh board" member count. It's only showing 1 member - Admin. However, now I've got to find a way to refresh this stats.. if possible.. to reflect what both boards show. I think it's some serilized data somewhere in the db. I'll figure it out soon enough. :)

well do you mind sharing how you got yours to work? I have tried many times and failed.

Rahjeir 02-28-2006 08:08 PM

I went another route. I replaced TABLE_PREFIX with MERGE_PREFIX and defined it. Though I merged alot more tables then the ones defined here.

For 3.5.X I had to edit the class_dm.php. These are the two stock lines I needed to edit for a 3.5.X. My forums have been running merged for 1 1/2 years now. Only minor issues come up.

class_dm.php(rewrite with your merged value.)
Search for
$return = $this->db_insert(TABLE_PREFIX, $this->table, $doquery);

Search for
$return = $this->db_update(TABLE_PREFIX, $this->table, $this->condition, $doquery, $delayed);

Other then that, the above hack should work.

lovevn 03-08-2006 02:28 AM

I could pay if anyone can do this for me. I am using 3.5.x

Thanks

john_robot 03-21-2006 06:55 PM

Hi, This is really good info , I want to do something different , I want to to get all the forum posts categories and what ever it has except the skin template , can you please guide me on this. the idea is I want to have a different skin on one of my forum.

Fenriz 03-22-2006 04:21 PM

westpointer is dead

CyberRanger 03-22-2006 04:37 PM

hehe ... no, not dead. I think the one poster summed it up well. This is more a concept than an easy to install mod. If you aren't versed in php, I really don't recommend trying this.

:banana: :banana:

dicb 03-22-2006 08:22 PM

I'm about to try this for 3.5.4 right now. I have a site ready to launch, and I'm this is all I need for it. Just to let you know, I assumed I would have to figure this out myself untill I googled "vbulletin same login on multiple forums".

Whether this works or not, I want to thank Westpointer for this BEFORE I start cursing and screaming.

Here goes. I'm not optomistic. If you don't hear back from me shortly assume the worst and don't try it on 3.5.4.

dicb 03-22-2006 09:20 PM

I should note, I backedup the entire new forum directory, so my numbers may be off here, especially since I see them replacing things in the install dir. I just thought better safe than sorry since their may be more things that needed changes made in them than 3.0.8 did.

First replace... 597 replaced in 315 documents.

Second replace... 8 replaced in 315.

Third replace... 77 replaced in 315.

#8 - changed [ . TABLE_PREFIX . $idname] to [. "$idname] on line 1242 of /includes/functions.php

print_chooser_row (with two o's) starts on line 1497 of /includes/adminfunctions.php. started replacement at 1506, but I'm not sure I did it right. I replaced
Code:

if (!is_array($GLOBALS["$cachename"]))
        {
                $GLOBALS["$cachename"] = array();
                $result = $vbulletin->db->query_read("SELECT title, $tableid FROM " . TABLE_PREFIX . "$tablename $wherecondition ORDER BY title");
                while ($currow = $vbulletin->db->fetch_array($result))
                {
                        $GLOBALS["$cachename"]["$currow[$tableid]"] = $currow['title'];
                }
                unset($currow);
                $vbulletin->db->free_result($result);
        }

with
Code:

if ($tableid == "user" OR $tableid == "usergroup") {
                $result = $DB_site->query("SELECT title, $tableid FROM "."$tablename $wherecondition ORDER BY title");
        } else {
                $result = $DB_site->query("SELECT title, $tableid FROM " . TABLE_PREFIX . "$tablename $wherecondition ORDER BY title"); // existing code
        }

Once again, I have no idea if that's right.

construct_style_choose starts on line 166. Replaced on line 175,
Code:

        $tableid = $tablename . "id";
with...
Code:

$tableid = $tablename . "id";

    if ($tablename == "user" OR $tablename == "usergroupid") {
        $result = $DB_site->query("
            SELECT title, $tableid
            FROM "."$tablename
            WHERE userselect = 1
            ORDER BY title
        ");

    } else {
                // existing code
                        $result = $DB_site->query("
            SELECT title, $tableid
            FROM " . TABLE_PREFIX . "$tablename
            WHERE userselect = 1
            ORDER BY title
        ");
    }

I'm not sure I did everything right, or if there is more that needs to be done, however that is what I did. I am uploading them now, but don't have time to test it. Timestamp should give an idea of how long it took, but subtract one cig break for sanity.

dicb 03-22-2006 10:27 PM

whhew, I'm glad I documented that... cause it worked.... er, almost.
The PM's are screwed up. I can compose and send them... but I can't read them. Even if I send one, I can't view it in my sent items folder. When I switch between the forums they both show the same thing (2 messages in inbox) and when I go to my PM folder the space where the PM title should be is blank. There are still two rows in the table (one for each message) and there is even that little check box on the right to mark them for deletion. Only problem is with no title to the message, I can't view the message.

Bottom line, everyone has been bugging to get this ported to 3.5.x, but nobody just went through it to see if it would work. It almost did. All you have to do is follow the directions carefully. Westpoint - excellent job here on this hack. Your time and efforts are greatly appreciated by everyone here, regardless of how they express it. Hopefully you or someone here will be able to get the PM issue fixed. It looks like something small, cause I'm not getting any error messages. Unfortunatly I don't know how vb works well enough to figure it out myself.

dicb 03-23-2006 05:58 PM

Well, I spoke too soon. Registration is completely jacked up. Depending on which forum you register in, you'll have different problems. Undoing all the work.

Cheers, and hopefully someone will have more sucess than I, and maybe my experiment will help a little.

dicb 03-23-2006 06:05 PM

I found more details, but it doesnt' seem like anyone cares... Anyway, if you register in the forum that doesn't use the prefix, everything is find. If you register in any of the other forums, things get very squirrly.

Fenriz 04-12-2006 08:16 PM

dicb, is it work properly in 3.5.4 now?

tyfoon 04-16-2006 09:55 AM

I 've managed it working in 3.54 now trying to make it work whith the users in a special user database.

e2s 05-21-2006 11:58 PM

I have everything working as well except when registering a new user from the new forums. It is still adding it to the new database user table instead of the old existing. Does anyone have any helpfull tips on where to find the insert statement that adds in a new user.

Any help is appreciated

Thanks

e2s 06-09-2006 07:23 PM

Ok got past the previous post problem. The current issue is in the Private Messaging. Whe I send a PM from the new site I get no error message and the message shows in my sent items however does not show in my inbox. I looked in the database and in table pmtext I can see the PM inside of table PM I see one entry which would be what shows in my PM box. What I don't see is the second entry that would allow it to show in my inbox.

I have been over the code way to many times and I think I am just missing it somewhere any help would be appreciated. It is really hard to find problems when there is no errors.

Thanks

e2s 06-10-2006 09:30 PM

Ok not sure if anyone is interested or how I could distribute this but I have the entire program working just I didn't keep track of the changes needed to make it work. Can I just remove my license key from all files and zip all the files together? I don't know what the rules are and how to go about this. I have it working on V3.5.

Any help would be great, Thanks

lovevn 06-11-2006 01:27 AM

Could you please show me the demo?
Thanks

e2s 06-12-2006 09:42 AM

The demo would be

forums.everything2stroke.com
and
forums.everythingmx.com

I am still looking into how I can package this to make it easy to distribute

Steve F 06-12-2006 01:06 PM

Works great, just signed up on both *well, just on 1 ;)*

I hope you'll find your way around re-packaging the mod, really looking forward to test it on my board(s)

CyberRanger 06-12-2006 02:01 PM

Quote:

Originally Posted by e2s
Ok not sure if anyone is interested or how I could distribute this but I have the entire program working just I didn't keep track of the changes needed to make it work. Can I just remove my license key from all files and zip all the files together? I don't know what the rules are and how to go about this. I have it working on V3.5.

Any help would be great, Thanks

First, great work! Thanks for keeping this concept alive. I've simply not had the appropriate amount of time to devote to it. How to package it is the tough thing. I'm fairly certain that you are NOT allowed to distribute entire vb replacement files here. You have to just show the hacks. I'm not positive about that but I think that's true.

Kirk Y 06-12-2006 08:58 PM

Yeah you're not allowed to display full source code, good luck with repackaging it -- it'd be an excellent hack!

e2s 06-13-2006 12:20 PM

Yeah I asked a Moderator and that is what they told me. I am however still going to work on getting instructions setup to make this work. They led me to a compare program so I am going thru and comparing the files and seeing what all that I changed.

I promise I will get this up soon as possible. I know this was a huge thing for me to be able to get another site up and running. I did successfully take the code off the second site and install it to a now third site with very little work so once you get it done once I think the sky is the limit on creating new sites.

I will post links to the directions once I get them up

e2s 06-13-2006 02:05 PM

Ok guys here it is

https://vborg.vbsupport.ru/showthread.php?t=118473

westpointer I hope you don't mind i used bits and pieces of your directions to save time. I did give credit so I hope that is ok

If you have any questions about this modification please post in the new thread above.

Thanks

CyberRanger 06-13-2006 02:22 PM

Quote:

Originally Posted by e2s
Ok guys here it is

https://vborg.vbsupport.ru/showthread.php?t=118473

westpointer I hope you don't mind i used bits and pieces of your directions to save time. I did give credit so I hope that is ok

If you have any questions about this modification please post in the new thread above.

Thanks

Excellent! I'll add your link to the top of this thread.

Ahsin1 09-19-2007 02:29 AM

im using 3.6.x can some do this for me? pm me please.. THANKS

CyberRanger 09-19-2007 04:57 PM

Quote:

Originally Posted by Ahsin1 (Post 1342196)
im using 3.6.x can some do this for me? pm me please.. THANKS

Sorry, I just don't have the time for any additional projects now.

massiveblack 10-24-2007 06:07 AM

is it possible to run something like this across multiple servers?

I run a big board (90k members, 1.5 million posts and 1.3 million visits a month) and am wanting to expand into multiple other forums. Basically setting up about thirty other forums (when it is all done) and having each current user being automatically registered, and all new members being able to auto register across all forums no matter which one they sign up on. Since my site allows image uploads and is art heavy, I do not think a single server is possible when it is all said and done. I will need many servers eventually.

If anyone can assist me with this, please let me know at jmanley@massiveblack.com The site is called conceptart.org and you can find the forums link atop the page. We are making a photography forums, a fine art forums and some other areas.

Please advise...just talented artists here, not many programmers.


Jason

CyberRanger 10-24-2007 09:57 AM

I'm experimenting with that right now with vb 3.6.8. I "think" that it's possible given all the right conditions. I'll post back here in a week or so with my results.

TundraSoul 11-28-2007 09:22 PM

Quote:

Originally Posted by CyberRanger (Post 1367348)
I'm experimenting with that right now with vb 3.6.8. I "think" that it's possible given all the right conditions. I'll post back here in a week or so with my results.

Great, let everyone know if it works. vB totally needs to implement this kind of feature into their software.

CyberRanger 11-28-2007 09:30 PM

Quote:

Originally Posted by TundraSoul (Post 1391300)
Great, let everyone know if it works. vB totally needs to implement this kind of feature into their software.

oh man, I forgot I posted this! I've done it and it works great. Create an account at www.armchairgeneral.com/forums then go over to http://www.armchairhq.com/forums/ (nothing really in that forum, it's a test area.)

Those two forums are on the same server ... but if you really want to see the potential, go to www.brentandmary.net/vb36 (login is acg, 99acg99). Now that rocks! That's three databases on two different servers tied into the same vb user login.

Now ... I just gotta find the time to document how to do it. For those who can get a command line, I think I can do a unix script that would all the changes automagically in seconds!

Why vb doesn't support this is a mystery to me. The easily could.

TundraSoul 11-28-2007 09:46 PM

I don't mind doing the edits, I just need to know what to do. (drool)...

geckofrog 11-29-2007 06:20 PM

me too, I need this!

massiveblack 11-30-2007 09:44 PM

Is there any more information on this?

Much appreciated...truly.

JM

Reeve of shinra 12-27-2007 07:39 PM

I would really like this as well.

glaird 02-26-2008 03:46 AM

Cross-server is just what I'm looking for! :D :D Have you had a chance to document it yet?

thanks!

superthang 02-27-2008 12:59 AM

any up for this on 3.6.8 or 3.7 ?

cyberranger your my hero! please share!

Sean James 06-21-2008 03:58 AM

Is this available?

sv1cec 02-18-2009 06:21 AM

I know this is a very old thread, but I am still running 3.0.xx and I need to build a second site which will use the user tables of my first one, so here I am.

I would like to know how the "sessions" are handled. I have some questions here and I would appreciate if someone can answer them for me.

Let's assume two sites, A and B. With this hack, all user information is kept in the "user" table in database A.

A member of site A logs in Site B. Obviously, since the last login time is stored in the shared user table, the last login time entered in the table, will be common for both sites, correct? So if the member comes back after two days and logs in site A, the last login time will be the last login time from his visit in site B. That means that if the user asks to see the new posts since his last visit (for example), the posts shown to him will not be correct, he will miss the posts between the last time he visited site A and the time he visited site B. Am I correct on this? It is of course possible to alter the user table to have separate columns for these time parameters for site A and site B.

Another question: again, let's suppose that a member logs in site B, does some work there and then follows a link to site A. Will he still be logged in in site A or will he need to re-log in in the other site? In other words, how are cookies handled? And what difference will it make if someone uses the "Remember me" checkbox in one site?

Finally a code question: the author suggests that we use a new table prefix for the new database "new_". The changes suggested show an empty table prefix though, for the old database. Shall I assume that wherever it is suggested to replace " . TABLE_PREFIX . " with ".", if one uses a prefix in the old database, he should replace " . TABLE_PREFIX . " with whatever his old table prefix is? I guess one could define something like "USER_TABLE_PREFIX" with the value of the table prefix used in the first site, and do the find and replace operations you suggest?

Again, I am aware this is an old hack, which has already been ported to later vB releases, but since I do not plan to use later releases, and this thing is pressing me, I would certainly appreciate any help you can give me.


All times are GMT. The time now is 04:20 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01427 seconds
  • Memory Usage 1,842KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (38)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete