vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Make vbulletin use another table for users (https://vborg.vbsupport.ru/showthread.php?t=66685)

DeMiNe0 06-29-2004 08:40 PM

Make vbulletin use another table for users
 
I want to be able to make Vbulletin use another table for users.

Basicly i have 2 vb licences now, and i have one forum up and running. I want to get another forums up and running, but i want to use the same user table as my other forum. Is there a way to do this?

Zachery 06-29-2004 08:42 PM

Quote:

Originally Posted by DeMiNe0
I want to be able to make Vbulletin use another table for users.

Basicly i have 2 vb licences now, and i have one forum up and running. I want to get another forums up and running, but i want to use the same user table as my other forum. Is there a way to do this?

I think it would requrie editing every call to the usertable O.o which is alot of files and edits.

AlexanderT 06-30-2004 06:22 AM

I don't think so. It would be sufficiant to hook db_mysql.php, and make the necessary additions to it.

Modin 07-01-2004 03:00 AM

You could just modify db_mysql.php, but that would add unecessary overhead on every query...the more efficient option would to do what Zachary said, which you can find (or write) a simple too that'll just do a find and replace on all files

Lurk 07-05-2004 04:43 PM

exactly what has to be done?

Zachery 07-05-2004 04:44 PM

Quote:

Originally Posted by Lurk
exactly what has to be done?

Alot of work

Lurk 07-05-2004 04:47 PM

can someone post what i have to change or add in most or all of the files?

Zachery 07-05-2004 04:49 PM

Lurk, unless your willing to either take some time and expirement or pay someone to do this, i really dont think anyone is going to list out the change of every file in the system.

Lurk 07-05-2004 04:50 PM

ok, i'll set up a test board and play around with it. I don't know php/mysql though. But i kinda have an idea :D

Lurk 07-05-2004 04:52 PM

actually, i give up :(
oh well

jamescrf 07-05-2004 05:02 PM

I did this with 3 sites, works great. Took about 8 hours to set up and workout the kinks. Now members can go to any of the 3 sites without having to register 3 times. This has been live for about 2 months now, without any problems. I am planning to add 3 more sites as well.

Zachery 07-05-2004 05:03 PM

Quote:

Originally Posted by Lurk
actually, i give up :(
oh well

That was short lived


James do you have a few moments to talk i wouldnt mind knowing how you did it and worked around some of the problems.

jamescrf 07-05-2004 05:06 PM

Sure, do you want me to send you a PM of what I did?

Zachery 07-05-2004 05:06 PM

^_^ that works, you can also email me

zachery.woods <at> vbulletin.com

jamescrf 07-05-2004 05:12 PM

Okay, I'll email a word doc to you - need to create the word doc anyway so I remember what I did..lol..

Brad 07-05-2004 05:30 PM

Quote:

Originally Posted by jamescrf
Sure, do you want me to send you a PM of what I did?

Why not post a thread and share with everybody? I'm intrested in the process to, I know how to do it personaly but i've never had it running in a production enviroment.

Can you give us some details about your community's? How big are they and how many users do you have browsing at one time? :)

Modin 07-05-2004 05:44 PM

I was playing around with this idea and wrote a script that searches through all php files replacing all the table prefixes for the user queries...

it took some time, but overall wasn't that difficult.

jamescrf 07-05-2004 06:06 PM

I'll send doc to Zachery and let him have a look, then we should be able to post it.

I am running 3 forums now and will be adding 3 more in the next few months. My forums are not that big so I am not sure how this mod would perform with 10,000+ users. I have about 2 thousand users with max on line of 100+, avg is around 40.

Lurk 07-05-2004 06:31 PM

:)
i hope you post it :p
i wanna try this :D

Zachery 07-05-2004 07:29 PM

I got the doc, havent had a chance to read over it, i want to ask a few more questions before anything else :)

Lurk 07-05-2004 11:14 PM

that doc gonna be posted here? :) :p

Zachery 07-05-2004 11:42 PM

Quote:

Originally Posted by Lurk
that doc gonna be posted here? :) :p

I dunno lurk, its still alot of work, and you gaveup after 20 seconds :p

Lurk 07-06-2004 12:29 AM

lol :D, i wanna try it though. I'm going to try it if i got a doc to help me out :p

Lurk 07-07-2004 04:32 AM

So, Zachery, i hope you don't mind me asking this, but can you either post the doc here or send me a pm?

nicholas 07-07-2004 07:11 AM

Zachery, please post either the doc or your modified version. I'm interested in this and I'm sure a LOT of others are as well.

Lurk 07-07-2004 04:39 PM

yeah :)

Lurk 07-11-2004 10:05 PM

Zachery, you gonna release it?? I really wanna try it

nexialys 07-12-2004 12:38 AM

in includes/db_mysql.php
FIND:
PHP Code:

    function query($query_string$query_type 'mysql_query')
    {
        global 
$query_count$querytime

JUST AFTER, ADD:
PHP Code:

        global $yournewdatabase$yournewprefix;
        
$query_string ereg_replaceTABLE_PREFIX."user "$yournewdatabase.".".$yournewprefix."user "$query_string); 

$yournewdatabase = you share your users in a single database, so you need to switch from the vB database this forum use, to the one you want to share.

$yournewprefix = your new database have a different prefix i suppose... change it there...

you can add these new variables to your config.php file... but have to be added or the script is useless.

also, this hack is for sharing between different vB, and have not been tested for other purposes... and i will not release it, because you really have to own 2 different licenses to be able to deal with it - or it's illegal!

this can become a official hack btw!

Andreas 07-12-2004 01:05 AM

I think, except the legal issues, there are several problems:
  • post counter
  • last activity
  • used style
  • PMs
  • reputation
  • usergroup membership

Id' like to know how this problems can be avoided/fixed?

nexialys 07-12-2004 01:22 AM

for this list, just make the exact same change as for the user table... tables are precisely identified, so it's not a problem... the friend just asked for the users table, not the entire system...

some will tell this change make some overhead, but when you want to share your stuff like that, you have to deal with some problems... you can make a global change around the script and make it impossible to update later, or make this little quicky that will enable you a complete merge of users without changing more of the script...

i've done the same change for hivemail to use my own vb table instead of the regular vb integration ... job is cool!

Andreas 07-12-2004 01:32 AM

M8, all these things I mentioned ARE in the user table - and that's the problem.

If you have only one user table you have only one post counter, only one field for usergroup memberships and so on ...

nexialys 07-12-2004 01:38 AM

usually, users are the same from one board to another... so if you count the posts from one board, i suppose they have to be added to the other one ?!... logically...

and yes i didn't noticed your detail.. ;)

with a merge of tables, users will have one sig, one count, etc... you can merge all the tables related to users details, or keep them independant from board to board...

vB have built their users table with too much details, so we have to deal with this...

Lurk 07-12-2004 03:02 AM

hmm, i'm having a problem with that... some questions:
1. can i use a different database? (user, pass, db name)
2. am i supposed to add it after or below?

nexialys 07-12-2004 09:04 AM

1- to have a different db with different users/pass is a bit more complicated, because in this way, you have to add the password ans username to the process, and it can'T be done that way... you ask for too complicated procedure here.

and as it was written, you add it after the first part.

btw, i just see there is a usergroup table, this can be hasardeous as the hack i give is replacing everything starting with user... i've updated with a space


All times are GMT. The time now is 04:56 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.01157 seconds
  • Memory Usage 1,784KB
  • 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
  • (2)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (34)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete