I'm interested in this as well. I'm somewhat savy in PHP but I'm not sure which file or template I would need to add the select statement to to populate the dropdown on the registration page.
For reference, I saw the code below posted elsewhere.
Code:
// Get Members
$members = $db->query_read("
SELECT user.email, user.userid, user.username " . iif((!empty($vbulletin->options['c_news_letter_field'])),",userfield." . $vbulletin->options['c_news_letter_field'] . "") . "
FROM " . TABLE_PREFIX . "user AS user
" . iif((!empty($vbulletin->options['c_news_letter_field'])),"LEFT JOIN " . TABLE_PREFIX . "userfield AS userfield ON (userfield.userid = user.userid)") . "
WHERE user.userid >= " . $vbulletin->GPC['startat'] . "
" . iif((!empty($vbulletin->options['c_news_letter_field']))," AND (userfield." . $vbulletin->options[c_news_letter_field] . " = '" . $vbulletin->options[c_news_letter_field_yes] . "' OR userfield." . $vbulletin->options[c_news_letter_field] . " = '')") . "
" . iif((!empty($vbulletin->GPC['usergroups'])), "AND user.usergroupid IN ('" . implode("','",$c_news_letter_filter_usergroups) . "')") . "
ORDER BY user.userid ASC
LIMIT " . $vbulletin->GPC['perpage']
);
while ($member = $db->fetch_array($members))
I've also seen this posted somewhere for VB4 and not sure if PHP code needs to be added like this for vb3.X :
Code:
<div class="desc">[php]<br />
$myvar = 'Hello World!';<br />
for ($<i></i>i = 0; \$i < 10; \$i++)<br />
{<br />
echo $myvar . "\n";<br />
}<br />
[ /php]</div>
From the above, it looks like the PHP code is rendered with HTML and THEN rendered by the web server. ????