Go Back   vb.org Archive > vBulletin 4 Discussion > vB4 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 02-05-2014, 01:58 AM
patracy patracy is offline
 
Join Date: Feb 2006
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Display a list of users in a usergroup under a forum?

Anyone have an idea of how to make this work?

I'd like to take the vendor usergroup we have (id:20) and have a forum display setup to list their usernames in a list (with hyperlinks to their profiles) as a forum.
Reply With Quote
  #2  
Old 02-05-2014, 01:26 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I don't know what you mean when you say "as a forum". But maybe a roster mod, like this one: https://vborg.vbsupport.ru/showthread.php?t=299659 . I haven't tried it myself, and you might want to look at others by searching vb4 mod titles for "roster".
Reply With Quote
  #3  
Old 02-06-2014, 01:54 PM
patracy patracy is offline
 
Join Date: Feb 2006
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nahh, not really what I'm looking for. I'd like to simply display under a forum place holder a list of names with the names being hyperlinks to their profiles. Not really wanting another page to display. I assume that there's something that could be leveraged from the canned vB file showgroups.php since they display there. Just really would like to trim it down to either a single page that would display only the vendor usergroup (not the admin/mods) or a simple listing of user names on the main page, which is really what I'm aiming for.
Reply With Quote
  #4  
Old 02-06-2014, 04:56 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well, you could try creating a plugin using hook location forumdisplay_complete and code like this (change the X on the first line to the id of the forum where you want it to display):
PHP Code:
if ($forumid == X)
{
   if (
$result $vbulletin->db->query_read_slave("SELECT * FROM " TABLE_PREFIX "user WHERE usergroupid=20 ORDER BY username"))
   {
      while (
$user $vbulletin->db->fetch_array($result))
      {
         
$members[] = $user;
      }
      
$template vB_Template::create('my_memberlist');
     
$template->register('members'$members);
     
$template_hook['forumdisplay_below_threadlist'] .= $template->render();
   }


then create a new template something like this:
Code:
Members:<br /><br />
<vb:each from="members" key="key" value="member">
<a href="{vb:link member, {vb:raw member}}">{vb:var member.username}</a><br />
</vb:each>
<br/><br/>

In this example I named the new template 'my_memberlist', but you can name it anything you want as long as you change it in the plugin code as well.

Of course this is a simple example, html isn't really my thing so I'll leave it up to you to make it look good.
Reply With Quote
  #5  
Old 02-13-2014, 08:48 PM
patracy patracy is offline
 
Join Date: Feb 2006
Posts: 45
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm, so I did all this, but all I see is the newly formed forum, but no listing. Is there something I should do in how the forum is setup? Maybe insert some code into the link?
Reply With Quote
Reply


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 02:15 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.04141 seconds
  • Memory Usage 2,202KB
  • Queries Executed 11 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete