Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online
1 registered (Ruben), 19 Guests and 8 Spiders online.
Key: Admin, Global Mod, Mod
Featured Member
Registered: 01/16/08
Posts: 546
Top Posters (30 Days)
Ruben 47
Bert 26
Gizmo 18
Rob Provencher 10
Rimex 9
SD 6
sw55 5
Eugene 5
Matthias1976 4
Dunny 3
Latest Photos
Uhm...
Mayan End of World
Gas Station Disco Video Shoot
Test Pictures
Audrey Kate
Topic Options
#248211 - 01/27/12 09:15 PM Re: New Features + Bug Fixes for 7.6 ( implemented ) [Re: SD]
SD Offline
Registered: 04/19/07
Posts: 4205
Loc: SoCal, USA
Another Geek post, with no pictures.

I seriously overhauled the user class, to abstract the database fields into the object.

What was there before was a mixture of an array ( $user ) and an object ( $userob ).

For a newbie developer, this wasn't very obvious to deal with.

Regardless, the other thing that has always been lacking is abstraction.

There were certain hard coded ways Rick did things and you had to know how the DB was setup.

Now, you don't....

Before you had to do something like:

Php Code:
if ($user['USER_MEMBERSHIP_LEVEL'] == 'Administrator') doSomething(); 


All well and good for those in the know, but it really made it so there were only 2 or 3 peeps who 'got it'. And if i showed you how a Mod or globalMod was determined, it is even more obscure with a preg_match..

Now, the code is simply:

Php Code:
if ($me->isAdmin) doSomething();

or

if ($me->isMod) doSomething();

or

if ($me->isAnyMod) ... etc etc..

 


You don't care what the DB value is, because the user class shields you from the DB layer..

This is just one example of about 30 or more things that were changed to make it easier for both the developer ( modder, plugin maker ) as well as efficient code execution

Additionally, all fields in the DB that should have had a default value for the user profile in particular, now DO!

I don't know how many times i see stupid code where we have to wonder if a database value is set and take the configuration value if it isn't, when it would have been much simpler to have a default.

Like posts per topic or topics per page for example...

DB field lengths are also cut down to proper size. If it is a simple yes/no value, then i use 0, 1, with it abstracted. This makes DB record fetching much more efficient overall.

It also fixes BUGS!!! the email user when getting a PM always gets hosed in 7.5.6 and below, because the admin code uses Yes/No for the value and the script side uses On and anything NOT On... egads... now it is simply $me->notifyPM, and the coder has no clue and doesn't care what the value is ( yes, it is 0, 1 now )

Many more changes to the underlying engine have been made.

Like lower case table names, for example. This allows going to/from linux/windows servers a no brainer.

( note: why you would go TO a windows server for ubbthreads is beyond me however laugh . stay in unix, if you have a choice!! )

All in all, a TON of time was spent just cleaning up junk...

the scripts directory in 7.5.6 had 129 files.

the scripts directory in 7.6 has 98 and will be less when i'm done.

Same for the templates/default directory ( approximate same ratio )

Oh and surprise: there are even comments in the headers to say what the hell the file does and the filenames have been renamed to kinda be more logical...

example 'addaddress.inc.php' -- take a guess what it did.. yup.. no semantic meaning...

now it is included along with other files into one file called:

...

mywatches.inc.php

...

kinda more meaning there...

bla bla bla...

essentially, all this abstraction allows us to make proper DB changes that are needed to move forward without overhauling the code each time. The code stays the same and just the ONE FILE ( class.user.php ) changes to re-abstract the new DB to all the scripts...

what i did for the user class has also been done for the html, mysql, bbcode and mysql classes.

oh, and speaking of bbcode.. there was NO reason to include that file every time in ubbthreads, when the html class was the only one that used it. now, it is only loaded when needed. That is one HUGE class that isn't lugged around anymore.

Same goes for the mailer class...

use it when you need it..

too much more rambling to go here, but suffice to say, the code is much more streamlined, readable, commented AND SECURE!. ( all variables are sanitized.. they weren't before... yes, there are still obscure issues with 7.5.6 security and have been since 7.0 )

bottom line.. a LOT has been done and i can see the light at end of tunnel to beta...

hang in there... i have a couple more picture based posts to follow in the coming week wink
_________________________

Threads tutorials . Threads & Wordpress experts . UBB resume

If I you, click this link as to why
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."



Entire topic
Subject Posted by Posted
New Features + Bug Fixes for 7.6 ( implemented ) SD 11/06/11 07:18 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/06/11 07:21 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/06/11 07:21 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/06/11 07:22 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/06/11 07:22 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/06/11 07:25 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/06/11 07:26 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/06/11 07:27 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/06/11 07:27 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/06/11 07:27 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/06/11 07:27 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/06/11 07:27 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/06/11 07:30 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/06/11 07:36 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/06/11 07:36 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/06/11 07:36 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/06/11 07:37 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/06/11 07:42 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/07/11 11:34 AM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/07/11 01:04 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/07/11 07:51 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/09/11 01:43 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/11/11 10:01 AM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/11/11 10:09 AM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/11/11 10:36 AM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/13/11 01:36 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/14/11 07:59 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 11/17/11 03:06 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 12/06/11 06:01 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 12/06/11 06:10 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 12/08/11 11:47 AM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 12/08/11 11:19 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 12/10/11 02:24 AM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 12/10/11 02:36 AM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 12/10/11 06:04 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 12/10/11 07:08 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 12/11/11 01:20 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 12/16/11 01:41 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 12/17/11 09:02 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 12/18/11 11:26 AM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 12/18/11 12:19 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 12/18/11 01:01 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 12/18/11 08:21 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 12/19/11 01:04 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 12/19/11 01:05 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 12/21/11 01:44 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 12/26/11 02:19 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 12/28/11 12:42 AM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 12/29/11 02:41 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 01/05/12 10:55 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 01/06/12 02:28 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 01/07/12 03:09 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 01/09/12 02:12 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 01/27/12 08:47 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 01/27/12 08:56 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 01/27/12 09:15 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 03/17/12 03:32 PM
Re: New Features + Bug Fixes for 7.6 ( implemented ) SD 03/17/12 03:35 PM

Shout Box

Today's Birthdays
No Birthdays
Recent Topics
Time zone setup
by skicomau
05/22/13 12:16 AM
Express hosting.
by Ruben
05/16/13 03:54 PM
Level of detail in new user registration emails
by Mitch P.
05/15/13 10:20 PM
Approving users
by Bert
05/15/13 09:22 PM
Users randomly added to other group
by Bert
05/15/13 09:15 PM
Forum Stats
10968 Members
36 Forums
33959 Topics
183413 Posts

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