Small layout and compliance updates
This commit is contained in:
parent
fe9ecfad73
commit
45ca500cc3
6 changed files with 66 additions and 40 deletions
6
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
6
.idea/inspectionProfiles/Project_Default.xml
generated
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="SqlNoDataSourceInspection" enabled="false" level="WARNING" enabled_by_default="false" />
|
||||||
|
</profile>
|
||||||
|
</component>
|
|
@ -26,28 +26,31 @@ $module["module"]["ver"]="0.3.0";
|
||||||
use Smarty\Smarty;
|
use Smarty\Smarty;
|
||||||
|
|
||||||
|
|
||||||
class ajax_module {
|
class ajax_module
|
||||||
|
{
|
||||||
public $uses_default_templates=FALSE;
|
|
||||||
|
|
||||||
function __construct() {
|
public $uses_default_templates = FALSE;
|
||||||
global $log,$config,$tpl,$db,$task,$plugin;
|
|
||||||
|
function __construct()
|
||||||
|
{
|
||||||
|
global $log, $config, $tpl, $db, $task, $plugin;
|
||||||
$root = $_SERVER['DOCUMENT_ROOT'] . $config["path"];
|
$root = $_SERVER['DOCUMENT_ROOT'] . $config["path"];
|
||||||
$this->tpl= new Smarty();
|
$this->tpl = new Smarty();
|
||||||
$this->tpl->setCompileDir($root . '/core/template/templates_c');
|
$this->tpl->setCompileDir($root . '/core/template/templates_c');
|
||||||
$this->tpl->setCacheDir($root . '/core/template/cache');
|
$this->tpl->setCacheDir($root . '/core/template/cache');
|
||||||
$this->tpl->setConfigDir($root . '/core/template/config');
|
$this->tpl->setConfigDir($root . '/core/template/config');
|
||||||
If($config["caching"]==1){
|
if ($config["caching"] == 1) {
|
||||||
$this->tpl->setCaching(Smarty::CACHING_LIFETIME_SAVED);
|
$this->tpl->setCaching(Smarty::CACHING_LIFETIME_SAVED);
|
||||||
}
|
}
|
||||||
$this->tpl->assign("path",$config["path"]."/");
|
$this->tpl->assign("path", $config["path"] . "/");
|
||||||
}
|
}
|
||||||
|
|
||||||
function __destruct() {
|
function __destruct()
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
function meta() {
|
function meta()
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
|
|
@ -63,6 +63,7 @@ class manage_chat_panel extends admin_module{
|
||||||
$status = $this->get_readable_status($istat);
|
$status = $this->get_readable_status($istat);
|
||||||
|
|
||||||
$panel->content.=$status.'<br />';
|
$panel->content.=$status.'<br />';
|
||||||
|
$extra = "";
|
||||||
if($istat==1){
|
if($istat==1){
|
||||||
$extra='disabled="disabled"';
|
$extra='disabled="disabled"';
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,23 +17,13 @@ class chat extends ajax_module{
|
||||||
|
|
||||||
function daytime() {
|
function daytime() {
|
||||||
$now = time();
|
$now = time();
|
||||||
$sunrise = date_sunrise($now, SUNFUNCS_RET_TIMESTAMP, 47.6880, 13.1344);
|
$sun = date_sun_info($now, 47.6880, 13.1344);
|
||||||
$sunset = date_sunset( $now, SUNFUNCS_RET_TIMESTAMP, 47.6880, 13.1344);
|
return ($sun['sunrise'] < $now && $now < $sun['sunset']);
|
||||||
return ($sunrise < $now && $now < $sunset);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if($_POST['call']=='userlist'){
|
if($_POST['call']=='userlist'){
|
||||||
if($session->userdata['uid']!=0){
|
if($session->userdata['uid']!=0){
|
||||||
/*if (!$fh = fopen('http://'.$curl.':'.$config['SOCK_PORT'].'/room?yacsid='.$_GET['yacsid'], 'r')){
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
// Read data and close
|
|
||||||
while(!feof($fh))
|
|
||||||
$content .= fread($fh, 1024);
|
|
||||||
|
|
||||||
fclose($fh);*/
|
|
||||||
//$content = $ccache->get('userroom'.$_GET['yacsid']);
|
|
||||||
$room = json_decode($_POST['dat']);
|
$room = json_decode($_POST['dat']);
|
||||||
//{"roomname":"Lounge","usercolor":"25a1ed","roomusers":[{"nick":"genuineparts","color":"25a1ed","typing":false,"notice":0}]}
|
//{"roomname":"Lounge","usercolor":"25a1ed","roomusers":[{"nick":"genuineparts","color":"25a1ed","typing":false,"notice":0}]}
|
||||||
foreach($room->roomusers as $user) {
|
foreach($room->roomusers as $user) {
|
||||||
|
@ -81,7 +71,7 @@ class chat extends ajax_module{
|
||||||
{ name: \"report\", action: function (element) { reportwindow($(element).attr('id')); } }
|
{ name: \"report\", action: function (element) { reportwindow($(element).attr('id')); } }
|
||||||
];";
|
];";
|
||||||
}
|
}
|
||||||
$users[]=array('nick'=>$user->nick,'color'=>$user->color,'notice'=>$notice,'gender'=>$gen,'typing'=>$user->typing,'location'=>$location);
|
$users[]=array('nick'=>$user->nick,'color'=>$user->color,'notice'=>$notice,'gender'=>$gen,'typing'=>$user->typing);
|
||||||
}
|
}
|
||||||
$tpl->assign('col',$room->usercolor);
|
$tpl->assign('col',$room->usercolor);
|
||||||
$tpl->assign('room',$room->roomname);
|
$tpl->assign('room',$room->roomname);
|
||||||
|
@ -94,10 +84,7 @@ class chat extends ajax_module{
|
||||||
if($_POST['call']=='rooms'){
|
if($_POST['call']=='rooms'){
|
||||||
if($session->userdata['uid']!=0){
|
if($session->userdata['uid']!=0){
|
||||||
$rooms = json_decode($_POST['dat']);
|
$rooms = json_decode($_POST['dat']);
|
||||||
foreach($rooms as $room) {
|
foreach($rooms as $room) {
|
||||||
if($session->userdata['allow_grimdark']==0 && $room->type=='grimdark'){
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
$userlist[$room->room]['s'] = $room->lock;
|
$userlist[$room->room]['s'] = $room->lock;
|
||||||
$userlist[$room->room]['g'] = $room->type;
|
$userlist[$room->room]['g'] = $room->type;
|
||||||
$userlist[$room->room]['u'] = array();
|
$userlist[$room->room]['u'] = array();
|
||||||
|
@ -110,9 +97,9 @@ class chat extends ajax_module{
|
||||||
}
|
}
|
||||||
$result = $db->query("SELECT * FROM `aa_v_nickpage` WHERE `username`='".$user->nick."'");
|
$result = $db->query("SELECT * FROM `aa_v_nickpage` WHERE `username`='".$user->nick."'");
|
||||||
$gender = $db->fetch_array($result);
|
$gender = $db->fetch_array($result);
|
||||||
if($gender['fid3']=='Männlich'){
|
if($gender['gender']=='m'){
|
||||||
$gen='male';
|
$gen='male';
|
||||||
}elseif($gender['fid3']=='Weiblich'){
|
}elseif($gender['gender']=='f'){
|
||||||
$gen='female';
|
$gen='female';
|
||||||
}else{
|
}else{
|
||||||
$gen='na';
|
$gen='na';
|
||||||
|
@ -121,7 +108,6 @@ class chat extends ajax_module{
|
||||||
$userlist[$room->room]['u'][$i]['n'] = $user->nick;
|
$userlist[$room->room]['u'][$i]['n'] = $user->nick;
|
||||||
$userlist[$room->room]['u'][$i]['i'] = $notice;
|
$userlist[$room->room]['u'][$i]['i'] = $notice;
|
||||||
$userlist[$room->room]['u'][$i]['g'] = $gen;
|
$userlist[$room->room]['u'][$i]['g'] = $gen;
|
||||||
$userlist[$room->room]['u'][$i]['l'] = $location;
|
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -321,24 +307,24 @@ class chat extends ajax_module{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if($_GET['call']=='chars'){
|
if($_GET['call']=='chars'){
|
||||||
$chars='';
|
$chars = array();
|
||||||
$result = $db->query("SELECT `name` FROM `" . $config["prefix"] . "rp_chars` WHERE `name` LIKE '".$db->escape($_GET['term'])."%'");
|
$result = $db->query("SELECT `name` FROM `" . $config["prefix"] . "rp_chars` WHERE `name` LIKE '".$db->escape($_GET['term'])."%'");
|
||||||
while($n = $db->fetch_array($result)){
|
while($n = $db->fetch_array($result)){
|
||||||
$chars[] = $n['name'];
|
$chars[] = $n['name'];
|
||||||
}
|
}
|
||||||
if(!empty($chars)){
|
if(!empty($chars)){
|
||||||
return '["'.join($chars,'","').'"]';
|
return '["'.join('","', $chars).'"]';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($_GET['call']=='users'){
|
if($_GET['call']=='users'){
|
||||||
$chars='';
|
$chars = array();
|
||||||
$result = $db->query("SELECT `username` FROM `" . $config["prefix"] . "users` WHERE `username` LIKE '".$db->escape($_GET['term'])."%'");
|
$result = $db->query("SELECT `username` FROM `" . $config["prefix"] . "users` WHERE `username` LIKE '".$db->escape($_GET['term'])."%'");
|
||||||
while($n = $db->fetch_array($result)){
|
while($n = $db->fetch_array($result)){
|
||||||
$chars[] = $n['username'];
|
$chars[] = $n['username'];
|
||||||
}
|
}
|
||||||
if(!empty($chars)){
|
if(!empty($chars)){
|
||||||
return '["'.join($chars,'","').'"]';
|
return '["'.join('","', $chars).'"]';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -425,5 +411,4 @@ class chat extends ajax_module{
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Welcome message
|
# Welcome message
|
||||||
txtWelcome|SourceUser = <link rel="stylesheet" href="//funch.at/style.css?id=278389" type="text/css" media="screen" /></head><body><span id="copyrightline"><%APP_NAME%> <%APP_VERSION%> © 2013-2025 by <a href="//funch.at" target="_blank" style="color: #516176;">GenuineParts</a></a></span><br/><br/><audio id="notice"><source id="oggnotice" src="//funch.at/modules/chat/sound/ding_notice.ogg?id=21131223132" type="audio/ogg" ><source id="mp3notice" src="//funch.at/modules/chat/sound/ding_notice.mp3?id=21131223132" type="audio/mpeg"></audio><audio id="audioPlayer"><source id="oggSource" type="audio/ogg" ><source id="mp3Source" type="audio/mpeg"></audio><script type="text/javascript">set_notice();</script>
|
txtWelcome|SourceUser = </head><body><span id="copyrightline"><%APP_NAME%> <%APP_VERSION%> © 2013-2025 by <a href="//funch.at" target="_blank" style="color: #516176;">GenuineParts</a></a></span><br/><br/><audio id="notice"><source id="oggnotice" src="//funch.at/modules/chat/sound/ding_notice.ogg?id=21131223132" type="audio/ogg" ><source id="mp3notice" src="//funch.at/modules/chat/sound/ding_notice.mp3?id=21131223132" type="audio/mpeg"></audio><audio id="audioPlayer"><source id="oggSource" type="audio/ogg" ><source id="mp3Source" type="audio/mpeg"></audio><script type="text/javascript">set_notice();</script>
|
||||||
|
|
||||||
# Simple messages
|
# Simple messages
|
||||||
txtMessage|SourceRoom = <span class="time">(<%Time%>) </span><span style="color: #<%SourceColor%>;"><span class="user_whisper" title="<%friendlysender%>">%(<%id%>)%<%SourceNick%></span>: <%Message%></span><br/>
|
txtMessage|SourceRoom = <span class="time">(<%Time%>) </span><span style="color: #<%SourceColor%>;"><span class="user_whisper" title="<%friendlysender%>">%(<%id%>)%<%SourceNick%></span>: <%Message%></span><br/>
|
||||||
|
|
|
@ -49,6 +49,37 @@ body {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.rb-anim{
|
||||||
|
position: relative;
|
||||||
|
letter-spacing: 0.05em;
|
||||||
|
font-weight: 500;
|
||||||
|
background: linear-gradient(
|
||||||
|
#fd004c 16.7%,
|
||||||
|
#fe9000 16.7%,
|
||||||
|
#fe9000 33.4%,
|
||||||
|
#fff020 33.4%,
|
||||||
|
#fff020 50.1%,
|
||||||
|
#3edf4b 50.1%,
|
||||||
|
#3edf4b 66.8%,
|
||||||
|
#3363ff 66.8%,
|
||||||
|
#3363ff 83.5%,
|
||||||
|
#b102b7 83.5%
|
||||||
|
);
|
||||||
|
color: transparent;
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
background-clip: text;
|
||||||
|
-webkit-text-stroke: 0.04em white;
|
||||||
|
margin-bottom: 0.5em;
|
||||||
|
line-height: 1.1em;
|
||||||
|
animation: rainbow 50s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes rainbow {
|
||||||
|
100% {
|
||||||
|
background-position: 0 30em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.clear {
|
.clear {
|
||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
|
@ -470,7 +501,7 @@ div.wrapper h2 {
|
||||||
background-color: #333333;
|
background-color: #333333;
|
||||||
border: 1px solid #666666;
|
border: 1px solid #666666;
|
||||||
}
|
}
|
||||||
0 #column #featured li h2 {
|
#column #featured li h2 {
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0 0 14px 0;
|
padding: 0 0 14px 0;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue