dcevoclub,
First go to your admincp and add a new custom profile field. The names of the classes must be
exactly as I list them or it won't work when sorting on the timeslips page.
Go to: admincp >> User Profile Fields >> Add New User Profile Field
Profile Field Type: Single Selection Menu
Click Continue.
Title: Class
Description: whatever you want
Options:
Street
Outlaw
Full Drag
Set Default: Yes, include a first blank option.
Display Order: Whatever you want
Field Required: No
Field Editable by User? Yes
Field Hidden on Profile? No
Field Searchable on Members List? No
Show on Members List? No
Allow user to input their own value for this option? No
Max length of allowed user input: 15
Display Size: 15
Regular Expression: 0
Which page displays this option? Edit Profile
Click Save.
Now on the next screen (the user profile field manager screen) find the new field that you just added. Over to the right of the new field you'll see a link that says [Edit]. Hold your mouse over that link (don't click it) and look at the bottom of your browser where it shows the url. Make a note of the field ID # for the field you just added.
Assuming that you're still using v2.0 in member.php and includes/functions_user.php find all instances of this (there will be several):
Code:
(50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65)
Now in the code below replace the XX with the field ID of the new class field.. Then copy the code below and replace ALL instances of the code above in member.php and includes/functions_user.php:
Code:
(50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,XX)
Save & upload.
Now open timeslips.php and find this:
Below it add this:
Code:
$street = 'Street';
$outlaw = 'Outlaw';
$drag = 'Full Drag';
Still in timeslips.php find:
Code:
}
else if ($_REQUEST['do'] == 'na')
{
$condition.=" AND userfield.field65='$natasp' AND userfield.field55>'".intval($number)."'";
$cond.=" WHERE userfield.field55!=''";
$orderby="userfield.field55";
$direction=ASC;
$bracket13="<b>[</b>";
$bracket14="<b>]</b>";
Below it add:
Code:
}
else if ($_REQUEST['do'] == 'street')
{
$condition.=" AND userfield.fieldXX='$street' AND userfield.field55>'".intval($number)."'";
$cond.=" WHERE userfield.field55!=''";
$orderby="userfield.field55";
$direction=ASC;
$bracket133="<b>[</b>";
$bracket143="<b>]</b>";
}
else if ($_REQUEST['do'] == 'outlaw')
{
$condition.=" AND userfield.fieldXX='$outlaw' AND userfield.field55>'".intval($number)."'";
$cond.=" WHERE userfield.field55!=''";
$orderby="userfield.field55";
$direction=ASC;
$bracket133="<b>[</b>";
$bracket143="<b>]</b>";
}
else if ($_REQUEST['do'] == 'drag')
{
$condition.=" AND userfield.fieldXX='$drag' AND userfield.field55>'".intval($number)."'";
$cond.=" WHERE userfield.field55!=''";
$orderby="userfield.field55";
$direction=ASC;
$bracket133="<b>[</b>";
$bracket143="<b>]</b>";
Now in the chunk of code above find all 3 instances of XX and replace it with the field ID for the new class field.
Still in timeslips.php find:
Below it add:
Find:
Below it add:
Code:
$class = $userinfo[fieldXX];
Again, replace the XX in the code above with the field ID for the class field.
Save and upload timeslips.php
In your timeslips template find:
Code:
<td bgcolor="{categorybackcolor}" colspan="5" class="tcat"><b> Timeslip Database
Replace it with:
Code:
<td bgcolor="{categorybackcolor}" colspan="6" class="tcat"><b> Timeslip Database
Find:
Code:
<option value="timeslips.php?$session[sessionurl]&do=na">N/A cars only</option>
Below it add:
Code:
<option value="timeslips.php?$session[sessionurl]&do=street">Street Class</option>
<option value="timeslips.php?$session[sessionurl]&do=outlaw">Outlaw Class</option>
<option value="timeslips.php?$session[sessionurl]&do=drag">Full Drag Class</option>
Find:
Code:
<td class="thead" align="center">$bracket13<b>Induction</b>$bracket14</td>
Below it add:
Code:
<td class="thead" align="center">$bracket133<b>Class</b>$bracket143</td>
Find:
Code:
<td class="tfoot" colspan="10">
Replace it with:
Code:
<td class="tfoot" colspan="11">
In your timeslipsbit template find:
Code:
<td class="alt2">$induction</td>
Below it add:
Code:
<td class="alt1">$class</td>
Thats it! If you added the profile field class names exactly as I said and you replaced all of the XXs with the correct field ID it will work.
Now you know why I said it would be much easier if I just do it myself.