Seite 1 von 1

PJIRC-Chat --- Box im Portal

Verfasst: 28.01.2005 18:10
von Dominik Müller
Hallo zusammen,

in der Anleitung zum Einbau steht folgendes:

Code: Alles auswählen

##############################################################
## MOD Title: ezPortal ChatStats MOD (PJIRC Chat MOD w/Blitzed.org ChatStats)
## MOD Author: Midnightz < eyze@netzero.net > (Tia Kremetis) http://pjirc4phpbb.earlsoft.co.uk/
## MOD Description: Add PJIRC Chat MOD chat statistics in your ezPortal Who is Online block.
## MOD Version: 1.0.0
## 
## Installation Level: (Easy) 
## Installation Time: 5 minutes
## 
## Files To Edit: 	   2
##
##		   - portal.php
##		   - portal_body.tpl
##		    
## Included Files: 	   0
##		   	  
##
############################################################## 
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the 
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code 
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered 
## in our MOD-Database, located at: http://www.phpbb.com/mods/ 
############################################################## 
## Author Notes:
##
##		Installation Requirements: 
##			1. PJIRC Chat MOD by Midnightz
##			2. ChatStats (Blitzed.org scripts incl. w/PJIRC Chat MOD)
##			3. Registered channel and Channel Userlist script at Blitzed.org
##			4. ezPortal by Smartor
##
##		This MOD only adds "Who's chatting" stats to your ezPortal! 
##		The Status Indicator script is not included because it should already be in your 
##		overall_header.tpl if you fully installed these add-ons to the PJIRC Chat MOD.
## 
############################################################## 
## MOD History:
##
##   2004-08-24	 - Version 1.0.0
##		 - First release
##
##
############################################################## 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
############################################################## 

#
#-----[ OPEN ]------------------------------------------ 
#
portal.php
#
#-----[ FIND ]------------------------------------------
#
//
// Start output of page
//
#
#-----[ BEFORE, ADD ]-------------------------------- 
#
# Notes: You need to edit the "CHANNEL" and "PASSWORD" to retrieve those stats from Blitzed.org.
#	(both must be in lowercase)
#           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/chanuserlist/register.phtml
#           Do not use the "#" symbol before your channel name when editing.
#           You must CHMOD 777 your cache folder in order for this script to work!
#
# Example: if ( $listfile = @fopen("http://blitzed.org/scripts/chanuserlist/?channel=%23midnightz&pass=something", "r") ) {
#

// 
// 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://blitzed.org/scripts/chanuserlist/?channel=%23CHANNEL&pass=PASSWORD", "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; 
}

#-----[ FIND ]---------------------------------------------- 
#
'L_STATISTICS' => $lang['Statistics'],
#
#-----[ AFTER, ADD ]-------------------------------------- 
#

// PJIRC MOD w/Channel Userlist & Count Integrations
	'MYUSERLIST' => $myuserlist, $nickname, $listfile, $count, $users,
	
#
#-----[ OPEN ]----------------------------------------------
#
root/templates/subSilver/portal_body.tpl
#
#-----[ FIND ]-----------------------------------------------
#
<td class="row1" align="left"><span class="gensmall">{TOTAL_USERS_ONLINE}<br /><br />{LOGGED_IN_USER_LIST}<br /><br /><center>[ <a href="{U_VIEWONLINE}">{L_VIEW_COMPLETE_LIST}</a> ]</center><br />
#
#-----[ IN-LINE AFTER, ADD ]-----
#

{MYUSERLIST}<br /><br />

#
#
#
#-----[ SAVE/CLOSE ALL FILES ]-------------------------- 
# 
# EoM
Nur kann ich damit leider überhaupt nichts anfangen :cry:

B I T T E - - H E L F E N !

Grüße,
Dominik

Verfasst: 29.01.2005 12:44
von ATARI
was gibts daran nicht zu kapieren?
steht alles schön da was gemacht werden muss!

Verfasst: 29.01.2005 13:46
von Dominik Müller
Was heißt das hier:

Code: Alles auswählen

# Notes: You need to edit the "CHANNEL" and "PASSWORD" to retrieve those stats from Blitzed.org. 
#   (both must be in lowercase) 
#           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/chanuserlist/register.phtml 
#           Do not use the "#" symbol before your channel name when editing. 
#           You must CHMOD 777 your cache folder in order for this script to work! 
# 
# Example: if ( $listfile = @fopen("http://blitzed.org/scripts/chanuserlist/?channel=%23midnightz&pass=something", "r") ) { 
# 

Verfasst: 08.02.2005 16:30
von Dominik Müller
Kann mir denn niemand genau sagen, was ich machen muss, damit einfach eine Online-User-Anzeige erscheint?!?!

Verfasst: 09.02.2005 21:23
von Dominik Müller
So - hab mich da jetzt nochmal ran gesetzt und den Mod eingebaut....
ABER wo bekomm ich das hier her?
Channel Userlist script
In der Anleitung steht, dass man das dafür braucht und es auf Blitzed.org findet - aber wo dort?

Grüße,
Dominik