vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   usergroup in memberlist (https://vborg.vbsupport.ru/showthread.php?t=33915)

StarBuG 01-08-2002 01:30 PM

Hi!

How can I show the usergroup after the username in the memberlist??

I menaged to show the groupid but i want the name!

help plz

StarBuG

StarBuG 01-09-2002 06:29 PM

No one can help ????

StarBuG

Admin 01-09-2002 06:36 PM

Err I'm in a bit of a hurry, but try replacing this in memberlist.php:
Code:

  $users=$DB_site->query("SELECT *
                          FROM user,userfield
                          WHERE $condition AND

with this:
Code:

  $users=$DB_site->query("SELECT *
                          FROM user,userfield
                          LEFT JOIN usergroup ON usergroup.usergroupid=user.usergroupid
                          WHERE $condition AND

then try using $user[title] in the memberlistbit template.

Hope this works. :)

Tarion 01-09-2002 08:32 PM

nope there where no output in the memberlist.

StarBuG 01-09-2002 11:38 PM

I get this error:

Invalid SQL: SELECT *
FROM user,userfield
LEFT JOIN usergroup ON usergroup.usergroupid=user.usergroupid
WHERE 1=1 AND
user.userid = userfield.userid
AND usergroupid NOT IN (1,3,4)
ORDER BY username ASC
LIMIT 0,30
mysql error: Column: 'usergroupid' in where clause is ambiguous

mysql error number: 1052

Any suggestions?

Admin 01-10-2002 09:39 AM

Replace this:
Code:

                                ".iif($memberAllGood, " AND usergroupid NOT IN (1,3,4) ", "")."
                          ORDER BY $orderby $direction

with:
Code:

                                ".iif($memberAllGood, " AND user.usergroupid NOT IN (1,3,4) ", "")."
                          ORDER BY $orderby $direction


Tarion 01-10-2002 09:50 AM

Firefly, in memberlistbit Template don't add $user[title], add this $unserinfo[title] and it will work.

THX for your help

StarBuG 01-10-2002 05:51 PM

Quote:

Originally posted by Tarion
Firefly, in memberlistbit Template don't add $user[title], add this $unserinfo[title] and it will work.

THX for your help

You made a Typo $userinfo[title] not unserinfo[titel] but that was the solution!!

THX to both of u for your help!!!

Greetings

StarBuG

Tarion 01-10-2002 06:10 PM

sorry litte false, but i think everyone can understand this :) now

THX for the corretion

5861king 01-14-2002 10:15 PM

is there away of displaying the usergroup text in the postbit template, if so what will i need to do!!!!!

squawell 01-15-2002 02:22 AM

i got the same error

Invalid SQL: SELECT *
FROM user,userfield
LEFT JOIN usergroup ON usergroup.usergroupid=user.usergroupid
WHERE 8=8 AND
user.userid = userfield.userid
AND usergroupid NOT IN (1,3,4)
ORDER BY username ASC
LIMIT 0,30
mysql error: Column: 'usergroupid' in where clause is ambiguous

and i already replace the code with FireFly's post

any idea??

Admin 01-15-2002 12:18 PM

Quote:

Originally posted by squawell
and i already replace the code with FireFly's post
No, you didn't.

squawell 01-16-2002 03:57 AM

Quote:

Originally posted by FireFly

No, you didn't.

yes i'm sure!!

see my code
PHP Code:

$users=$DB_site->query("SELECT *
                          FROM user,userfield
                          LEFT JOIN usergroup ON usergroup.usergroupid=user.usergroupid
                          WHERE 
$condition AND
                                user.userid = userfield.userid
                                "
.iif($memberAllGood" AND user.usergroupid NOT IN (1,3,4) """)."
                          ORDER BY 
$orderby $direction
                          LIMIT "
.($limitlower-1).",$perpage"); 

it should be like this isn't it??

but it still cann't work~~

Admin 01-16-2002 02:21 PM

Then you didn't upload the file, because that query you pasted is not with the fix.

ElecEagle 03-13-2002 01:47 AM

Sorry to bother, but I have one quick question:

I have added this 'hack', but could someone please post what I would need to change in it to use the "user status" field for the group, rather than the group name? It's probably pretty easy ...I just don't know off hand what it would be. ...

sgeiger 09-03-2004 12:38 PM

Chen,

How could I change this query to only show members of a usergroup when one clicks on memberlist.

I want no outside groups to see the members of other user groups.

Group A to see only group A members in memberlist....
and
Group B to only see group B members in member list....




Quote:

Originally Posted by Chen
Err I'm in a bit of a hurry, but try replacing this in memberlist.php:
Code:

  $users=$DB_site->query("SELECT *
                          FROM user,userfield
                          WHERE $condition AND

with this:
Code:

  $users=$DB_site->query("SELECT *
                          FROM user,userfield
                          LEFT JOIN usergroup ON usergroup.usergroupid=user.usergroupid
                          WHERE $condition AND

then try using $user[title] in the memberlistbit template.

Hope this works. :)



All times are GMT. The time now is 02:45 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.01086 seconds
  • Memory Usage 1,758KB
  • 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
  • (6)bbcode_code_printable
  • (1)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (16)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete