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
Entire Thread
Subject Posted By Posted
Hack.inc.php and the new 6.5 way of adding variables scroungr 05/28/2004 8:46 AM
Re: Hack.inc.php and the new 6.5 way of adding variables JoshPet 05/28/2004 9:01 AM
Re: Hack.inc.php and the new 6.5 way of adding variables AKD96 05/28/2004 11:09 AM
Re: Hack.inc.php and the new 6.5 way of adding variables AllenAyres 05/29/2004 12:01 AM

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
isaac
isaac
California
Posts: 1,157
Joined: July 2001
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
WebGuy 2
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)