vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=252)
-   -   Users currently viewing this thread based on usergroup (https://vborg.vbsupport.ru/showthread.php?t=317279)

EvanAbagail 02-11-2015 10:42 PM

Users currently viewing this thread based on usergroup
 
Hello,

I want to make it so only certain usergroups can view who is currently browsing a thread. Preferably, it'd also be nice if this was applicable to certain forums only, how-ever this isn't needed.

Are there any modifications that can do this? Thanks!

SaN-DeeP 02-12-2015 06:06 PM

Not sure if a modification as per your request exists.. (not at majority/maximum require this)

But 100% doable.. probably find the right coder..
It seems vb.org is not yet dead (as per statements from many other sites)..

VB.ORG is still very active..

EvanAbagail 02-12-2015 07:10 PM

Where can I make such a request for FREE?(I'd be able to offer a free cents, nothing more for one modification).

ozzy47 02-12-2015 07:47 PM

Where are you talking to restrict this display, on forumdisplay.php or showthread.php

EvanAbagail 02-12-2015 10:39 PM

Well it'd be optimal for BOTH if possible. So maybe something like having the option to set certain usergroups for specific forum boards.

kh99 02-13-2015 07:31 PM

You could create a plugin using hook location showthread_start and this code:
Code:

$stu_usergroups = array(5, 6, 7); // usergroupis who will see "users browsing this thread"
$stu_forums = array(5); // forum id to show "users browsing this thread"

if (is_member_of($vbulletin->userinfo, $stu_usergroups) AND in_array($forumid, $stu_forums))
{
  $vbulletin->options['showthreadusers']=1; // 1=alphabetical all visitors,
                                            // 2=random order all visitors,
                                            // 3=alphabetical registered members only
                                            // 4=random order registered members only
}


where you'd have to edit the $stu_usergroups and $stu_forums arrays as needed, and you can also change the '1' to whichever type of display you want, as noted in the comments.

You could copy the entire block of code as many times as you needed (select it, copy it, and paste it at the end), if you want to allow different groups to see the display in different forums.

EvanAbagail 02-14-2015 12:11 AM

How would I put this together to form a product? Can you compile it into a script for me please? Or is it just something going in showthread.php?

Elite_360_ 02-14-2015 12:39 AM

i can make a mod for you

--------------- Added [DATE]1423895374[/DATE] at [TIME]1423895374[/TIME] ---------------

Well the mod is finish i will upload it tomorrow and post the link to the mod here.

kh99 02-14-2015 11:05 AM

Quote:

Originally Posted by EvanAbagail (Post 2537348)
How would I put this together to form a product? Can you compile it into a script for me please? Or is it just something going in showthread.php?

It's a plugin, so you'd go to Plugins & Products and Add New Plugin. I thought about making a full product, but it would be a little difficult to have more than one set of groups/forums so I thought this might be OK. Also, there's usually someone else willing to make it into product :).

Elite_360_ 02-14-2015 09:44 PM

here is the link to that mod e360 Usergroup Forum Permissions for Users Browsing Forums & Threads


All times are GMT. The time now is 04:17 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.01495 seconds
  • Memory Usage 1,728KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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