mirror of
https://github.com/moparisthebest/Server-Status-Page
synced 2025-02-20 04:31:48 -05:00
Add ability to add extra links via configuration
This commit is contained in:
parent
2701787db8
commit
2b533493fc
@ -22,11 +22,11 @@ if (!defined('SS_PAGE'))
|
||||
die(highlight_file(__FILE__, true));
|
||||
|
||||
# uncomment these to show all errors
|
||||
//ini_set('display_errors', 0);
|
||||
//ini_set('display_errors', 1);
|
||||
//error_reporting(E_ALL);
|
||||
|
||||
# you need to set these regardless
|
||||
global $g_source_dir, $g_sql_host, $g_sql_user, $g_sql_pass, $g_sql_db, $g_versions, $g_default_port, $g_theme, $g_img_dir, $g_admin_contact, $g_checker_ip, $g_picture_banner;
|
||||
global $g_source_dir, $g_sql_host, $g_sql_user, $g_sql_pass, $g_sql_db, $g_versions, $g_default_port, $g_theme, $g_img_dir, $g_admin_contact, $g_checker_ip, $g_picture_banner, $g_extra_links;
|
||||
# path to ss_sources
|
||||
$g_source_dir = './ss_sources';
|
||||
$g_img_dir = './images';
|
||||
@ -42,6 +42,7 @@ $g_admin_contact = '<a href="/smf/index.php?action=profile;u=youruid">yourname</
|
||||
# IP address the ServerChecker application connects from
|
||||
$g_checker_ip = '69.39.224.55';
|
||||
$g_picture_banner = 'Server Status';
|
||||
$g_extra_links = array('Minecraft Server Status' => '//www.moparcraft.net/');
|
||||
|
||||
define('SS_PAGE', 1);
|
||||
|
||||
|
@ -22,7 +22,7 @@ if (!defined('SS_PAGE'))
|
||||
|
||||
// echos the header
|
||||
function echoHeader($action) {
|
||||
global $thispage, $g_img_dir, $g_theme;
|
||||
global $thispage, $g_img_dir, $g_theme, $g_extra_links;
|
||||
/*echo '<?xml version="1.0" encoding="UTF-8"?>'."\n";*/
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
@ -60,8 +60,12 @@ function echoHeader($action) {
|
||||
<li>
|
||||
<a href="?action=register&edit"<?php if ($action == 'register' && isset($_GET['edit'])) echo ' class="on"'; ?>>Edit
|
||||
my Server</a></li>
|
||||
<li><a href="?action=search"<?php if (strpos($action, 'search') !== false) echo ' class="on"'; ?>>Search</a>
|
||||
</li>
|
||||
<li><a href="?action=search"<?php if (strpos($action, 'search') !== false) echo ' class="on"'; ?>>Search</a></li>
|
||||
<?php
|
||||
if(is_array($g_extra_links))
|
||||
foreach($g_extra_links as $text => $link)
|
||||
echo "<li><a href=\"$link\">$text</a></li>";
|
||||
?>
|
||||
<li><?php echoLogoutLink($thispage . '?' . $_SERVER['QUERY_STRING']); ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user