Thread: Don't use
View Single Post
  #3  
Old 18th July 2018, 17:17
BamBam0077 BamBam0077 is offline
Banned
 
Join Date: Jul 2013
P2P
Posts: 410
Default
Lol, torrent trader,ts,freetsp,tbdev,mybb,u232 if you wanted to a hit of that here some good old your gonna need it to smoke my arse about programming or hip-hop you grass hopper

Bump:
Code:
DROP TABLE IF EXISTS `{PREFIX}pref`;
CREATE TABLE IF NOT EXISTS `{PREFIX}pref` (
  `pref_target` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `pref_name` longtext COLLATE utf8_unicode_ci NOT NULL,
  `pref_value` longtext COLLATE utf8_unicode_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO `{PREFIX}pref` (`pref_target`, `pref_name`, `pref_value`) VALUES
('time', 'adjust', ''),
('time', 'date', ''),
('time', 'joined', 'j-F y'),
('time', 'long', 'F j Y, H:i'),
('time', 'offset', '0.0'),
('time', 'short', 'd m Y - H:i'),
('time', 'tiny', ''),
('time', 'use_relative', '1'),
('time', 'use_relative_format', '{--}, H:i');
Should cover:
[code]
$TBDEV['time_adjust'] = 0;
$TBDEV['time_offset'] = '0';
$TBDEV['time_use_relative'] = 1;
$TBDEV['time_use_relative_format'] = '{--}, h:i A';
$TBDEV['time_joined'] = 'j-F y';
$TBDEV['time_short'] = 'jS F Y - h:i A';
$TBDEV['time_long'] = 'M j Y, h:i A';
$TBDEV['time_tiny'] = '';
$TBDEV['time_date'] = '';
[CODE]

You need to patch up where I made mistakes I would check but my laptop is outta action. my tbdev dbconn SQL backend I have to put it together will in the next few days or so as I need it to move forward!

Code:
<?php
/*********************************\ 
  DO NOT EDIT THIS FILE, PLEASE USE
  THE SETTINGS PANEL!!
\*********************************/
if(!defined('IN_INSTALL')){
  die('Hacking attempt!');
}
error_reporting(E_ALL);
date_default_timezone_set('Europe/London');
const REQUIRED_PHP = 50300, REQUIRED_PHP_VERSION = '5.3.0';

if (PHP_VERSION_ID < REQUIRED_PHP) {

die('PHP '.REQUIRED_PHP_VERSION.' or higher is required.');
}

define('SQL_DEBUG', 1);
define('TIME_NOW', time());
define('EMAIL_CONFIRM', true);
define('XBT_TRACKER', false);

// Cookie setup
$TBDEV['cookie_prefix']  = 'alpha_'; // This allows you to have multiple trackers, eg for demos, testing etc.
$TBDEV['cookie_path']    = ''; // ATTENTION: You should never need this unless the above applies eg: /tbdev
$TBDEV['cookie_domain']  = ''; // set to eg: .somedomain.com or is subdomain set to: .sub.somedomain.com

$cryptdb = mysqli_connect("localhost", "root", "");
if (!$cryptdb) { 
die("Could not connect: " . mysqli_error());
} 
return $cryptdb;

// start here!
// select * from config.sql
$sql = 'SELECT * FROM config';
// sql query to run above sql request
$result = sql_query($cryptdb, $sql);
// while $result -> $config
while($info = mysqli_fetch_assoc($result)){ 

$TBDEV['time_adjust'] =  $info["time_adjust"];
$TBDEV['time_offset'] = $info["time_offset"]; 
$TBDEV['time_use_relative'] = $info["time_use_relative"];
$TBDEV['time_use_relative_format'] = $info["time_use_relative_format"];
$TBDEV['time_joined'] = $info["time_joined"];
$TBDEV['time_short'] = $info["time_short"];
$TBDEV['time_long'] = $info["time_long"];
$TBDEV['time_tiny'] = $info["time_tiny"];
$TBDEV['time_date'] = $info["time_date"];

// DB setup
$TBDEV['mysql_host'] = $info["mysql_host"];
$TBDEV['mysql_user'] = $info["mysql_user"];
$TBDEV['mysql_pass'] = $info["mysql_pass"];
$TBDEV['mysql_db']   = $info["mysql_db"];

// Settings 
$TBDEV['site_online'] = $info["site_online"];
$TBDEV['maxusers'] = $info["maxusers"]; 
$TBDEV['domain'] = $info["domain"];
$TBDEV['site_name'] = $info["site_name"];
$TBDEV['site_email']  = $info["site_email"];
$TBDEV['language'] = $info["language"];
$TBDEV['char_set'] = $info["char_set"];
$TBDEV['announce_interval'] = $info["announce_interval"];
$TBDEV['tracker_post_key'] = $info["tracker_post_key"];
$TBDEV['max_torrent_size'] = $info["max_torrent_size"];
$TBDEV['max_dead_torrent_time'] = $info["max_dead_torrent_time"];
$TBDEV['signup_timeout'] = $info["signup_timeout"];
$TBDEV['pic_base_url'] = $info["pic_base_url"];
$TBDEV['stylesheet'] = $info["stylesheet"];
$TBDEV['readpost_expiry'] = $info["readpost_expiry"];
$TBDEV['autoclean_interval'] = $info["autoclean_interval"];
$TBDEV['announce_url'] = $info["announce_url"];
$TBDEV['msg_alert'] = $info["msg_alert"];
$TBDEV['minvotes'] = $info["minvotes"];
$TBDEV['av_img_height'] = $info["av_img_height"];
$TBDEV['av_img_width'] = $info["av_img_width"];
}

define('DIR_PATH', dirname($_SERVER['SCRIPT_FILENAME']).'/');
$TBDEV['sql_error_log'] = DIR_PATH.'/libs/logs/'.date("M_D_Y").'sql_err.log';

$TBDEV['allowed_ext'] = array('image/gif', 'image/png', 'image/jpeg');
// DB setup
$TBDEV['mysql_host'] = "localhost";
$TBDEV['mysql_user'] = "root";
$TBDEV['mysql_pass'] = "";
$TBDEV['mysql_db']   = "tbdev";


                              
$TBDEV['site_online'] = 1;
$TBDEV['tracker_post_key'] = 'changethisorelse';
$TBDEV['max_torrent_size'] = 1000000;
$TBDEV['announce_interval'] = 60 * 30;
$TBDEV['signup_timeout'] = 86400 * 3;
$TBDEV['minvotes'] = 1;
$TBDEV['max_dead_torrent_time'] = 6 * 3600;

// Max users on site
$TBDEV['maxusers'] = 5000; // LoL Who we kiddin' here?


if ( strtoupper( substr(PHP_OS, 0, 3) ) == 'WIN' )
  {
    $file_path = str_replace( "\\", "/", dirname(__FILE__) );
    $file_path = str_replace( "/include", "", $file_path );
  }
  else
  {
    $file_path = dirname(__FILE__);
    $file_path = str_replace( "/include", "", $file_path );
  }
  
define('ROOT_PATH', $file_path);
$TBDEV['torrent_dir'] = ROOT_PATH . '/torrents'; # must be writable for httpd user   

# the first one will be displayed on the pages
$TBDEV['announce_urls'] = array();
$TBDEV['announce_urls'][] = "http://localhost/announce.php";
//$TBDEV['announce_urls'] = "http://localhost:2710/announce";
//$TBDEV['announce_urls'] = "http://domain.com:83/announce.php";

if ($_SERVER["HTTP_HOST"] == "")
  $_SERVER["HTTP_HOST"] = $_SERVER["SERVER_NAME"];
  
$TBDEV['baseurl'] = "http://" . $_SERVER["HTTP_HOST"]."/";

/*
## DO NOT UNCOMMENT THIS: IT'S FOR LATER USE!
$host = getenv( 'SERVER_NAME' );
$script = getenv( 'SCRIPT_NAME' );
$script = str_replace( "\\", "/", $script );

  if( $host AND $script )
  {
    $script = str_replace( '/index.php', '', $script );

    $TBDEV['baseurl'] = "http://{$host}{$script}";
  }
*/

//set this to true to make this a tracker that only registered users may use
//$TBDEV['membersonly'] = 1; //deprecated no longer needed

//maximum number of peers (seeders+leechers) allowed before torrents starts to be deleted to make room...
//set this to something high if you don't require this feature
//$TBDEV['peerlimit'] = 50000; //deprecated. no longer used.

// Email for sender/return path.
$TBDEV['site_email'] = "coldfusion@localhost";

$TBDEV['site_name'] = "TBDEV.NET";

$TBDEV['language'] = 'en';
//charset
$TBDEV['char_set'] = 'UTF-8'; //also to be used site wide in meta tags
if (ini_get('default_charset') != $TBDEV['char_set']) {
ini_set('default_charset',$TBDEV['char_set']);
}
$TBDEV['msg_alert'] = 0; // saves a query when off

$TBDEV['autoclean_interval'] = 900;
$TBDEV['pic_base_url'] = "./pic/";
$TBDEV['stylesheet'] = "./1.css";
$TBDEV['readpost_expiry'] = 14*86400; // 14 days
//set this to size of user avatars
$TBDEV['av_img_height'] = 100;
$TBDEV['av_img_width'] = 100;
$TBDEV['allowed_ext'] = array('image/gif', 'image/png', 'image/jpeg');
// Set this to the line break character sequence of your system
//$TBDEV['linebreak'] = "\r\n"; // not used at present.

define ('UC_USER', 0);
define ('UC_POWER_USER', 1);
define ('UC_VIP', 2);
define ('UC_UPLOADER', 3);
define ('UC_MODERATOR', 4);
define ('UC_ADMINISTRATOR', 5);
define ('UC_SYSOP', 6);

//Do not modify -- versioning system
//This will help identify code for support issues at tbdev.net
define ('TBVERSION','TBDev_2009_svn');

?>
Edit before you just use it you will need the config.sql which is somewhere in the first post just alter it and if your not sure what to do just wait for me I'll get us there
Reply With Quote