Bravo List
Register
Go Back   > Bravo List > Source Code > Trackers > TBDev
Reply
  #1  
Old 19-07-18, 02:32
BamBam0077's Avatar
BamBam0077 BamBam0077 is offline
Support
 
Join Date: Jul 2013
P2P
Posts: 287
Default TBDEV Project
NOT TESTED!!

libs/include/config.php
Code:
<?php
if(!defined('IN_INSTALL')){
  die('Hacking attempt!');
}
/*********************************\ 
  DO NOT EDIT THIS FILE, PLEASE USE
  THE SETTINGS PANEL!!
\*********************************/
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);

$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"];
}
?>
need to create config.sql
Code:
CREATE TABLE config (
  `mysql_host` varchar(255) NOT NULL default '',
  `mysql_db` varchar(255) NOT NULL default '',
  `mysql_user` varchar(255) NOT NULL default '',
  `mysql_pass` varchar(255) NOT NULL default '',
  `site_url` varchar(255) NOT NULL default '',
  `announce_url` varchar(255) NOT NULL default '',
  `site_online` varchar(255) NOT NULL default '',
  `members_only` varchar(255) NOT NULL default '',
  `site_mail` varchar(255) NOT NULL default '',
  `email_confirm` enum('true','false') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'true',
  `site_name` varchar(255) NOT NULL default '',
  `image_dic` varchar(255) NOT NULL default '',
  `torrent_dic` varchar(255) NOT NULL default '',
  `peer_limit` varchar(255) NOT NULL default '',
  `max_members` varchar(255) NOT NULL default '',
  `max_users_then_invite` int(10) UNSIGNED DEFAULT '5000' NOT NULL,
  `invites` int(10) UNSIGNED DEFAULT '2500' NOT NULL,
  `signup_timeout` varchar(255) NOT NULL default '',
  `min_votes` varchar(255) NOT NULL default '',
  `autoclean_interval` varchar(255) NOT NULL default '',
  `announce_interval` varchar(255) NOT NULL default '',
  `max_torrent_size` varchar(255) NOT NULL,
  `max_dead_torrent_time` varchar(255) NOT NULL default '',
  `posts_read_expiry` varchar(255) NOT NULL default '',
  `max_login_attempts` varchar(255) NOT NULL default '',
  `dictbreaker` varchar(255) NOT NULL default '',
  `delete_old_torrents` varchar(255) NOT NULL default '',
  `dead_torrents` varchar(255) NOT NULL default '',
  `site_reputation` enum('true','false') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'true',
  `maxfilesize` varchar(255) NOT NULL default '',
  `attachment_dir` varchar(255) NOT NULL default '',
  `forum_width` varchar(255) NOT NULL default '',
  `maxsubjectlength` varchar(255) NOT NULL default '',
  `postsperpage` varchar(255) NOT NULL default '',
  `use_attachment_mod` varchar(255) NOT NULL default '',
  `use_poll_mod` varchar(255) NOT NULL default '',
  `forum_stats_mod` varchar(255) NOT NULL default '',
  `use_flood_mod` varchar(255) NOT NULL default '',
  `limmit` varchar(255) NOT NULL default '',
  `minutes` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`mysql_host`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
** taken from freetsp edit to best suit, good luck!

So tell me does this work on default tbdev09?

Last edited by BamBam0077; 19-07-18 at 03:04. Reason: forgot db connection, added now for config.php, missed } added now
Reply With Quote
Reply

Tags
project , tbdev

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT +2. The time now is 18:39. vBulletin skin by ForumMonkeys. Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2019, vBulletin Solutions Inc.