Difference between revisions of "Tutorial:Dota Ladder Creation"
Line 32: | Line 32: | ||
− | + | '''Ghost++''' : http://www.codelain.com/wiki/index.php?title=ReadMe | |
Revision as of 20:19, 11 January 2012
[Tutorial] How to make your own dota ladder?
Are you an owner of ghost++ or ghostOne? Would you like to make your own dota ladder to be displayed on your own site? This is the right tutorial for you.
MAIN STEP BY STEP
FOLLOW THIS TUTORIAL EXACTLY AS IT SAYS OR YOU MIGHT ENCOUNTER ERRORS!
Difficulty: Medium
Time: ~1 hour, depends on you
If you don't yet own a ghost, go and either download ghost++ or ghostOne (recommended). You can get either of them here:
Tutorials about setting up ghost and other related things can be found here:
Ghost++ : http://www.codelain.com/wiki/index.php?title=ReadMe
I suggest getting GhostOne, because you will need it later to transform your old database to mysql. If you're on linux, you'll have to use ghost++ and external tools for transformation.
STEP 1.1 In order to host your site, you will need to setup a server on your PC. If you already own one (needs PHP+MySQL) skip this step.
If you don't own a server already, go download and install WAMP server:
http://www.wampserver.com/en/download.php
Running linux? Get LAMP server instead.
STEP 1.2
Run WAMP server. LEFT click on the tray icon, select Start all services. Open the menu again and click Put Online. When the server is online you will see a white tray icon with the indicator to full. Now go in your modem/router configuration and [B]open port 80 (port forward)[/B]. After you open the port 80, you can now reach your server by putting your IP in browser's adress bar. You can find out your IP here: [url]http://www.whatismyip.com/[/url]. Make sure you also open port 80 on your firewall, if you don't do that, firewall will block all the trafic and nobody will be able to acces your website.
Now left click on tray icon of WAMP server and run phpmyadmin.
In the "create new database" field, type a random name for your database, ex: dotaladder, and create the database. Make sure you remember this name because you will need it later on.
Now select the newly created database (if it's not already selected-on the menu on the left), click on Privileges tab and click on Add new user. Input your new Username, set Hostname=localhost (if you own an external server put your IP here) and Password. In the Global Privileges click on Check all to check all the boxes and hit Go button. Creating a new user is optional, you can also use pre-existing root account, but it has no password and might be vulnerable to hackers. It is recommended to set a new password for root account as soon as possible.
STEP 1.3 Now select your database again (if it's not selected already) and hit the Import tab. Open your Ghost folder and search for:
for GhostOne: mysql_create_tables_v2.3one.sql for Ghost++: mysql_create_tables_v2.sql
File names are outdated, make sure you select the latest version that you find in your ghost folder.
Hit the Go button to import the tables.
STEP 1.4
Download and install TortoiseSVN
http://tortoisesvn.net/downloads
Restart your PC.
STEP 1.5
Now run WAMP server again, left click on tray and open www directory. Create new folder in www directory and call it whatever you want ex: allstats. Now run explorer (Go: Run>explorer) and in the map treeview search for c:\wamp\www\yourfolder folder. Right click on your folder and select SVN checkout.
In the URL of repository, copy this link: http://allstats.googlecode.com/svn/trunk/
The checkout repository must be your custom folder you made back then. Hit the Ok button to start downloading Dota Allstats source files.
This is the main part of the tutorial. To find out more about the Allstats source, visit http://code.google.com/p/allstats/
Wait for the files to download.
STEP 1.6
Open file config.php (it downloaded in your folder) to configure your settings. I recommend using some site editor program but notepad should do the work too. Just be carefull not to save the file as .txt and make sure you choose utf8 coding.
The following lines are necessary to be edited:
$host = 'localhost'; $username = 'TheUsernameYouCreatedInTheDatabase'; $password = 'TheUsernamePassword'; $databasename = 'TheNameOfYourDatabaseYouCreated'; $botName = 'YourBotName'; $rootAdmin = 'Bot'sRootAdmin';
Other lines are optional.
STEP 1.7
Now open PhPMyadmin and select your GHost database on the left. Select the import tab. Click choose file and select the MySQLSetup.sql file (located in your allstats folder). Click Import.
STEP 1.8
You're almost done! You can now reach your dota ladder page by putting your IP in the browser's address bar. ex: yourIP/nameofyourfolder
You will notice that your ladder is currently empty. In order to import all the data from your old database (if you were using sqlite so far), open GhostOne->Database->Open database (wamp server must be running! after opening the "Import from sqlite" button should appear)->Import from sqlite->Check all boxes and Import. You're done!
When importing from old database it could happen that no dota games are imported. This is because you probably weren't using the correct map cfg-s. For dota games to be saved in database, you need to open up your dota cfg, search for line map_type and set it to: map_type=dota
OPTIONAL-HIGHLY RECOMMENDED
STEP 2.1 - Hiding your IP from public
If you want to share the ladder with your friends or with public, it's recommended to hide your IP from them and all other people.
Select NO-IP Free, fill up your e-mail and sign up. Fill all the textboxes with your info and create new account. After receiving activation e-mail follow the activation link to activate your account.
After that, login and click on Host/Redirects tab. Select Add host, choose your domain name (it will include no-ip.org on the end but it's free!), choose DNS Host (A) option, enter your IP address and create the host. If you have dynamic IP you should also download and install their client which must be run everytime you reconnect to your internet. Their client will assign the correct IP to the domain, because dynamic IP changes on every reconnect.
And now you're done! You can check your domain name under [U]Manage hosts[/U] link. Simply enter the adress in your adress bar like this: yourdomainname.no-ip.org/nameofyourfolder/ and that's it!
IMPORTANT INFO!
-Your ghost won't be able to start if mysql service isn't working. WAMP server must be running (offline or online, doesn't matter) or bot won't be able to connect. But, if you want your ladder site to be visible to the public, your server must be Online.
-If you want to start WAMP server on system startup, go Run->type in "shell:startup" and make a shortcut to wamp in the folder which opens (right click on wamp shortcut, hold it and release in Startup folder->create shortcut). You can do this for any other program.
-After you succesfully setup allstats, you can uninstall Tortoise SVN, as you probably won't need it for the rest of your life if you're an average user. It'll only take your resources on startup etc. That tool is only needed to download the allstats source files.
If you encounter any errors feel free to post or PM me. (Cen)