Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Oct 2003
Posts: 2,305
Old Hand
Old Hand
Joined: Oct 2003
Posts: 2,305
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

Sponsored Links
Joined: Nov 2001
Posts: 10,369
I type Like navaho
I type Like navaho
Joined: Nov 2001
Posts: 10,369
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.

Joined: Aug 2000
Posts: 1,609
Addict
Addict
Offline
Joined: Aug 2000
Posts: 1,609
I'm liking the way this is unfolding....

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
yah, me too.. we do something similar with .classic and it helps keep things straight.


- Allen wavey
- What Drives You?

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)