vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Users can select wich group of standerd titles they want (https://vborg.vbsupport.ru/showthread.php?t=41214)

Mephisteus 07-17-2002 10:21 PM

Users can select wich group of standerd titles they want
 
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:
PHP Code:

<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:

PHP Code:

eval("\$customfields .= \"".gettemplate("register_customfields")."\";"); 

Replace it as:
PHP Code:

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?


All times are GMT. The time now is 01:04 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01127 seconds
  • Memory Usage 1,728KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete