vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Add a select field to the profile (https://vborg.vbsupport.ru/showthread.php?t=21833)

Keyser S?ze 07-02-2003 03:12 AM

[QUOTE]06-04-03 at 04:42 PM Nomb said this in Post #113
CODE
[/php]

Basically, all the instances of $bbuserinfo have been changed to $userfield which is from the query above this block of code in user.php.

Remember to replace this twice. [/B]

themonarch 08-24-2003 08:26 PM

I can't get this to work on 2.3.2. It just shows static text boxes.

I tried everything I could figure out on this thread to no avail. I got confused on which instructions to use but I tried both and with all the fixes and no go. Boo hoo for me. :disappointed:

themonarch 08-26-2003 04:20 AM

Wow! I can't believe it! I used phpMyAdmin and changed the field TYPE (all caps) to type in the profilefield table and voila - it works! Damn case sensitive server/database!

Also, I set the default value (again with phpMyAdmin) of this field to 1, as in textbox.

And another tweek, I used the vBulletin Admin Control Panel to change the field size to 1 and now it's a dropdown box.

Oh, and I edited this post with the most recent copy and edits of the install instructions text file, hopefully to help the next person out.

This is working on my vBulletin 2.3.2

Have fun and vBulletin forever! :banana:

Tae-Hwan 09-02-2003 03:39 AM

Quote:

07-02-03 at 05:12 AM IceMalee said this in Post #121
i was/am having this problem, i did like u said and it halfway fixed it, now it doesnt put mine in, but just makes the users custom info blank completely

any help?


I first installed this hack without looking at all the replies afterwards, so I ended up having to plug all the holes with my own fixes.. =( seems like this is the only one that hasn't been plugged by you guys yet.

Here's my fix to this problem, I don't know if it's the most efficient, but it works:

Find in user.php, under the "edit" subroutine:
PHP Code:

    // new options
    
    
maketableheader("Custom Profile Fields");
    
$profilefields=$DB_site->query("SELECT *
                                    FROM profilefield
                                    WHERE editable = 1
                                    ORDER BY displayorder"
);
    while (
$profilefield=$DB_site->fetch_array($profilefields)) {
      
$profilefieldname="field$profilefield[profilefieldid]"

and just stick this lil bit under the // new options so it looks like:

PHP Code:

    // new options

  
$userfields=$DB_site->query("SELECT * from userfield where userid=$userid");
  
$userfield=$DB_site->fetch_array($userfields);
    
    
maketableheader("Custom Profile Fields");
    
$profilefields=$DB_site->query("SELECT *
                                    FROM profilefield
                                    WHERE editable = 1
                                    ORDER BY displayorder"
);
    while (
$profilefield=$DB_site->fetch_array($profilefields)) {
      
$profilefieldname="field$profilefield[profilefieldid]"


Tae-Hwan 09-02-2003 03:40 AM

^ oh yea, and this is in conjunction with nomb's "replace $bbuserinfo w/ $userfield" fix.

TheComputerGuy 09-19-2003 03:05 PM

Monarch...do you think you could possibly fix that txt without all those Blocks and stuff, it is very hard to read. :(

Liz 09-27-2003 11:53 PM

I second that. Themonarch - could you please fix?

Falkware 10-03-2003 04:30 PM

Following all these instructions I've yet been able to pull up a user's choice as default choice when editing a profile. It still show's whatever field is default, in my case "None" rather than whatever the user has selected.

This means every time I have to edit a profile to flag them for whatever feature we have I have to double check their profile for what that field is suppose to be.

Has anybody been able to make the system show the user's selection rather than default when editing user profile through admin?

DiscussAnything 09-15-2004 12:12 AM

I know it's late in the game, but I have a request. Hopefully someone still cares and can tell me how to do this.

I installed this with all the fixes and it works fine on 2.34. What I'd like though is to have check boxes instead of a single selection. I would like people to be able to make multiple selections. I added checkboxes and that works, only it doesnt save all selected fields, just the last one. I can't figure it out, can anyone help me out here?

Thanks!

The Markus 12-07-2004 04:25 PM

does this work on the latest version?

imageconstrux 02-13-2005 12:41 AM

This is a great hack, I've had it installed on my board since the beginning. I'm hoping to tweak it, though. I have drop-down boxes for required fields, and the default is the first field in the list. If a user doesn't actively select a different option from each drop-down, the default is what ends up as part of their profile. I'd like to avoid this issue, forcing new registrants to actually select an option. I would imagine this would involve adding an extra field for each drop down that says "Make a selection" - that part is easy.

What I'm wondering how to do is, how do I get the system to return an error if they do not make a selection?


All times are GMT. The time now is 11:29 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.01159 seconds
  • Memory Usage 1,752KB
  • 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
  • (2)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (11)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete