|
|||||||||
|
|||||||||
Details | |||||||||
Author: | nexus (apk) | ||||||||
Date: | 22/11/2005 | ||||||||
Version: | 1.0 | ||||||||
Source: | tbsource-0705 & tbdev 0905 | ||||||||
Greets: |
|
||||||||
|
|||||||||
Introduction | |||||||||
Disclaimer |
This guide was originally written in 2004 my MrMister. Since then the tbsource has been chopped and changed and is now tbdev. This guide is for the updated version. Its only version 1.0 so please be nice. This is only to be used as a reference so if it fucks up, please dont have a go at me:). Instead head over to http://www.tbdev.net. | ||||||||
|
|||||||||
Table Of Contents |
I. Introduction To TorrentBits |
||||||||
I. |
Introduction
to TorrentBits TorrentBits.org was a revolutionary torrent tracker script. The site was very popular but was closed for sharing illegal files. However tbsource still lives on! The script has since grown and grown with more fixes being released all the time. |
||||||||
II. |
Requirements
|
||||||||
III. |
Installation This guide is for all to use. Although it does take about 20 minutes to complete. Make sure you have a nice cold beer (no American beer!) or glass of water. Please note: This can be a little confusing for people who are new to php and sql. |
||||||||
A. |
Extraction Get the latest version of tbsource/tbdev from: http://sourceforge.net/projects/tbdevnet/
Once you have downloaded it unrar the file
and upload to your server using a good ftp tool (like flashfxp). Once
you have uploaded carry on reading. It is best to upload the content to
a subdomain such as
http://sub.yoursite.com rather than
http://www.yoursite.com/sub however for this guide we
are going to use
http://www.yoursite.com/tb as the example as it takes
less time to write. |
||||||||
B. |
SQL This section is divided into 2 parts; (1) & (2). Part 1 is for people without phpmyadmin. Part 2 is for people with it installed. |
||||||||
1. |
DB
Creation Note: I'm expecting you to know how to make a DB, if you don't, look around on the internet, or read the doc: http://dev.mysql.com/doc/mysql/en/create-database.html
If you have cPanel, go to the SQL page and create a new database.
I'd reccomend the name 'tb'. After it's made it, it will be username_tb
(replace username with whatever your username is).Then create a user (tbusr is a good choice) and pass. It will turn into username_tbusr (again, username = your username). The pass will not be altered, though. Now that you have created the database and the user (in cpanel), select the username_tbusr and username_tb in the dropdown boxes right under the list of databases. Then click "Add User to DB". Congrats, the DB has been made. Please note what database, username, and pass you used, you will need this information later. If you didn't use cpanel, you shouldn't have even needed this section, as you're a pro. |
||||||||
2. |
Insertion Note: This is LOTS easier when you have phpmyadmin installed. If you want to get it, go to http://www.phpmyadmin.net/ , but I will not assist you in setting it up. When you have extracted the file, there will be several .sql files included, and they are ALL important. Open them up one by one and insert them into your database. Make sure you insert database.sql first. |
||||||||
C. | Editing
Config There are quite a few parts to the configuration, some confusing. You were warned when you started reading this. |
||||||||
1. |
Setting
up secrets.php This is one of the easiest parts of the installation, apart from extracting the php. Go to the directory/folder you extracted the TBSource into. Open the 'includes' directory. Edit " secrets.php ". It is easy to understand, it should come out like so. <? $mysql_host = "localhost"; $mysql_user = "username_tbusr"; $mysql_pass = "password"; $mysql_db = "username_tb"; ?> Where the 'mysql_user' is the username you used earlier, the mysql_pass is the pass you set earlier, and the mysql_db is the database you made earlier. |
||||||||
2. |
Setting
up bittorrent.php You'll be editing the part at the top, please do NOT touch the code at the bottom unless instructed to by me. Maximum Users First, $maxusers sets how many users can join your site. Set this to whatever number you like, when your user count hits that number, no more signups will be allowed until the automatic pruning opens a slot. Torrent Directory Next, $torrent_dir is where the .torrent files will be stored. This does NOT have to be in a public folder. However, since it's unlikely you'll be running this script on a dedicated server, please set it to full/path/to/account/tb/torrents. If you are unsure about the full path, please ask your host. Remember this directory, you'll need it later. Annouce Now, you need to sort out the $announce_urls array. Please change the first one to your domain with the location of the tbsource, and append announce.php:80 to it. (such as http://www.yoursite.com/tb/announce.php:80). I doubt you'll be using other ports, but if you ever do, you can easily add to or edit this area. Base Address After that, the $DEFAULTBASEURL is your websites URL. Please enter the address of your website (such as http://www.yoursite.com/tb (DO NOT put a slash at the end). Private Site? Sites Email Address |
||||||||
3. |
Static
Edits These edits will take place only on the page you edit them, unlike the dynamic edits in bittorrent.php which affect the whole site. |
||||||||
a. |
URL
on HomePage Edit index.php Scroll down to the bottom and find the Disclaimer. Replace the (www.torrentbits.org) (<?PHP echo
$DEFAULTBASEURL ?>) |
||||||||
b. |
FAQ You can edit the faq if you like, it's faq.php, but that's really up to you, I'm just here to tell you that you have to edit the php, it's not in the DB, and there is no tool to do this. You can open the file in dreamweaver (of whatever tool you use) and do a find and replace, search for torrentbits, http://www.torrentbits.org and RedBeard and replace with your site name/admin name (redbeard). |
||||||||
c. |
Staff
Page You can have a static (current, but blank) page, which decreases load on the mysql server, but doesnt show if the users are online, and isn't as easy to make. If your site isn't going to be used too stressfully, or it can handle the load, use the dynamic version. I'll cover both. |
||||||||
1. |
Dynamic
Staff Page Warning! This adds a very small load onto the server. It's a large piece of code, here's what it'll be replacing. <? begin_frame("Staff");
?>
It includes the online status and such. I would recommend it, but please back up your original staff.php which you will use if you find this dynamic version too demanding (unlikely,lol) |
||||||||
2. |
Static
Staff Page To use this I recommend you use the dynnamic code just once, copy the source code from that for the admins, paste it in the static, and repeat for all the groups. This will result in a very nice layout with a minimal amount of work. |
||||||||
D. |
Making
Yourself Staff Now the hard part is over, this is the part where you become a user! Sign up as usual, entering all details. Now open your tbsource/tbdev database (phpmyadmin) and select the users table (near the bottom), then click browse. Find your name and change the 'class' to '6'. Now your a sysop! |
||||||||
E. |
Filling
in the Blanks Now when you load up the site you will see an error, it looks nasty but its not! All you need to do is add a poll to the site. |
||||||||
1. |
Adding
the Poll Go to http://www.yoursite.com/tb/makepoll.php and make a poll. Now this should be fixed. |
||||||||
2. |
Creating
Forums If you planning on using the forums you will need to create them. There is no easy way to do this, it has to be done in phpmyadmin. Open phpmyadmin again and select the forums table. Now click the insert tab. Fill in the ID (1 is fine, then the next one is 2, and so on) Fill in the Name (Like "General") Fill in the Description ("Talk about anything here") The next two areas, minclassread and minclasswrite, can be left at 0 if these are public forums. If you want a forum for uploaders and above, make it 3 in both areas. This list shows the user classes available.
|
||||||||
4. |
Adding More
Staff Find out the username of person you want to make staff. Open phpmyadmin and change their class. (look above for class) |
||||||||
F. |
Finalization Now we are nearly done. Just a few more steps. |
||||||||
1. |
Allowing
Uploads Remember that directory you created earlier for uploads? Well open your ftp client and CHMOD the directory as 0777 or 777. If 'recursive' is an option, check it, if not dont worry. |
||||||||
2. |
PeerGuardian
Blocklist This bans allot of IP address for well known government agencies etc. If you want to use this then open your browser and enter http://www.yoursite.com/tb/importpg.php. |
||||||||
IV. |
BugFixing Most of the bugs should have been fixed, however if you still have some please look at this section or download a new snapshot. If you get complaints from users that when they click to download a torrent and they get a 404 saying the torrent could not be found then please read the following: Edit details.php Go to Line 166 (or around it) to find this code print("<tr><td
class=rowhead
width=1%>Download</td><td width=99% align=left> Find:
href=\"download.php/$id/" |
||||||||
V. | Upgrading If you want to upgrade, please be very careful and backup everything. The safest way is to upgrade one file at a time. |
||||||||
|
|||||||||
If you need any further support then please visit http://tbdev.net. |
|||||||||
This guide is
© nexus (apk) 2005. Original guide ©
MrMister 2004. |