The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#11
|
||||
|
||||
Right I did. In newthread template I have $der2 for example.
Then this is part of the code from earlier. Code:
$usergroupdata = array(); while ($usergroup = $vbulletin->db->fetch_array($usergroups)) { $usergroupdata[$usergroup['usergroupid']] = $usergroup['title']; $der2 = $usergroup['title']; eval('$der .= "' . fetch_template('jon') . '";'); } oh and the template jon I have: Code:
<label for="usergroups"> <input type="checkbox" name="" value="" id="" tabindex="1" />$der2 </label> Hmm, changed it around cuz I found some issues with my code (idiot) doh. newthread form complete hook Code:
$usergroupdata = array(); while ($usergroup = $vbulletin->db->fetch_array($usergroups)) { //Assign group title to $grouptitle variable $usergroupdata[$usergroup['title']] = $usergroup['title']; $grouptitle = $usergroupdata[$usergroup['title']]; //Assign group ID to $groupID variable $usergroupdata[$usergroup['usergroupid']] = $usergroup['usergroupid']; $groupID= $usergroupdata[$usergroup['usergroupid']]; eval('$der .= "' . fetch_template('jon') . '";'); } Code:
<label for="usergroups"> <input type="checkbox" name="groupID" value="$groupID" id="" tabindex="1" />$grouptitle </label> Code:
$vbulletin->input->clean_array_gpc('p', array('groupID' => TYPE_ARRAY)); echo $vbulletin->GPC['groupID']; --------------- Added [DATE]1239285415[/DATE] at [TIME]1239285415[/TIME] --------------- I think I got it to display all ID's that I check! My newthread post complete hook was wrong. This works. Maybe you can double check to make sure its written correctly though. Also, what if I needed to get all email address from users associated with each checkbox. Wouldnt' I just do a left join on that original query? Code:
$vbulletin->input->clean_array_gpc('p', array('groupID' => TYPE_ARRAY)); foreach ($vbulletin->GPC['groupID'] AS $id) { echo $id . " "; } |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|