UBB.Dev
okay we have been tossing around the idea of a centralized file we could call hack.inc.php which esential have the following lines in it

<?
// DO NOT EDIT THIS SECTION
// Require the library
require ("main.inc.php");
?>

and would be placed in the includes directory and ALL scripts can then be pointed to that file instead of the main.inc.php it would enable people to make easy conversions from one version to another by just copying the new hack.inc.php to the new versions includes directory and then editing that ONE file..

Essentially all scripts would have the following

// DO NOT EDIT THIS SECTION
// Require the library
require ("/your/path/to/threads/includes/hack.inc.php");

instead of the one pointing to main.inc.php

also great news..the way 6.5 handles extra config variables is ya don;t paste em into the config.inc.php anymore you can do the following.

1. Create file called configextras.php in the /ubbthreads/includes directory and add
variables similar to the following basically any extra variables you need that do not come with the main config.inc.php:

$config['PPost_Host'] = "localhost";
$config['PPost_Database'] = "<yourdatabase>";

$theme['game_table_width'] = "";
$theme['game_cell_padding'] = "";

then

1a. In ubbtinc.php

FIND

require_once("$configdir/config.inc.php");
require_once("$thispath/mysql.inc.php");
require_once("$thispath/includes/theme.inc.php");

ADD BELOW IT

require_once("$thispath/includes/configextras.php");


that will autoload any configuration variables from the configextras.php into the config.inc.php or theme.inc.php file

thats a plus for we modders
Actually - the more I think about this.

the hack.inc.php file (or extras.inc.php file) doesn't need any includes.

It can just be like this:

<?
$config['game_table_width'] = 'whatever';
$config['game_cell_padding'] = 'thisthat';
?>

It only need to contain the variables.

Then, rather than having to modify any threads scripts with extra includes.

The include statement could be added right into main.inc.php - which is a script which never gets overwritten with upgrades.

Then you could include the misc config variables into threads, without having to modify anything extra.

We could release it as a "mod" then any mods we write could state in the instructions that it required the hack.inc.php mod. Thus eventually - everyone who runs several mods will add this once, and be able to use it for all settings for mods today and in the future.
I'm liking the way this is unfolding....
yah, me too.. we do something similar with .classic and it helps keep things straight.
© UBB.Developers