Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

Reply
 
Thread Tools
Current Staff Online Forum Sideblock and CMS Widget by BOP5 Details »»
Current Staff Online Forum Sideblock and CMS Widget by BOP5
Version: 0.99, by BirdOPrey5 (Senior Member) BirdOPrey5 is offline
Developer Last Online: Aug 2023 Show Printable Version Email this Page

Category: vBulletin Forum Sideblocks - Version: 4.2.x Rating:
Released: 06-18-2012 Last Update: 06-29-2012 Installs: 192
Uses Plugins Auto-Templates
Re-useable Code Translations Is in Beta Stage  
No support by the author.

Brought to you by BirdOPrey5
www.Qapla.com


New Version: 0.99 Beta
New in 0.99
  • Added Widget
  • Added Settings instead of manual configuration
  • Added phrases for "None" and "No staff currently online." text.
  • Made code more compatible with older VB Versions (should work in 4.1.x now)




This is my first attempt at a Sideblock and Widget. The purpose of this is to list all forum staff members online.

There are settings to choose which usergroups are considered staff groups and for other basic settings.

The product .xml file contains the necessary templates and phrases but you will need to manually install the sideblock code itself and/or manually create the widget.

Specific installation instructions are in the .txt file in the zip file but the overall process is:
  • Upload the Product XML File
  • Add code to additional.css template
  • Edit Settings in Admin CP -> Options to setup your options
  • Create Sideblock (if using Sideblock)
  • Create Widget (if using widget)
  • Add Widget to Layout(s) (if using widget)


Overall this is working well- it is Beta as it's my fist Sideblock and Widget. I know it works on VB 4.2.0 but it should work on earlier versions as well (code was revised in Beta 0.99 for greater compatibility.)

If you get an error at the top of the browser window when you enable the sideblock or widget you know your VB version is too old.

In addition to working with my Font Selection by Username mod it will also work withe my Sidebar Anywhere mod.

Does not work with "Everywhere Sidebar" mod but DOES work with MY "Sidebar Anywhere" mod.

------------------------------------------------------

Please "Mark as Installed" if you use this.
Donations always appreciated. :up:
Nominate MOTM if you LOVE it!

Download Now

File Type: zip Current Staf Online Sidebar & Widget by BOP5 - Beta.99.zip (7.7 KB, 1486 views)

Screenshots

File Type: jpg staff_online_sidebar.jpg (63.7 KB, 0 views)
File Type: jpg staff_online_widget_none.jpg (32.7 KB, 0 views)
File Type: jpg staff_online_widget_two.jpg (40.7 KB, 0 views)
File Type: jpg staff_online_settings.jpg (149.6 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
11 благодарности(ей) от:
akz645, Alex@bulletin, blind-eddie, findingpeace, Gemma, Hornstar, NoMatt3r, sodasusu, t-j, Taurus1, Techno Cowboy

Comments
  #152  
Old 07-15-2014, 02:28 PM
Marcin1 Marcin1 is offline
 
Join Date: Sep 2012
Location: Poland
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How to reorder of the groups displayed? I've got Mod currently on top, Admin below.
Reply With Quote
  #153  
Old 08-12-2014, 11:58 PM
Mark_Zuckerberg Mark_Zuckerberg is offline
 
Join Date: Sep 2011
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #154  
Old 08-13-2014, 12:02 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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;

Reply With Quote
  #155  
Old 08-13-2014, 12:13 AM
Mark_Zuckerberg Mark_Zuckerberg is offline
 
Join Date: Sep 2011
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #156  
Old 08-13-2014, 12:15 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It is in the text document that came with this mod, it is named, Staff Online Sideblock & Widget by BOP5 Install
Reply With Quote
  #157  
Old 08-13-2014, 12:25 AM
Mark_Zuckerberg Mark_Zuckerberg is offline
 
Join Date: Sep 2011
Posts: 195
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

True sorry my bad i appologize i didnt scrooled down till end :/ thats why it occurs thank you dear
Reply With Quote
  #158  
Old 08-13-2014, 12:26 AM
ozzy47's Avatar
ozzy47 ozzy47 is offline
 
Join Date: Jul 2009
Location: USA
Posts: 10,929
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's cool, it happens to all of us at some point.
Reply With Quote
  #159  
Old 08-16-2014, 03:11 PM
Buzzle Buzzle is offline
 
Join Date: Apr 2012
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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'
Reply With Quote
  #160  
Old 08-16-2014, 03:28 PM
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Location: Riverside, California USA
Posts: 1,080
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #161  
Old 08-16-2014, 04:24 PM
CAG CheechDogg's Avatar
CAG CheechDogg CAG CheechDogg is offline
 
Join Date: Feb 2012
Location: Riverside, California USA
Posts: 1,080
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any idea about this BOP5? ....
Reply With Quote
Reply

Thread Tools

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 01:00 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.05024 seconds
  • Memory Usage 2,383KB
  • Queries Executed 26 (?)
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_code
  • (1)bbcode_php
  • (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
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (5)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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