My plugin suddenly started slowing down my forum

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jeremy8
    Senior Member
    • Oct 2009
    • 161

    [Forum] My plugin suddenly started slowing down my forum

    I made a plugin that get's the number of users in my IRC and puts the number in the tab that links to the IRC. For example, if there are 8 people in the IRC, the tab says "Chat: 8".

    Anyway, the plugin that gets the number and makes it into a variable for the tab template stopped working and made the whole forum go very slow. I've used this for about a year with no problems, so I don't know what happened.

    This is the plugin:
    Code:
    $usercount = file_get_contents('http://usercount.geekshed.net/?chan=belltree&noimage');
    
    vB_Template::preRegister('irc_navtab',array(
    'usersin' => $usercount
    ));
    
    
    $template_hook['users_in_chat'] = $usercount;
    You can see that the URL above contains a number of the amount of users in the IRC room. http://usercount.geekshed.net/?chan=belltree&noimage

    Here's the tab's template if you need to see it for any reason

    Code:
    <li<vb:if condition="$vbulletin->options['selectednavtab'] == 'chat'"> class="selected"</vb:if>><a class="navtab" href="chat.php">Chat<vb:if condition="$usersin != 0">: {vb:raw template_hook.users_in_chat}</vb:if></a></li>
  • punchbowl
    Senior Member
    • Nov 2006
    • 3903
    • 4.0.x

    #2
    try using a different variable name instead of $usercount

    Comment

    • Jeremy8
      Senior Member
      • Oct 2009
      • 161

      #3
      Originally posted by punchbowl
      try using a different variable name instead of $usercount
      Didn't work

      Comment

      • Zachery
        Former vBulletin Support
        • Jul 2002
        • 59097

        #4
        Its possible that your webhost has changed the filegetcontents function, or the server cannot connect to it for some reason. vBulletin.org would be a better place to get further help.

        Comment

        Related Topics

        Collapse

        Working...