feat: GSP 1.0 baseline – module versions, FAQ refresh, XML editor validation, Obsidian theme

Agent-Logs-Url: https://github.com/GameServerPanel/GSP/sessions/40ca313f-3f17-4f62-8f05-ba72540a8d30

Co-authored-by: iaretechnician <2749183+iaretechnician@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2026-05-03 23:31:07 +00:00 committed by GitHub
parent 1b3b79447f
commit d564476d1c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
178 changed files with 3327 additions and 44 deletions

268
themes/Obsidian/js/Obsidian.min.js vendored Normal file
View file

@ -0,0 +1,268 @@
jQuery(function($){
$(".slider").click(function() { //The Left Side bar's Hide/Show button function
if ($("#wrapper").hasClass("wrapper-hidder")){
$(".menu-bg").removeClass("menu-hidder");
$("#wrapper").removeClass("wrapper-hidder");
$.cookie('menu-bg-options', "show", { expires: 365, path: '/' });
}
else {
$(".menu-bg").addClass("menu-hidder");
$("#wrapper").addClass("wrapper-hidder");
$.cookie('menu-bg-options', "hide", { expires: 365, path: '/' });
}
});
if($.cookie("menu-bg-options") == "show") {
$(".menu-bg").removeClass("menu-hidder");
$("#wrapper").removeClass("wrapper-hidder");
} else if($.cookie("menu-bg-options") == "hide") {
$(".menu-bg").addClass("menu-hidder");
$("#wrapper").addClass("wrapper-hidder");
}
if(window.location.href.indexOf("home.php?m=support&p=support") == -1 && window.location.href.indexOf("home.php?m=user_games&p=edit&home_id=") == -1){
//those Hover-info boxes
jQuery("a").tipsy({gravity: jQuery.fn.tipsy.autoNS});
jQuery("title").tipsy({gravity: jQuery.fn.tipsy.autoNS});
jQuery("img").tipsy({gravity: jQuery.fn.tipsy.autoNS});
jQuery("i").tipsy({gravity: jQuery.fn.tipsy.autoNS});
jQuery("span").tipsy({gravity: jQuery.fn.tipsy.autoNS});
jQuery("div").tipsy({gravity: jQuery.fn.tipsy.autoNS});
jQuery("label").tipsy({gravity: jQuery.fn.tipsy.autoNS});
jQuery("input").tipsy({gravity: jQuery.fn.tipsy.autoNS});
}
/* Login */
if((window.location.href.indexOf("index.php") != -1 && window.location.href.indexOf("index.php?") == -1 && $('div.bloc h4').length != false) || $('input[name=ulogin]').length != false) {
$("head").append('<link rel="stylesheet" href="themes/Obsidian/css/login.css">');
var username_text = $(".bloc > form > table > tbody > tr:nth-child(2) > td:first").html().replace(':','');
var pass_text = $(".bloc > form > table > tbody > tr:nth-child(3) > td:first").html().replace(':','');
$("body").attr("id", "login-bg");
$("div.bloc").attr('style', 'background-color: rgba(25,48,65,0.701);');
$("#bottomWrapper").attr('style', 'background-color: rgba(24,33,36,0.301);');
$(".menu-bg").addClass("menu-hidder");
$("#wrapper").addClass("wrapper-hidder");
/* Login Elements */
$("div.main-content").attr('style', 'box-shadow: none;');//Remove unwanted Shadow effect
$('div.bloc h4').addClass('login_header'); //Adds classes to main-content
$("div.main-content > table").removeAttr("style"); //Removes style from table.
$("div.main-content > table").attr('align', 'center');//Center it.
$("div.main-content > table").attr('style', 'padding: 0px 10px 1px 10px;margin-top: 80px;'); //Removes style from table + droping it little down..
$("input[name=login]").addClass('login_button');//Adding class
$("div.bloc > form > table > tbody > tr:first").appendTo("div.bloc > form > table > tbody");//droping language tr down.
$("div.bloc > form > table > tbody > tr:last").find('td').contents().unwrap();//Removing all Td tags
$("div.bloc > form > table > tbody > tr:last").contents().wrapAll("<span style='float: left;'></span>");//Wrapping who td with that.
$("div.bloc > form > table > tbody > tr:last").append("<span class='forgotp' style='float: right;'></span>");
$("div.bloc > form > table > tbody > tr:last").contents().wrapAll("<td>");
$("div.bloc > form > table > tbody > tr td > a").appendTo("div.bloc > form > table > tbody > tr:last > td > span.forgotp");
if ($(".g-recaptcha")[0]) { //There is Google Captcha
$("div.bloc > form > table > tbody > tr:nth-child(4)").appendTo("div.bloc > form > table > tbody");
$("div.bloc > form > table > tbody > tr:nth-child(3) > td:first").remove();
$("div.bloc > form > table > tbody > tr:nth-child(3) > td").attr('align', 'center');
$("div.bloc > form > table > tbody > tr:nth-child(4) > td:first").attr('style', 'padding: 20px 25px 10px;');
$(".g-recaptcha").attr('data-theme', 'dark'); // makes the Google Captcha dark!
}else {
$("div.bloc > form > table > tbody > tr:nth-child(3)").appendTo("div.bloc > form > table > tbody");
$("div.bloc > form > table > tbody > tr:nth-child(3) > td:first").attr('style', 'padding: 20px 25px 10px;');
}
$("div.bloc > form > table > tbody > tr:nth-child(2) > td:first").remove();
$("div.bloc > form > table > tbody > tr:first > td:first").remove();
$("div.bloc > form > table > tbody > tr:last > td:last").remove();
$('input[name=ulogin]').attr('placeholder', username_text);
$('input[name=upassword]').attr('placeholder', pass_text);
$("div.bloc > form > table > tbody > tr:first > td:first").attr('style', 'padding: 25px 20px 10px;');
$("div.bloc > form > table > tbody > tr:nth-child(2) > td:first").attr('style', 'padding: 5px 20px;');
$("div.bloc > form > table > tbody > tr:last > td:first").attr('style', 'text-align: center;');
if($('.menu > ul > li > a[href="?m=register&p=form"').length > 0) {
$("div.bloc > form > table > tbody > tr:last > td").append("<br>Need an account ? <a href='?m=register&p=form'>Register</a>")
}
}
//Replacing images/ path with themes/Obsidian/images/ path
$('img').each(function() {
if ($(this).attr('src') == 'images/edit.png') {
$(this).attr('src', 'themes/Obsidian/images/edit.png');
}else if ($(this).attr('src') == 'images/file_size.png') {
$(this).attr('src', 'themes/Obsidian/images/file_size.png');
}else if ($(this).attr('src') == 'images/ftp.png') {
$(this).attr('src', 'themes/Obsidian/images/ftp.png');
}else if ($(this).attr('src') == 'images/install.png') {
$(this).attr('src', 'themes/Obsidian/images/install.png');
}else if ($(this).attr('src') == 'images/txt.png') {
$(this).attr('src', 'themes/Obsidian/images/txt.png');
}else if ($(this).attr('src') == 'images/log.png') {
$(this).attr('src', 'themes/Obsidian/images/log.png');
}else if ($(this).attr('src') == 'images/rsync.png') {
$(this).attr('src', 'themes/Obsidian/images/rsync.png');
}else if ($(this).attr('src') == 'images/magnifglass.png') {
$(this).attr('src', 'themes/Obsidian/images/magnifglass.png');
}else if ($(this).attr('src') == 'images/icon_help_small.gif') {
$(this).attr('src', 'themes/Obsidian/images/icon_help_small.png');
}else if ($(this).attr('src') == 'images/steam.png') {
$(this).attr('src', 'themes/Obsidian/images/steam.png');
}else if ($(this).attr('src') == 'images/auto_update.png') {
$(this).attr('src', 'themes/Obsidian/images/auto_update.png');
}
});
$('#pagination').each(function() {
$(this).html($(this).html().replace(/, /g, ''));
$(this).html($(this).html().replace(/]|\[/g, ''));
$(this).find('[class$="_firstPageLink"]').addClass('g_fPL');
$(this).find('[class$="_pageLinks"]').addClass('g_pL');
$(this).find('[class$="_lastPageLink"]').addClass('g_lPL');
$(this).find('[class$="_previousPageLink"]').addClass('g_pPL');
$(this).find('[class$="_currentPageLink"]').addClass('g_cPL');
$(this).find('[class$="_nextPageLink"]').addClass('g_nPL');
});
$('.image-tip').each(function(){
var tip_text = $(this).find('.tip').text();
$(this).find('.tip').remove();
$(this).attr('title', tip_text)
});
$("#wrapper").removeAttr("style"); //Removes style from Wrapper.
$(".logout").text($(".logout").text().replace('[', '').replace(']', ''));
//sidebar//
$('div.menu li:has(ul)').addClass('treeview');
$('div.menu li:has(ul) > a').append('<i class="fa fa-angle-left pull-right"></i>');
$('div.menu ul ul').addClass('treeview-sub');
$('.treeview > a').addClass('treeview-a');
$.sidebarMenu = function(menu) {
var animationSpeed = 300;
$(menu).on('click', 'li a', function(e) {
var $this = $(this);
var checkElement = $this.next();
if (checkElement.is('.treeview-sub') && checkElement.is(':visible')) {
checkElement.slideUp(animationSpeed, function() {
checkElement.removeClass('menu-open');
});
checkElement.parent("li").removeClass("active");
}
//If the menu is not visible
else if ((checkElement.is('.treeview-sub')) && (!checkElement.is(':visible'))) {
//Get the parent menu
var parent = $this.parents('ul').first();
//Close all open menus within the parent
var ul = parent.find('ul:visible').slideUp(animationSpeed);
//Remove the menu-open class from the parent
ul.removeClass('menu-open');
//Get the parent li
var parent_li = $this.parent("li");
//Open the target menu and add the menu-open class
checkElement.slideDown(animationSpeed, function() {
//Add the class active to the parent li
checkElement.addClass('menu-open');
parent.find('li.active').removeClass('active');
parent_li.addClass('active');
});
}
//if this isn't a link, prevent the page from being redirected
if (checkElement.is('.treeview-sub')) {
e.preventDefault();
}
});
} //sidebarMenu end.
//GOT HELP//
$('li.treeview').each(function() {
$('<li class="copied"></li>').html($(this).children('a').clone()).prependTo($(this).children('ul')).find('> a > span').html('Overview');
});
$(".copied > a").removeClass('admin_menu_link_selected');
$(".copied > a").removeClass('user_menu_link_selected');
$(".copied > a > span").removeAttr('data-icon_path');
$(".treeview > a").removeClass('treeview-a');
$('.treeview').each(function() {
var $linked = $(this);
if ($linked.find('.admin_menu_link_selected').length > 0) {
$linked.addClass('active');
} else if ($linked.find('.user_menu_link_selected').length > 0) {
$linked.addClass('active');
}
}); //treeview.each end.
$.sidebarMenu($('.menu'));
$(".copied > a > span").css("background", "");
$(".copied > a > span").css("padding", "");
if(window.location.href.indexOf("home.php?m=") > -1) {
$(".menu").prepend('<div class="avatar-cover"><span class="avatar-username"></span><span class="avatar-status"><i class="fa fa-circle"></i>Online</span><form id="ava-form" method="POST" enctype="multipart/form-data"><label class="edit_avatar"><i class="fa fa-camera"></i><input class="avatarinput" name="image" accept="image/*" type="file" /></label></form><span id="remove_avatar"><i class="fa fa-trash"></i></span></div>');
$(".avatar-username").text($("li.treeview > a > span.username").text());
$.ajax({
url: "themes/Obsidian/upload/get.php",
type: 'get',
dataType: 'html',
async: false,
success: function(data) {
$(".menu .avatar-cover").prepend('<img id="avatar" src="themes/Obsidian/' + data + '">');
}
});
} //href index of end.
//You might want to do if check to see if localstorage set for theImage here
$('body').on('click', '#remove_avatar',function(){
$.ajax({
url: "themes/Obsidian/upload/remove.php",
type: "POST",
data: {remove: "1"},
success: function(data)
{
$("#avatar").remove();
$(".menu .avatar-cover").prepend('<img id="avatar" src="themes/Obsidian/images/default_avatar.png">');
},
error: function(data)
{
}
});
}); //body.on.click end.
$(".avatarinput").change((function(){
$("#avatar").remove();
$(".avatar-cover").prepend('<img id="avatar" src="themes/Obsidian/images/spinner_big.gif">');
var form = $('#ava-form').get(0);
$.ajax({
url: "themes/Obsidian/upload/upload.php",
type: "POST",
data: new FormData(form),
async: false,
contentType: false,
cache: false,
processData:false,
success: function(data)
{
$("#avatar").remove();
$(".avatar-cover").prepend(data).fadeIn();
$.cookie('avatar', data, { expires: 365, path: '/' });
},
error: function()
{
$("#avatar").remove();
$(".avatar-cover").prepend('<img id="avatar" src="themes/Obsidian/images/error.png">').fadeIn();
}
});
})); //body.on.change end.
if($("#refresh-manual").length > 0) {
$('.main-content').attr('style', 'background: rgba(22,37,53,0.4);');
}
$(window).load(function() {
$(".datetime").fadeIn(2000);
$(".menu > ul").fadeIn(2000);
$(".main-content").fadeIn(2000);
});
}); //document.ready end

1
themes/Obsidian/js/config.min.js vendored Normal file
View file

@ -0,0 +1 @@
jQuery(function(a){a.ajax({type:"GET",url:"themes/Obsidian/config/config.xml",dataType:"xml",success:function(g){var j=a.parseXML(g),c=a(j);var h=a(g).find("favicon").text();var i=a(g).find("loginbg").text();var e=a(g).find("bgblur").text();var d=a(g).find("logo").text();var b=a(g).find("pace").text();var f=a(g).find("responsive").text();a("#m_favicon").attr("href",h);a("head").append('<style>#login-bg:before{background-image: url("'+i+'");}</style>');if(e==1){window.onload=function(){a("head").append("<style>#login-bg:before{-webkit-filter: blur(5px);-moz-filter: blur(5px);-o-filter: blur(5px);-ms-filter: blur(5px);filter: blur(5px);}</style>")}}if(f==1){a("head").append('<meta name="viewport" content="width=device-width, initial-scale=1">')}a("#m_logo").attr("src",d);if(b==0){window.onload=function(){a("#m_pace_js").remove();a("#m_pace_css").remove()}}}})});

View file

@ -0,0 +1,10 @@
/**
* Cookie plugin
*
* Copyright (c) 2006 Klaus Hartl (stilbuero.de)
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
*/
jQuery.cookie=function(name,value,options){if(typeof value!="undefined"){options=options||{};if(value===null){value="";options.expires=-1;}var expires="";if(options.expires&&(typeof options.expires=="number"||options.expires.toUTCString)){var date;if(typeof options.expires=="number"){date=new Date();date.setTime(date.getTime()+(options.expires*24*60*60*1000));}else{date=options.expires;}expires="; expires="+date.toUTCString();}var path=options.path?"; path="+(options.path):"";var domain=options.domain?"; domain="+(options.domain):"";var secure=options.secure?"; secure":"";document.cookie=[name,"=",encodeURIComponent(value),expires,path,domain,secure].join("");}else{var cookieValue=null;if(document.cookie&&document.cookie!=""){var cookies=document.cookie.split(";");for(var i=0;i<cookies.length;i++){var cookie=jQuery.trim(cookies[i]);if(cookie.substring(0,name.length+1)==(name+"=")){cookieValue=decodeURIComponent(cookie.substring(name.length+1));break;}}}return cookieValue;}};

2
themes/Obsidian/js/pace.min.js vendored Normal file

File diff suppressed because one or more lines are too long

6
themes/Obsidian/js/tip.min.js vendored Normal file
View file

@ -0,0 +1,6 @@
// tipsy, facebook style tooltips for jquery
// version 1.0.0a
// (c) 2008-2010 jason frame [jason@onehackoranother.com]
// released under the MIT license
(function(c){function b(e,d){return(typeof e=="function")?(e.call(d)):e}function a(e,d){this.$element=c(e);this.options=d;this.enabled=true;this.fixTitle()}a.prototype={show:function(){var g=this.getTitle();if(g&&this.enabled){var f=this.tip();f.find(".tipsy-inner")[this.options.html?"html":"text"](g);f[0].className="tipsy";f.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).prependTo(document.body);var j=c.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight});var d=f[0].offsetWidth,i=f[0].offsetHeight,h=b(this.options.gravity,this.$element[0]);var e;switch(h.charAt(0)){case"n":e={top:j.top+j.height+this.options.offset,left:j.left+j.width/2-d/2};break;case"s":e={top:j.top-i-this.options.offset,left:j.left+j.width/2-d/2};break;case"e":e={top:j.top+j.height/2-i/2,left:j.left-d-this.options.offset};break;case"w":e={top:j.top+j.height/2-i/2,left:j.left+j.width+this.options.offset};break}if(h.length==2){if(h.charAt(1)=="w"){e.left=j.left+j.width/2-15}else{e.left=j.left+j.width/2-d+15}}f.css(e).addClass("tipsy-"+h);f.find(".tipsy-arrow")[0].className="tipsy-arrow tipsy-arrow-"+h.charAt(0);if(this.options.className){f.addClass(b(this.options.className,this.$element[0]))}if(this.options.fade){f.stop().css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:this.options.opacity})}else{f.css({visibility:"visible",opacity:this.options.opacity})}}},hide:function(){if(this.options.fade){this.tip().stop().fadeOut(function(){c(this).remove()})}else{this.tip().remove()}},fixTitle:function(){var d=this.$element;if(d.attr("title")||typeof(d.attr("original-title"))!="string"){d.attr("original-title",d.attr("title")||"").removeAttr("title")}},getTitle:function(){var f,d=this.$element,e=this.options;this.fixTitle();var f,e=this.options;if(typeof e.title=="string"){f=d.attr(e.title=="title"?"original-title":e.title)}else{if(typeof e.title=="function"){f=e.title.call(d[0])}}f=(""+f).replace(/(^\s*|\s*$)/,"");return f||e.fallback},tip:function(){if(!this.$tip){this.$tip=c('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>')}return this.$tip},validate:function(){if(!this.$element[0].parentNode){this.hide();this.$element=null;this.options=null}},enable:function(){this.enabled=true},disable:function(){this.enabled=false},toggleEnabled:function(){this.enabled=!this.enabled}};c.fn.tipsy=function(h){if(h===true){return this.data("tipsy")}else{if(typeof h=="string"){var j=this.data("tipsy");if(j){j[h]()}return this}}h=c.extend({},c.fn.tipsy.defaults,h);function g(l){var m=c.data(l,"tipsy");if(!m){m=new a(l,c.fn.tipsy.elementOptions(l,h));c.data(l,"tipsy",m)}return m}function k(){var l=g(this);l.hoverState="in";if(h.delayIn==0){l.show()}else{l.fixTitle();setTimeout(function(){if(l.hoverState=="in"){l.show()}},h.delayIn)}}function f(){var l=g(this);l.hoverState="out";if(h.delayOut==0){l.hide()}else{setTimeout(function(){if(l.hoverState=="out"){l.hide()}},h.delayOut)}}if(!h.live){this.each(function(){g(this)})}if(h.trigger!="manual"){var d=h.live?"live":"bind",i=h.trigger=="hover"?"mouseenter":"focus",e=h.trigger=="hover"?"mouseleave":"blur";this[d](i,k)[d](e,f)}return this};c.fn.tipsy.defaults={className:null,delayIn:0,delayOut:0,fade:true,fallback:"",gravity:"n",html:false,live:false,offset:0,opacity:0.8,title:"title",trigger:"hover"};c.fn.tipsy.elementOptions=function(e,d){return c.metadata?c.extend({},d,c(e).metadata()):d};c.fn.tipsy.autoNS=function(){return c(this).offset().top>(c(document).scrollTop()+c(window).height()/2)?"s":"n"};c.fn.tipsy.autoWE=function(){return c(this).offset().left>(c(document).scrollLeft()+c(window).width()/2)?"e":"w"};c.fn.tipsy.autoBounds=function(e,d){return function(){var f={ns:d[0],ew:(d.length>1?d[1]:false)},i=c(document).scrollTop()+e,g=c(document).scrollLeft()+e,h=c(this);if(h.offset().top<i){f.ns="n"}if(h.offset().left<g){f.ew="w"}if(c(window).width()+c(document).scrollLeft()-h.offset().left<e){f.ew="e"}if(c(window).height()+c(document).scrollTop()-h.offset().top<e){f.ns="s"}return f.ns+(f.ew?f.ew:"")}}})(jQuery);