Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Currently Active IRC Users Details »»
Currently Active IRC Users
Version: 1.00, by Saar Saar is offline
Developer Last Online: Apr 2013 Show Printable Version Email this Page

Category: Chat Modifications - Version: 4.1.2 Rating:
Released: 04-01-2011 Last Update: Never Installs: 8
Uses Plugins Template Edits
Re-useable Code Additional Files Translations  
No support by the author.

I will work on a more user-friendly version of this article, I am not a programmer and this is actually my first modification, so there may still be some glitches. I originally wrote this modification, because I couldn't find any working hack for vBulletin 4 (which is the reason why I am writing these lines on vB.org), so I did some research and after two weeks I finally had a working active IRC nicklist on the forums. The main problem was to figure out, how to print the output of a text file on the forums and displaying it below "Currently Active Users" on FORUMHOME.

Those two articles were very helpful to me:
[1] http://www.vbulletin.com/forum/showt...P-or-HTML-File
[2] https://vborg.vbsupport.ru/showthread.php?t=242454

Okay, let's start...

This modification requires an Eggdrop running on your server, please install and configure it first, before proceeding. On a Debian (Lenny) server you do that with the following command:

Code:
$ aptitude install eggdrop
Create a directory where all modifications and config files are stored at with appropriate permissions

Code:
$ mkdir /home/eggdrop
$ adduser eggdrop
$ chown eggdrop:eggdrop /home/eggdrop
$ chmod 700 /home/eggdrop -r
Copy the eggdrop configuration file to that directory

Code:
$ cp /usr/share/doc/eggdrop-data/examples/eggdrop.conf.gz /home/eggdrop
$ cd /home/eggdrop
$ gunzip eggdrop.conf.gz
How to get a working eggdrop.conf, please visit http://eggwiki.org/Eggdrop.

Now let's implement the required modification to get the user list.

Code:
$ nano eggdrop.conf
Find:
Code:
# A few IRC networks (EFnet and Undernet) have added some simple checks to
# prevent drones from connecting to the IRC network. While these checks are
# fairly trivial, they will prevent your Eggdrop from automatically
# connecting. In an effort to work-around these, we have developed a couple of
# TCL scripts to automate the process.
Below that add
Code:
source /home/eggdrop/nickplus.tcl
Download the following modification from egghelp.org: NickPlus
[1] http://www.egghelp.org/tclhtml/3478-...1-nicklist.htm
and upload the nickplus.tcl to /home/eggdrop

Edit the nickplus.tcl to make the necessary changes, read the commented lines!

Code:
$ nano nickplus.tcl
Find:
Code:
# Change dumpfile to the path where you'd like the file to be written.
Below that add:
Code:
set dumpfile "/path/to/your/forum/nicklist.txt"
Now log on to your vBulletin Administrator Control Panel and add the following plugin (Hook Location: global_start):

Code:
ob_start();
  require_once('/path/to/your/forum/irc.php');
  $php_include = ob_get_contents();
ob_end_clean();
vB_Template::preRegister('FORUMHOME',array('php_include' => $php_include));
Create a irc.php in your forum home directory with the following contents:

Code:
$ touch /path/to/your/forum/irc.php
Code:
<html>

<head>

</head>

<body>
<?php
        $lines = file ('/path/to/your/forum/htdocs/nicklist.txt');
        $count = count($lines);
                if ($count == 1)
        {
        echo  "There is currently ".$count." user online. Network: irc.rizon.net, Port: 6667, Channel: #yourchannel";
        }
        else{
        echo  "There are currently ".$count." users online. Network: irc.rizon.net, Port 6667, Channel: #yourchannel";
        }
        echo "<br>";
?>
<font color="#417394">
<?php
        $fh = fopen("/path/to/your/forum/nicklist.txt", 'r');
        $pageText = fread($fh, 25000);
        echo $pageText;
?>
</font>
</body>

</html>
Create a nicklist.txt in your forum home directory with proper permissions:

Code:
$ touch /path/to/your/forum/nicklist.txt
$ chown eggdrop:eggdrop /path/to/your/forum/nicklist.txt
$ chmod 775 /path/to/your/forum/nicklist.txt
In your vBulletin Administrator Control Panel edit the FORUMHOME template:

Find:
Code:
            <!-- end logged-in users -->
            </vb:if>
            {vb:raw template_hook.forumhome_wgo_pos2}
            <vb:if condition="$show['upcomingevents']">
            <div id="wgo_events" class="wgo_subblock section">
                <h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/event.png" alt="{vb:rawphrase todays_events}" /><vb:if condition="$show['todaysevents']">{vb:rawphrase todays_events}<vb:else />{vb:rawphrase upcoming_events_for_the_next_x_days, {vb:raw vboptions.showevents}}</vb:if></h3>
                <ol>
                    {vb:raw upcomingevents}
                </ol>
            </div>
            </vb:if>
            {vb:raw template_hook.forumhome_wgo_pos3}
            <vb:if condition="$show['birthdays']">
Below that add:
Code:
            <!-- irc -->
            <div id="wgo_irc" class="wgo_subblock section">
                <h3 class="blocksubhead"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="Currently Active IRC Users" />Currently Active IRC Users</h3>
                <ol>{vb:raw php_include}</ol>
            </div>
            <!-- end irc -->
Now start your eggdrop:

Code:
$ aptitude install su
$ su eggdrop
$ cd ~
$ eggdrop -m ./eggdrop.conf
Now configure your bot, set password etc. (read the eggdrop help wiki!) and restart your bot.

Code:
$ eggdrop
Et voil?!

Any comments, feedback, suggestions? Wanna write a plugin for this or improve this modification? Go ahead, this is free for use.

Download Now

File Type: php irc.php (660 Bytes, 36 views)

Screenshots

File Type: png screenshot.png (16.0 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
davidg

Comments
  #2  
Old 04-05-2011, 08:33 PM
Dragaon Dragaon is offline
 
Join Date: Feb 2010
Posts: 43
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow, you rock. Tagged and will try it out asap. Already have a network and eggie ready to go.
Reply With Quote
  #3  
Old 04-12-2011, 03:20 PM
Saviour's Avatar
Saviour Saviour is offline
 
Join Date: Apr 2007
Posts: 743
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can the eggdrop be running on someone else's server?
Reply With Quote
  #4  
Old 04-12-2011, 07:24 PM
Saar Saar is offline
 
Join Date: Feb 2004
Location: Germany
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Saviour View Post
can the eggdrop be running on someone else's server?
That's technically possible, yes. All ya need is a cron job, uploading the nicklist.txt to your web site's ftp (forum root!). But please keep in mind, that you would loose the real time functionality of your who's online list. Do the following on the server, where your eggdrop is configured at:

Code:
$ aptitude install ncftp
and install the following cron job

Code:
$ crontab -e
cron job (runs every five minutes):
Code:
*/5 * * * * ncftpget -u ftp_username -p ftp_password ftp_ip '/path/to/your/forum/' './nicklist.txt' &> /dev/null
Reply With Quote
  #5  
Old 04-13-2011, 03:31 PM
lubbie lubbie is offline
 
Join Date: May 2010
Posts: 169
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tagged. Thanks a lot
Reply With Quote
  #6  
Old 04-16-2011, 12:25 PM
Warnink Warnink is offline
 
Join Date: Apr 2008
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for this, I used to use THIS one as my eggdrop is hosted on a separate box from my site, I'm not sure what needs fixing since my move to vB4 but the admin side of it works with the irc info updating fine in there, it just gives a template error on the main site when enabled.
Anyway I'll give this one a shot, thx.
Reply With Quote
  #7  
Old 04-16-2011, 07:36 PM
Saar Saar is offline
 
Join Date: Feb 2004
Location: Germany
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Warnink View Post
Thanks for this, I used to use THIS one as my eggdrop is hosted on a separate box from my site, I'm not sure what needs fixing since my move to vB4 but the admin side of it works with the irc info updating fine in there, it just gives a template error on the main site when enabled.
Anyway I'll give this one a shot, thx.
Let me know whether it's working for you, the modification you were linking is for vb 3.5.4 only.
Reply With Quote
  #8  
Old 04-09-2012, 07:44 AM
DevilNetwork's Avatar
DevilNetwork DevilNetwork is offline
 
Join Date: Nov 2011
Location: The Tardis
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Working on 4.1.11.

@Warnick, the way to get it working on separate servers is to have the irc.php and the nicklicklist.txt and the eggdrop all on the 1 server so they can write/read each other, then
just change:
Quote:
ob_start();
require_once('/path/to/your/forum/irc.php');
$php_include = ob_get_contents();
ob_end_clean();
vB_Template:: preRegister('FORUMHOME',array('php_include' => $php_include));
to this:
Quote:
ob_start();
require_once('http://<domain/ip the eggdrop is hosted on>.com/irc.php');
$php_include = ob_get_contents();
ob_end_clean();
vB_Template:: preRegister('FORUMHOME',array('php_include' => $php_include));
Basically so the vBulletin only needs to read the remote PHP file. So you will need web
installed on the server the eggdrop is on so you can connect via http
Reply With Quote
  #9  
Old 04-09-2012, 08:33 AM
GhostHunter2010 GhostHunter2010 is offline
 
Join Date: Nov 2010
Location: London UK
Posts: 259
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi there i would love if u can install me this please i have no idea how i have already an eggdrop bot installed an runnin on my unrealircd server but i dont know how to install this if u can help me install it plz pm me ur msn then we can talk thankyou downloaed but not installed yet
Reply With Quote
  #10  
Old 04-09-2012, 11:56 PM
HondaATC HondaATC is offline
 
Join Date: May 2004
Posts: 96
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow I rememebr a similar hack from the 3.7x days that rocked, it brought a ton of traffic to my IRC channel, and then after I upgraded to 4.x I could never get it to work again and the channel died off. Definitely gonna have save this for a day when I got some time and see if I can get it working again
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 03:21 AM.


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.06418 seconds
  • Memory Usage 2,347KB
  • Queries Executed 24 (?)
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
  • (20)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (1)post_thanks_box_bit
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (2)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete