Go Back   vb.org Archive > Community Central > vBulletin.org Site Feedback
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #11  
Old 07-11-2005, 03:20 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M
Yes it does, but it's not an upgrade script, it's built in functionality (and it ought to copy all the fields it finds in the table, but I notice it doesn't). I can't think of any reason an upgrade would need to drop a table, alter it yes, perhaps even clear it, but drop it - no - even if fields are no longer used, they can be just ignored.
The only time any data in the database which is not the original vB database structure will be dropped is if you select to [high]Empty the database[/high], but I think you can only do this via /install/install.php

Satan
Reply With Quote
  #12  
Old 07-11-2005, 03:25 PM
The Geek's Avatar
The Geek The Geek is offline
 
Join Date: Sep 2003
Location: Behind you
Posts: 2,779
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I cant ever see much of a reason to append fields to a vb table anyway. In fact, it really annoys me when I see macks that do this when its not needed.

The most common table modified is the user table. Why cant people just use profile fields? Thats essentially what its designed for. That or just include your own table that you can drw information from. Nothing worse than trying to uninstall a mod that has made changes to the underlying vb table structure.

Just my 2 yen (which of course comes to very little at the current exchange rate).
Reply With Quote
  #13  
Old 07-12-2005, 12:19 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by The Geek
The most common table modified is the user table. Why cant people just use profile fields?
Because it's not very easy. First they have useless names (field6, field7, field8 etc), and secondly there is no way to know what the next one will be on any installation, it could be field6 on one, and field12 on another.
Reply With Quote
  #14  
Old 07-12-2005, 02:16 AM
Link14716's Avatar
Link14716 Link14716 is offline
 
Join Date: Jun 2002
Location: Georgia, USA
Posts: 2,519
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by The Geek
That or just include your own table that you can drw information from.
I would rather modify a table "needlessly" when it is the best option. Using a profile field means that you have to find what field it is in, which requires either a setting or a needless datastore row to keep track of. Adding a brand new table means you either add a query needlessly, or you modify queries, which mean needless file edits.

Modifying the user table is much simpler than either of the two alternate methods you mention. Either way, a hack should include an uninstall script.
Reply With Quote
  #15  
Old 07-12-2005, 03:40 AM
Colin F's Avatar
Colin F Colin F is offline
 
Join Date: Jul 2004
Location: Switzerland
Posts: 1,551
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Link14716
I would rather modify a table "needlessly" when it is the best option. Using a profile field means that you have to find what field it is in, which requires either a setting or a needless datastore row to keep track of. Adding a brand new table means you either add a query needlessly, or you modify queries, which mean needless file edits.

Modifying the user table is much simpler than either of the two alternate methods you mention. Either way, a hack should include an uninstall script.
With an install script it should be easy to fetch the last userfield used and increment that by one??
Reply With Quote
  #16  
Old 07-12-2005, 06:24 AM
The Geek's Avatar
The Geek The Geek is offline
 
Join Date: Sep 2003
Location: Behind you
Posts: 2,779
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Or simply have the field be an option in the settings. I do this for GAL and GAB.

An extra table doesnt mean always mean an extra query - all that just depends on your design and (in the end) what youre trying to do.

Although there may be times where its unavoidable, far too many take the lazy way out and simpy append fields to the user table without exploring better and cleaner ways of accomplishing the same thing.
Reply With Quote
  #17  
Old 07-12-2005, 07:48 AM
Revan's Avatar
Revan Revan is offline
 
Join Date: Jan 2004
Location: Norway
Posts: 1,671
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by The Geek
An extra table doesnt mean always mean an extra query - all that just depends on your design and (in the end) what youre trying to do.
Do tell me how I can create my own table, populate it with EVERY user, then fetch this info as easily as $vbulletin->userinfo WITHOUT any extra queries and WITHOUT file edits.
If you can't do this, then you are full of it
Reply With Quote
  #18  
Old 07-12-2005, 08:46 AM
The Geek's Avatar
The Geek The Geek is offline
 
Join Date: Sep 2003
Location: Behind you
Posts: 2,779
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Um - Do it with the freaking profile fields thats what they were designed for. Sheesh.

Things would also be made much easier if they would allow hooks into the queries as I mentioned in this post. Then you could accomplish much more (though I am sure people will still rely on appending extra fields on the end of the user table as it was the easier thing to do).

Isnt hacking the Tables about the same thing as hacking the files?
Reply With Quote
  #19  
Old 07-12-2005, 08:52 AM
Marco van Herwaarden Marco van Herwaarden is offline
 
Join Date: Jul 2004
Posts: 25,415
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by The Geek
Isnt hacking the Tables about the same thing as hacking the files?
Even worse if you do it wrong.
Reply With Quote
  #20  
Old 07-12-2005, 09:42 AM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by The Geek
Um - Do it with the freaking profile fields thats what they were designed for. Sheesh.

Things would also be made much easier if they would allow hooks into the queries as I mentioned in this post. Then you could accomplish much more (though I am sure people will still rely on appending extra fields on the end of the user table as it was the easier thing to do).

Isnt hacking the Tables about the same thing as hacking the files?
If you alter any of the existing-default-not-touched vBulletin database structure, yes - If you add to it, no

Satan
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:08 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.06106 seconds
  • Memory Usage 2,261KB
  • 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
  • (7)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
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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