News:

Wondering if this will always be free?  See why free is better.

Main Menu

SSI MemberGroup

Started by SleePy, November 07, 2006, 10:48:21 AM

Previous topic - Next topic

lordtron

#60
How would you pull the avatar instead of the member's name. I tried using the code I used for other pages to pull the avatar, but for some reason it will only pull mine.

VainSoftGames.com - New Design To Gaming

SleePy

By default this mod doesn't get such info.

You would have to add in the calls to the query to find the avatar and then add it as part of the output :)
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

ℓσяєиz

Hi,
Thanks for mod

I did add. feature

member post , avatar , karma , mail

Code (find) Select

$request = db_query("
SELECT ID_MEMBER, realname, ID_GROUP
FROM {$db_prefix}members
WHERE ID_GROUP IN (" . implode(', ',$groupid) . ")".$additional."
ORDER BY '".($sort == 2 ? 'ID_MEMBER' : 'realname')."' ".($sortorder == 2 ? 'DESC' : 'ASC')."", __FILE__, __LINE__);
}
else
$request = db_query("
SELECT ID_MEMBER, realname, ID_GROUP
FROM {$db_prefix}members
WHERE ID_GROUP = " . $groupid . ($additional == 1 ? "
OR FIND_IN_SET(" . $groupid . ", additionalGroups)" : "")."
ORDER BY '".($sort == 2 ? 'ID_MEMBER' : 'realname')."' ".($sortorder == 2 ? 'DESC' : 'ASC')."", __FILE__, __LINE__);


Code (replace) Select

$request = db_query("
SELECT ID_MEMBER, realname, ID_GROUP, avatar, karmaGood, emailAddress, posts
FROM {$db_prefix}members
WHERE ID_GROUP IN (" . implode(', ',$groupid) . ")".$additional."
ORDER BY '".($sort == 2 ? 'ID_MEMBER' : 'realname')."' ".($sortorder == 2 ? 'DESC' : 'ASC')."", __FILE__, __LINE__);
}
else
$request = db_query("
SELECT ID_MEMBER, realname, ID_GROUP, avatar, karmaGood, emailAddress, posts
FROM {$db_prefix}members
WHERE ID_GROUP = " . $groupid . ($additional == 1 ? "
OR FIND_IN_SET(" . $groupid . ", additionalGroups)" : "")."
ORDER BY '".($sort == 2 ? 'ID_MEMBER' : 'realname')."' ".($sortorder == 2 ? 'DESC' : 'ASC')."", __FILE__, __LINE__);



Code (find) Select
$membergroup[] = array(
'id' => $row['ID_MEMBER'],
'name' => $row['realname']
);

Code (replace) Select
$membergroup[] = array(
'id' => $row['ID_MEMBER'],
'name' => $row['realname'],
'post' => $row['posts'],
'avatar' => $row['avatar'],
'karma' => $row['karmaGood'],
'mail' => $row['emailAddress']
);


Use :
avatar
<img src="'.$info['avatar'].'"  alt=" '.$info['name'].'" />
karma :
$info['karma']
post :
$info['post']
Email  :
$info['mail']

Barış Dokumacı


MY THEMES

The greates enemy will hide in the last place you would ever lock..

Acans

Kool mod, but what do i need to do do display all members in this order

group_id=1
group_id=9
Group_id=2
group_id=10
"The Book of Arantor, 17:3-5
  And I said unto him, thy database query shalt always be sent by the messenger of $smcFunc
  And $smcFunc shall protect you against injections and evil
  And so it came to pass that mysql_query was declared deprecated and even though he says he is not
  dead yet, the time was soon to come to pass when mysql_query shall be gone and no more

SleePy

ssi_membergroup(1);
ssi_membergroup(9);
ssi_membergroup(2);
ssi_membergroup(10);
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

npereira

How can this mod work on SMF2.0RC1-1?

Please advise.

npereira

Nevermind... Was able to finaly get this running with ezportal and custom PHP block.

Biology Forums

What if you only want the top 10 in that membergroup?

SleePy

I don't currently support this mod anymore.
However you can have it return data as an array, and then do your own coding to stop after it displays the first 10.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Biology Forums

Quote from: SleePy on February 19, 2011, 06:27:59 PM
I don't currently support this mod anymore.
However you can have it return data as an array, and then do your own coding to stop after it displays the first 10.

I see, thank you. One question, perhaps you still remember, but how do you add the persons avatar, like a smaller 30 x 30 version of it next to his/her name? ???

SleePy

You would have to modify the code to do this :)

I don't support this as SMF 2.0 fully supports this beyond what this mod offers.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

Biology Forums

Quote from: ℓσяєиz on September 18, 2008, 09:22:41 PM
Hi,
Thanks for mod

I did add. feature

member post , avatar , karma , mail

Code (find) Select

$request = db_query("
SELECT ID_MEMBER, realname, ID_GROUP
FROM {$db_prefix}members
WHERE ID_GROUP IN (" . implode(', ',$groupid) . ")".$additional."
ORDER BY '".($sort == 2 ? 'ID_MEMBER' : 'realname')."' ".($sortorder == 2 ? 'DESC' : 'ASC')."", __FILE__, __LINE__);
}
else
$request = db_query("
SELECT ID_MEMBER, realname, ID_GROUP
FROM {$db_prefix}members
WHERE ID_GROUP = " . $groupid . ($additional == 1 ? "
OR FIND_IN_SET(" . $groupid . ", additionalGroups)" : "")."
ORDER BY '".($sort == 2 ? 'ID_MEMBER' : 'realname')."' ".($sortorder == 2 ? 'DESC' : 'ASC')."", __FILE__, __LINE__);


Code (replace) Select

$request = db_query("
SELECT ID_MEMBER, realname, ID_GROUP, avatar, karmaGood, emailAddress, posts
FROM {$db_prefix}members
WHERE ID_GROUP IN (" . implode(', ',$groupid) . ")".$additional."
ORDER BY '".($sort == 2 ? 'ID_MEMBER' : 'realname')."' ".($sortorder == 2 ? 'DESC' : 'ASC')."", __FILE__, __LINE__);
}
else
$request = db_query("
SELECT ID_MEMBER, realname, ID_GROUP, avatar, karmaGood, emailAddress, posts
FROM {$db_prefix}members
WHERE ID_GROUP = " . $groupid . ($additional == 1 ? "
OR FIND_IN_SET(" . $groupid . ", additionalGroups)" : "")."
ORDER BY '".($sort == 2 ? 'ID_MEMBER' : 'realname')."' ".($sortorder == 2 ? 'DESC' : 'ASC')."", __FILE__, __LINE__);



Code (find) Select
$membergroup[] = array(
'id' => $row['ID_MEMBER'],
'name' => $row['realname']
);

Code (replace) Select
$membergroup[] = array(
'id' => $row['ID_MEMBER'],
'name' => $row['realname'],
'post' => $row['posts'],
'avatar' => $row['avatar'],
'karma' => $row['karmaGood'],
'mail' => $row['emailAddress']
);


Use :
avatar
<img src="'.$info['avatar'].'"  alt=" '.$info['name'].'" />
karma :
$info['karma']
post :
$info['post']
Email  :
$info['mail']

I've tried this but it doesn't work... I would like to place a 30X30 avatar image of the users belonging to that group. Could someone help please!

Advertisement: