vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Eggdrop Irc Manager (https://vborg.vbsupport.ru/showthread.php?t=110362)

HondaATC 05-23-2008 08:45 PM

I hope so, cause this mod a lone might keep my from upgrading if there isn't.

Ingress 07-02-2008 03:17 PM

I'd also be interested in an update for 3.7.x.

Ingress

reesev 07-31-2008 07:43 PM

this works fine for 3.7

tweakmonkey 08-16-2008 10:26 PM

Great mod!
Works fine for me with 3.7.2 and eggdrop 1.6.18. It took a few minutes to show who was in there but works fine now.

One question: Can you show the who's chatting dialog on other template pages? I tried $irc_channels but it does not show anything except on forum_home. Any suggestions?

EDIT - I just changed the hook position to global_start for now to make this work.

One problem I'm seeing is it says "Array" as a member in the list. Like:
Topic: robots are cool, but so are sponges
@mattdev, @tweakmonkey, @Voltron, Array, Array, juballharsha

EDIT 2 - In case anyone else had this problem, I fixed it by editing the Plugin called [Eggdrop IRC Manager]forum template alteration:
Code:

$replace = '<!-- start logged in IRC -->

$irc_channels

<!-- end logged in IRC -->';

switch ($vbulletin->options['eim_location']) {
   
    case 1:
    $search = '#\$navbar#';
    $replace = '\\0 ' . $replace;
    break;

    case 2:
    $search = '#<!-- main -->#';
    $replace .= ' \\0';
    break;

    case 3:
    $search = '#<!-- what\'s going on box -->#';
    $replace .= ' \\0';
    break;

    case 4:
    $search = '#<!-- end logged-in users -->\s*?"\) : \(""\)\)\\."#';
    $replace = '\\0 ' . $replace;
    break;
}

$vbulletin->templatecache['FORUMHOME'] = preg_replace($search, $replace, $vbulletin->templatecache['FORUMHOME']);

/////////// Eggdrop IRC Manager - By Velocd ///////////
///////////        Ported By Akex          ///////////


$channels = $db->query_read("
                        SELECT *
                        FROM " . TABLE_PREFIX . "irc_channel
                ");

while ($channel = $db->fetch_array($channels))
{
        $nick_style = explode('||', $channel['nick_style']);

        $ops    = explode(' ', $channel['operators']);
        $halfops = explode(' ', $channel['halfops']);
        $voiced  = explode(' ', $channel['voiced']);
        $users  = explode(' ', $channel['users']);

        if (!empty($ops[0]))
        {
                foreach ($ops AS $op)
                {
                        if ($op != "Array")
                        $channel['nick_list'] .= str_replace('{nick}', $op, $nick_style[0] . ', ');

                }
        }
       
        if (!empty($halfops[0]))
        {
                foreach ($halfops AS $halfop)
                {
                        if ($halfop != "Array")
                        $channel['nick_list'] .= str_replace('{nick}', $halfop, $nick_style[1] . ', ');
                }
        }

        if (!empty($voiced[0]))
        {
                foreach ($voiced AS $voice)
                {
                        if ($voice != "Array")
                        $channel['nick_list'] .= str_replace('{nick}', $voice, $nick_style[2]) . ', ';
                }
        }

        if (!empty($users[0]))
        {
                foreach ($users AS $user)
                {
                        if ($user!= "Array")
                        $channel['nick_list'] .= str_replace('{nick}', $user, $nick_style[3]) . ', ';
                }
        }

        $channel['nick_list'] = substr($channel['nick_list'], 0, -2);

        if ($channel['activity'] > 40)
        {
                $channel['alevel'] = 5;
        }
        else if($channel['activity'] == 0)
        {
                $channel['alevel'] = 0;
        }
        else
        {
                $channel['activity'] = $channel['activity']/8;

                $channel['alevel'] = round($channel['activity']);

                if ($channel['alevel'] < 1)
                {
                        $channel['alevel'] = 1;
                }
        }

        $channel['aname'] = $channel["act$channel[alevel]"];

        $channel['online_max'] = number_format($channel['online_max']);
        $channel['online'] = number_format($channel['online']);

        $channel['date_max'] = vbdate($vbulletin->options['dateformat'], $channel['dateline_max']);
        $channel['time_max'] = vbdate($vbulletin->options['timeformat'], $channel['dateline_max']);

        eval('$irc_channels .= "' . fetch_template('irc_loggedin') . '";');

        unset($channel['nick_list']);
}


//////////////////////////

To check to see if the array was blank and only contained "Array", I added:
Code:

                        if ($user!= "Array")
Code:

                        if ($op!= "Array")
Code:

                        if ($halfop!= "Array")
Code:

                        if ($voice!= "Array")

tweakmonkey 08-18-2008 06:55 PM

Another feature I wanted was to have the topic being shown on my site automatically link URLs, since they are often used in IRC topics.

To do this, edit the [Eggdrop IRC manager]Forumhome template alteration in the Plugin and Plugin Manager in the control panel.

Find the line:
Code:

$channel['dateline_max']);
Below it add:
Code:

$channel['topic'] = preg_replace('@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@', '<a href="$1" target="_blank">$1</a>', $channel['topic']);

Raptor 01-01-2010 04:08 PM

I have it working - shows on forumhome also

Only have 2 problems so far

Topic isn't showing

Activity Graphic isn't changing

Suggestions ?

Other than that its working great on vb 3.8.4 PL2

HondaATC 01-01-2010 05:11 PM

I never got the activity graphic working for my setup. The topic does refresh after a while. You need someone to leave/rejoin for it to change if I remember correctly.

Raptor 01-01-2010 08:05 PM

Yep I got the Topic sorted (just had to change it in the channel)

Everything works now except the Activity Graphic.

Warnink 06-12-2010 02:05 PM

Unfortunately this has stopped working for vb4, would anyone be willing to make it compatible again as it was a great addition to our board, I'd do it myself but I wouldn't know where to start.

Also for the people having trouble with the acivity graphic, you need to put the images in the images folder of your style then they'll show up just fine.

HondaATC 06-12-2010 02:14 PM

I could definitely use this on my 4.0 site too. I could make it. Work if I had enough time to gmess with it.


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

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01055 seconds
  • Memory Usage 1,746KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete