Halli hallo,
ich stelle mir gerade die Frage, wie man es hin bekommt, dass eine Meldung(am besten blinkend) im Tab kommt, wenn man eine Privatnachricht erhalten hat.
Hat Jemand ne Idee?
Liebe Grüße
betroffene Homepage: externer Link
Hier kann eine Notiz zum Merk-Eintrag hinzugefügt werden (optional)
Geschlossen |
if ( $allgAr['Fpmf'] == 1 ) { $erg = db_query("SELECT COUNT(id) FROM `prefix_pm` WHERE gelesen = 0 AND status < 1 AND eid = ".$_SESSION['authid']); $check_pm = db_result($erg,0); $nachrichten_link = '<a class="loginilch" href="index.php?forum-privmsg">'.$lang['messages'].'</a> ('.$check_pm.')'; } else { $nachrichten_link = ''; }
$q = " SELECT DISTINCT a.fid as fid, a.name as titel, 'foru' as typ, a.id as id, `time`, c.erst as autor FROM prefix_posts c LEFT JOIN prefix_topics a ON a.id = c.tid LEFT JOIN prefix_forums b ON b.id = a.fid LEFT JOIN prefix_groupusers vg ON vg.uid = ".$_SESSION['authid']." AND vg.gid = b.view LEFT JOIN prefix_groupusers rg ON rg.uid = ".$_SESSION['authid']." AND rg.gid = b.reply LEFT JOIN prefix_groupusers sg ON sg.uid = ".$_SESSION['authid']." AND sg.gid = b.start WHERE (((b.view >= ".$_SESSION['authright']." AND b.view <= 0) OR (b.reply >= ".$_SESSION['authright']." AND b.reply <= 0) OR (b.start >= ".$_SESSION['authright']." AND b.start <= 0)) OR (vg.fid IS NOT NULL OR rg.fid IS NOT NULL OR sg.fid IS NOT NULL OR ".$_SESSION['authright']." = -9)) AND (".$str_forum." 1 = 1) AND (".$str_forum_a." 1 = 1) AND (time >= ". $x .") GROUP BY a.id ORDER BY time DESC"; $anzNew = db_num_rows(db_query($q)); if ($check_pm >= 1) { $xsgs = 'PM'; if ($check_pm == 1) { $xsgs = 'Nachricht'; } elseif ($check_pm >= 2) { $xsgs = 'Nachrichten'; } echo '<script language="javascript" type="text/javascript"> <!-- function titlebar(val) { var msg = "'.$check_pm.' '.$xsgs.'"; var speed = 1500; var pos = val; var msg1 = "Du hast"; var msg2 = ""+msg+""; if(pos == 0){ masg = msg1; pos = 1; } else if(pos == 1){ masg = msg2; pos = 0; } document.title = masg; timer = window.setTimeout("titlebar("+pos+")",speed); } titlebar(0); // --> </script>'; } $tpl->set ( 'anzNEW', $anzNew );
<?php # Copyright by Manuel Staechele # Support www.ilch.de defined ('main') or die ( 'no direct access' ); $tpl = new tpl ( 'user/boxen_login.htm' ); if ( loggedin() ) { if ( user_has_admin_right($menu,false) ) { $tpl->set ( 'ADMIN', '<table width="100%" border="0" cellpadding="1"><td><a href="admin.php?admin"><span style="font-size:9; margin-left:10px;"><font color="#6f6f6f">'.$lang['adminarea'].'</font></span></a></td></table>' ); } else { $tpl->set ( 'ADMIN', '' ); } if ( $allgAr['Fpmf'] == 1 ) { $erg = db_query("SELECT COUNT(id) FROM `prefix_pm` WHERE gelesen = 0 AND status < 1 AND eid = ".$_SESSION['authid']); $check_pm = db_result($erg,0); $nachrichten_link = '<a class="box" href="index.php?forum-privmsg"><span style="font-size:9;"><font color="#6f6f6f">Neue '.$lang['messages'].'</font></span></a> ('.$check_pm.')<img alt="PM" src="include/images/icons/login/pm.png" style="border: 0px solid ; margin: -1px; margin-left:5px;"><br>'; } else { $nachrichten_link = ''; } $anzNew = $ilchBB->countNewTopics(); if ($check_pm >= 1) { $xsgs = 'PM'; if ($check_pm == 1) { $xsgs = 'Nachricht'; } elseif ($check_pm >= 2) { $xsgs = 'Nachrichten'; } echo '<script language="javascript" type="text/javascript"> <!-- function titlebar(val) { var msg = "'.$check_pm.' '.$xsgs.'"; var speed = 1500; var pos = val; var msg1 = "Du hast"; var msg2 = ""+msg+""; if(pos == 0){ masg = msg1; pos = 1; } else if(pos == 1){ masg = msg2; pos = 0; } document.title = masg; timer = window.setTimeout("titlebar("+pos+")",speed); } titlebar(0); // --> </script>'; } $tpl->set ( 'anzNEW', $anzNew ); $erg=db_query('SELECT * FROM prefix_kasse_beitraege WHERE uid='.$_SESSION['authid']); if(@db_num_rows($erg)==1){ $row=db_fetch_assoc($erg); $payedto= mktime(0, 0, 0, date ("m",$row['date'])+$row['zyklus'] , date ("d",$row['date']), date("Y",$row['date'])); $prewarn= mktime(0, 0, 0, date ("m") , date ("d")+20, date("Y")); $warn= mktime(0, 0, 0, date ("m") , date ("d")+7, date("Y")); $alert= mktime(0, 0, 0, date ("m") , date ("d")+2, date("Y")); $payedto2=date("d.m.Y",$payedto); if($payedto<time()){ $beitrag='<center><em style="font-size:0.8em;">Admin war zu zahlen am '.$payedto2.'</em></center></div>'; } elseif($payedto>time() AND $payedto<=$alert){ $beitrag='<center><em style="font-size:0.8em;">Admin zu zahlen am '.$payedto2.'</em></center></div>'; } elseif($payedto>time() AND $payedto<=$warn){ $beitrag='<center><em style="font-size:0.8em;">Admin zu zahlen am '.$payedto2.'</em></center></div>'; } elseif($payedto>time() AND $payedto<=$prewarn){ $beitrag='<center><em style="font-size:0.8em;">Admin bezahlt bis '.$payedto2.'</em></center>'; } elseif($payedto>time()){ $beitrag='<center><em style="font-size:0.8em;">Admin bezahlt bis '.$payedto2.'</em></center>'; } } else{ $beitrag=''; } $erg = db_query('SELECT id, name, avatar FROM prefix_user WHERE name = "'.$_SESSION['authname'].'"'); $row = db_fetch_object($erg); if ( file_exists($row->avatar)) { $avatar = '<a href="index.php?user-8" ><img src="'.$row->avatar.'" width="30" height="30" border="0" title="Avatar">'; }else{ $avatar = '<a href="index.php?user-8" ><img src="include/images/avatars/keinavatar.png" width="30" height="30" border="0" title="Kein Avatar">'; } $erg = db_query('SELECT id, name, userpict FROM prefix_user WHERE name = "'.$_SESSION['authname'].'"'); $row = db_fetch_object($erg); if ( file_exists($row->userpict)) { $userpict = '<a href="index.php?user-8"><img src="'.$row->userpict.'" width="30" height="30" border="0" title="Userbild">'; }else{ $userpict = '<a href="index.php?user-8" ><img src="include/images/avatars/keinavatar.png" width="30" height="30" border="0" title="Kein USerbild">'; } # USERGB START $usergb = db_query("SELECT COUNT(id) FROM `prefix_usergb` WHERE uid = ".$_SESSION['authid'].""); $eintrage = db_result($usergb,0); $usergb2 = '<a class="box" href="index.php?user-usergb-view-'.$_SESSION['authid'].'">Mein Gästebuch</a> ('.$eintrage.')<br>'; $tpl->set ( 'USERGB' , $usergb2 ); # USERGB ENDE $tpl->set ( 'SID' , session_id() ); $tpl->set ( 'NACHRICHTEN' , $nachrichten_link ); $tpl->set ( 'NAME', $_SESSION['authname'] ); $tpl->set ( 'ID', $_SESSION['authid'] ); $tpl->set ( 'BEITRAG' , $beitrag ); $tpl->set ( 'POPUP', check_for_pm_popup() ); $tpl->set ( 'AVATAR' , $avatar ); $tpl->set ( 'USERBILD' , $userpict ); $tpl->out (0); } else { if (empty($_POST['login_name'])) { $_POST['login_name'] = 'Nickname'; } if (empty($_POST['login_pw'])) { $_POST['login_pw'] = 'ääääääää'; } $regist = ''; if ( $allgAr['forum_regist'] == 1 ) { $regist = '<table width="80px" border="0" cellspacing="1" class="none" cellpadding="1" align="center"><tr><td class="Chead"><center><a href="index.php?user-regist"><strong><font size="1" color="#b68400">[</font> <font size="1">Registrieren</font> <font size="1" color="#b68400">]</font></strong></td></tr></table></a></div></center>'; } $tpl->set_ar_out ( array ( 'regist' => $regist, 'wdlink' => '?'.$allgAr['smodul'], 'PASS' => $_POST['login_pw'], 'NAME' => $_POST['login_name'] ) , 1 ); } unset($tpl); ?>
<?php // Copyright by Manuel Staechele // Support www.ilch.de defined ('main') or die ('no direct access'); $tpl = new tpl ('user/boxen_login.htm'); if (loggedin()) { if (user_has_admin_right($menu, false)) { $tpl->set ('ADMIN', '<a class="box" href="admin.php?admin">' . $lang['adminarea'] . '</a>'); } else { $tpl->set ('ADMIN', ''); } $erg = db_query("SELECT COUNT(id) FROM `prefix_pm` WHERE gelesen = 0 AND status < 1 AND eid = " . $_SESSION['authid']); $check_pm = db_result($erg, 0); $tpl->set ('SID' , session_id()); // $tpl->set ( 'NACHRICHTEN' , $nachrichten_link ); $tpl->set ('NAME', $_SESSION['authname']); $tpl->set ('UID', $_SESSION['authid']); $tpl->out (0); if ($check_pm > 0) { echo '<script type="text/javascript"> $(document).ready(hover);</script>'; check_for_pm_popup(true); } } else { if (empty($_POST['login_name'])) { $_POST['login_name'] = 'Nickname'; } if (empty($_POST['login_pw'])) { $_POST['login_pw'] = 'ääääääää'; } $regist = ''; if ($allgAr['forum_regist'] == 1) { $regist = ' <a href="index.php?user-regist">Regist</a>'; } $tpl->set_ar_out (array ('regist' => $regist, 'wdlink' => '?' . $allgAr['smodul'], 'PASS' => $_POST['login_pw'], 'NAME' => $_POST['login_name']) , 1); } unset($tpl); ?>
echo '<script type="text/javascript"> $(document).ready(hover); window.setInterval(function() { document.title = document.title == "Seitentitel" ? "Neue Nachrichten" : "Seitentitel"; }, 1000); </script>';
echo '<script type="text/javascript"> $(document).ready(hover); window.setInterval(function() { document.title = document.title == "{titel}" ? "Neue Nachrichten" : "{titel}"; }, 1000); </script>';
<script> var refreshId = setInterval(function() { $("#loginbox").load('include/boxes/user_login.php&randval='+ Math.random()); }, 20000); </script>evtl noch die loginbox-pfad-angabe und die div-id anpassen
echo '<script type="text/javascript"> $(document).ready(hover); var sitetitle = document.title; window.setInterval(function() { document.title = document.title == sitetitle ? "Neue Nachrichten" : sitetitle; }, 1000); </script>';
<div id="loginbox">{_boxes_login}</div>
<script> var refreshId = setInterval(function() { $("#loginbox").load('include/boxes/user_login.php&randval='+ Math.random()); }, 20000); </script>
Geschlossen | ||
Zurück zu Allgemein |