ChatSpot Status auf externer Seite

Du hast Probleme beim Einbau oder bei der Benutzung eines Mods? In diesem Forum bist du richtig.
Forumsregeln
phpBB 2.0 hat das Ende seiner Lebenszeit überschritten
phpBB 2.0 wird nicht mehr aktiv unterstützt. Insbesondere werden - auch bei Sicherheitslücken - keine Patches mehr bereitgestellt. Der Einsatz von phpBB 2.0 erfolgt daher auf eigene Gefahr. Wir empfehlen einen Umstieg auf phpBB 3.0, welches aktiv weiterentwickelt wird und für welches regelmäßig Updates zur Verfügung gestellt werden.
Antworten
InTimo
Mitglied
Beiträge: 284
Registriert: 16.09.2005 15:40
Wohnort: Wallenhorst
Kontaktdaten:

ChatSpot Status auf externer Seite

Beitrag von InTimo »

Hallo ..

wir nutzen mit Erstaunen den ChatSpot bei uns im Board ;)

Würde gerne den ChatStatus auf eine externe Seite mit einbinden .. so wie im Linken Menü bei www.homaer.de/startseite/ .. (der bisherige Status ist für den alten Chat)

Müsste doch irgendwie gehen, da ja auch untem im WhoIsOnline der Status angezeigt wird, oder


Timo
InTimo
Mitglied
Beiträge: 284
Registriert: 16.09.2005 15:40
Wohnort: Wallenhorst
Kontaktdaten:

Beitrag von InTimo »

Mahlzeit ..
Schade .. niemand eine Idee ??
InTimo
Mitglied
Beiträge: 284
Registriert: 16.09.2005 15:40
Wohnort: Wallenhorst
Kontaktdaten:

Beitrag von InTimo »

Habs selber hinbekommen .. die chatspot_front kopieren und unter status.php abspeichern ..

Diesen Code nehmen ,,

Code: Alles auswählen

<?php

/***************************************************************************
 *							chatspot_front.php
 *							-------------------
 *      last updated      : July 3rd, 2005
 *      email             : kaniaz =at= ggmail.com (remove extra g),
 *							techboy =at= ffsmail.net (remove extra f).
 *
 ***************************************************************************/

/***************************************************************************
 *
 *   This program is free software; you can redistribute it and/or modify
 *   it under the terms of the GNU General Public License as published by
 *   the Free Software Foundation; either version 2 of the License, or
 *   (at your option) any later version.
 *
 ***************************************************************************/

/* **[DESCRIPTION]*********************************************************************************************************
		- called by the forum's index.php file
		- simply polls all the current chatters from phpBBChatSpot's session list; invisible and dead sessions will not be
		  returned
		- deletion of ghosts is now performed by phpBBChatSpot upon joining rooms
	************************************************************************************************************************ */

define('IN_PHPBB', true);
$phpbb_root_path = './';
$phpEx = "php";
error_reporting(E_ERROR | E_WARNING | E_PARSE);
set_magic_quotes_runtime(0);

include_once( $phpbb_root_path . 'config.' . $phpEx );
include_once( $phpbb_root_path . 'chatspot/chatspot_config.' . $phpEx );

$table_chatspot_sessions_name = $table_prefix . 'chatspot_sessions';

$expire_time = time() - $chatspot_config[ 'hide_in_list_time' ];

$sql = "SELECT DISTINCT user_id, username FROM " . $table_chatspot_sessions_name . "
	WHERE last_active >= '" . $expire_time . "' AND
			mode = " . NORMAL . "
	ORDER BY username ASC";

if( $result = $db->sql_query( $sql ) )
{
	$num_users_in_chat = $db->sql_numrows( $result ); // return this

    $users_in_chat_clean = '';
    $users_in_chat = '';

	while( $row = $db->sql_fetchrow( $result ) )
	{
//		if( strstr( $online_userlist, $row[ 'username' ] ) ) // invisible users will not be shown, nor will dead sessions
//		{

//			$users_in_chat .= $row[ 'username' ] . ", ";
			$chatper = $row['user_id'];
			$chat_arr = get_userdata($chatper);
			if($chat_arr['user_level'] == ADMIN){
				$chatclass = "style=\"color:#FFA34F\"";
			} elseif($chat_arr['user_level'] == MOD){
				$chatclass = "style=\"color:#006600\"";
			}else{
				$chatclass = '';
			}
			$users_in_chat_clean .= $row['username'] . ", ";

			$chatprolink = append_sid('/testing/phpBB2/profile.php?mode=viewprofile&u=' . $row['user_id']);
			$chatusername = "<A HREF=\"$chatprolink\" $chatclass>".$row['username']."</A>";
			$users_in_chat .= $chatusername . ", ";
//		}
//		else // but if a dead session is passed, make sure the user count gets one taken off.
//		{
//			$num_users_in_chat--;
//		}
	}

	$users_in_chat = rtrim( $users_in_chat, ", " ); // return this
	$users_in_chat_clean = rtrim( $users_in_chat_clean, ", " );

	$db->sql_freeresult( $result );
echo' '.$num_users_in_chat.' User im Chat';
}
?>
Und dann per include in test2.php gepackt

Anschließend in unsere www.homaer.com/board/status1.php .. läuft super
Antworten

Zurück zu „phpBB 2.0: Mod Support“