Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #1  
Old 02-26-2007, 02:15 PM
Jenkins Jenkins is offline
 
Join Date: Nov 2002
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default display the memberes of a certain usergroup as a vertical list one per line?

I would like to be able to incorporate a list of users in a "right colum code" hack that i have on my board, is there a way to do this? I just need it to list one user per line as seen on my current board, except this list is done manually, i'd like to to autoupdate as the members in the usergroup change.

http://www.okgmp.com you can see the list on the right about middle way.
Reply With Quote
  #2  
Old 02-26-2007, 06:14 PM
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Location: Tallahassee, Florida
Posts: 2,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Try this; create a new plugin at forumhome_start with the following:
Code:
$query = $db->query_read("SELECT username,userid FROM user WHERE usergroupid = 'X'");

while($row = mysql_fetch_array($query))
{
eval('$usernames .= "' . fetch_template('forum_users_bit') . '";');
}
Note the Red X must be replaced with the UsergroupID of the Users you're trying to retrieve.

Then create a new template named "forum_users_bit" with the following:
Code:
<a href="member.php?u=$row[userid]">$row[username]</a>,&nbsp;
Then just place "$usernames" in your Forumhome template and you're off.


You can fiddle with it yourself if you're not trying to place it on the forumhome.
Reply With Quote
  #3  
Old 02-27-2007, 01:49 PM
Jenkins Jenkins is offline
 
Join Date: Nov 2002
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

looks simple enough, just one other question.

Okay seems to work fine in the forumhome, how can I make it work in the "RightColumn" template? do I need to move the HOOK to somewhere or something? sorry I'm not too good with coding..
Reply With Quote
  #4  
Old 02-27-2007, 07:43 PM
Kirk Y's Avatar
Kirk Y Kirk Y is offline
 
Join Date: Apr 2005
Location: Tallahassee, Florida
Posts: 2,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Where is your Right Column being placed? You'd probably be fine just changing the Hook's location from "forumhome_start" to "global_start". This'll make it available on the majority of templates.
Reply With Quote
  #5  
Old 02-28-2007, 04:52 PM
Jenkins Jenkins is offline
 
Join Date: Nov 2002
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

the right column has it's own template off of the root (i guess you could say) it's not a sub template in any other template. the varible for the right column code is in the forum home template. I'll try moving the hook location to global and see what happens.

thanks for the help!

***EDIT***
hmm.. still no workie I moved the hook location to global_start but still nothing in the right column. weird.
Reply With Quote
  #6  
Old 03-05-2007, 02:51 AM
Jenkins Jenkins is offline
 
Join Date: Nov 2002
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone? surely someone knows how to do this?

all the code is working right I guess I just need to find the correct place to put my hook? I tried Global but it doesn't work.
Reply With Quote
  #7  
Old 08-30-2007, 07:26 AM
dfinkle dfinkle is offline
 
Join Date: Jul 2005
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm in the same boat. Can anyone help?
Reply With Quote
  #8  
Old 03-31-2008, 04:35 PM
Jenkins Jenkins is offline
 
Join Date: Nov 2002
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone ever get this to work? Would still like to do this.
Reply With Quote
  #9  
Old 09-12-2008, 04:54 PM
ResaleBroker's Avatar
ResaleBroker ResaleBroker is offline
 
Join Date: Aug 2004
Location: Arizona, USA
Posts: 111
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would like to the list members in a secondary usergroup. I've changed "usergroupid" to "membergroupids". With "usergroupid" all members of the primary usergroup (X) are displayed however with"membergroupids" only one (1) member of the secondary usergroup (X) is being displayed. Any ideas?

Code:
$query = $db->query_read("SELECT username,userid FROM user WHERE membergroupids = '51'");
while($row = mysql_fetch_array($query))
{
eval('$usernames .= "' . fetch_template('forum_users_bit') . '";');
}
Reply With Quote
  #10  
Old 05-13-2009, 12:22 AM
DiSpy's Avatar
DiSpy DiSpy is offline
 
Join Date: Feb 2007
Location: South Florida!!
Posts: 107
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm... did anyone ever figure this out? It seems to be working in the origional thread starters' page, but I can't get it working on mine.

EDIT: got it working, nevermind.
Reply With Quote
Reply

Thread Tools
Display Modes

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:29 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07690 seconds
  • Memory Usage 2,243KB
  • Queries Executed 13 (?)
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
  • (3)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)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_postinfo_query
  • fetch_postinfo
  • 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