![]() |
Getting the group ID of edited post
How do you get the group ID of the user that edited a post? I wanted to display a different style if the post was edited by moderators or admins.
|
Hello,
Wrap the output with if conditionals like this: Code:
<if condition="is_member_of($bbuserinfo, 6)"> Code:
<if condition="is_member_of($bbuserinfo, 6,5,7)"> |
That's what I did but not exactly what I wanted. The logic is: if the post was edited by a moderator or admin, show it using a different style (div) else use normal style.
|
Hello,
To make it look differently, you will need to add YOUR code between the conditions. For example: <if condition="is_member_of($bbuserinfo, 6)"> <div class="YOURS">Admins Display This for editted post</div> </if> </else> <if condition="is_member_of($bbuserinfo, 2)"> Whatever is normally here! </if> I don't know exactly where the editted post info is located, so i don't know how it is handled. (Don't have time to search through the templates right now.) |
What he wants is not quite as simple as that - $bbuserinfo is the information for the poster, not the editor.
|
Hello,
I just ran a test on my site to see if I could figure this out. This is what I did and it worked for me: Code:
<if condition="is_member_of($bbuserinfo, 6)"> I didn't play with the colors or anything. I just added the little text that is bolded to see if it saw the difference. I editted a post of my test account and it displayed the "No No" like I wanted it to. I then logged in with my test account, which is a normal user, and it displayed the "HA HA" when he editted like I wanted it to. On both of these I entered a reason for the edit. The only other thing I was going to try was the $post[edit_userid] and perhaps create an array with the user id's of those in the staff. I am not sure if this will remain working but I was thinking that since the edit function passes through the permissions system this would be adequate. |
All times are GMT. The time now is 04:50 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|