View Full Version : Users can select wich group of standerd titles they want
Mephisteus
07-17-2002, 10:21 PM
ok, I thought it could be somethin like this. In the usercp --> edit options area an extra field like
What side?
Do you want to be good or evil.
And then radiobuttons with either good or evil.
And that you can edit the titles for both groups in the admin center.
So that you have either good or evil :p And that other members see your title the way you selected it.
Hope you understand what I mean :)
Xenon
07-18-2002, 09:50 PM
hmm, wouldn't be easy to do, because there are more than one file where the usertitle changes
steps to do (theoretically)
add one field to usertitle table for example titlesetid
add one field to usertable titlesetid
edit file admin/user.php to alter the autotitling when editing a user
edit file admin/usertitle.php to add a inputbox for titleset id..
edit file newreply.php (same as in user.php)
i think also newthread.php too
also member.php to give users the chance to select setid and at least one templatemod ;)
i'd say you better wait for vb3 because i saw in the already suggested:
User title ladder sets for specific usergroups
than it should be easier to make what ya want :)
Logician
07-19-2002, 05:38 AM
I guess a workaround might be possible:
Add a new mandatory user profile field via Admin CP, then edit register.php and member.php to add a small "if" conditional which changes its default textbox behaviour to a select box (or radio button) with 2 options: evil/good (btw why dont u include nautral? hehe)
Then you can add this profile field to postbit template..
SHalliday
01-29-2003, 06:56 PM
has anyone done this yet?
Logician
01-30-2003, 10:17 AM
Why this can be a full release hack? Because one section of the code (the part where users past selection is auto selected in edit profile page) requires a custom code which will change in every user according to the profile field info you are using in this hack. But other than that part, here is the hack you wanted:
1- First note profile field id of the profile field you want to convert to radio button or select menu.
2- Now create a new template with this info:
TEMPLATE NAME: select_field
CONTENT:
<tr>
<td bgcolor="$bgcolor"><normalfont><b>$profilefield[title]:</b></normalfont><br>
<smallfont>$profilefield[description]</smallfont></td>
<td bgcolor="$bgcolor"><normalfont><select name="$profilefieldname">
<option value="item1" selected>item1</option>
<option value="item2">item2</option>
<option value="item3">item3</option>
</select></normalfont></td>
</tr>
(Edit select items in the menu or change them to radio buttons etc. if you want..)
3- In member.php AND register.php, find:
eval("\$customfields .= \"".gettemplate("register_customfields")."\";");
Replace it as:
if ($profilefield[profilefieldid]==XX) {eval("\$customfields .= \"".gettemplate("select_field")."\";");}
else { eval("\$customfields .= \"".gettemplate("register_customfields")."\";");}
Replace XX with your profile fieldid and you are done.
But please remember my warning above: this does not auto-select previous selection of the user when user edits his profile because this section's code would be different according to your select menu items..
Enjoy..
SHalliday
04-25-2003, 07:20 PM
I am very interested in using this. Is it a full release hack yet and/or has anyone implemented it yet?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.