The Arcive of vBulletin Modifications Site. |
|
associate $usergroup[title] with specific post? Details »»
|
|||||||||||||||||||||||||
let's suppose i have a board with users who can change their usertitle. as an admin i want to see what usergroup they are in, right under the usertitle.
this is what i tried: showthread.php PHP Code:
thanks for your help. Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
do you mean something like $post[usergroupid]
|
|
#3
|
||||
|
||||
|
i want to be able to grab the usergroup title. for example to show the user is part of Administrators Group.
|
|
#4
|
||||
|
||||
|
In showthread.php replace:
Code:
avatardateline","")." FROM post ".iif($forum[allowicons],'LEFT JOIN icon ON icon.iconid=post.iconid','')." Code:
avatardateline","").",usergroup.title AS usergrouptitle FROM post ".iif($forum[allowicons],'LEFT JOIN icon ON icon.iconid=post.iconid','')." LEFT JOIN usergroup ON (usergroup.usergroupid=user.usergroupid) |
|
#5
|
||||
|
||||
|
thanks alot firefly.
|
|
#6
|
||||
|
||||
|
hmmm..
Code:
Database error in vBulletin 2.2.4:
Invalid SQL:
SELECT
post.*,post.username AS postusername,post.ipaddress AS ip,user.*,userfield.*,icon.title as icontitle,icon.iconpath,
attachment.attachmentid,attachment.filename,attachment.visible AS attachmentvisible,attachment.counter,usergroup.title AS usergrouptitle
,avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar,customavatar.dateline AS avatardateline
FROM post
LEFT JOIN icon ON icon.iconid=post.iconid
LEFT JOIN usergroup ON usergroup.usergroupid=user.usergroupid
LEFT JOIN user ON user.userid=post.userid
LEFT JOIN userfield ON userfield.userid=user.userid
LEFT JOIN avatar ON avatar.avatarid=user.avatarid
LEFT JOIN customavatar ON customavatar.userid=user.userid
LEFT JOIN attachment ON attachment.attachmentid=post.attachmentid
WHERE post.postid IN (0,1,2)
ORDER BY dateline
mysql error: Cross dependency found in OUTER JOIN. Examine your ON conditions
mysql error number: 1120
Script: http://localhost/forum/forum/showthread.php?threadid=1
Referer: http://localhost/forum/forumdisplay.php?forumid=2
|
|
#7
|
||||
|
||||
|
ok.. i tried this:
PHP Code:
thanks alot. |
|
#8
|
||||
|
||||
|
I dunno... try moving the row with LEFT JOIN user above the row with LEFT JOIN usergroup. *shrugs*
|
|
#9
|
||||
|
||||
|
any of the devs(or hackers) can give me a hint? freddie, PPN? can you make a roumanian happy? thank you for taking the time to read this.
|
|
#10
|
|||
|
|||
|
were do i add this?
|
![]() |
|
|