vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   vBulletin Forum Sideblocks - Current Staff Online Forum Sideblock and CMS Widget by BOP5 (https://vborg.vbsupport.ru/showthread.php?t=284617)

Marcin1 07-15-2014 02:28 PM

How to reorder of the groups displayed? I've got Mod currently on top, Admin below.

Mark_Zuckerberg 08-12-2014 11:58 PM

how to create site block to show staff online i am also using your add on sidebar everywhere after installing this mod edited its settings but when i go to forum block i cant see any block of staff online to create?

ozzy47 08-13-2014 12:02 AM

Did you do this part of the instructions?

Go to Admin CP -> Forums & Moderators (on the side menu) -> Forum Blocks Manager

Click on "Add Block"

Choose "Custom HTML/PHP" from the drop down menu and click "Continue"

Title: Staff Online by BOP5
Description: Sideblock shows current forum staff online.
Cache Time: 1
Display Order: (Your Choice)

Content Type: PHP
Template to use: block_staff_online_bop5

Content:

<<<<<<< COPY BELOW THIS LINE >>>>>>>>

PHP Code:

global $vbulletin$vbphrase;
$vbo = &$vbulletin->options;

if (
$vbo['bop5sob_en'])
{
    
$staff_usergroupids $vbo['bop5so_groups']; 
  
    
$bopshowav $vbo['bop5so_showav'];
  
    
$dofonts $vbo['bop5so_intfont'];   
    
$dosizes $vbo['bop5so_intsize'];                 
    
$docolor $vbo['bop5so_intcolor'];                 
      
    
$showinvisible $vbo['bop5so_showinvis'];
    
    
$nostaffuser $vbphrase['bop5_staff_online_none'];
    
$nostaffusertitle $vbphrase['bop5_staff_online_no_staff'];

  if (
THIS_SCRIPT != 'index'
  {
     require_once(
DIR '/includes/functions_bigthree.php');
  } 


  
$cooktimeout TIMENOW $vbulletin->options['cookietimeout'];
  
$staffcount 0;

  
$bop5_fields '';

  if (
$dofonts)
    
$bop5_fields .= " , user.bop5_userfont AS bop5_userfont ";

  if (
$dosizes)
    
$bop5_fields .= " , user.bop5_usersize AS bop5_usersize ";

  if (
$docolor)
    
$bop5_fields .= " , user.bop5_usercolor AS bop5_usercolor ";


  if (
$showinvisible)
  {
    
$forumstaff $vbulletin->db->query_read_slave("
        SELECT
            user.username, user.usergroupid, user.lastvisit, user.usertitle,
            session.userid, session.inforum, session.lastactivity,
            IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid
            
$bop5_fields
        FROM " 
TABLE_PREFIX "session AS session
        LEFT JOIN " 
TABLE_PREFIX "user AS user ON(user.userid = session.userid)
        WHERE session.lastactivity > 
$cooktimeout AND user.usergroupid IN (".$staff_usergroupids .")
        ORDER BY username ASC"
);
  }
  else
  {
    
$forumstaff $vbulletin->db->query_read_slave("
        SELECT
            user.username, (user.options & " 
$vbulletin->bf_misc_useroptions['invisible'] . ") AS invisible, user.usergroupid, user.lastvisit, user.usertitle,
            session.userid, session.inforum, session.lastactivity,
            IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid
            
$bop5_fields
        FROM " 
TABLE_PREFIX "session AS session
        LEFT JOIN " 
TABLE_PREFIX "user AS user ON(user.userid = session.userid)
        WHERE session.lastactivity > 
$cooktimeout AND user.usergroupid IN (".$staff_usergroupids .")
        ORDER BY username ASC"
);
  }

  
$bp5i 0;
  while (
$staffon $vbulletin->db->fetch_array($forumstaff))
  {
      
$bp5i++;
      
$userid $staffon['userid'];    
      
$userinfos[$userid] = $staffon;
  }

  if (!
$bp5i//No Staff Online
  
{
      
$userid 0;    
      
$userinfos[$userid] = $staffon;  
      
$staffon['showav'] = 0;
      
$staffon['musername'] = $staffon['username'] = $nostaffuser;
      
$staffon['usertitle'] = $nostaffusertitle;
      
$staffon['none'] = true;
      
$activestaff[0] = $staffon;
  }
  else
  {
    
$activestaff = array();
    foreach (
$userinfos AS $userid => $staffon)
    {
        
fetch_musername($staffon);
        
        
$staffon['none'] = false;
        
$staffon['showav'] = $bopshowav;
        
        if (
$bopshowav)
        {
          require_once(
'./includes/functions_user.php');
          
          
$staffon['avatarurl'] = fetch_avatar_url($staffon['userid']);

          if (!
$staffon['avatarurl']) 
            
$staffon['avatarurl'] = $stylevar['imgdir_misc'] . 'images/misc/unknown.gif'
          else 
          { 
            
$staffon['avatarurl'] = $vbulletin->options['bburl'] . '/' 
            
$staffon['avatarurl'][0];   
          }     
        }

        if (
fetch_online_status($staffon))
        {
            
$staffcount++;
            
$activestaff[$staffcount] = $staffon;
        }
    }
  }

  unset(
$userinfos$staffon);

  
$vbulletin->db->free_result($forumstaff);

  
$staffsarray = array('activestaff'    => $activestaff); 

  return 
$staffsarray;



Mark_Zuckerberg 08-13-2014 12:13 AM

YAAAAYYYYYY!!!!

after posting that code which you have mentioned is working fine.... by the way that code is not mentioned in the readme file nor on the post page? it must be added iznt that? thanks much much for the help you are great

ozzy47 08-13-2014 12:15 AM

It is in the text document that came with this mod, it is named, Staff Online Sideblock & Widget by BOP5 Install

Mark_Zuckerberg 08-13-2014 12:25 AM

True sorry my bad i appologize i didnt scrooled down till end :/ thats why it occurs thank you dear

ozzy47 08-13-2014 12:26 AM

It's cool, it happens to all of us at some point. :)

Buzzle 08-16-2014 03:11 PM

Any idea why i'm getting a databaser error?

Code:

Invalid SQL:

        SELECT
            user.username, user.usergroupid, user.lastvisit, user.usertitle,
            session.userid, session.inforum, session.lastactivity,
            IF(displaygroupid=0, user.usergroupid, displaygroupid) AS displaygroupid, infractiongroupid
            , user.bop5_userfont AS bop5_userfont
        FROM vB_session AS session
        LEFT JOIN vB_user AS user ON(user.userid = session.userid)
        WHERE session.lastactivity > 1408204549 AND user.usergroupid IN (13,14,5,7,6,-1)
        ORDER BY username ASC;

MySQL Error  : Unknown column 'user.bop5_userfont' in 'field list'


CAG CheechDogg 08-16-2014 03:28 PM

Bummer..even with the update this still doesn't work for me ...I get the following error:

Warning: Invalid argument supplied for foreach() in [path]/includes/class_core.php(4606) : eval()'d code on line 12

CAG CheechDogg 08-16-2014 04:24 PM

Any idea about this BOP5? ....


All times are GMT. The time now is 01:13 AM.

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.01258 seconds
  • Memory Usage 1,784KB
  • 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
  • (1)bbcode_code_printable
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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