Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   TBDev (http://www.bvlist.com/forumdisplay.php?f=20)
-   -   TBDev (http://www.bvlist.com/showthread.php?t=11018)

puppy 10th November 2016 01:54

TBDev
 
Hey guys,

I know this code is old and wrinkly and has security holes etc but I was wondering if I put the time and effort into updating a copy with mods etc weather it would be worth sharing? I am not going to promise a deadline or anything as I know there is a lot of work ahead, I have already updated the config file using a few sources to patch it up to my vision which anyone could do if they tried.

I am in mids of converting to mysqli, I have successfully already converted the dbconn() to run with mysqli I still need to update it a tad more by reading a few other sources of course. I am thinking about adding partial cms code snippets to this copy of tbdev version, so what do you think?

Have a good day :friend:

TLO 10th November 2016 12:26

Quote:

Originally Posted by puppy (Post 49627)
Hey guys,

I know this code is old and wrinkly and has security holes etc but I was wondering if I put the time and effort into updating a copy with mods etc weather it would be worth sharing? I am not going to promise a deadline or anything as I know there is a lot of work ahead, I have already updated the config file using a few sources to patch it up to my vision which anyone could do if they tried.

I am in mids of converting to mysqli, I have successfully already converted the dbconn() to run with mysqli I still need to update it a tad more by reading a few other sources of course. I am thinking about adding partial cms code snippets to this copy of tbdev version, so what do you think?

Have a good day :friend:

Try looking at u232 project. Mindless and co have already completed what you are suggesting. u232 is the new Tbdev :whistle::whistle::whistle:

puppy 10th November 2016 22:34

I don't mean to be rude when I say this as it just my opinion, I use u232 already and well tbh they are a reason as to why I want to do this project as they have inspired me to attempt doing a version. :friend:

Phogo 11th November 2016 12:34

Quote:

Originally Posted by puppy (Post 49630)
I don't mean to be rude when I say this as it just my opinion, I use u232 already and well tbh they are a reason as to why I want to do this project as they have inspired me to attempt doing a version. :friend:

If you want to do this using an old TBDEV as a base isn't the answer.

The team responsible for u232 have put lots of hours into their releases. Why not contribute to their source on github?

TLO 11th November 2016 15:07

Hi m8

No offence taken, Bigjoos has just converted u232 v1 and v2 to utilise mysqli. All versions will soon all utilise it.

puppy 13th November 2016 00:39

Quote:

If you want to do this using an old TBDEV as a base isn't the answer.

The team responsible for u232 have put lots of hours into their releases. Why not contribute to their source on github?
I see there is FreeTSP, FreeSpirit, u-232 all based on TBDev which makes me wonder if I can do a copy myself I don't mean to offend anyone by doing this project I just wanted to see if I could attempt another version for people to consider, I will be using open source projects to utilize this goal.

PHP Code:

<?php
# ************************************************************************
# Licence Info: GPL                                                                *
# Copyright (C) 2016 Project R2                                               *
# Source Base TBDev/FreeTSP/FreeSpirit/U-232/Gazelle/MyBB       *
# Project Developer: SceneGod                                                *
# ************************************************************************

/* Disallow direct access to this file for security reasons */
if (!defined("PROJECT_R2")) {
    
  
print_r("Direct initialization of this file is not allowed.");
}

error_reporting(E_ALL);

const 
REQUIRED_PHP 50400REQUIRED_PHP_VERSION '5.4.0';

if (
PHP_VERSION_ID REQUIRED_PHP) {
    
  
print_r('PHP '.REQUIRED_PHP_VERSION.' or higher is required.');
}

if (isset(
$_SERVER["HTTP_HOST"]) &&  $_SERVER["HTTP_HOST"] == "") {
  
  
$_SERVER["HTTP_HOST"] = $_SERVER["SERVER_NAME"];
}  

define('TIME_NOW'time());
$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'] = '';
/* Set the database access information as constants: */
define('DB_HOST''localhost');
define('DB_USER''root');
define('DB_PASSWORD''MagicMushrooms');
define('DB_DATABASE''project');
/* Site Settings */                              
define ('UC_USER'0);
define ('UC_POWER_USER'1);
define ('UC_ELITE_USER'2);
define ('UC_DJ_USER'3);
define ('UC_TRUSTED_USER'4);
define ('UC_VIP'5);
define ('UC_TORRENT_EDITOR'6);
define ('UC_MODERATOR'7);
define ('UC_ADMINISTRATOR'8);
define ('UC_TEAM_LEADER'9);
define ('UC_DESIGNER'10);
define ('UC_SYSOP'11);
define ('UC_CO_OWNER'12);
define ('UC_OWNER'13);
define('PATH'dirname(__FILE__).DIRECTORY_SEPARATOR);
define('ROOT_PATH'realpath(PATH.'..'.DIRECTORY_SEPARATOR).DIRECTORY_SEPARATOR);
$TBDEV['announce_urls'] = array();
$TBDEV['site_online'] = 1;
$TBDEV['baseurl'] = 'http' . (isset($_SERVER['HTTPS']) && (bool)$_SERVER['HTTPS'] == true 's' '') . '://' $_SERVER['HTTP_HOST'];
$TBDEV['announce_urls'][] = "https://'.$_SERVER['HTTP_HOST'].'/announce.php";
$TBDEV['tracker_post_key'] = 'bsghrtheu6!5y$etr';
$TBDEV['max_torrent_size'] = 1024 1024;
$TBDEV['announce_interval'] = 60 30;
$TBDEV['signup_timeout'] = 86400 3;
$TBDEV['minvotes'] = 1;
$TBDEV['max_dead_torrent_time'] = 3600;
$TBDEV['autoclean_interval'] = 1800;
$TBDEV['maxusers'] = 5000;
$TBDEV['site_email'] = "noreply@localhost";
$TBDEV['site_name'] = "Scene Club";
$TBDEV['language'] = 'en';
$TBDEV['msg_alert'] = 0;
$TBDEV['torrent_dir'] = ROOT_PATH '/torrents';
$TBDEV['sql_error_log'] = ROOT_PATH.'/logs/'.date("M_D_Y").'_sql.log';
$TBDEV['pic_base_url'] = "./pic/";
$TBDEV['stylesheet'] = "2";
$TBDEV['readpost_expiry'] = 14*86400;
$TBDEV['av_img_height'] = 100;
$TBDEV['av_img_width'] = 100;
$TBDEV['allowed_ext'] = array('image/gif''image/png''image/jpeg');
define ('BETA_VER','R2');
?>

to utilize the config file you must place this code:
PHP Code:

/* above require_once("include/config.php"); */
define('PROJECT_R2'true);

/* needs updating but works */
function dbconn($autoclean false) {

  
mysqli_connect(DB_HOSTDB_USERDB_PASSWORDDB_DATABASE) or mysqli_errno("Connection Failed: %s\n"mysqli_connect_error());
  
userlogin();

  if (
$autoclean) {
      
    
register_shutdown_function("autoclean");
  }


inside of bittorrent.php

I know you may not see my point but I am trying something different to the other sources within saying that using some code to help secure and guide me into the correct direction. :friend:

fireknight 13th November 2016 05:11

Hey Puppy.

End of the day - most of the codes out there are based of TBDev ( which is based of the original TBSource code )
Both of which are outdated and full of security holes.

Having said that, they can be filled and made secure.

Good on you for starting with a very base code.
While you are updating that code - you will learn a lot ( from a coding point of view )
This is always a good thing !!

The more base codes out there - the more we all learn.
Some of us are more advanced coders that others.
But we all started somewhere.

So it is great that you want to create something from scratch.

Do not let people put you down.
Do not let people put you off.

You have a great idea, and a lot of work ahead of you.
But you are willing to give it a go.
I for one am interested in your idea, and look forward to what you create.

You V 1.0 code may not be the best.
But you will learn from it, and that will push you forward to create better.

The best way to learn is to give it your best shot, and learn from your mistakes.

You go for it.
Don't let the knockers wear you down.
Stand tall, be proud.

If you need help, do not be afraid to ask for it.
The real coders out there will offer good and solid advice, and maybe even help.
But you also have to be able to take their negative comments, as well as their positive comments.

The wanna be coders
( who have never taken on a real project - as in an one they will release to the general public )
But claim they have their own code - but it is only for sale - not for general release.
Will knock you down.

STAND TALL - well done and keep going with your project.

joeroberts 13th November 2016 06:37

I would be putting this
PHP Code:

define('PROJECT_R2'true); 

In all the base files (index.php, browse.php,forum.php ..............)
and all the other files I would put
PHP Code:

if (!defined("PROJECT_R2")) {
    
  
print_r("Direct initialization of this file is not allowed.");


this well help a little more with securing your files.

puppy 13th November 2016 06:49

Thanks fireknight I am glad to herd your take on this project, I have gotten a pro coder from here on board to help me out with the code, I am just waiting on his response.

I understand I got alot of work ahead so today I am just reading / recoding the bittorrent script plus learning ontop. I might do an updated version without mods for a starting point as putting in multi mods would just jam it up in the updates as for now it is just me doing the work, not that I am complaining :chch: I wanted to do this so I learned what made these other sources so great today and while today is my day off work I am gonna do some research, gonna try out a few cms tricks to see if I can integrate my ideas, I am taking it slow as I have to work for living like most. :ok:

I might alter some code/files/folders so I should do a changelog.txt but I will do that after I have done my part, as stated before this is not a rush job I am taking this serious just like most would if they cared about a project they helped, created, designed etc... I just hope I am not treading on anyones feet as that is the last thing I wanna do.

Bump:
Quote:

Originally Posted by joeroberts (Post 49643)
I would be putting this
PHP Code:

define('PROJECT_R2'true); 

In all the base files (index.php, browse.php,forum.php ..............)
and all the other files I would put
PHP Code:

if (!defined("PROJECT_R2")) {
    
  
print_r("Direct initialization of this file is not allowed.");


this well help a little more with securing your files.

Thanks Joe, I never thought about doing that, but now you have pointed that idea about I will be sure to utilize that gesture. :friend:

Bump: Quick design peak -

https://i.imgbox.com/UYnW4JUw.png

I hope you like the beginning :drink:


All times are GMT +2. The time now is 17:11.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.