Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Fully integrated IRC Stats Details »»
Fully integrated IRC Stats
Version: 1.00, by jluerken jluerken is offline
Developer Last Online: Dec 2018 Show Printable Version Email this Page

Version: 3.0.3 Rating:
Released: 08-28-2004 Last Update: Never Installs: 9
 
No support by the author.

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 PISG

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 mirc, connected to the chan and enable log file creation in mirc.

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!

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 08-29-2004, 11:43 AM
jluerken's Avatar
jluerken jluerken is offline
 
Join Date: Aug 2003
Location: Germany
Posts: 1,016
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I take this thread to paste updates on this later on

LiveDemo: http://www.clanforums.com/forum/cfn_ircstats.php

If you like this hack then please click on INSTALL

Update: Added new attachment of FORUMHOME Template integration
Reply With Quote
  #3  
Old 08-29-2004, 01:31 PM
Zelda-King's Avatar
Zelda-King Zelda-King is offline
 
Join Date: Nov 2002
Location: London, England
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How would we implement that with an embedded IRC chat such as jpilot?
Reply With Quote
  #4  
Old 08-29-2004, 01:44 PM
jluerken's Avatar
jluerken jluerken is offline
 
Join Date: Aug 2003
Location: Germany
Posts: 1,016
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Zelda-King
How would we implement that with an embedded IRC chat such as jpilot?
Does not matter which way you use to connect to IRC. Important is that you get a logfile. If jpilot has a way to create logfiles and pisg can built stats out of this format then you can use the hack.
Reply With Quote
  #5  
Old 08-29-2004, 01:48 PM
Zelda-King's Avatar
Zelda-King Zelda-King is offline
 
Join Date: Nov 2002
Location: London, England
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm sure it can. My point is some of us might not know where to get the log files or what to do with them in the case of embedded chats.

But this concept is very good and might actually liven up dead chats, though I'm guessing in the case of embedded chats, a cron job via the admin cp might be a good call?
Reply With Quote
  #6  
Old 08-29-2004, 01:54 PM
jluerken's Avatar
jluerken jluerken is offline
 
Join Date: Aug 2003
Location: Germany
Posts: 1,016
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The only thing is a log file that pisg can convert.

Small hint: If you use Mirc on a windows machine to create the logfiles and now also want to run pisg on the same machine but pisg is written in perl then download and install Active Perl

On my installation all the stuff is done on a windows 2003 server and only the .pisg files are transfered to the webserver one a day.
Reply With Quote
  #7  
Old 08-29-2004, 02:01 PM
Zelda-King's Avatar
Zelda-King Zelda-King is offline
 
Join Date: Nov 2002
Location: London, England
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, well I'm using pjirc and I'm not sure that creates logfiles. I'll have a look at the pisg info.
Reply With Quote
  #8  
Old 08-29-2004, 02:07 PM
jluerken's Avatar
jluerken jluerken is offline
 
Join Date: Aug 2003
Location: Germany
Posts: 1,016
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The extension does not matter also. Important is that pisg knows what to do with the file. Check the pisg documentation.

Some of the languages supported are:
EN | DE | DK | FR | ES | PL| PT | NO | NL | SE | EE | IT | HU | SI | FI

Supported logfile formats:

* X-Chat
* mIRC
* mIRC6
* Eggdrops
* bxlog for +++++X
* irssi
* virc98
* dancer
* Trillian
* Grufti
* mbot
* winbot
* zcbot
* muh
* energymech
* ircII
* psybnc
* ircle
* infobot
* axur
* bobot++
* oer
* perlbot
* Vision
* pircbot
* KVIrc
* HydraIRC
* sirc
* moobot
* supybot
* blootbot
* dircproxy
Reply With Quote
  #9  
Old 08-29-2004, 05:09 PM
Zelda-King's Avatar
Zelda-King Zelda-King is offline
 
Join Date: Nov 2002
Location: London, England
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I intend to install this... if I can ever figure out how to have an embedded IRC chat on the server that writes log files to the server. That's assuming PISC can be used with on-server log files.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:18 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04639 seconds
  • Memory Usage 2,316KB
  • Queries Executed 22 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_html
  • (5)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (9)post_thanks_box
  • (9)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (9)post_thanks_postbit_info
  • (8)postbit
  • (9)postbit_onlinestatus
  • (9)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete