-
-
Notifications
You must be signed in to change notification settings - Fork 0
Webpage
Ben Lavery-Griffiths edited this page Aug 13, 2023
·
2 revisions
The Manaha Minecraft server has a really naff webpage. I am not a web designer:
As you can see from the screenshot above, there are some links to some useful Manaha community pages, as well as some common Minecraft resources. There there is a "lovely" table showing when I was last online.
At the bottom of the page is the calculation of how long everyone has been online for:
The table of player statuses is created using the following bit of config (as shown in the README):
activity:
# If this is set to false then all other activity operations are disabled
log_activity: true
# Enable generating a status page for the website
generate_status: true
# Where the status page should be outputted to
status: /var/www/html/players.html
The player activity is created using the following bit of config (as shown in the README):
activity:
# If this is set to false then all other activity operations are disabled
log_activity: true
# Enable calculating the amount of time each player has been online and outputting it to a file
generate_output: true
# Where the activity calculations should be outputted to
output: /var/www/html/activity.txt
In my index page (/var/www/html/index.html
), I then include these files using some jquery:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<script src="jquery-3.7.0.min.js"></script>
<script>
$(function(){
$("#activity").load("activity.txt" + '?_=' + Date.now());
$("#status").load("players.html" + '?_=' + Date.now());
});
</script>
</head>
<body>
<h1>Welcome!</h1>
<h2>Player Activity</h2>
<p>Please note that all times are GMT</p>
<table id="status" border='1' bgcolor='DimGrey' cellpadding='5'></table>
<h2>Activity 30/10/2013</h2>
<pre>
<div id="activity"></div>
</pre>
</body>
</html>