Pre Thread Titles Help - 04/23/2005 4:04 AM
This is adapted from LK's little mod found here
https://www.ubbdev.com/ubb/ultimatebb.php/topic/8/3801.html#000000
What Im trying to do is, if the user selects only two of these options, then it creates the thread title with the two chosen. However, the problem Im running into is, since I have 3 types, as seen below, if a user only selects two options, it still writes out the third.
For example it'll actually post this: [Roommate] blank1[Male]
So what I have is this for example: (public_new_topic_form.pl)
and in ubb_new_topic.cgi:
https:/
What Im trying to do is, if the user selects only two of these options, then it creates the thread title with the two chosen. However, the problem Im running into is, since I have 3 types, as seen below, if a user only selects two options, it still writes out the third.
For example it'll actually post this: [Roommate] blank1[Male]
So what I have is this for example: (public_new_topic_form.pl)
Code
if ($in{f} =~ m/^(7)$/) {
print qq~
<tr bgcolor="$vars_style{AltColumnColor1}">
<td nowrap="nowrap">
<font size="$vars_style{TextSize}" face="$vars_style{FontFace}"><b>
Message Type:
</b></font></td>
<td>
<input type="radio" name="type" value="" checked="checked" /> None
<input type="radio" name="type" value="[Roommate] " /> Roommate
<input type="radio" name="type" value="[Sublessor] " /> Sublessor
<input type="radio" name="type" value="[Apartment] " /> Apartment
<input type="radio" name="type" value="[House] " /> House
<input type="radio" name="type3" value="[Male] " /> Male
<input type="radio" name="type3" value="[Female] " /> Female
<select name="type2">
<option selected value="blank1">Please Choose</option>
<option value="['05] ">05</option>
<option value="[05-06] ">05-06</option>
<option value="['06] ">06</option>
<option value="[06-07] ">06-07</option>
</select>
</td>
</tr>
~;
}
Code
$in{topic_subject} = $in{type} . $in{type2} . $in{type3} . $in{topic_subject};