Smiley face
 
  Forum Index    Search    Usergroups    Edit your profile    Members    Arcade    Ranks

 Reputation    Medals    Staff    Statistics    Board Rules    Forum FAQ    Private MessagesLogin, Check Messages    Log in 

Search for at
Soldier Of Fortune 2 Advanced Search



Post new topicReply to topicprinter-friendly viewThank Post
   Soldier Of Fortune 2 Forum Index » SOF2 Tutorials » Ultrastats V.0.8.202 Installation Tutorial
 View previous topic :: View next topic  
Author Message
Punisher
Administrator
Administrator


In Game: The Punisher
Gender: Gender:Male
Joined: May 04, 2012
Last Visit: Jul 19, 2017
Age: 20
Posts: 714

Netherlands.png 
Reputation: 3138
votes: 3
Medals: 2 (View more...)
Dedication (Amount: 1)

Status: Offline
PostPosted: Sun May 11, 2014 11:19 pm
PostPost subject: No icon Ultrastats V.0.8.202 Installation Tutorial
Reply with quote

Ultrastats v.0.8.202 SOF2 Supported Installation Tutorial


Download link: http://www.sof2.org/modules.php?name=Downloads&op=getit&lid=603

Hidden: 


How to upload a file?

If you look at the menu press the button called ' Downloads '.
Under the Search bar you will see 3 other buttons ( ADD, NEW, POPULAR ).
Hit the ' ADD ' Button, scroll down and you will see ' Call of Duty 4 - Modern warfare ' press on it and a bar will popup and hit 'Soldier of Fortune 2'. Than Hit 'GOTO NEXT STEP'.

Now Enter the Title ' ultrastats v0.8.202, press 'choose file ' and redirect to the file which is probably called 'zip' or 'rar'. Than Press Open the the window will close.

Check 'yes' at Terms of Use.

Make a description, rest doesnt really matter and press ' Add this file ', now it will upload ( May take a while ).



In This tutorial i'll show you how to install Ultra Stats for your website which displays your gamelogs.


Config_db.php

If you have opened it you will see something like this:

Hidden: 

<php> Configuration variables for the Database configuration
*
* All directives are explained within this file
*/

// --- Database options
$CFG['DBServer'] = 'localhost';
$CFG['Port'] = 3306;
$CFG['DBName'] = 'stats';
$CFG['TBPref'] = 'stats_';
$CFG['User'] = 'root';
$CFG['Pass'] = 'usbw';
$CFG['EnableMySQLCommandLine'] = 0; // If set it 1, you enable the update script to creat temp files with lots of UPDATE statements
// and pass it to mysql by using the pipe. This is much faster then using a mysql_query() command
// for each UPDATE statement
$CFG['MySQLPathAndName'] = "/usr/bin/mysql"; // For *nix: mysql -u username -ppasswort database < stats.sql
//$CFG['MySQLPathAndName'] = "C:/mysql/bin/mysql"; // For Windows: mysqld.exe -u username -ppasswort database <stats>


We will only change the following lines:

Quote:

$CFG['DBServer'] = 'localhost';          // Your Database Server.
$CFG['Port'] = 3306;                       // The Database Port ( Leave this what it is, unless you know what your doing ).
$CFG['DBName'] = 'stats';              // Your Database name
$CFG['TBPref'] = 'stats_';              // Database Prefixes ( Leave this what it is )
$CFG['User'] = 'root';                   // Your Database Username ( Probably root )
$CFG['Pass'] = 'usbw';                // Your Database Password


config_live.php

If you opened it you will see something like this:

Hidden: 

<php> Configuration variables for the Livestats | Optional you do not have to configure this.
*
* All directives are explained within this file
*/

// --- Frontend Style options
$CFG['Live_ServerIP'] = "188.165.252.147"; // Your SOF2 Server IP
$CFG['Live_ServerPort'] = "20110"; // SOF2 Server Port
$CFG['Live_ServerName'] = "^S//^-Baka^S|. ^-Public^S-^-Server^S!";       // Optional Name - Only configure if you want to override
     // the name of the Server
$content['Name_of_Blue_Team'] = 'BLUE TEAM';                                                // Team name ' Blue Team '
$content['Name_of_Red_Team'] = 'GRAY TEAM';                                               // Team name ' Red Team '
// ---
?>



config_medals.php

If you opened it you will see something like this:

Hidden: 

<php> Configuration variables for the Medals
*
* All directives are explained within this file
*/

// --- General Medal options
$CFG['DeleteBeforeCreate'] = 0; // Set this value to 1 if you want to delete the medals before
// they are created every time
// ---

// --- Medal detail options
// 1 means ON, 0 means OFF
// Medals that are turned off arent shown on the index page!
$CFG['Medal_Kills'] = 1;
$CFG['Medal_Deaths'] = 1;
$CFG['Medal_TeamKills'] = 1;
$CFG['Medal_Suicides'] = 1;
$CFG['Medal_Flags'] = 1;
$CFG['Medal_FlagsDefended'] = 1;
$CFG['Medal_Briefcases'] = 1;
$CFG['Medal_BriefcasesDefended'] = 1;
$CFG['Medal_Sacks'] = 1;
$CFG['Medal_SacksDefended'] = 1;
$CFG['Medal_Explode'] = 1;
$CFG['Medal_Knife'] = 1;
$CFG['Medal_Sniper'] = 1;
$CFG['Medal_M4Noob'] = 1;
$CFG['Medal_HeadShots'] = 1;
$CFG['Medal_MostKicked'] = 1;
$CFG['Medal_MostCamper'] = 1;
$CFG['Medal_ChattyBitch'] = 1;
// ---
?>


In this file you can control which Medals are enable and which not.
1 means it will be displayed on the homepage.
0 means is disabled and wont be displayed.

config_parser.php

If you opened it you will see something like this:

Hidden: 

<php> Configuration variables for the Parser
*
* All directives are explained within this file
*/

// --- Debugging options
$CFG['ShowErrors'] = 1; // Hrm currently not really used Wink
$CFG['BreakOnErrors'] = 0; // Defines if the parser breakes on Error's. Some error's can be ignored.
$CFG['ErrorLogFileName'] = "Errors.log"; // defines a filename where the error's aer logged to.
// If blank, no error log will be created
$CFG['ShowDebug'] = 0; // This enables avarage debug output, you will see much more then usual.
$CFG['ShowDebugLine'] = 0; // Print each line of the gamelog into the debug output when it is processed
// usefull for developers only
$CFG['ShowDebugVerbose'] = 0; // Only developers should enable it, or if you are searching some bug!
// This will create a huge amount of debug output, so don't tell me I didn't warn you Wink
$CFG['DisableWriteLastLogLine'] = 0; // For debugging support! By enabling this value, Sof2UltraStats
// will not write back the last read line from the gamelogfile into the database
// ---

// --- Logging options
$CFG['EnableChatLogging'] = 1; // Logging all chat can increase the size of the database very fast. Enable it only
// if you have enough Database space free.
$CFG['MinimumGametime'] = 60; // Minimum duration of a game session if it should processed in the Server settings.
$CFG['Gamelogfile'] = "../logfile/games.log"; // Location of the Gamelogfile
$CFG['Calculate_overall_stats'] = 1; // If set to 1, it will generate overall stats at the end of a run. Thinks like
// allkills,alldeaths,complete played time will be calculated
// ---

// --- FTP Options
// FTP Can Speed up the Stats Update.
// However, If this doesnt work you could use filepath for ftp.
// There is also a security Fix that would only allow to update
// If the last update is more then 5 minutes old!
// The file bin/statstemp.dat has to be chmod 777.

$CFG['ftp_activate'] = "0"; // Do you want to use ftp for transfer? 1 will actitivate and 0 will deactivate (Default: 0)
$CFG['ftp_host'] = "ftp.hostname.host"; // Your FTP Host e.g. an ip or a domain like ftp.youserver.com
$CFG['ftp_uname'] = "Your FTP UserName"; // Your FTP loginname
$CFG['ftp_pass'] = "Your FTP Password"; // Your FTP password
$CFG['ftp_timeout'] = "25"; // This is the Time a Transfer should take maximal (Default: 25 = Its Ethernal^^)
$CFG['ftp_port'] = "21"; // Your FTP port (Default: 21)
$CFG['tempfile'] = "tempfile.dat"; // This is just the Temp-File for storing the Transfered Data, so we havent
// need to establish a FTP connection every time the site reloads
// ---

// --- Special Options
$CFG['Enable_g_logHits_parsing'] = 0; // This special option requires you to set the "g_logHits" cvar to 1 !
// Instead of the kill logline, the parser will then try to get the
// hit location of a kill by the "hit: " log lines.
// Note enabling this option will create much larger logfiles, but is your only choice
// if you want hit location logging.
$CFG['PHPScriptTimeOut'] = 25; // This variable defines the timeout if the updater is called over a website.
// The parser will abort all operation if this timeout is reached.
// This makes sure that the webserver does not interrupt the parser in the middle
// of an operation. Note, this variable will be IGNORED if you run the
// parser over the command line.
// ---
?>


We will only change the following lineS:

Quote:


$CFG['Gamelogfile'] = "../logfile/games.log";

$CFG['ftp_activate'] = "0"; // Do you want to use ftp for transfer? 1 will actitivate and 0 will deactivate (Default: 0)
$CFG['ftp_host'] = "ftp.hostname.host"; // Your Webserver FTP Host!
$CFG['ftp_uname'] = "Your FTP UserName"; // Your Webset username
$CFG['ftp_pass'] = "Your FTP Password"; // Your WEbserver Password
$CFG['ftp_timeout'] = "25"; // This is the Time a Transfer should take maximal (Default: 25 = Its Ethernal^^)
$CFG['ftp_port'] = "21"; // Your FTP port (Default: 21)
$CFG['tempfile'] = "tempfile.dat";                                                // Dont change unless you know what your doing



config_web.php

Now we are getting to the difficult part, where most people will get errors, so follow my steps closely.

When opened you will see something like this:

Hidden: 

<php> Configuration variables for the Webinterface
*
* All directives are explained within this file
*/

// --- Important Options!
$CFG['CommonBasePath'] = ""; // If you have problems with teh base path, use this variable to
// overwrite the default one! For example
// (UNIX) "/home/www/html/mywebsite" or
// (WINDOWS) "C:/wwwsites/html/mywebsite".
$CFG['projectname'] = ""; // This name is used to append into the base path as subdirectory where you have
// stored all UltraStats files Change this value if u prefer
// another name for the project, or if u got running ultrastats
// twice :)If you have the ultrastats files in the root dir,
// you can leave this field blank. (Default "/ultrastats")
$CFG['languagefile'] = "en"; // Set this to "en" or "de"
// ---

// --- Plugin Options
$CFG['ShowSig'] = 1; // If set to 1 u may have to edit config_sig.php . On 0 you disable the Signature
$CFG['ShowSigHTMLCode'] = 1; // If set to 1 it will show the HTML code of the signature on the players detail pages
$CFG['ShowSigBBCode'] = 1; // If set to 1 it will show the BB code of the signature on the players detail pages
// ---

// --- Frontend Style options
$CFG['StyleSheet'] = "default"; // Name of the stylesheetfile which is to be used.
$CFG['Extension'] = ".php"; // Default Fileextension for all link files
// ---

// --- General Frontend options
$CFG['MINKILLS'] = "0"; // Limit of players shown on main statistic page (Default "100")
$CFG['LIMIT1'] = "50"; // Limit of players shown on main statistic page (Default "50")
$CFG['LIMIT2'] = "25"; // Limit of players shown on weapon statistic page (Default "25")
$CFG['LIMIT3'] = "10"; // Limit of players shown in the target and victim list on the playerdetail page (Default "10")
$CFG['MINIMUM_PLAYING_TIME'] = "0"; // Mimimum Time (in seconds) a player played on your server (Default "3600")
// before shown on statistic page - default 2 hours
$CFG['MAX_PAGES_COUNT'] = "25"; // Max count of Pages (Player, weapon, servermaps List etc) (Default "25")
$CFG['ShowRandomChat'] = 1; // Show random chat message from game! (Default "1")
$CFG['Show_Medals_on_Player_Detail_Page'] = "1"; // Show earned Medals on playerdetails page (Default "1")
$CFG['Show_dgxBox_on_Player_Detail_Page'] = "1"; // Show some new things of the latest RoCMOD dgx (Default "1")
// ---

// --- Skill Calculating Options
$CFG['FlagsCount'] = "10"; // Factor for skill determination 10 Points /FlagCap (Default "10")
$CFG['FlagKillCount'] = "5"; // Factor for skill determination 5 Points /FlagDef (Default "5")
// Set this values to 0 to disable advanced skill determination
$CFG['BriefCount'] = "10"; // Factor for skill determination 10 Points /Briefcase (Default "10")
$CFG['BriefKillCount'] = "5"; // Factor for skill determination 5 Points /Briefcase Kill (Default "5")
// Set this values to 0 to disable advanced skill determination
$CFG['SacksCount'] = "10"; // Factor for skill determination 10 Points /SacksCap (Default "10")
$CFG['SacksKillCount'] = "5"; // Factor for skill determination 5 Points /SacksDef (Default "5")
// Set this values to 0 to disable advanced skill determination
$CFG['HeadshotCount'] = "2"; // Set this value to 0 to disable advanced skill determination (Default "2")
// ---

// --- Skill Calculating Options
$CFG['ShowFlags'] = 1; // Show / Hide Flags from Playerlist
$CFG['ShowFlagKill'] = 1; // Show / Hide Flag kills from Playerlist
$CFG['ShowSacks'] = 1; // Show / Hide Sacks from Playerlist
$CFG['ShowSacksKill'] = 1; // SHow / Hide Sacks kills from Playerlist
$CFG['ShowBriefcases'] = 1; // Show / Hide Briefcases from Playerlist
$CFG['ShowBriefcaseKill'] = 1; // SHow / Hide Briefcase kills from Playerlist
$CFG['ShowHeadshotKill'] = 1; // SHow / Hide Headshot kills from Playerlist
// ---

// --- Server display Variables
$CFG['ServerName'] = "^S//^-Baka^S|. ^-Public^S-^-Server^S!";
$CFG['ServerAdmin'] = "NO4H, T!NE & Punisher";
$CFG['ServerAdminMail'] = "punisher@sof2.org";
$CFG['Clannametitle'] = "^S//^-Baka^S|. Clan";
// ---

// --- MOD Support
$CFG['CustomGame'] = "ROC"; // Can be used to show additional things in UltraStats which
// are only available in some MODS. (Default "OSP")
// Currently the following MOD names can be used to active
// additional features
// OSP = orange smoothie productions
// ICS = INTERNATIONAL CRIME SYNDICATE
// ROC = Rocmod
// BBC = BBC Mod
$CFG['FixRoCMOD'] = "1"; // If you experiencing problems with the most kicked medal - use this option
$CFG['ROC_MsgFile'] = "voicecmds.cfg"; // If you use ROCMOD, this file contains all voice commands.
// Use the file must be located in the /web/include/ folder. By default, there
// is a file from version 0.7b.
// The file will be used to insert text in the chat lines everywhere @xx is used.
// ---

?>


Only change the things im saying:

Quote:


$CFG['projectname'] = "";                        // Here is probably something filled in, make it blank like mine ( else error may occur ).

$CFG['ServerName'] = "^S//^-Baka^S|. ^-Public^S-^-Server^S!";       // Servername which will be displayed on site.
$CFG['ServerAdmin'] = "NO4H, T!NE & Punisher";                                 // Server admins which will be displayed on site.
$CFG['ServerAdminMail'] = "punisher@sof2.org";                                      // email which will be displayed on site.
$CFG['Clannametitle'] = "^S//^-Baka^S|. Clan";                                         // tag/team which will be displayed on site.

$CFG['CustomGame'] = "ROC"; // The Mod your using ( ROC or ICS only )



Warning: Dont Change anything unless you know what your doing !!!

Database Setup
Now there are 2 ways to import the database.

1.
- Go to phpmyadmin and hit Import.
- Press ' Choose file ' and redirect to the ultrastats/bin/db_template.txt file and press 'open'.
- Scroll a bit down and you will find the button called ' start ', Press it.

2.
- Go to phpmyadmin and hit SQL or Query.
- Open ultrastats/bin/db_template.txt and copy everything.
- paste everything into the text block of the phpmyadmin site.
- hit start and it will upload.

Do the same with ' db_template_v0.8.113_update.txt '.

Now your Database has been installed and most of the website.



Fix Parse Error

If your entering the link where your ultrastats is installed you will see an parse error.

Go to your  ' ultrastats/web/content/index.php ' file and open it.
Scroll down untill line 99.
at this line will be the following: echo ;, if not search for: // Subselect
3 lines under it will be echo ;.
You probably need to press ' search next ' one more.
The first is : // Subselect for player details ' but you dont need to have that one you need to have // Subselect.

What you need to do is very easy.

Just make ' echo ; ' into ' echo ""; ' and save the file.

Now go back to your  website and it should work.

Import Gamelog

Import your games.log ( In your rocmod folder ) to the logfiles folder of your webserver.

now go to www.yoursite.com/bin/update.php and it will be updated.

Now enter your website and your gamelogs are updated into your website.

I havent figured out how to auto update your gamelogs.


I Hopes this helped you installing Ultra Stats.

Yours Sincerelly,
Punisher

If you have any Questions reply at this topic.

This Tutorial was made by a Request from Floo.


Website: House of Pain Server - Website
Serverlist: House of Pain Server - Serverlist

<a><img></a>

<a><img></a>
Back to top
View user's profile Send private message
Sponsor
ProClanServers.com
Display posts from previous:
Post new topicReply to topic printer-friendly viewThank Post
Soldier Of Fortune 2 Forum Index »  SOF2 Tutorials
 
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Related topics
 Topics   Replies   Author   Views   Last Post 
No new posts SOF2MAPPING Tutorial.2 - Make a room 0 Punisher 1011 Tue Oct 06, 2015 3:16 pm
Punisher View latest post
No new posts How to make you own mod? 4 Crankedup 2979 Fri Oct 02, 2015 6:38 pm
Teo View latest post
No new posts To make it more clear to everyone READ PLZ 3 Teo 2786 Thu Nov 28, 2013 8:41 pm
Teo View latest post
No new posts want to make a post :) 6 conviction 3506 Thu Nov 15, 2012 10:08 pm
Lessoe View latest post
No new posts Teo which programs u use for make themes? 1 MacTavishXx 2794 Wed May 02, 2012 5:23 pm
Teo View latest post
 




Back to Top

SOF2.ORG Multiplayer Community © 2017 All times are UTC + 2 Hours [DST enabled]
 

Copyright ©