Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 03-09-2004, 05:53 PM
soopa soopa is offline
 
Join Date: Apr 2002
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Xenon
Dean, that's exactly the way i mentioned above.
with that way you can produce some real problems if you are not carefully when creating new usergroups and such
could you not just move the usergroups table into the `user-db` ?

what types of problems you have in mind?
Reply With Quote
  #12  
Old 03-09-2004, 05:55 PM
soopa soopa is offline
 
Join Date: Apr 2002
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dean C
Wow phpbb does that - that's a great idea The tablenames are hardcoded but I genuinely think this'd be a good idea to do in later versions of vB3. I suggest you suggest this as a feature suggestion. I was going to suggest a way to do this in not so many lines within config.php. However I'm not sure if php's capabilities would allow this.

Basically for all those that may know I was thinking that perhaps you could write some ifs and regexp's to check the instance of where the constant is being used. For example if the follow characters until the next gap of TABLE_PREFIX was user then replace it with something. I don't know if this is possible.

yea its kinda neat. http://www.phpbb.com/kb/article.php?article_id=55

i will suggest it for vb. very handy.


as for adding db prefix to sql queries in vB code... easy nuff to do with text editor. rather find and replace by hand anyway just to make sure im not flubbin nothing.


just looking at the vB3 DB schema it could be quite a challenge figuring out what tables exactly to seperate... hmm.


would this also work for vB2 do you imagine?
Reply With Quote
  #13  
Old 03-09-2004, 06:25 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well I kind of just did a practice of how this would work.

Assuming you had a table prefix (WILL NOT WORK WITHOUT A TABLE PREFIX !) you add this within db_mysql.php:

PHP Code:
$query_string str_replace(TABLE_PREFIX 'user''a' TABLE_PREFIX 'user'$query_string); 
Below:

PHP Code:
global $query_count$querytime
Now don't actually do this - This is just to illustrate how you could use it. You'd replace the a with the name of the database and a period and it'll work. The problem comes with the key fields like userid, usergroupid. Just a though for people thinking about doing this though
Reply With Quote
  #14  
Old 03-09-2004, 07:18 PM
soopa soopa is offline
 
Join Date: Apr 2002
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hmm. if both sites have the same user groups tho, this would not be a problem correct?
Reply With Quote
  #15  
Old 03-09-2004, 07:20 PM
soopa soopa is offline
 
Join Date: Apr 2002
Posts: 21
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what lines of db_mysql are you adding these snippets?
Reply With Quote
  #16  
Old 03-10-2004, 02:33 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It was just pseudo code not to actually be implemented. It was just to show the possibilities of how it could be done
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:46 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04165 seconds
  • Memory Usage 2,218KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (6)post_thanks_box
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (6)post_thanks_postbit_info
  • (6)postbit
  • (6)postbit_onlinestatus
  • (6)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete