Back to vBulletin 3.0 Add-Ons

Fully integrated IRC Stats
Mod Version: 1.00, by jluerken

This modification is in the archives.
vB Version: 3.0.3 Rating: (0 vote - 0 average) Installs: 9
Released: 29 Aug 2004 Last Update: Never Downloads: 0
Not Supported  

Hi,

this is my second hack and I hope you like it.

Background:
I am running a quakenet IRC Channel and I've seen some hacks here to check who is actually on the chan. This is nice but not enough.
I wanted to have stats for my board which are
1st for free and
2nd fully integrated

And here we go:

INSTALL:
Time to install: depending on what you're using for a method 10-120 minutes
Difficulty: middle
Database changes: none
File changes: none
Templates: 1 added
Screenshots: attached

History:
1.0 Integrated the stats
1.1 Added show stats on who is online page
1.2 Added multilanguage support
1.3 Added info on different ways to get the stats

First of all you need to download the free stats generator http://pisg.sourceforge.net

If you're running eggdrop or whatever to get a logfile from a chan configure pisg to create stats files it. See the pisg documentation for that.

I have no eggdrop or something installed but I have a pc running at home 24/7 so I used this. I installed http://www.mirc.com, connected to the chan and enable log file creation in http://www.mirc.com.

Then I used pisg to analyze the logfile and write two different files.
One in german and one in english. I use the ftp command and the sheduled task option of windows to transfer those two files every night to my webserver.

IMPORTANT:
Use as output file the following: ircstats.pisg (for english)
and ircstats_languadeid (e.g. ircstats_de) for other languages you want to use.

Add the following Template to your style:

IRCStats with the following content (case sesitive!)

HTML Code:
$stylevar[htmldoctype]
<html dir="$stylevar[textdirection]" lang="$stylevar[languagecode]">
<head>
<title>$vboptions[bbtitle]</title>
$headinclude
</head>
<body>
$header
$navbar
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
<td class="alt1">
<table cellSpacing="0" cellPadding="0" width="100%" border="0" id="table1">
              <tr>
                <td class="alt2" align="center"><b><font size="3" face="Verdana">IRC Stats</font></b>
</td></tr>
<tr>
<td>
<if condition="$bbuserinfo[languageid]== '3' OR $bbuserinfo[languageid]== '2'">$ircstatsdata_de
<else />$ircstatsdata
</if> 
</td>
</tr>
</table>
</td>
</tr>
</table>
$footer
</body>
</html>
Now create a file called ircstats.php in your forumhome with the following content:

PHP Code:
<?php

// ####################### SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// #################### DEFINE IMPORTANT CONSTANTS #######################
define('NO_REGISTER_GLOBALS'1);
define('THIS_SCRIPT''custom_ircstats.php'); // change this depending on your filename

// ################### PRE-CACHE TEMPLATES AND DATA ######################
// get special phrase groups
$phrasegroups = array(

);

// get special data templates from the datastore
$specialtemplates = array(

);

// pre-cache templates used by all actions
$globaltemplates = array(
    
'IRCStats',
);

// pre-cache templates used by specific actions
$actiontemplates = array(

);

// ######################### REQUIRE BACK-END ############################
require_once('./global.php');

// #######################################################################
// ######################## START MAIN SCRIPT ############################
// #######################################################################

$navbits = array();
$navbits[$parent] = 'IRC Stats';

$navbits construct_navbits($navbits);

// get irc data
$ircstatsdata implode(''file('http://YOURURLTOTHEFORUM/ircstats.pisg'));
//$ircstatsdata_de = implode('', file('http://http://YOURURLTOTHEFORUM/ircstats_de.pisg'));

eval('$navbar = "' fetch_template('navbar') . '";');
eval(
'print_output("' fetch_template('IRCStats') . '");');

?>
Change http://YOURURLTOTHEFORUM to match your forum root url.
As an example I added a second language above (ircstats_de.pisg). Uncomment the line if you need a second language and see the pisg documentation which languages are available.

In /includes/functions_online.php find:
PHP Code:
case 'index':
                        
$userinfo['action'] = $vbphrase['viewing_index'];
                        
$userinfo['where'] = "<a href=\"$vboptions[forumhome].php?$session[sessionurl]\">$vboptions[bbtitle]</a>";
                        break; 
and add the following lines under it:
PHP Code:
case 'ircstats':
                        
$userinfo['action'] = "IRC Stats";
                        
$userinfo['where'] = "<a href=\"irc_stats.php\">IRC Stats</a>";
                        break; 

Find:
PHP Code:
case "$vboptions[forumhome].php":
  
$userinfo['activity'] = 'index';
  break; 
and add the following code under it

PHP Code:
case "ircstats.php":
  
$userinfo['activity'] = 'ircstats';
  break; 
Load the images in /pisg/gfx to /images/misc and change all files in /pisg/modules using search and replace.

Search for the image names for example red-h.png and change it everywhere to images/misc/red-h.png. Do so for all images.

The last thing you have to do is to change the default.css of pisg. Kill all tags that are use by vb and change the others like you want. I've done this also with a simple search and replace method).

Place a link to ircstats.php whereever you want. In the navbar or the footer template for example.

Thats it!

Download

No files for download.

Screenshots

     

Similar Mods

Statistics Modifications Fully integrated IRC Stats: Updated with Pisg, Cron guide. vBulletin 3.6 Template Modifications

vblts.ru supports vBulletin®, 2022-2024