PDA

View Full Version : vBulletin Forum Sideblocks - Current Staff Online Forum Sideblock and CMS Widget by BOP5


BirdOPrey5
06-18-2012, 10:00 PM
Brought to you by BirdOPrey5
www.Qapla.com (http://www.qapla.com/mods/)

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)



https://vborg.vbsupport.ru/attachment.php?attachmentid=139208&stc=1&d=1340065140

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 (https://vborg.vbsupport.ru/showthread.php?t=283307) 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! ;)

BirdOPrey5
06-18-2012, 11:22 PM
Reserved.

sodasusu
06-18-2012, 11:39 PM
nice mods like xenforo

BirdOPrey5
06-18-2012, 11:39 PM
I forgot to post the css code- just added it to the first post. :o

LouiseWilson
06-18-2012, 11:39 PM
All working good here super work again :)

DM BoNeZ
06-19-2012, 12:05 AM
will be testing this on 4.1.7
i will give feed back when done,,,,
EDIT does not work on 4.1.7

FTG LIQUID CL
06-19-2012, 12:43 AM
error on 4.1.12

RSNF
06-19-2012, 02:40 AM
The mod specifically states vB Version: 4.2.x



error on 4.1.12

sodasusu
06-19-2012, 02:56 AM
error on 4.1.12


vB Version: 4.2.x

Hornstar
06-19-2012, 06:59 AM
Looking good. Nice work.

ProFifaLeagues
06-19-2012, 08:52 AM
Very handy Idea thank you!!!

Are there any plans to turn this into a Widget too Sir???

deverill2010
06-19-2012, 09:02 AM
I asked for this, he's done the sidebar block and will hopefully be doing the widget soon :D fingers crossed!

BOP rocks!

BirdOPrey5
06-19-2012, 09:48 AM
Thanks for the Feedback on the version numbers guys, I knew it wouldn't work on older versions though honestly I am surprised there is an error even on 4.1.12. I will see if I can get access to a 4.1.12 board again, I ended up updating both my test sites to 4.2.0.

Yes I plan to make this into a widget as well, although it is re-usable code so if anyone wants to "beat me to it" they are encouraged to try. :)

Krusty1231
06-19-2012, 10:23 AM
Excellent. Works great!

Thanks

GSMPINOY
06-19-2012, 10:25 AM
i'll be installing this on my forum... hope it will work fine.. ;)

Patriots1049
06-19-2012, 12:05 PM
For some reason the avatar is posting exceptionally large (160x118), is there something I can do to fix that?

EDIT: I do have the CSS code posted in additional.css .. it just seems to not recognize it.

BirdOPrey5
06-19-2012, 01:08 PM
For some reason the avatar is posting exceptionally large (160x118), is there something I can do to fix that?

EDIT: I do have the CSS code posted in additional.css .. it just seems to not recognize it.

You sure it's posted in the correct style's additional.css? Can I get a link to your site so I can see it with my browser?

Patriots1049
06-19-2012, 03:00 PM
Yes, I double checked that as well. You can access the website here (http://www.valiantnation.com/forum/forum.php)

EDIT: The code was getting commented out from someone elses modification to the additional.css ... FIXED. Thank you!

FTG LIQUID CL
06-19-2012, 05:09 PM
The mod specifically states vB Version: 4.2.x


If you read the page and instructions it says this mod should work between 4.0.8 and 4.2.0
I was just trying to let the designer know that I got error messages with 4.1.12
I would love to see this for 4.1.12

Alex@bulletin
06-19-2012, 05:12 PM
Hi Dude!

I like your idea and wanted to provide a little translation to german but you seem to be out of phrases :(

The mod is perfect if you could phrase the following displayed texts - concerning the situation that noone from the staff is online:


https://vborg.vbsupport.ru/attachment.php?attachmentid=139223&stc=1&d=1340129452

Finally the mod seems to work as you can see - I tried on 4.2 :) :up:

tomrep
06-19-2012, 11:29 PM
my vb is not reconizeing .bop5staffimg {
max-width: 40px;
max-height: 40px;
min-width: 40px;
min-height: 40px;
padding: 0 4px 2px 0;
float: left;
}

.bop5staffli {
height: 42px;
}

.bop5staffol {
padding: 1px;
}

.bop5staffuser {
font-size: 110%;
}

.bop5staffhr {
display: none;
}

BirdOPrey5
06-20-2012, 01:11 AM
Hi Dude!

I like your idea and wanted to provide a little translation to german but you seem to be out of phrases :(

The mod is perfect if you could phrase the following displayed texts - concerning the situation that noone from the staff is online:


https://vborg.vbsupport.ru/attachment.php?attachmentid=139223&stc=1&d=1340129452

Finally the mod seems to work as you can see - I tried on 4.2 :) :up:

It is not phrased that is true, but it is something you can edit via the configuration at the top of the PHP code.

If you have need to use phrases you can create the custom phrase(s) in GLOBAL phrases and in the top of configuration set the options such as:


$nostaffuser = $vbphrase['staff_online_none'];
$nostaffusertitle = $vbphrase['staff_online_no_one_online'];


You just have to create those two phrases (staff_online_none and staff_online_no_one_online) in Phrase Manager.

my vb is not reconizeing
.bop5staffimg {
max-width: 40px;
max-height: 40px;
min-width: 40px;
min-height: 40px;
padding: 0 4px 2px 0;
float: left;
}

.bop5staffli {
height: 42px;
}

.bop5staffol {
padding: 1px;
}

.bop5staffuser {
font-size: 110%;
}

.bop5staffhr {
display: none;
}

That code goes in your additional.css template of each style you use- are you sure you put it in the right location?

If so I need a link to your site to check.

Karma1337
06-20-2012, 02:05 AM
Thanks a lot.
Mark installed and nominated. :)

Alex@bulletin
06-20-2012, 10:56 AM
hmmm okay. I don't need it yet, as I don't have a public forum yet, I just like to translate mods when I'm bored ;)

Gemma
06-20-2012, 01:29 PM
Well done creating your first sideblock addon BOP5, looks good and works perfectly. Thanks for releasing :)

Nirjonadda
06-21-2012, 12:59 PM
Its not working on 4.1.10
Warning: Invalid argument supplied for foreach() in [path]/includes/class_core.php(4606) : eval()'d code on line 10

BirdOPrey5
06-23-2012, 12:35 PM
Thanks. Requires 4.2.0 it seems.

deverill2010
06-23-2012, 01:19 PM
Any progress on the widget BOP?

BirdOPrey5
06-24-2012, 03:03 PM
no, nothing to show yet. I thought it would be a simpler port.

deverill2010
06-24-2012, 03:14 PM
Ah that's a real shame, it was the widget I originally wanted when I requested lol. :)

BirdOPrey5
06-24-2012, 03:18 PM
I know, I haven't given up- just been fighting with kidney stone pain to try and concentrate on coding lately... not as productive as usual.

deverill2010
06-24-2012, 03:39 PM
No worries, I'm grateful however long it takes ;) take it easy!

Gn_Snake
06-26-2012, 05:29 AM
Hi,
in VB4.21 i have the error on the forum block.
The block is completely white with the writing:"array"

Pandemikk
06-26-2012, 07:02 AM
Good idea BOP.

BirdOPrey5
06-26-2012, 01:42 PM
Hi,
in VB4.21 i have the error on the forum block.
The block is completely white with the writing:"array"

VB 4.2.1 isn't out yet, do you have an alpha version?

Gn_Snake
06-26-2012, 06:39 PM
Hi,
i'm sorry, i have 4.2.0 patch 2

BirdOPrey5
06-26-2012, 11:14 PM
In that case I'd say follow the instructions again, carefully- it's working for many people on 4.2.0 I don't see why it wouldn't on yours.

Kirk Fitzgerald
06-27-2012, 04:24 AM
Very nice mod, I did install but the code needs a bit of validating which led me to un-install, will install when the code is tidied up, I know it's only BETA so not expecting clean code as yet.

Very good job though, well done. :)

Gn_Snake
06-27-2012, 06:08 AM
In that case I'd say follow the instructions again, carefully- it's working for many people on 4.2.0 I don't see why it wouldn't on yours.

You're right, thanks. now it works

BirdOPrey5
06-27-2012, 01:34 PM
Very nice mod, I did install but the code needs a bit of validating which led me to un-install, will install when the code is tidied up, I know it's only BETA so not expecting clean code as yet.

Very good job though, well done. :)

Do you mean the HTML isn't passing validation?

Kirk Fitzgerald
06-27-2012, 03:53 PM
Do you mean the HTML isn't passing validation?

Yes, not a big deal I know as it is in Beta stage. :)

Kirk Fitzgerald
06-27-2012, 11:39 PM
I felt kind of bad for just doing the "it doesn't validate cry", so here's the validated code for the template.

<li>
<div class="block smaller">
<div class="blocksubhead">
<a class="collapse" id="collapse_block_html" href="{vb:raw relpath}#top"><img alt="" src="{vb:stylevar imgdir_button}/collapse_40b.png" id="collapseimg_html" /></a>
<span class="blocktitle"><img src="{vb:stylevar imgdir_misc}/users_online.png" alt="{vb:rawphrase bop5_staff_online}" />{vb:rawphrase bop5_staff_online}</span>
</div>
<div id="block_html" class="blockbody floatcontainer">
<div class="blockrow">
<ol class="bop5staffol">
<vb:each from="content.activestaff" value="staffon">
<li class="bop5staffli">
<vb:if condition="$staffon['showav']">
<img src="{vb:raw staffon.avatarurl}" border="0" alt="" class="bop5staffimg" />
</vb:if>
{vb:stylevar dirmark}
<div class="bop5staffuser">
<vb:if condition="$staffon['none']">
{vb:raw staffon.username}
<vb:else />
<a class="username" href="{vb:link member, {vb:raw staffon}}">{vb:raw staffon.musername}</a>{vb:raw staffon.invisiblemark}{vb:raw staffon.buddymark}
</vb:if>
</div>
{vb:raw staffon.usertitle}
<hr class="bop5staffhr" />
</li>
</vb:each>
</ol>
</div>
</div>
</div>
<div class="underblock"></div>
</li>

You can see it working here: http://www.pipesmokerscubby.com/forum.php

BirdOPrey5
06-28-2012, 10:25 AM
Thanks- I'll use it in the next release. :up:

Kirk Fitzgerald
06-28-2012, 12:34 PM
Thanks- I'll use it in the next release. :up:

Very welcome, least I could do for this great addon. ;)

BirdOPrey5
06-28-2012, 06:59 PM
Good news is I am making good progress on the widget now too.. going to package them together and let you enable the sideblock or widget independently.

http://juotpics.com/pics/images/753staff_online_widget.jpg

Should be ready something this weekend. :up:

ProFifaLeagues
06-28-2012, 07:06 PM
Looking forward to it mate thank you

deverill2010
06-28-2012, 08:22 PM
Yay BOP, your an angel :D

Bernd Glasstett
06-29-2012, 01:13 PM
Hi,
in VB4.21 i have the error on the forum block.
The block is completely white with the writing:"array"Same thing in the 4.2.0 Patch Level 2 here. I am only using the sidebar in the Activity Stream. Sad thing it doesn't work :(

Kirk Fitzgerald
06-29-2012, 01:49 PM
Same thing in the 4.2.0 Patch Level 2 here. I am only using the sidebar in the Activity Stream. Sad thing it doesn't work :(

This mod works just fine, double check your edits, perhaps you missed something. :)

Bernd Glasstett
06-29-2012, 08:30 PM
I only made one edit: The groups. I only used 2 IDs instead of 3 IDs.

Edit: Ah didn't use the right template. Now it works.

JetLee
06-29-2012, 09:46 PM
I've checked and rechecked, I have all default settings, correct style/template. I get absolutely nothing in my sidebar.

I'm using Everywhere Sidebar 1.5.2

BirdOPrey5
06-30-2012, 08:15 PM
I've checked and rechecked, I have all default settings, correct style/template. I get absolutely nothing in my sidebar.

I'm using Everywhere Sidebar 1.5.2

Honestly I have never confirmed it works with Everywhere Sidebar, but it does work with my Sidebar for the Activity Stream mod so I believe it SHOULD work.

Does anyone out there have it working with Everywhere Sidebar?

FYI I am about to release a new version so you can try that if you want.

BirdOPrey5
06-30-2012, 08:29 PM
OK, updated to Beta 0.99.

Some big changes...

Now includes both the sideblock AND the widget.

I have done away with the manual configuration and now use "settings" in the Admin CP for all options.

I have added phrases for the hard coded text "None" and "No Staff Currently Online." *(All phrases are GLOBAL phrases and begin with bop5_staff_online.)

I have changed the code so it should be more compatible with older VB versions- although not tested I strongly believe it will work on VB 4.1.x and maybe even 4.0.x now. Please try and let me know.

----

All install instructions in the zip file.

-----

If upgrading from beta 0.9 please:

1) Import new XML file (allow overwrite = yes)

2) Edit the forum block code and paste in the new php code completely replacing the old code.

3) Follow install instructions to add the widget (if you want to use the widget)

4) Go to Admin CP -> Settings -> Options -> Staff Online Sideblock & Widget by BOP5 and set your options (including enabling the sideblock, widget, or both.)

Gemma
06-30-2012, 08:56 PM
Thanks for the update :)

ProFifaLeagues
06-30-2012, 08:57 PM
Superb Works A1 Thanks mate

Kirk Fitzgerald
07-01-2012, 01:56 PM
First rate update, thank you. :)

LgsOfChampions
07-01-2012, 02:31 PM
For some reason the avatar is posting exceptionally large (160x118), is there something I can do to fix that?

EDIT: I do have the CSS code posted in additional.css .. it just seems to not recognize it.

I'm actually having this issue. How can I fix this? You can view my URL here (http://www.leaguesofchampions.com/forum.php)

Thanks!!!!!:eek:

JetLee
07-01-2012, 03:08 PM
Honestly I have never confirmed it works with Everywhere Sidebar, but it does work with my Sidebar for the Activity Stream mod so I believe it SHOULD work.

Does anyone out there have it working with Everywhere Sidebar?

FYI I am about to release a new version so you can try that if you want.

I understand it's not been tested, that's why I was letting you know.

It's still not working, after the update.

I've yet to get a PHP-type forum block to work much at all with Everywhere Sidebar. I can do HTML all day long, but PHP are appear to be extremely tempermental.

BirdOPrey5
07-01-2012, 03:28 PM
I'm actually having this issue. How can I fix this? You can view my URL here (http://www.leaguesofchampions.com/forum.php)

Thanks!!!!!:eek:

There's no staff currently online so I can't see the issue first hand, I will keep an eye out though today and see if I catch it with someone online.

The most likely reason is that the additiona.css code was wrong, missing, incomplete, or even put in the wrong style.

You currently have CSS stored in the database so I can't confirm it is correct but if you could move CSS to the file system (which i think is better overall anyway) then I can confirm.

Admin CP -> Settings -> Style & Language Setting -> Store CSS Stylesheets in Filesystem -> Yes (in most cases this works fine without any permission edits needed, try it and see.)

I understand it's not been tested, that's why I was letting you know.

It's still not working, after the update.

I've yet to get a PHP-type forum block to work much at all with Everywhere Sidebar. I can do HTML all day long, but PHP are appear to be extremely tempermental.

OK thanks for the feedback. If I can get someone to confirm I will note it in the first post.

deverill2010
07-01-2012, 04:08 PM
I can confirm. I have the everywhere sidebar installed and the forum block isn't showing for me either. Meh!

BirdOPrey5
07-01-2012, 05:59 PM
Thanks. I'll try to get Everything Sidebar running on one of my test sites and see if I can get them to work together... hopefully this week, no promises though.

deverill2010
07-01-2012, 06:19 PM
Thanks BOP it's appreciated!

LgsOfChampions
07-01-2012, 06:25 PM
There's no staff currently online so I can't see the issue first hand, I will keep an eye out though today and see if I catch it with someone online.

The most likely reason is that the additiona.css code was wrong, missing, incomplete, or even put in the wrong style.

You currently have CSS stored in the database so I can't confirm it is correct but if you could move CSS to the file system (which i think is better overall anyway) then I can confirm.

Admin CP -> Settings -> Style & Language Setting -> Store CSS Stylesheets in Filesystem -> Yes (in most cases this works fine without any permission edits needed, try it and see.)



OK thanks for the feedback. If I can get someone to confirm I will note it in the first post.

I did what was asked, still not working right. Here is a pic, dunno if this helps
click here for pick (http://i1053.photobucket.com/albums/s469/LgsOfChampions/ccccc.png)

BirdOPrey5
07-02-2012, 01:48 AM
I did what was asked, still not working right. Here is a pic, dunno if this helps
click here for pick (http://i1053.photobucket.com/albums/s469/LgsOfChampions/ccccc.png)

You have a "comment" in your CSS:


// sidebar who is on currently on line for staff


But "//" does not work as a comment in a CSS stylesheet so it is ruining the lines below it.

Remove the "comment" completely or change it to an HTML comment:


<!-- sidebar who is on currently on line for staff -->

Poppet
07-02-2012, 06:45 AM
Installed, very impressed works like a dream :)

LgsOfChampions
07-02-2012, 12:55 PM
You have a "comment" in your CSS:


// sidebar who is on currently on line for staff


But "//" does not work as a comment in a CSS stylesheet so it is ruining the lines below it.

Remove the "comment" completely or change it to an HTML comment:


<!-- sidebar who is on currently on line for staff -->


thank you sir!!
Great Mod, glad we got it to work.
**marked installed**

BirdOPrey5
07-04-2012, 05:51 PM
Well I could not get this to work with Everywhere Sidebar...

However I WAS able to update my Sidebar for Activity Stream mod to work on all pages, so I now call it Sidebar Anywhere by BOP5 (https://vborg.vbsupport.ru/showthread.php?threadid=283307) and it's fully compatible with this mod.

Sidebar Anywhere does most of the things Everywhere Sidebar does except for custom blocks per page, custom width, and collapsible by usergroup- but it does most of the same things- and it does it without a copyright notice on every sidebar.

This is the best I can do at the moment- I am not going to peruse trying to make it work with Everywhere Sidebar any longer.

imported_polygrinder
07-05-2012, 06:33 PM
Is there any way to change the title from "Current Staff Online"? I changed the title in my block like normal but it does not change the title when displayed. I am using 4.2.0 Patch Level 2.

BirdOPrey5
07-05-2012, 08:26 PM
Yes it's a phrase you have to edit.

Go to Phrase Manager -> GLOBAL Phrases -> bop5_staff_online


And please "Mark as Installed" if you are using it. :)

imported_polygrinder
07-05-2012, 10:33 PM
Worked great. Thanks.

imported_polygrinder
07-06-2012, 03:56 AM
There is a little icon, little green person. How can I change that?

BirdOPrey5
07-06-2012, 09:23 AM
That is the built in users_online.png image, it is in your images/misc/ directory for each style. It's usually used elsewhere in vBulletin as well.

So if you want to change or remove it just for this mod you will have to edit the templates-

block_staff_online_bop5 - Forum Sideblock Template
and/or
vbcms_widget_bop5_staffonline - CMS Widget

And in either template look for the image name in the text and change or remove it.

imported_polygrinder
07-06-2012, 03:17 PM
BirdOPrey5. You are the man.

dany_danay
07-06-2012, 05:16 PM
Not working for me. Installed, but nothing show: foro-ptc.com

BirdOPrey5
07-06-2012, 10:55 PM
Did you follow the instructions and manually create the forum block and copy in the code? I'm not seeing even an empty box so it doesn't look like that was ever done...

There is more to this mod then just installing the xml file.

fookaa
07-14-2012, 03:49 PM
Hi,

i installed this today and followed instructions to the tee and it all works fine except 1 thing.

I added several groups for it to display and it does not display them all, only 1 infact ?

Any ideas pls ?

BirdOPrey5
07-14-2012, 04:01 PM
When you say you "added several groups" what do you mean?

Usergroups? Or forum blocks? Link to your forum?

fookaa
07-14-2012, 04:23 PM
Hi,

My forums are private so u wont be able to see...

Yes i added several usergroups, i even created a new usergroup and put a few members in it and it never showed them...

It shows me as an admin, is it only showing the default groups and not created groups maybe ?

BirdOPrey5
07-14-2012, 05:04 PM
Did you check the boxes for the new groups in the mod settings?

fookaa
07-14-2012, 05:09 PM
Did you check the boxes for the new groups in the mod settings?

Yes

BirdOPrey5
07-16-2012, 09:50 AM
It does work on non-built in usergroups, but they must be primary usergroups. It will not pick up additional (secondary) usergroups as staff.

doctorsexy
07-25-2012, 05:13 PM
Smashin...thanks....

fishmaster
07-26-2012, 04:54 AM
Awesome mod

r00028304
08-04-2012, 05:00 PM
Perhaps you can help. It seems the profile image is too big thus overlapping the block? I've tried to halve the sizes in additional.css without success.. Am i doing something wrong?

BirdOPrey5
08-05-2012, 10:18 AM
i don't know... weird the name is below it too. And you say the size in additional.css isn't working? Make sure any code in additional.css is valid. A missing semi-colon for example can ruin lines below it. Try moving this mod's code to the top of additional.css.

If that doesn't help I'd need a link to see it first hand.

r00028304
08-05-2012, 11:17 AM
i don't know... weird the name is below it too. And you say the size in additional.css isn't working? Make sure any code in additional.css is valid. A missing semi-colon for example can ruin lines below it. Try moving this mod's code to the top of additional.css.

If that doesn't help I'd need a link to see it first hand.

Will check this out once i get home, cheers
-----------------------------------------------------

EDIT: Everything working fine by moving code to the top of additional.css

caf20012
08-21-2012, 02:24 PM
Help?

http://puu.sh/XqZ3

Its showing underneith the forum footer

BirdOPrey5
08-26-2012, 01:19 PM
Please post a link to your forum so I can see it in action.

Stormlilly
11-06-2012, 12:59 AM
Hey,

This looks like an awesome Mod and is exactly what I am looking for.

I noticed there was an update in July, does it now work on 4.x by any chance, or still only 4.2?

I am still way back on 4.0.7.

BirdOPrey5
11-10-2012, 08:10 PM
I've only tested it on 4.2, feel free to try it on earlier versions but no promises. Personally however I do not think it will work.

krysune
11-13-2012, 01:10 AM
I've only tested it on 4.2, feel free to try it on earlier versions but no promises. Personally however I do not think it will work.

How hard do you think it would be to port to VB 3.8.7? Is it even possible to get this working on it?

BirdOPrey5
01-26-2013, 10:50 PM
As there is no sidebar nor CMS in 3.x there is no way to port it to 3.x. It would need to be a completely separate mod. I would not be interested in making that mod, sorry.

Amaury
01-27-2013, 03:40 AM
Does this require any server work or do you just upload the .xml file with Add/Import Product and you're done?

BirdOPrey5
01-27-2013, 11:27 PM
Just import the xml file, and then some manual steps but no file uploads.

Andrei29
01-29-2013, 01:53 PM
Hi not working with 4.20 displaying the "Array" text inside the side block

Amaury
01-30-2013, 01:04 AM
I found a typo in your instructions. See the bold text below:

========= INSTALL or UPGRADE ========

To Install:
In Admin CP go to Plugins & Products -> Manage Products -> Add/Import Product
Click on "Choose File" and browse to the product xml file that was packaged in the .zip file.
Click "Import"

Next you must add the code below to the additional.css template of each style (Admin CP -> Style Manager -> (Choose Style) -> Edit Templates -> CSS Tmplatees -> additional.css

Also, I don't suppose you have a sidebar modification to show normal members? :)

EDIT: I found one by Lynne last night.

Justinphx
01-30-2013, 08:16 AM
I installed it on 4.1.12 p2 and worked just fine. Looks great!

Andrei29
01-30-2013, 01:51 PM
The side block alignment all went out of order and avatar and names overlap each other

Stormnet
01-30-2013, 02:30 PM
Works great, thank you!

BirdOPrey5
01-31-2013, 09:20 PM
Hi not working with 4.20 displaying the "Array" text inside the side block

Make sure you have reverted all your templates to the VB 4.2.0 versions. This happens if you still have older 4.x templates being used- there is usually a message in the top of the Admin CP saying X number of templates need to be reverted.

I found a typo in your instructions. See the bold text below:



Also, I don't suppose you have a sidebar modification to show normal members? :)

EDIT: I found one by Lynne last night.

Good eye.

The side block alignment all went out of order and avatar and names overlap each other

Likely due to custom styles, you will probably need to play with the CSS.

Amaury
02-01-2013, 03:41 AM
Is there a way to increase the spacing between the avatars? Long user titles wrap and go right against the username of the user below:

https://vborg.vbsupport.ru/external/2013/01/1.jpg

I'm assuming it's in the modification's CSS that I added in additional.css somewhere.

Amaury
02-14-2013, 03:44 PM
Is there a way to increase the spacing between the avatars? Long user titles wrap and go right against the username of the user below:

http://i101.photobucket.com/albums/m62/AmauryGarcia/44f0abff-848f-4198-be75-b60f3fa74f68_zpscb261e44.jpg

I'm assuming it's in the modification's CSS that I added in additional.css somewhere.

Bump? :)

I fixed this a while ago by increasing the sidebar width to 400px, making the user title be all on one line, but reverted it to the default 270px yesterday because it was just too long and causing some minor issues with thread title trimming.

Amaury
02-22-2013, 11:16 PM
*posts*

Just curious if you saw my posts or oversaw them by mistake. :)

BirdOPrey5
03-03-2013, 12:13 PM
Not missed, just don't have time to check in that often anymore.

Try adding this to additional.css:


.bop5staffol { padding: 0 0 10px 0 !important; }


That should add 10 pixels between the spacing on bottom, change 10px to whatever value works for you. Do not change the zeros.

Amaury
03-03-2013, 05:14 PM
Not missed, just don't have time to check in that often anymore.

Try adding this to additional.css:


.bop5staffol { padding: 0 0 10px 0 !important; }
That should add 10 pixels between the spacing on bottom, change 10px to whatever value works for you. Do not change the zeros.

Thanks for the response.

I finally got it a while ago, though.

I changed this in the code that came with it:
.bop5staffli {
height: 50px;
}You had 42px by default.

Dimentio
05-01-2013, 10:02 PM
Database error when installing on 4.2.0

Edit: Problem gone had to turn off the "Do Custom Fonts?" setting.

Fatal Hazard
06-03-2013, 02:10 PM
My sideblock says Array???

BirdOPrey5
06-03-2013, 03:13 PM
Make sure you are using this on VB 4.2.0 or higher.

Go to Admin CP -> Settings -> Languages & Phrases -> Find Updated Phrases and update any phrases listed.

Fatal Hazard
06-03-2013, 08:55 PM
I forgot to change the template used when adding the forum block. Fixed it now. Oh and nice plugin, like XenForo's but better :)

BirdOPrey5
06-03-2013, 11:13 PM
I forgot to change the template used when adding the forum block. Fixed it now. Oh and nice plugin, like XenForo's but better :)

Thanks. Please "Mark as Installed" on the side in the first post. :up:

Fatal Hazard
06-05-2013, 08:55 PM
Thanks. Please "Mark as Installed" on the side in the first post. :up:

Marked ;)

Paul.
06-06-2013, 05:17 PM
Installed on 4.2.0 and it shows the user names overlapping each other.
How can this be resolved?

BirdOPrey5
06-06-2013, 06:39 PM
Did you add the required code to additional.css template?

Can you post a link where it happens or a screenshot?

0verl0rd
06-09-2013, 11:16 PM
Hi,

Mine is showing a very big avatar and a username below the avatar... btw I changed the avatar size of a usergroup to 150/190... where can I specify the height/width of the avatar in staff online?

also..

how can I make it look like that... avatar on the left side and a username on right side... and rank title below the username?

mine is not using a rank title.

just a big avatar on top and this the username below the avatar

0verl0rd
06-09-2013, 11:26 PM
here is the image..

http://i.imgur.com/jXXJ1n9.png

BirdOPrey5
06-10-2013, 10:30 PM
You need to add the code in the readme / instructions file to the additional.css template as described.

Also it shows User Titles, not ranks.

0verl0rd
06-11-2013, 12:51 AM
Ah sorry I forgot that part... Thanks.. its working fine now...

Amaury
06-26-2013, 06:24 PM
If there are no staff online, instead of saying there are no staff online, any way to hide the block completely and go to the next block? (In my case, Currently Active Users.) Like on XenForo.

BirdOPrey5
07-06-2013, 09:33 PM
Will look into that in a future update.

findingpeace
07-08-2013, 12:18 PM
This is great! Is there any way to get the # of Staff currently online? For example, in the block title "Staff Online (#)"

I imagine this must be a SQL query or plugin somewhere. Any help would really be appreciated!

BirdOPrey5
07-10-2013, 09:23 PM
This is great! Is there any way to get the # of Staff currently online? For example, in the block title "Staff Online (#)"

I imagine this must be a SQL query or plugin somewhere. Any help would really be appreciated!

I will see about integrating this into a future version but for now...

Edit the Forum Blocks PHP code...

find

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

return $staffsarray;


Near the bottom

and replace both lines with these 3 lines:


$nums = "($bp5i)";

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

return $staffsarray;




Then in the template block_staff_online_bop5

Find the 2nd instance of:

{vb:rawphrase bop5_staff_online}

and add

{vb:raw content.nums}

right after it, include a space between them.

snakes1100
07-22-2013, 08:07 PM
BOP, how about the ability/option to remove the user title?

Nice add for the Total online call.

craigvm
08-07-2013, 05:05 PM
i`ve got this installed on my side block but i`ve noticed after a while no staff are showing online when i`m allways online but if i uninstall and install again it shows staff online for a while but then not showing again any idea , i had this on another site and worked fine tho

BirdOPrey5
08-17-2013, 12:06 PM
There is no reason installing/uninstalling should change anything. I would suspect whatever the issue it's with sessions on your site, not caused by this mod.

Amaury
08-17-2013, 08:15 PM
There is no reason installing/uninstalling should change anything. I would suspect whatever the issue it's with sessions on your site, not caused by this mod.

Yes, I agree. It's most likely to do with whatever he has the Session Timeout option set to because of caching with the staff online block.

For example, we have the Session Timeout option set to one hour on KH-Flare. If I'm inactive for over an hour and then reload the index, I will not see myself. I have the cache time set for one minute for the staff block, so if I reload the index a few minutes later, I will see myself again.

SPEEDKILLZ
11-02-2013, 04:21 PM
Love the mod but i get this? And it dont show any staff? Suggestions?

franzes80
11-02-2013, 07:20 PM
I have the same problem as SPEEDKILLZ on vb 4.2.2

ozzy47
11-02-2013, 07:24 PM
You probably did not change the Template to Use field from block_html to block_staff_online_bop5

That would give you the Array results.

franzes80
11-02-2013, 07:27 PM
Thank you ozzy47.Working now

ozzy47
11-02-2013, 07:30 PM
Not a problem, glad to help. :)

SPEEDKILLZ
11-03-2013, 08:06 PM
Not a problem, glad to help. :)


I got it to show but it is all messed up. Including the boarders?

ozzy47
11-03-2013, 08:08 PM
I don't see it on your site, so it is impossible for me to see what is going on.

SPEEDKILLZ
11-03-2013, 08:13 PM
I don't see it on your site, so it is impossible for me to see what is going on.

Sorry here i will enable

ozzy47
11-03-2013, 08:22 PM
Did you add the css to your additional.css template?

SPEEDKILLZ
11-03-2013, 08:27 PM
Did you add the css to your additional.css template?

Yes sir

SPEEDKILLZ
11-03-2013, 08:30 PM
This code



.bop5staffimg {
max-width: 40px;
max-height: 40px;
min-width: 40px;
min-height: 40px;
padding: 0 4px 2px 0;
float: left;
}

.bop5staffli {
height: 42px;
}

.bop5staffol {
padding: 1px;
}

.bop5staffuser {
font-size: 110%;
}

.bop5staffhr {
display: none;
}

ozzy47
11-03-2013, 08:37 PM
If I am not mistaken that is the TF_Ideal_Blue style.

The issue there is, the skin developer had to add <div class="clear"></div> to all the default sideblocks, which adds clear:both to the element basically a glorified, forced linebreak.

That is not standard coding, so of course any sideblocks that are coded to vBulletin default will look off in those styles.

To solve it you need to open the additional.css for each of the styles and find, #sidebar_container .blocksubhead,
#sidebar_container .blocksubhead.smaller

There you will see something like this:

#sidebar_container .blocksubhead,
#sidebar_container .blocksubhead.smaller {
background: {vb:stylevar notices_shadow_color} url({vb:stylevar imgdir_misc}/head_bg.png) repeat-x top;
color: {vb:stylevar blockhead_color};
font-family: {vb:stylevar blockhead_font};
font-weight: normal;
font-size: 20px;
font-weight: normal;
text-transform: uppercase;
text-shadow: 0 0 0 transparent, 0px 1px 0px #000000;
padding: 4px 10px;
height: auto !important;
border-left: 1px solid #dddddd;
border-top: 1px solid #dddddd;
border-right: 1px solid #dddddd;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
background-clip: padding-box;
}


After the last entry, before the } add the following:

overflow: hidden;

That should fix it for you.

SPEEDKILLZ
11-03-2013, 08:46 PM
Like a charm ozzy. Thank you

ozzy47
11-03-2013, 08:47 PM
Not a problem, I only know about this because I have dealt with that style before, and already had figured out how to fix it. :)

SPEEDKILLZ
11-03-2013, 08:49 PM
Well i am glad you are a advisor here. You are a huge help :) Now you can look at my latest post in more share option lol

cshellworld
12-02-2013, 11:54 PM
4.2.1 installed , rating 5 , nominated
thanks

RedTrinity
01-29-2014, 08:09 AM
Hi, just installed this for the first time, followed the instructions, getting this SQL error when I activate the block, which messes up the forum:

Database error in vBulletin 4.2.2:

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

FROM redtrin_session AS session
LEFT JOIN redtrin_user AS user ON(user.userid = session.userid)
WHERE session.lastactivity > 1390984366 AND user.usergroupid IN ()
ORDER BY username ASC;

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')
ORDER BY username ASC' at line 8

I've double checked everything, can't seem to work out where the problem is. Help!

:)

warfield
02-27-2014, 12:37 PM
:( i dont know how to edit additional.css

Meler
03-01-2014, 05:10 PM
You can add sorting displayed groups?

edgeless
03-13-2014, 02:24 AM
I've just installed this. How do you change the block title 'Current Staff Online' to something else? Changing the title in the 'edit block' form makes no difference.

ozzy47
03-13-2014, 02:26 AM
Try changing the phrase bop5_staff_online

edgeless
03-13-2014, 03:08 AM
Oh yeah. Thanks :)

ozzy47
03-13-2014, 03:13 AM
Not a problem, glad to help. :)

edgeless
03-13-2014, 02:58 PM
Well, here's one issue that I'm noticing... the current settings within the provided additional.css code tend to squeeze the larger avatars to the point of image distortion. For example, we have some staff avatars that are 180px × 120px and they end up looking very squeezed within the sidebar.

The actual aspect ratios of member avatars can however be preserved by changing max-width: 40px; to max-width: 60px; ...however, that misaligns the usernames and titles because they are each positioned the same distance from their respective multiple-width avatars.

So my choices seem to be: 1) accept the overly squeezed larger avatars, 2) accept the misaligned usernames, or 3) disable the display of avatars within this sideblock mod. The first two options don't look quite right. Playing around a bit, I've found that I can adjust the padding directive from 4px to, say, 24px. This will move the usernames farther toward the center of the sideblock. But unfortunately they are still misaligned.

I've noticed that various other sideblocks I add to the sidebar will auto-reduce avatar size proportionally in order to preserve aspect ratio and retain alignment of the text margin points. Can this somehow be done for this sideblock mod as well? And if not, is there any other solution that will allow the usernames and title text to line up while retaining the aspect ratios for larger avatars?

Other than this issue, I really love the mod!

Thanks

edgeless
03-13-2014, 08:31 PM
Update:
I've changed the max-width to 54 pixels ...while it's not perfect, I think I can live with it if there's no other available solution.

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 >>>>>>>>

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?

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? ....

OUTL4W
09-12-2014, 01:41 PM
after selecting the usergroups that are to be classified as "staff" and then clicking save will reload the page as normal but then none of the usergroups that were previously selected....are then ALL un-ticked.

Frosti
01-31-2015, 09:58 PM
No 'extra' usergroups showed up for me either...
then I got a big database error very similar to Cheechdog

Bottom line is once I got it back to working it still didn't show any group besides admin/mods... no other group I checked (which was an option to do) showed up while that group was online for quite some time.

MarkFL
04-08-2015, 01:58 PM
Any idea why i'm getting a databaser error?

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'

You likely do not have the "PER USERNAME COLOR, SIZE, FONT MOD" installed and have set one or more of the options depending on this mod to yes. Try setting those last 3 options to "No" and see if you have bliss...:D

Megaboost
04-12-2015, 10:27 AM
Installed and working just fine with 4.2.2

fxsuccess
09-13-2015, 06:19 PM
Not work

friendlymela
12-06-2015, 03:04 PM
Installed..

CAG CheechDogg
01-01-2016, 07:43 PM
Can someone look into why this doesn't work on 4.1.x ....

BirdOPrey5
01-05-2016, 02:12 PM
What exactly isn't working? Are you getting an error? A white screen? nothing? Did you try the sideblock or cms widget? both? What version of VB and PHP exactly? You should include this basic info if a mod isn't working, just reporting it not working is useless. Need to give me something to work with. Thanks.

CAG CheechDogg
01-05-2016, 03:12 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

What exactly isn't working? Are you getting an error? A white screen? nothing? Did you try the sideblock or cms widget? both? What version of VB and PHP exactly? You should include this basic info if a mod isn't working, just reporting it not working is useless. Need to give me something to work with. Thanks.

I asked about this before BOP5s ...

The sidebar block doesn't display anything at all and the error mentioned above pops up ...

BirdOPrey5
01-06-2016, 10:07 AM
Exact PHP version and VB Version?

CAG CheechDogg
01-06-2016, 01:35 PM
Exact PHP version and VB Version?

I sent you a pm with the information BOP5 ... I rather not post it for security reasons ... hope you understand

geosharing
02-05-2016, 09:54 AM
not working at my side i am setup all things but now active ..

WindVoice
01-10-2017, 08:51 PM
How to order admins by their usergroups.

XotelHotel
02-12-2017, 03:24 PM
Hey loving the Mod installed it all right did the Forum Block due toi me not havingf the CMS to do widget yet i see nothing on the main style help

update fixed the 1st half it dosn't show the new post and other things on the slider and i am useing the alternertave slider from your mod help
also this pops up when i useing your slider
PHP Warning: mysqli_query(): (42S22/1054): Unknown column 'user.bop5_userfont' in 'field list' in ..../includes/class_core.php on line 1394
Database Error Database error
The Habbolution database has encountered a problem.
Please try the following:
Load the page again by clicking the Refresh button in your web browser.
Open the forums.habbolution.com home page, then try to open another page.
Click the Back button to try another link.
The forums.habbolution.com forum technical staff have been notified of the error, though you may contact them if the problem persists.

We apologise for any inconvenience.

Database error in vBulletin 4.2.3:

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 , user.bop5_usersize AS bop5_usersize , user.bop5_usercolor AS bop5_usercolor
FROM session AS session
LEFT JOIN user AS user ON(user.userid = session.userid)
WHERE session.lastactivity > 1486939441 AND user.usergroupid IN (7,2,6,10,13,16,17,11,14,18,9,19,12,15,20,-1)
ORDER BY username ASC;

MySQL Error : Unknown column 'user.bop5_userfont' in 'field list'
Error Number : 1054
Request Date : Sunday, February 12th 2017 @ 10:59:01 PM
Error Date : Sunday, February 12th 2017 @ 10:59:01 PM
Script : http://forums.habbolution.com/forum.php
Referrer : http://forums.habbolution.com/forum.php
IP Address : My IP been removed on here for secruity Reasons
Username : YTFilthyAngelOfHype
Classname : vB_Database_MySQLi
MySQL Version : 10.1.18-MariaDB

XotelHotel
02-13-2017, 02:17 PM
@BOP5

BirdOPrey5
02-14-2017, 07:09 PM
Hello,

I see your post, but I'm sorry this mod is unsupported. I hate this mod, it worked(s) for most people but it was an ugly mod to build and I don't have the time to support it. I'm sorry.

The code is marked re-usable in case someone else wants to take it over.

yilmaz
01-18-2018, 01:46 AM
Hello,

I see your post, but I'm sorry this mod is unsupported. I hate this mod, it worked(s) for most people but it was an ugly mod to build and I don't have the time to support it. I'm sorry.

The code is marked re-usable in case someone else wants to take it over.

Thank you for marking the reusable code.

I made some changes for easy installation.

If you allow, I would like to share it with another topic.

Thank you!

CAG CheechDogg
01-18-2018, 02:40 AM
Thank you for marking the reusable code.

I made some changes for easy installation.

If you allow, I would like to share it with another topic.

Thank you!

He said it's reusable so I am sure he doesn't mind ...

BirdOPrey5
01-20-2018, 03:05 PM
Thank you for marking the reusable code.

I made some changes for easy installation.

If you allow, I would like to share it with another topic.

Thank you!

He said it's reusable so I am sure he doesn't mind ...

CAG CheechDogg is correct, if it's marked reusable it means you are free to repost it under your own thread on vBulletin.org. Please just mention/link to where you got the code from in your post.

ramesh_umk3
02-03-2020, 10:57 AM
For https support use below 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'] = str_replace('http','https',$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;
}

Credits: Exp500