Hallo zusammen,
ich suche für den Blueimp Ajax Chat eine "User-Online Anzeige" für eine einfache PHP Webseite.
Ich habe was für Joomla gefunden;:
Alles anzeigen
Ich brauche das aber nur für eine einfache PHP Seite, kann mir da jemand helfen?
ich suche für den Blueimp Ajax Chat eine "User-Online Anzeige" für eine einfache PHP Webseite.
Ich habe was für Joomla gefunden;:
Quellcode
- <?php
- $boldSetting = $params->get('boldy', 0);
- $chaturl = $params->get('urlchat');
- $fontca = $params->get('fontcoloradmin');
- $fontcu = $params->get('fontcoloruser');
- $message = $params->get('message');
- if ($boldy == 1) {
- $bb = "<b>";
- $be = "</b>";
- } else {
- $bb = "";
- $be = "";
- }
- $db =& JFactory::getDBO();
- $query = "SELECT * FROM ajax_chat_online";
- $db->setQuery($query);
- $rows = $db->loadObjectList();
- $i = 0;
- $lists = array();
- echo JText::_( 'Utenti in Chat:');
- foreach ( $rows as $row )
- {
- $lists[$i]->userName = $row->userName;
- if ($row->userRole =='3'){
- echo JText::_( '<font color="'.$fontca.'">' . $bb .$lists[$i]->userName . $be . '</font> ');
- }
- else{
- echo JText::_( '<font color="'.$fontcu.'">' . $bb .$lists[$i]->userName . $be . '</font> ');
- }
- $i++;
- }
- $content ="<p align=\"center\"><a href=".$chaturl." onclick=\"window.open(this.href,'Chat','resizable=yes,location=no,menubar=yes,scrollbars=yes,status=yes,toolbar=yes,fullscreen=no,dependent=no,width=700,height=500,left=30,top=40,status'); return false\"><img src=\"../modules/mod_blueimpajaxchat_useronline/images/chat.png\" align=\"middle\"></a><a href=".$chaturl." onclick=\"window.open(this.href,'Chat','resizable=yes,location=no,menubar=yes,scrollbars=yes,status=yes,toolbar=yes,fullscreen=no,dependent=no,width=700,height=500,left=30,top=40,status'); return false\">".$message."</a></p>";
- return $lists;
- ?>
Ich brauche das aber nur für eine einfache PHP Seite, kann mir da jemand helfen?