From 45ca500cc3dbc1483bff49d0c1fd7e0dc1537179 Mon Sep 17 00:00:00 2001 From: genuineparts Date: Wed, 25 Jun 2025 11:10:16 +0200 Subject: [PATCH] Small layout and compliance updates --- .idea/inspectionProfiles/Project_Default.xml | 6 ++++ class_templates/ajax_module.template.php | 27 +++++++------- modules/chat/admin/manage.apnl.php | 1 + modules/chat/chat.ajax.php | 37 ++++++-------------- template_1.txt | 2 +- themes/funchat/layout/styles/layout.css | 33 ++++++++++++++++- 6 files changed, 66 insertions(+), 40 deletions(-) create mode 100644 .idea/inspectionProfiles/Project_Default.xml diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml new file mode 100644 index 0000000..5cb71ef --- /dev/null +++ b/.idea/inspectionProfiles/Project_Default.xml @@ -0,0 +1,6 @@ + + + + \ No newline at end of file diff --git a/class_templates/ajax_module.template.php b/class_templates/ajax_module.template.php index 9c7c824..ad0736f 100644 --- a/class_templates/ajax_module.template.php +++ b/class_templates/ajax_module.template.php @@ -26,28 +26,31 @@ $module["module"]["ver"]="0.3.0"; use Smarty\Smarty; -class ajax_module { - - public $uses_default_templates=FALSE; +class ajax_module +{ - function __construct() { - global $log,$config,$tpl,$db,$task,$plugin; + public $uses_default_templates = FALSE; + + function __construct() + { + global $log, $config, $tpl, $db, $task, $plugin; $root = $_SERVER['DOCUMENT_ROOT'] . $config["path"]; - $this->tpl= new Smarty(); + $this->tpl = new Smarty(); $this->tpl->setCompileDir($root . '/core/template/templates_c'); $this->tpl->setCacheDir($root . '/core/template/cache'); $this->tpl->setConfigDir($root . '/core/template/config'); - If($config["caching"]==1){ + if ($config["caching"] == 1) { $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() + { } -} -?> +} \ No newline at end of file diff --git a/modules/chat/admin/manage.apnl.php b/modules/chat/admin/manage.apnl.php index a6c2a33..bc26a20 100644 --- a/modules/chat/admin/manage.apnl.php +++ b/modules/chat/admin/manage.apnl.php @@ -63,6 +63,7 @@ class manage_chat_panel extends admin_module{ $status = $this->get_readable_status($istat); $panel->content.=$status.'
'; + $extra = ""; if($istat==1){ $extra='disabled="disabled"'; } diff --git a/modules/chat/chat.ajax.php b/modules/chat/chat.ajax.php index 2184989..7b86e97 100644 --- a/modules/chat/chat.ajax.php +++ b/modules/chat/chat.ajax.php @@ -17,23 +17,13 @@ class chat extends ajax_module{ function daytime() { $now = time(); - $sunrise = date_sunrise($now, SUNFUNCS_RET_TIMESTAMP, 47.6880, 13.1344); - $sunset = date_sunset( $now, SUNFUNCS_RET_TIMESTAMP, 47.6880, 13.1344); - return ($sunrise < $now && $now < $sunset); + $sun = date_sun_info($now, 47.6880, 13.1344); + return ($sun['sunrise'] < $now && $now < $sun['sunset']); } if($_POST['call']=='userlist'){ 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']); //{"roomname":"Lounge","usercolor":"25a1ed","roomusers":[{"nick":"genuineparts","color":"25a1ed","typing":false,"notice":0}]} foreach($room->roomusers as $user) { @@ -81,7 +71,7 @@ class chat extends ajax_module{ { 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('room',$room->roomname); @@ -94,10 +84,7 @@ class chat extends ajax_module{ if($_POST['call']=='rooms'){ if($session->userdata['uid']!=0){ $rooms = json_decode($_POST['dat']); - foreach($rooms as $room) { - if($session->userdata['allow_grimdark']==0 && $room->type=='grimdark'){ - continue; - } + foreach($rooms as $room) { $userlist[$room->room]['s'] = $room->lock; $userlist[$room->room]['g'] = $room->type; $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."'"); $gender = $db->fetch_array($result); - if($gender['fid3']=='Männlich'){ + if($gender['gender']=='m'){ $gen='male'; - }elseif($gender['fid3']=='Weiblich'){ + }elseif($gender['gender']=='f'){ $gen='female'; }else{ $gen='na'; @@ -121,7 +108,6 @@ class chat extends ajax_module{ $userlist[$room->room]['u'][$i]['n'] = $user->nick; $userlist[$room->room]['u'][$i]['i'] = $notice; $userlist[$room->room]['u'][$i]['g'] = $gen; - $userlist[$room->room]['u'][$i]['l'] = $location; $i++; } } @@ -321,24 +307,24 @@ class chat extends ajax_module{ } } if($_GET['call']=='chars'){ - $chars=''; + $chars = array(); $result = $db->query("SELECT `name` FROM `" . $config["prefix"] . "rp_chars` WHERE `name` LIKE '".$db->escape($_GET['term'])."%'"); while($n = $db->fetch_array($result)){ $chars[] = $n['name']; } if(!empty($chars)){ - return '["'.join($chars,'","').'"]'; + return '["'.join('","', $chars).'"]'; } } if($_GET['call']=='users'){ - $chars=''; + $chars = array(); $result = $db->query("SELECT `username` FROM `" . $config["prefix"] . "users` WHERE `username` LIKE '".$db->escape($_GET['term'])."%'"); while($n = $db->fetch_array($result)){ $chars[] = $n['username']; } if(!empty($chars)){ - return '["'.join($chars,'","').'"]'; + return '["'.join('","', $chars).'"]'; } } @@ -425,5 +411,4 @@ class chat extends ajax_module{ } -} -?> +} \ No newline at end of file diff --git a/template_1.txt b/template_1.txt index 1a0f529..038198c 100644 --- a/template_1.txt +++ b/template_1.txt @@ -1,5 +1,5 @@ # Welcome message -txtWelcome|SourceUser = <%APP_NAME%> <%APP_VERSION%> © 2013-2025 by GenuineParts

+txtWelcome|SourceUser = <%APP_NAME%> <%APP_VERSION%> © 2013-2025 by GenuineParts

# Simple messages txtMessage|SourceRoom = (<%Time%>) %(<%id%>)%<%SourceNick%>: <%Message%>
diff --git a/themes/funchat/layout/styles/layout.css b/themes/funchat/layout/styles/layout.css index ce4b184..0e6583b 100644 --- a/themes/funchat/layout/styles/layout.css +++ b/themes/funchat/layout/styles/layout.css @@ -49,6 +49,37 @@ body { 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: both; } @@ -470,7 +501,7 @@ div.wrapper h2 { background-color: #333333; border: 1px solid #666666; } -0 #column #featured li h2 { +#column #featured li h2 { margin: 0; padding: 0 0 14px 0; font-size: 20px;