Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
4 registered (Dj Aero, capnbob, Morgan, id242), 46 Guests and 16 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 04/12/04
Posts: 154
Top Posters (30 Days)
Ruben 49
DennyP 24
Gizmo 23
Dunny 18
SteveS 14
AllenAyres 12
dbremer 10
drkknght00 9
SD 9
driv 8
Latest Photos
OK Corral Shoot Out
Testing
Basildon Train Station
Basildon Town Centre looking from the rounderbout
Basildon Town Square
Topic Options
#177255 - 02/03/07 01:31 PM When you create modifications....
Rick Offline
Post-a-holic
Registered: 06/04/06
Posts: 10164
Loc: Aberdeen, WA
Not exactly sure the best place to post this yet, but I'll post here for now.

For all of you modders out there. This is something that I stressed in earlier versions, but we'll revisit it again. Take a look at this thread.

A modification that was installed altered the database. The problem was, that the field names that were chosen for this modification were ones that we used for 7.1, so it ended up resulting in upgrade problems.

When creating a modification that alters the database, please give the new fields a custom prefix. In this case, instead of ONLINE_AGENT, use something like CUSTOM_ONLINE_AGENT. Just something that is different than the normal field naming convention. That way if future upgrades try to add a new field, there will be no conflicts.
Top
Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
#177357 - 02/03/07 06:12 PM Re: When you create modifications.... [Re: Rick]
Gizmo Online   cat

Registered: 06/05/06
Posts: 14994
Loc: Portland, OR; USA
I agree here completely, your mod shouldn't use current variables, you should create new ones as to not break things should a user decide to upgrade; plus it'd be near impossible to find what is needed to uninstall a mod with using pre-existing variables so users would end up with content not needed...
_________________________
Forums: UGN Security & VNC Web Design & Development
UBB.Threads: UBB.Wiki, My UBBSkins, UBB.Sitemaps
Longtime UBB Supporter, UBB Beta Tester & Resident Post-A-Holic.
UBB Modifications, Styling, Coding Services, Disaster Recovery, and more!
Top
#177379 - 02/03/07 07:42 PM Re: When you create modifications.... [Re: Gizmo]
jgeoff Offline
Pooh-Bah
Registered: 08/08/06
Posts: 1922
Loc: NJ

Someone should post this to UBBDev, too...
_________________________
GangsterBB.NET (Ver. 7.5.6)
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
Browsers: Chrome, Firefox, & Safari (Win7 and iPhone); No IE, ever!
Top
#188951 - 06/26/07 10:23 PM Re: When you create modifications.... [Re: jgeoff]
Mors Offline
addict
Registered: 06/26/06
Posts: 471
Loc: So. California
You should use the best practice of NEVER touching the original products data model.. Create your own tables and field names..
_________________________
Happy Customer !!!
Top
#235403 - 03/06/10 04:24 PM Re: When you create modifications.... [Re: Mors]
SD Offline
Registered: 04/19/07
Posts: 4055
Loc: SoCal, USA
i go one step further and create a new database.. the mysql class isn't married to a particular database, so you can do cross DB joins with no code changes at all to the sql class..

Basically, select queries can look like:

Sql Query:
SELECT my.FieldName, my.user_id, u.USER_ID
FROM $myDB.TableName my, {$config['TABLE_PREFIX']}USERS u
WHERE my.user_id=u.USER_ID


kinda stuff.. the only thing you have to make sure of is that the DB user and DB pass can connect to both DBs (duh) and the query is just as efficient as a intra table join within the same DB..

i stumbled upon it via google about 5yrs ago Linky Poo™

:2c:
_________________________

Threads tutorials . Threads & Wordpress experts . UBB resume

If I you, click this link as to why
Top
#235431 - 03/09/10 03:08 AM Re: When you create modifications.... [Re: SD]
Yarp™ Offline
Registered: 08/30/06
Posts: 1513
Loc: Breda, NL
Originally Posted By: Sirdude
i go one step further and create a new database..


I don't, often my mods enhance existing tables, if I would add more tables to the equision, I would need to add extra tables to the query mix, and would loose a little performance.
_________________________
Top
#235432 - 03/09/10 05:15 AM Re: When you create modifications.... [Re: Yarp™]
SD Offline
Registered: 04/19/07
Posts: 4055
Loc: SoCal, USA
To each their own.. the performance hit is negligible, imo..

You actually get a HUGE performance increase, depending upon what you are doing..

Example is to split the ubbt_POSTS table up into 2.. 1 ubbt_posts_archive is in another DB (for archived posts) then the normal ubbt_POSTS table stays as is.

Modify ubbt_TOPICS to then have TOPIC_STATUS include a new type 'A' for archive..

then in normal day to day operations, the ubbt_POSTS table is being queried with MUCH less records to retrieve for cfrm and postlist..

only time you would hit up the ubbt_posts_archive table would be for searching or showflat (if archive)..

it's like night/day in performance increase smile

so i see your point, and believe your example holds for things like extra field in ubbt_USER_PROFILE or whatever.. but there are really quite a few tables where splitting them off would actually increase the speed..

so i guess we agree in some way too laugh
_________________________

Threads tutorials . Threads & Wordpress experts . UBB resume

If I you, click this link as to why
Top



Moderator:  AllenAyres, Harold, Ian, Ron M 
Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Ability to "like" individual posts (not Facebook "likes)
by doug
05/23/12 09:03 AM
Island Permissions
by ThreadsUser
05/22/12 03:03 PM
streaming video
by prkrgrp
05/20/12 07:02 PM
New Posts Corrupted? Can someone help?
by PianoWorld
05/19/12 09:41 AM
Custom forum permissions
by ntdoc
05/18/12 02:07 PM
Forum Stats
10489 Members
36 Forums
33841 Topics
181698 Posts

Max Online: 978 @ 06/24/07 11:19 PM
Random Image