This is a great hack Jimbo, but appears to be lacking one feature that I found that I wanted enough to where I hacked it in myself.
Basically what I wanted was for users to be able to pick one of two or more different categories at registration times and get a different set of ranks depending on which category they pick. I did some tweaking here and there and came up with the following hack which needs to be applied on top of Jimbo's custom status hack. Note that because I manage UBB in CVS I've found it very easy to give a unified diff file rather than the usual set of instructions for the hack. Apoligies in advance if this is unsuitable, but this is also the way I choose to submit my hacks. I recommend that you apply this hack manually rather than using the patch program, but if you choose to do the latter you will probably have to supply the location of many of the files it modifies as well as fixing a number of rejects.
Note that this hack does use the first custom profile field. You can change that to any of the other three fields in the usual manner. Before applying this hack I recommend turning custom ranks off, then fix the ranks according to the instructions in Custom status management before turning custom ranks back on again. You'll have to set the first custom field in registration settings to Category and enable it also:
Index: cp_custom_status.cgi =================================================================== RCS file: /var/www/cvs/ubb-cgi/cp_custom_status.cgi,v retrieving revision 1.1 retrieving revision 1.2 diff -u -p -r1.1 -r1.2 --- cp_custom_status.cgi 2001/08/17 04:04:56 1.1 +++ cp_custom_status.cgi 2001/08/19 09:56:30 1.2 @@ -180,11 +180,12 @@ sub SetCustomStatusSettings { unless ($check =~ m/|!!|/) { &StandardHTML("ERROR (line $count): Custom Rank: $check does not have |!!| present OR a blank line exists where there shouldn't be one. If you've received this error previously and the data has been inputted correctly, you'll need to disable the Data Verification Check in Custom/Status Rank Variable Settings."); } - ($num, $rank) = split(/|!!|/ , $check); - unless ($num > $last) { - &StandardHTML("ERROR (around line $count): Custom ranks not in lowest to highest order. $num in $check is less than or equal to the one above it. It should be higher!"); - } - $last = $num; +# Disable this check -- PJ - 08/19/2001 +# ($num, $rank) = split(/|!!|/ , $check); +# unless ($num > $last) { +# &StandardHTML("ERROR (around line $count): Custom ranks not in lowest to highest order. $num in $check is less than or equal to the one above it. It should be higher!"); +# } +# $last = $num; } @check = (split/n/, $in{custom_override_guts}); for $check (@check) { Index: ubb_custom_status.cgi =================================================================== RCS file: /var/www/cvs/ubb-cgi/ubb_custom_status.cgi,v retrieving revision 1.1 retrieving revision 1.5 diff -u -p -r1.1 -r1.5 --- ubb_custom_status.cgi 2001/08/17 04:04:56 1.1 +++ ubb_custom_status.cgi 2001/08/19 10:21:11 1.5 @@ -9,7 +9,9 @@ require "$vars_config{VariablesPath}/var
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.