nickpage work
This commit is contained in:
parent
45ca500cc3
commit
0637c14b23
5 changed files with 76 additions and 82 deletions
|
@ -13,7 +13,7 @@ RewriteBase /
|
|||
|
||||
RewriteRule error/(.*)\.html$ index.php?task=error&sub=$1
|
||||
|
||||
RewriteRule ^np/images/(.+)$ /modules/nickpage/images/$1 [L,NC]
|
||||
RewriteRule ^np/images/(.*)$ /modules/nickpage/images/$1 [L,NC]
|
||||
RewriteRule np/(.*) index.php?task=nickpage&user=$1
|
||||
RewriteRule ^register/(.*)? register.php?regstring=$1
|
||||
RewriteRule ^avatar/(.*)? index.php?task=rp&sum=avatar&id=$1
|
||||
|
|
|
@ -24,18 +24,7 @@ class chat extends module{
|
|||
} else {
|
||||
$befinden="sind";
|
||||
}
|
||||
/*$nicks="";
|
||||
if($session->userdata['rp_admin']==1){
|
||||
$result=$db->query("SELECT * FROM `" . $config["prefix"] . "rp_chars` WHERE (`uid`='".$session->userdata['uid']."' OR `uid`='0') ORDER BY `uid` DESC") or die($db->error());
|
||||
}else{
|
||||
$result=$db->query("SELECT * FROM `" . $config["prefix"] . "rp_chars` WHERE `uid`='".$session->userdata['uid']."'") or die($db->error());
|
||||
}
|
||||
while($row=$db->fetch_array($result)){
|
||||
$nicks.='<option value="'.$row['id'].'">'.$row['name'].'</option>';
|
||||
}
|
||||
if($db->num_rows($result)<=0){
|
||||
$core->message('Sorry', 'You have to create a <a href="/create_char.html">Char</a> to participate.',FALSE,$config['path'].'/index.php');
|
||||
}*/
|
||||
|
||||
$rooms=array(array('room'=>'Lounge','selected'=>'selected="selected"'),array('room'=>'Flirt','selected'=>''),array('room'=>'Quiz','selected'=>''));
|
||||
$this->tpl->assign('options',$rooms);
|
||||
if($session->userdata['allow_grimdark']==0){
|
||||
|
@ -45,10 +34,8 @@ class chat extends module{
|
|||
}
|
||||
unset($data['usercount']);
|
||||
unset($data['gdusercount']);
|
||||
$meta.=$this->xmeta();
|
||||
$this->tpl->assign('user', $data);
|
||||
$this->tpl->assign('befinden',$befinden);
|
||||
$this->tpl->assign('nicks',$nicks);
|
||||
return $this->tpl->fetch('chat.tpl', 'chat_front');
|
||||
}else{
|
||||
$core->message('Sorry', 'Scheint so als hätte der Chat gerade Probleme. Wir kümmern uns sofort darum!',FALSE,$config['path'].'/index.php');
|
||||
|
@ -72,20 +59,6 @@ class chat extends module{
|
|||
}
|
||||
}
|
||||
$subs=array('1'=>'Enter','2'=>'Shift+Enter');
|
||||
/*$result=$db->query("SELECT `uid`,`pr_only` FROM `" . $config["prefix"] . "rp_chars` WHERE `id`='".$db->escape($_POST['nick'])."'") or die($db->error());
|
||||
$row=$db->fetch_array($result);
|
||||
if($row['pr_only']=='true' && $_POST['room']!='Ponyopolis'){
|
||||
$_POST['room']='Chitchat';
|
||||
}
|
||||
if($row['uid']!=$session->userdata['uid'] && $session->userdata['rp_admin']!=1){
|
||||
$core->message('HACK!','You tried something fishy! It has been logged.');
|
||||
}*/
|
||||
$opts=array(
|
||||
"ssl"=>array(
|
||||
"verify_peer"=>false,
|
||||
"verify_peer_name"=>false,
|
||||
),
|
||||
);
|
||||
$ch = curl_init();
|
||||
|
||||
// setze die URL und andere Optionen
|
||||
|
@ -102,11 +75,6 @@ class chat extends module{
|
|||
// schließe den cURL-Handle und gebe die Systemresourcen frei
|
||||
curl_close($ch);
|
||||
if ($fh) {
|
||||
/*$buffer = '';
|
||||
while (!feof($fh)) {
|
||||
$buffer .= fgets($fh, 512);
|
||||
}
|
||||
fclose($fh);*/
|
||||
$buffer = trim($fh);
|
||||
}
|
||||
|
||||
|
@ -132,11 +100,6 @@ class chat extends module{
|
|||
$whisper=$row['whisperwindow'];
|
||||
}
|
||||
$meta.= '<script> var yacsid="'.$cookie.'";var subm="'.$sub.'"; var col="'.$col.'"; var chid="'.$session->userdata['uid'].'"; var whwind='.$whisper.'; var ncounter='.$nc.'; var nickcheck = /(\b'.$nick.'\b)/gi;</script>';
|
||||
if($bg=='true'){
|
||||
$bgtext='BG Music: On';
|
||||
}else{
|
||||
$bgtext='BG Music: Off';
|
||||
}
|
||||
if($whisper=='true'){
|
||||
$whtext='Füsterfenster: An';
|
||||
}else{
|
||||
|
@ -155,11 +118,11 @@ class chat extends module{
|
|||
}else{
|
||||
$simg='<span style="color:#'.$col.';">'.$nick.':</span>';
|
||||
}
|
||||
$content = "";
|
||||
$tpl->assign('cookie', $cookie);
|
||||
$tpl->assign('username', $nick);
|
||||
$tpl->assign('id', $_POST['nick']);
|
||||
$this->titleaddon = $nick.' - ';
|
||||
$tpl->assign('bgmusic', $bgtext);
|
||||
$tpl->assign('whtext', $whtext);
|
||||
$tpl->assign('ooctext', $ooctext);
|
||||
$tpl->assign('submit', $subs[$sub]);
|
||||
|
@ -178,7 +141,8 @@ class chat extends module{
|
|||
}
|
||||
}
|
||||
function output_online(){
|
||||
$data=chat_online();
|
||||
global $core, $config;
|
||||
$data=chat_online();
|
||||
unset($data["usercount"]);
|
||||
unset($data["gdusercount"]);
|
||||
if (!$data["chat_offline"]) {
|
||||
|
@ -190,7 +154,7 @@ class chat extends module{
|
|||
}
|
||||
|
||||
function output_editlog(){
|
||||
global $session,$config,$db,$tpl,$core,$plugin,$meta;
|
||||
global $session,$config,$db,$core,$meta;
|
||||
$meta.= '<script type="text/javascript"> var chid="'.$_GET['id'].'"</script>';
|
||||
$logs=$db->query("SELECT c.*, u.`username` FROM `" . $config["prefix"] . "conversations` c LEFT JOIN `" . $config["prefix"] . "users` u ON u.`uid`=c.`owner` WHERE c.`owner`='".$session->userdata['uid']."' AND c.`id`='".intval($_GET['id'])."'");
|
||||
if($db->num_rows($logs)<=0){
|
||||
|
@ -210,7 +174,6 @@ class chat extends module{
|
|||
}
|
||||
$this->tpl->assign('share',$share);
|
||||
$this->tpl->assign('id',intval($_GET['id']));
|
||||
$this->tpl->assign('logdata',$logdata);
|
||||
return $this->tpl->fetch('editlog.tpl', 'editlog');
|
||||
|
||||
}
|
||||
|
@ -224,7 +187,7 @@ class chat extends module{
|
|||
while($delid=$db->fetch_array($did)){
|
||||
$ids[]=$delid['id'];
|
||||
}
|
||||
$sql="DELETE FROM `" . $config["prefix"] . "conversations` WHERE `id` in('".join($ids,'\',\'')."')";
|
||||
$sql="DELETE FROM `" . $config["prefix"] . "conversations` WHERE `id` in('".join('\',\'', $ids)."')";
|
||||
$db->query($sql);
|
||||
$db->query("DELETE FROM `" . $config["prefix"] . "private_logs` WHERE `cid`='".$rowl['id']."'");
|
||||
}else{
|
||||
|
@ -333,12 +296,12 @@ class chat extends module{
|
|||
$core->message('Sorry', "You have to be logged in to participate.");
|
||||
}else{
|
||||
$date='';
|
||||
$logs='';
|
||||
$logs = array();
|
||||
$cd='';
|
||||
if(isset($_POST['nicks']) && $_POST['nicks']!=""){
|
||||
$chars=explode(', ',$_POST['nicks']);
|
||||
array_pop($chars);
|
||||
$char = '\''.join ($chars,'\',\'').'\'';
|
||||
$char = '\''.join ('\',\'', $chars).'\'';
|
||||
$cd = ' AND `user` IN ('.$char.')';
|
||||
}
|
||||
|
||||
|
@ -451,6 +414,7 @@ class chat extends module{
|
|||
$tpl->assign('nrep',$nrep);
|
||||
$tpl->assign('rep',$rep);
|
||||
$meta.= $this->repmeta();
|
||||
$content = "";
|
||||
$core->make_page($content,TRUE,$config['fullpath'].'/modules/chat/templates/default/reports.tpl',$config['fullpath'].'/modules/chat/templates/default/chat_header.tpl',$config['fullpath'].'/modules/chat/templates/default/chat_footer.tpl');
|
||||
}else{
|
||||
//echo "SELECT r.*,u.username,u.fuid,c.name,r.fuid as `cpid`,s.username as `cname` FROM `ptc_reports` r LEFT JOIN `" . $config["prefix"] . "users` u ON u.`uid`=r.`rpid` LEFT JOIN `" . $config["prefix"] . "users` s ON s.`uid`=r.`uid` LEFT JOIN `" . $config["prefix"] . "rp_chars` c ON c.`id`=r.`chid` WHERE `seen`='0' AND r.`uid`='". intval($_GET['uid']) ."' ORDER BY `time` DESC";
|
||||
|
@ -467,32 +431,15 @@ class chat extends module{
|
|||
$tpl->assign('nrep',$nrep);
|
||||
$tpl->assign('rep',$rep);
|
||||
$meta.= $this->repmeta();
|
||||
$content = "";
|
||||
$core->make_page($content,TRUE,$config['fullpath'].'/modules/chat/templates/default/reports.tpl',$config['fullpath'].'/modules/chat/templates/default/chat_header.tpl',$config['fullpath'].'/modules/chat/templates/default/chat_footer.tpl');
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function xmeta(){
|
||||
$meta='<script type="text/javascript" src="'.$config["path"].'/js/jquery/jquery.min.js"></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
if ("WebSocket" in window){
|
||||
document.getElementById("sock").checked=true;
|
||||
document.getElementById("sock").disabled=false;
|
||||
}else{
|
||||
document.getElementById("sock").checked=false;
|
||||
document.getElementById("sock").disabled=true;
|
||||
}
|
||||
});
|
||||
</script>';
|
||||
return $meta;
|
||||
}
|
||||
function repmeta(){
|
||||
global $yacsid,$config;
|
||||
global $yacsid,$config, $meta;
|
||||
$meta.="<script src=\"//ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js?ver=1213232\"></script>
|
||||
<link type=\"text/css\" href=\"/themes/funchat/base/jquery-ui-1.9.2.custom.css?ver=1238732\" rel=\"Stylesheet\" />
|
||||
<script src=\"//ajax.googleapis.com/ajax/libs/jqueryui/1.9.2/jquery-ui.min.js?ver=123324732\"></script>
|
||||
|
@ -1108,7 +1055,8 @@ function inmeta2(){
|
|||
}
|
||||
|
||||
function meta_editlog(){
|
||||
$meta="<script type=\"text/javascript\" src=\"".$config["path"]."/js/jquery/jquery.min.js\"></script>
|
||||
global $config;
|
||||
$meta="<script type=\"text/javascript\" src=\"".$config["path"]."/js/jquery/jquery.min.js\"></script>
|
||||
<script type=\"text/javascript\" src=\"".$config["path"]."/js/jquery/jquery-ui.min.js\"></script>
|
||||
<link rel=\"stylesheet\" media=\"screen\" type=\"text/css\" href=\"".$config["path"]."/themes/austria/smoothness/jquery-ui-1.8.18.custom.css\" />
|
||||
<script type='text/javascript'>
|
||||
|
@ -1198,8 +1146,10 @@ function inmeta2(){
|
|||
</script>";
|
||||
return $meta;
|
||||
}
|
||||
|
||||
function footer_logs(){
|
||||
$footer.="<script type=\"text/javascript\" src=\"".$config["path"]."/js/jquery/jquery.min.js\"></script>
|
||||
global $config, $footer;
|
||||
$footer.="<script type=\"text/javascript\" src=\"".$config["path"]."/js/jquery/jquery.min.js\"></script>
|
||||
<script type=\"text/javascript\" src=\"".$config["path"]."/js/jquery/jquery-ui.min.js\"></script>
|
||||
<link rel=\"stylesheet\" media=\"screen\" type=\"text/css\" href=\"".$config["path"]."/themes/austria/smoothness/jquery-ui-1.8.18.custom.css\" />";
|
||||
return $footer;
|
||||
|
|
|
@ -45,12 +45,17 @@ class nickpage extends module{
|
|||
|
||||
$result=$db->query("SELECT * FROM `" . $config["prefix"] . "v_nickpage` WHERE `username`='".$db->escape($_GET['user'])."' LIMIT 1");
|
||||
$user=$db->fetch_array($result);
|
||||
|
||||
$themedir = $this->getTemplateDir();
|
||||
if(!isset($_GET['user']) || $db->num_rows($result)<=0 || $_GET['user']==''){
|
||||
$db->free_result($result);
|
||||
header("HTTP/1.1 404 Not Found");
|
||||
header("Status: 404 Not Found");
|
||||
$user['sitetitle']='Nickpage nicht gefunden';
|
||||
$this->tpl->assign('user',$user);
|
||||
$this->tpl->assign("themepath",'/themes/'.$config['theme']);
|
||||
$this->tpl->assign('domain',$config['domain']);
|
||||
$content=$this->tpl->fetch('nickpage_error.tpl');
|
||||
$core->make_page($content,TRUE,$themedir.'/nickpage.tpl',NULL,NULL);
|
||||
}else{
|
||||
$parser=new textparser();
|
||||
$loggedin = false;
|
||||
|
@ -136,9 +141,9 @@ class nickpage extends module{
|
|||
$data=get_user_room($user['username']);
|
||||
if($data){
|
||||
$user['room']=$data['room'];
|
||||
$user['roomlock']='<img src="'.$path.'/themes/funchat/images/unlocked.png" alt="Offen" />';
|
||||
$user['roomlock']='<img src="'.$config['fullpath'].'/themes/funchat/images/unlocked.png" alt="Offen" />';
|
||||
if($user['roomlocked']){
|
||||
$user['roomlock']='<img src="'.$path.'/themes/funchat/images/locked.png" alt="Abgeschlossen" />';
|
||||
$user['roomlock']='<img src="'.$config['fullpath'].'/themes/funchat/images/locked.png" alt="Abgeschlossen" />';
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -193,7 +198,6 @@ class nickpage extends module{
|
|||
$this->tpl->assign('pagination',$pagination);
|
||||
$content=$this->tpl->fetch('nickpage_content.tpl');
|
||||
}
|
||||
$themedir = $this->getTemplateDir();
|
||||
$core->make_page($content,TRUE,$themedir.'/nickpage.tpl',NULL,NULL);
|
||||
}
|
||||
|
||||
|
@ -207,7 +211,14 @@ class nickpage extends module{
|
|||
}
|
||||
return $themedir;
|
||||
}
|
||||
|
||||
function output_entry(){
|
||||
if(!empty($_POST['submit'])){
|
||||
die("Post entry");
|
||||
} else {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
function output_edit(){
|
||||
global $module,$tpl,$config,$db,$log,$core,$error, $session;
|
||||
If($_POST['submit']){
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
<title>FunCh.at - Nickpage von {$user.sitetitle}</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
</head>
|
||||
<body id="top-nickpage">
|
||||
<div class="wrapper col1">
|
||||
<div id="header">
|
||||
|
@ -21,13 +18,14 @@
|
|||
<br class="clear" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="wrapper col4">
|
||||
<div class="wrapper col4" style="border-bottom: none;">
|
||||
<div id="container">
|
||||
<div id="content" style="width:60vw;">
|
||||
<h3>Über {$user.username} <img src="images/{$user.gender}.png"></h3>
|
||||
<div style="float:left; width: 300px;">{$user.fid2}</div><img style="float:right;" src="/forum/{$user.np_picture}" alt="Ist das {$user.username}?">
|
||||
<br class="clear">
|
||||
<div id="comments">
|
||||
<hr>
|
||||
{if $gb!=""}
|
||||
{$pagination}
|
||||
<ul class="commentlist">
|
||||
|
@ -79,7 +77,9 @@
|
|||
{/if}
|
||||
<br class="clear">
|
||||
</div><!-- Row End-->
|
||||
<div class="wrapper col4">
|
||||
</div>
|
||||
</div>
|
||||
<div class="wrapper col5" style="color:#FEAC49;">
|
||||
<div id="container">
|
||||
<div id="content">
|
||||
{if $loggedin==true}
|
||||
|
@ -95,11 +95,6 @@
|
|||
<br class="clear">
|
||||
</div>
|
||||
|
||||
<div class="wrapper col6">
|
||||
<div id="footer">
|
||||
<br class="clear">
|
||||
</div>
|
||||
</div>
|
||||
<!-- ####################################################################################################### -->
|
||||
<div class="wrapper col7">
|
||||
<p>Für den Inhalt ist ausschließlich der User selbst verantwortlich. Diese Nickpage ist Teil der <a href="//www.funch.at" target="_blank">FunCh.at Community</a>.</p>
|
||||
|
|
38
modules/nickpage/templates/funchat/nickpage_error.tpl
Normal file
38
modules/nickpage/templates/funchat/nickpage_error.tpl
Normal file
|
@ -0,0 +1,38 @@
|
|||
<title>FunCh.at - Nickpage von {$user.sitetitle}</title>
|
||||
</head>
|
||||
<body id="top-nickpage">
|
||||
<div class="wrapper col1">
|
||||
<div id="header">
|
||||
<div class="fl_left">
|
||||
<img src="{$themepath}/images/logo_small.png">
|
||||
</div>
|
||||
<!--<div class="fl_right"><a href="#"><img src="" alt="" /></a></div>-->
|
||||
<br class="clear">
|
||||
</div>
|
||||
</div>
|
||||
<div class="wrapper col2">
|
||||
<div id="topbar">
|
||||
<div id="topnav">
|
||||
<h1 style="font-size:X-large">{$user.sitetitle}</h1>
|
||||
</div>
|
||||
<br class="clear" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="wrapper col4" style="border-bottom: none;">
|
||||
<div id="container">
|
||||
<div style="background-color:#FEAC49; color:#F4535A; width:50%; padding:10px; margin:auto;">
|
||||
Diesen User scheint es nicht zu geben.
|
||||
</diV>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- ####################################################################################################### -->
|
||||
<div class="wrapper col7">
|
||||
<p>Für den Inhalt ist ausschließlich der User selbst verantwortlich. Diese Nickpage ist Teil der <a href="//www.funch.at" target="_blank">FunCh.at Community</a>.</p>
|
||||
<div id="copyright">
|
||||
<p class="fl_left">© Copyright 2025 FunCh.at</p> <p class="fl_left">|</p> <p class="fl_left"><a href="/t/nutzungsbedingungen.html">Nutzungsbedingungen</a></p> <p class="fl_left">|</p> <p class="fl_left"><a href="/t/datenschutzerklaerung.html">Datenschutzerklärung</a></p>
|
||||
<br class="clear">
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue