Oh. Optgroup is an html tag that allows background images.
So, I made this change to the select in the "[Mood Manager] - Make Drop Down Menu" hook:
PHP Code:
foreach ($moodslist AS $mood)
{
$mood = trim($mood);
if ($mood == $vbulletin->userinfo['mood']) { $selectedmood = ' Selected'; } else { $selectedmood = ''; }
$vbmoods['mood'] .= '<optgroup style="background-image: url(images/mood/' .$mood. '.gif); height: 15px; width: 72px;"><option value="' .$mood. '"' .$selectedmood. '></option></optgroup>';
$vbmoods['mood'] .= "\r";
}
Also note that you need to make two small changes in the images. In Love.gif will need to have the space removed (and the name in settings needs the space removed to match). And Psychadelic.gif needs to be Psychedelic.gif (which technically is a problem with or without images in the drop-down, but might as well fix it)
I hard-coded the image size. If someone wanted to get all fancy they could probably make that more dynamic, but with the included images it works just fine.