| User | Post |
|
5:04 am November 10, 2010
| roles99
Member
| | | |
|
| posts 3 |
|
|
Hi, firstly thanks for an excellent plugin - we think it's great
We want to create a 'writer of the month' award to issue to our team of authors. I decided it might be a good idea to create a RS group called "Writer of the Month" and then, each month, add the winners to that group. So far, so easy…
In single.php I want to display a small yellow star next to any author who is a member of "Writer of the Month" RS group. Is this possible? I know you can use code to see if the logged in user is a member of a RS group, but I need a way to see if the_author is a member of a group.
|
|
|
11:08 am November 10, 2010
| Kevin
Admin
| | | |
|
| posts 2503 |
|
|
You'll have to use this function call and then compare the array of member IDs to the user in question:
$group_members = ScoperAdminLib::get_group_members( $your_group_id, COL_ID_RS );
|
|
|
3:35 pm November 10, 2010
| roles99
Member
| | | |
|
| posts 3 |
|
|
I'm a learner programmer! But let me see if I understand this correctly.
Something like this?
$group_members = ScoperAdminLib::get_group_members( '12', COL_ID_RS );
$winnerid = get_the_author_meta('ID');
if (in_array($winnerid, $group_members)) {
// something
}
Is that it?
|
|
|
3:44 pm November 10, 2010
| Kevin
Admin
| | | |
|
| posts 2503 |
|
|
roles99 said:
I'm a learner programmer! But let me see if I understand this correctly.
Something like this?
$group_members = ScoperAdminLib::get_group_members( '12′, COL_ID_RS );
$winnerid = get_the_author_meta('ID');
if (in_array($winnerid, $group_members)) {
// something
}
Is that it? 
That looks right!
|
|
|
8:23 am November 11, 2010
| roles99
Member
| | | |
|
| posts 3 |
|
|
Seems to be working a treat
|
|