View Full Version : Custom Eval Code Support
TheSupportForum
11-01-2012, 09:16 AM
Hello guys
im looking for support similar to a custom eval code from below
select:eval
$options = construct_forum_chooser_options(1);
in Option Code for custom eval code
is their a way to show a list of users from the following usergroups
administrators,Super Moderators, Moderators
You could try this:
select:eval
global $vbulletin;
$result = $vbulletin->db->query_read_slave("SELECT username, userid, usergroupid FROM " . TABLE_PREFIX . "user WHERE usergroupid IN(5, 6, 7) ORDER BY usergroupid");
$options = array();
while ($row = $vbulletin->db->fetch_array($result))
{
$options[$row['userid']] = htmlspecialchars_uni($row['username']);
}
TheSupportForum
11-01-2012, 02:53 PM
You could try this:
select:eval
global $vbulletin;
$result = $vbulletin->db->query_read_slave("SELECT username, userid, usergroupid FROM " . TABLE_PREFIX . "user WHERE usergroupid IN(5, 6, 7) ORDER BY usergroupid");
$options = array();
while ($row = $vbulletin->db->fetch_array($result))
{
$options[$row['userid']] = htmlspecialchars_uni($row['username']);
}
i'll give it a try
--------------- Added 1351781773 at 1351781773 ---------------
kh99
it works :)
all i have to do now is test this with what i need it for :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.