The code for these 3 functions were spread out over too many files to reliably manage. I've now made all the editors and positions of the buttons consistent.

A ton of code cleanup was done ( cleaned out a ton of obsolete code ). Security holes were fixed and common functions ( validation / permissioning ) were used to ensure consistency and non-corrupt databases.

The number of things that could potentially go wrong are too long to list here, but we now have a more solid foundation.

To take just edit post for an example: the total code size in 756 was 29K.. now with the combined / cleaner code, it is 17K and does fewer unnecessary queries as well.

Smaller things, like LOCKING THE TOPIC that is about to be deleted have also been added. Before, there was a chance that a use could be replying to a topic that was about to go gonzo and produce a post that was an orphan.

( the same idea / cleanup has been applied to deleting a user -- 756 leaves stray unhooked PMs from users -- spammers -- who get deleted ) This happens on this forum all the time and is very annoying!

Anyway, for many forums, there is a desire to only make the topic subject be the subject for all replies after that. Some people change the subject and especially in flat mode, it makes no sense at all.

There is now a way to configure the board to disallow this:

When a user edits any reply, they just see the subject and cannot change it.

All of the save buttons go thru a common fadeout message as well..

I really should post another 10 screens here to show all the possibilities, but this should just be considered a template for all editors now with the buttons right below the editor.

Additionally all templates are chock full of CSS goodness for the stylers to go crazy with..

This has always been lacking, since an admin should at least see if captcha works and which one to use has a preview

Additionally the ImageMagick code had bugs in it that has now been cleaned up.

All code has been merged into one file, since the lib directory file was only used by 1 file. Dunno, why that was ever done.

The angles used to distort the letters were also relaxed a bit from some of the extremes that were in there before. This still maintains needing a human to decipher, but at least gives the poor bashtids a chance to even read the letters

Additionally ( i think i already mentioned before ), there is a fallback to GD, as default, if nothing is initialized.

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 . 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