Seite 1 von 1

Username und Count PJIcq im Portal und Intro 1.50a einbinden

Verfasst: 28.12.2004 00:15
von ben96
Hallo zusammen,

Hat von euch schon jemand in das Portal als Rechte Box die Statistiken vom PJIcq Mod (Anzahl + Namen der Chatuser) eingebaut oder kann mir sagen wie ich das machen muss.

gruß

benny

Verfasst: 05.01.2005 14:45
von ben96
Ich denke bei mir läuft das jetzt.

zusehen unter :

http://www.arche-noah-westerwald.de/public/forum/

Hier die Änderungen:


Portal_body.tbl

Code: Alles auswählen

<!-- ##### pjircchat START ##### -->
<!-- BEGIN switch_pjircchat_active -->
<table width="100%" border="0" cellpadding="1" cellspacing="1" style="border-collapse: collapse" class="forumline">
<tr>
<td class="catHead" colspan="2" height="25"><span class="cattitle">{pjircchat1}:</span></td>
</tr>
<tr>
<td colspan="2" height="1" class="row3"><img src="images/spacer.gif" width="1" height="1" alt="."></td>
</tr>
<tr>
<td align="center" nowrap="nowrap" class="row1"><span class="gensmall">
{pjircchat2}&nbsp;{Count}<br>
{pjircchat_users}
<br>
<a href="javascript:void(0);" onClick="window.open('{pjircchat_web}','{pjircchat_web}','scrollbars=no,width=680,height=500')">{pjircchat_click}</a>
<br />
</span></td></tr></table><br>
<!-- END switch_pjircchat_active -->
<!-- ##### pjircchat END ##### -->
lang_introportal.php

Code: Alles auswählen

$lang['pjircchat1'] = 'Wer ist im Chatraum';
$lang['pjircchat2'] = 'Es sind derzeit im Chat:';
$lang['pjircchat3'] = 'Person(en)';
$lang['pjircchat_click'] = 'Hier klicken um zu chatten';

portal.php

Code: Alles auswählen

// SWITCH PJIrcchat START
if( $introportalmod_config['pjircchat_active'] == "1" )
{
// PHP CODE START
// 
// 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) . ",<br>"; 
       $count++; 
    } 
    $thingydingy = 1; 
} 
else { 
    if ( $listfile = @fopen("http://blitzed.org/scripts/chanuserlist/?channel=%23Arche-Noah&pass=sonnen12", "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['Keine Personen Online']; 
    $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; 
}
if ($count==0) {
	$count="Keiner";
	}
// 
// END PJIRC Channel Userlist & Count Integrations 
// 
// PHP CODE END
$template->assign_block_vars('switch_pjircchat_active', array(
$template->assign_vars(array(
// TEMPLATE CODE VARS START
'pjircchat1' => $lang['pjircchat1'],
'pjircchat2' => $lang['pjircchat2'],
'pjircchat3' => $lang['pjircchat3'],
'pjircchat_web' => $lang['pjircchat_web'],
'pjircchat_click' => $lang['pjircchat_click'],
'pjircchat_users' => $users,
'Listfile' => $listfile,
'Count' => $count

// TEMPLATE CODE VARS END
))
));
}
// SWITCH pjircchat END