/edit;siehe nächster Beitrag

http://pjirc4phpbb.earlsoft.co.uk/Ramona_FP hat geschrieben:Habe nun diesen MOD eingebaut...leider bekomme ich im Forum immer
Chat status temporarily unavailable
Code: Alles auswählen
//
// Begin PJIRC Channel Userlist & Count Integrations
//
$cachefile = 'cache/blitzedlist.html';
$cachetime = 1 * 60;
// Use cache if younger than $cachetime
if ( file_exists($cachefile) && time() - $cachetime < filemtime($cachefile) ) {
$listfile = @fopen($phpbb_root_path.$cachefile, "r");
$users = "";
$count = 0;
while ($nickname = fgets($listfile)) {
$users .= trim($nickname) . ", ";
$count++;
}
$thingydingy = 1;
}
else {
if ( $listfile = @fopen("http://scripts.blitzed.org/chanuserlist?channel=%23fruehchenchat&pass=XXXXXXXXXX", "r") ) {
$users = "";
$fullfile = "";
$count = 0;
while ($nickname = fgets($listfile)) {
$users .= trim($nickname) . ", ";
$fullfile .= $nickname;
$count++;
}
// Cache the output to file
$fp = fopen($phpbb_root_path.$cachefile, 'w');
fwrite($fp, $fullfile);
fclose($fp);
$thingydingy = 1;
} else {
$myuserlist = $lang['IRC_memberlist_offline'];
$nickname = "";
$listfile = "";
$count = 0;
$users = "";
$thingydingy = 0;
}
}
if ( $thingydingy == 1 ) {
// Remove , from end
$users = ereg_replace(', $', "", $users);
$myuserlist = $lang['IRC_memberlist']." <b>$count</b><br />\n$users";
$myuserlist;
}
Code: Alles auswählen
@chmod($cachefile, 0777);
It is required that you register for this feature at Blitzed.org before you can use it.
# Go here to register it: http://www.blitzed.org/scripts/chanuser ... ster.phtml
# Do not use the "#" symbol before your channel name when editing.
Code: Alles auswählen
// Do the serverprotocol-domain-path-port-thingy by phpbb.com group
$script_name = preg_replace('/^\/?(.*?)\/?$/', "\\1", trim($board_config['script_path']));
$server_name = trim($board_config['server_name']);
$server_protocol = ( $board_config['cookie_secure'] ) ? 'https://' : 'http://';
$server_port = ( $board_config['server_port'] <> 80 ) ? ':' . trim($board_config['server_port']) . '/' : '/';