View Single Post
Primeas
Junior Member
Join Date: Aug 2019
Old 12-28-2019 , 13:27   Re: [L4D & L4D2] Custom Player Stats v1.4B121
Reply With Quote #1894

Custom Player Stats v1.4B121 (Original English)

This is the original unchanged Template from muukis which contains a hotfix to work on PHP 7.4,
it is compatible from PHP 5.6 up to 7.4.


Preview Demo




Fix Log
  • PHP: 5.6 up to 7.4 fixed
  • Players Online: Country Flag fixed
  • Player Rankings: Country Flag fixed
  • Viewing Player: Country Flag & Name fixed
  • Player Search: Country Flag fixed
  • Rank Awards: Country Flag fixed
  • Top 10 Players: Country Flag fixed
  • MOTD: Country Flag fixed
  • Population: New Population file - Updated: 2019-12-29
  • Population: USA: 12.619 (Lamesa, TX) till 7.674.575.000 (Earth)
  • IP2Country GeoLite2: GeoLite2-Country.mmdb - Updated: 2020-09-08


Webspace Installation Guide
  1. Download the Archive "l4d_l4d2_stats_web_original_english.zip" and unzip it
  2. Upload the Folder or only the Files from "l4d_stats" to your Webspace.
  3. Go to your PhpMyAdmin and Import from the Archive "sql_dump.zip" the "l4d2stats.sql"
  4. Go to "/l4d_stats/awards/" and Set CHMOD 777 to the File "awards_cache.html"
  5. Go to "/l4d_stats/" and edit the File "config.php"

Code:
"config.php"

// MySQL DATA
$mysql_server = "localhost";
$mysql_db = "XXX";
$mysql_user = "XXX";
$mysql_password = "XXX";
$mysql_tableprefix = "";

Gameserver Installation Guide
  1. Download the Original Plugin from muukis "l4d_stats.smx" and Upload it to your Gameserver "/addons/sourcemod/plugins"
  2. Go to "/addons/sourcemod/configs/" and edit the "databases.cfg"

Code:
"addons/sourcemod/configs/databases.cfg"

"Databases"
{
	"driver_default"		"mysql"
	
	"l4dstats"
	{
		"driver"			"mysql"
		"host"				"127.0.0.1"
		"database"			"MYSQL DB"
		"user"				"MYSQL USER"
		"pass"				"MYSQL PASSWORD"
		//"timeout"			"0"
		//"port"			"0"
	}
	"storage-local"
	{
		"driver"			"sqlite"
		"database"			"sourcemod-local"
	}

	"clientprefs"
	{
		"driver"			"sqlite"
		"host"				"localhost"
		"database"			"clientprefs-sqlite"
		"user"				"root"
		"pass"				""
		//"timeout"			"0"
		//"port"			"0"
	}
}



Custom Player Stats v1.4B121 (Modern Template English)

This is the Modern Template for the Custom Player Stats v1.4B121 plugin.
I had offered it here before, but there were problems with the plugin (missing source), so I have uploaded it again because other users asked me about it.
It is a responsive template and also includes a game server live area (GameQ) and a YouTube player.
Due to technical problems, there are no further templates or updates for the webstats from me, it is compatible from PHP 5.6 up to 7.4. It includes 5 different colors.


Preview Demo




Webspace Installation Guide
  1. Download the Archive "l4d_l4d2_stats_web_modern_ template_english.zip" and unzip it
  2. Upload the Folder or only the Files from "l4d_stats" to your Webspace.
  3. Download the Archive "l4d_l4d2_stats_web_modern_ template_country_flags.zip" and unzip it
  4. Upload the Folder or only the Files from "l4d_stats" to your Webspace.
  5. Go to your PhpMyAdmin and Import from the Archive "sql_dump.zip" the "l4d2stats.sql"
  6. Go to "/l4d_stats/awards/" and Set CHMOD 777 to the File "awards_cache.html"
  7. Go to "/l4d_stats/_source/js/" and Set CHMOD 777 to the Folder "cache"
  8. Go to "/l4d_stats/gameserver/" and Set CHMOD 777 to the Folder "cache"
  9. Go to "/l4d_stats/_source/" and edit the File "config.php"

Code:
"config.php"

// MySQL DATA
$mysql_server = "localhost";
$mysql_db = "XXX";
$mysql_user = "XXX";
$mysql_password = "XXX";
$mysql_tableprefix = "";

// SITE SETTINGS
$site_name = "My Clan-Name"; // Clan Name
$site_url = "https://xevanio.de/"; // Clan URL
$site_style = "default"; // Site Style
$site_game = "Left 4 Dead 2"; // Site Game
$site_statsurl = "https://xevanio.de/en/projects/l4d-l4d2/customplayerstatsv14B121-modern/default/"; // Site Stats URL
$site_description = "Do you like to play Left 4 Dead 2? Our servers have no ads, no changes and the statistics are real time."; // Site Description
$site_keywords = "left 4 dead 2, left4dead2, l4d2, survivor, survival horror, apocalypse, online gaming, multiplayer, xevanio, xevanio.de"; // Site Keywords

// SITE LOGO
$site_logo = "_source/images/logo.png"; // Logo Image URL - Options: Empty for only Clan Name
$site_logo_height = "60"; // Logo Image Height
$site_logo_width = "325"; // Logo Image Width

// COMMUNITY SETTINGS
$site_steamgroup = "https://steamcommunity.com/groups/xevanio_de"; // Steamgroup URL
$site_welcome = "Thank you for using the Custom Player Stats v1.4B121 Modern Template with the associated plugin on your Gameserver(s).</br>You can edit this text completely!<br /><br />We hope you enjoy the Game!"; // Welcome Message
$site_welcome_intro = "https://www.xevanio.de/en/projects/l4d-l4d2/customplayerstatsv14B121-modern/l4d2_teaser.mp4"; // Welcome Intro Movie URL - Empty for only Welcome Message

// PLUGIN SETTING
$top3_site = "enabled"; // Top3 Ranking - Options: enabled, disabled

// Gameserver
$gameserver = "enabled"; // Gameserver Page - Options: enabled, disabled
$server1_ip = "188.40.130.186";$server1_port = "27015"; // Server 1 - IP:PORT
$server2_ip = "188.40.130.186";$server2_port = "27025"; // Server 2 - IP:PORT
$server3_ip = "188.40.130.186";$server3_port = "27026"; // Server 3 - IP:PORT
$server4_ip = "";$server4_port = ""; // Server 4 - IP:PORT
$server5_ip = "";$server5_port = ""; // Server 5 - IP:PORT
$server6_ip = "";$server6_port = ""; // Server 6 - IP:PORT
$server7_ip = "";$server7_port = ""; // Server 7 - IP:PORT
$server8_ip = "";$server8_port = ""; // Server 8 - IP:PORT
$server9_ip = "";$server9_port = ""; // Server 9 - IP:PORT
$server10_ip = "";$server10_port = ""; // Server 10 - IP:PORT
$server11_ip = "";$server11_port = ""; // Server 11 - IP:PORT
$server12_ip = "";$server12_port = ""; // Server 12 - IP:PORT
$server13_ip = "";$server13_port = ""; // Server 13 - IP:PORT
$server14_ip = "";$server14_port = ""; // Server 14 - IP:PORT
$server15_ip = "";$server15_port = ""; // Server 15 - IP:PORT

// YOUTUBE PLAYER
$youtube = "enabled"; // Youtube - Options: enabled, disabled
$youtube_title = "Youtube Player"; // Youtube Title Name
$yt_movie1_embed = "4KA9YSkM7VE"; // Youtube Movie 1 Embed Code
$yt_movie1_title = "Left 4 Dead 2: Intro (Full HD)"; // Youtube Movie 1 Title
$yt_movie2_embed = "Pn7NeE83418"; // Youtube Movie 2 Embed Code
$yt_movie2_title = "Left 4 Dead 2: Dead Center #1 - Full Campaign (Full HD)"; // Youtube Movie 2 Title
$yt_movie3_embed = "KWubAsMwRz4"; // Youtube Movie 3 Embed Code
$yt_movie3_title = "Left 4 Dead 2: Dark Carnival #2 - Full Campaign (Full HD)"; // Youtube Movie 3 Title
$yt_movie4_embed = "qUDUsq9Vzy4"; // Youtube Movie 4 Embed Code
$yt_movie4_title = "Left 4 Dead 2: Swamp Fever #3 - Full Campaign (Full HD)"; // Youtube Movie 4 Title
$yt_movie5_embed = "strvCrGZKUg"; // Youtube Movie 5 Embed Code
$yt_movie5_title = "Left 4 Dead 2: Hard Rain #4 - Full Campaign (Full HD)"; // Youtube Movie 5 Title
$yt_movie6_embed = "Btv51AOzAYw"; // Youtube Movie 6 Embed Code
$yt_movie6_title = "Left 4 Dead 2: The Parish #5 - Full Campaign (Full HD)"; // Youtube Movie 6 Title
$yt_movie7_embed = "vkHV3mdE65I"; // Youtube Movie 7 Embed Code
$yt_movie7_title = "Left 4 Dead 2: The Passing #6 - Full Campaign (Full HD)"; // Youtube Movie 7 Title
$yt_movie8_embed = "BAS7K3L6vks"; // Youtube Movie 8 Embed Code
$yt_movie8_title = "Left 4 Dead 2: The Sacrifice #7 - Full Campaign (Full HD)"; // Youtube Movie 8 Title
$yt_movie9_embed = "A4IK4C-j8X0"; // Youtube Movie 9 Embed Code
$yt_movie9_title = "Left 4 Dead 2: No Mercy #8 - Full Campaign (Full HD)"; // Youtube Movie 9 Title
$yt_movie10_embed = "gUGJbs_RCw0"; // Youtube Movie 10 Embed Code
$yt_movie10_title = "Left 4 Dead 2: Crash Course #9 - Full Campaign (Full HD)"; // Youtube Movie 10 Title
$yt_movie11_embed = "Su6P_rdLIM8"; // Youtube Movie 11 Embed Code
$yt_movie11_title = "Left 4 Dead 2: Death Toll #10 - Full Campaign (Full HD)"; // Youtube Movie 11 Title
$yt_movie12_embed = "CXDuINVjsAI"; // Youtube Movie 12 Embed Code
$yt_movie12_title = "Left 4 Dead 2: Dead Air #11 - Full Campaign (Full HD)"; // Youtube Movie 12 Title
$yt_movie13_embed = "j0UzDX38bAI"; // Youtube Movie 13 Embed Code
$yt_movie13_title = "Left 4 Dead 2: Blood Harvest #12 - Full Campaign (Full HD)"; // Youtube Movie 13 Title
$yt_movie14_embed = "0cEK5YXdDjI"; // Youtube Movie 14 Embed Code
$yt_movie14_title = "Left 4 Dead 2: Cold Stream #13 - Full Campaign (Full HD)"; // Youtube Movie 14 Title
$yt_movie15_embed = "vjozkivYqxg"; // Youtube Movie 15 Embed Code
$yt_movie15_title = "Left 4 Dead 2: The Last Stand #14 - Full Campaign (Full HD)"; // Youtube Movie 15 Title

Different Colours

You can choose between different colors, just edit the entry in "config.php" the entrys.
  1. Default: $site_style = "default"; // Site Style
  2. Dark-Blue: $site_style = "dark-blue"; // Site Style
  3. Dark-Red: $site_style = "dark-red"; // Site Style
  4. Dark-Green: $site_style = "dark-green"; // Site Style
  5. Dark-Purple: $site_style = "dark-purple"; // Site Style



Gameserver Live Status (GameQ)

You can activate or deactivate the Gameserver live status.
If it is deactivated, the "who is online" is displayed on the main page, if you activate the gameserver live status, an extra area appears in the menu and the "who is online" is displayed in the gameserver area.
You can display up to 15 game servers.
Edit them in the "config.php" the entrys.
  1. $gameserver = "enabled"; // Gameserver Page - Options: enabled, disabled
  2. $server1_ip = "188.40.130.186";$server1_port = "27015"; // Server 1 - IP : PORT


Youtube Player

You can activate or deactivate the Youtube Player.
You can display up to 15 videos.
Edit them in the "config.php" the entrys.
  1. $youtube = "enabled"; // Youtube - Options: enabled, disabled
  2. $yt_movie1_embed = "4KA9YSkM7VE"; // Youtube Movie 1 Embed Code
  3. $yt_movie1_title = "Left 4 Dead 2: Intro (Full HD)"; // Youtube Movie 1 Title


MOTD

You can use the MOTD for different game modes. just use one of these links
  1. All: motd.php Demo here
  2. Coop: motd.php?type=coop Demo here
  3. Realism: motd.php?type=realism Demo here
  4. Versus: motd.php?type=versus Demo here
  5. Scavenge: motd.php?type=scavenge Demo here
  6. Survival: motd.php?type=survival Demo here
  7. Realism Versus: motd.php?type=realismversus Demo here
  8. Mutations: motd.php?type=mutations Demo here




MOTD & Host Banner
  1. Download the Archive "l4d_l4d2_host_banner.zip" and unzip it
  2. The Archive contains a PSD file. Create your own banner using the template with Photoshop.
  3. Create a subdomain on your Webspace and deactivate SSL and SSL auto redirect for the Subdomain
  4. Upload the Folder or the files from "serverbanner" to your Subdomain.
  5. Edit the File "motd.txt" on your Gameserver and add the URL from your MOTD "http://www.yourdomain.com/motd.php"
  6. Edit the File "host.txt" on your Gameserver and add the URL from your Subdomain "http://subdomain.yourdomain.com/serverbanner/index.html"
  7. Restart your Gameserver and your Steam Client




GeoLite2 & Missing Flags

GeoLite2 is used in the webstats, a database of Ip addresses which is used to display the country's flags.
It can happen that after a certain time the entries are wrong or other IP addresses of the countries have been added.
The file in the Webstats for GeoLite2 is called "GeoLite2-Country.mmdb".
You should update this file after a certain period of time, it's free.
It can happen that a country flag is missing, just go to the given website and search for the missing flag.
Simply upload the required flag into the appropriate folder, it is either "/images/flags" or "/_source/images/flags"
  • GeoLite2 (maxmind.com): here
  • Country Flags (3dflagsplus.com): here




Possible Errors and Bugs
  • Plugin cannot connect to the MYSQL: In the "databases.cfg" do not use the host 127.0.0.1 but a domain or localhost will work
  • Plugin does not connect to an external MYSQL database: Check whether your MYSQL database allows external access.
  • MOTD and host banner is not displayed: The game MOTD does not support SSL or only to a limited extent therefore only use HTTP and the host banner should be on a non-SSL Webspace (subdomain)
  • One page in the ranking cannot be displayed, but the others work: The IP address is not in the GeoLite2 "GeoLite2-Country.mmdb" file, update the file.
  • Steam Profil Picture does not show: Put CHMOD 777 on the "/_source/js/cache" folder. Alternatively, the PHP Module is deactivated and your Webspace doesn't support it.
  • Gameserver area does not show any data: Put CHMOD 777 on the "/gameserver/cache" folder.
  • Modern Template doesn't show any colors or it's messed up: Enter your url in "config.php ($site_statsurl)" with a "/" at the end.




Copyright

muukis provides a good plugin and many have invested a lot of time for it.
A lot of time was also invested in the fix and the modern template.
It would be nice if you didn't remove the copyright.
Attached Files
File Type: zip sql_dump.zip (5.2 KB, 824 views)
File Type: zip l4d_l4d2_host_banner.zip (894.1 KB, 722 views)
File Type: zip l4d_l4d2_stats_web_original_english.zip (2.34 MB, 917 views)
File Type: zip l4d_l4d2_stats_web_modern_ template_english.zip (4.79 MB, 1043 views)
File Type: zip l4d_l4d2_stats_web_modern_ template_country_flags.zip (5.31 MB, 908 views)
__________________
- If you have any Questions, write to me in Steam: Click here



Last edited by Primeas; 09-30-2020 at 11:44.
Primeas is offline