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)

Mutt 07-02-2001 10:00 PM

Hey there

I'm still trying to learn all of this and damn this is cool ****. Anyway, I installed the gender hack and was going to use it to install another profile select box. Then I saw the very cool CP tool for adding a field to the profile. It currently only allows you to add a input box. I decieded to modify it so I could add my select box from there. It wasn't very hard and the hack is pretty short.


Here it is in a nutshell
I added a textarea field to the add/edit profile field
if you want the new field to be a dropdown, you enter the dropdown values. each line represents a new option tag.

Ex. you want a new field called "sex" that is a drop down with
the choices male,female, and other.

Make the new field as usual.
Set Field Length. (1 would be a standard dropdown)
Set Maximum Input (I'd leave it at 250)
In the Select Box Items text area type

Male
Female
Other

each on it's own line.


UPDATED for v224 with vbHacker
Click thru for the updated version

Mutt 07-04-2001 03:05 PM

would anyone want the ability to add radio yes/no fields as well? I don't need em right now, but I gotta beileve I will sooner or later

Big Up to the VB guys for making it possible to add profile fields from the Admin CP. I dig it!

Jonathan@Refresh 07-04-2001 03:13 PM

This looks an excellent hack!

Radio buttons would also be very useful.

Has anyone installed it?

Ruth 07-06-2001 02:23 AM

great hack, radio buttons anyone?

RobAC 07-06-2001 12:40 PM

Radio buttons would be great!

BradC 07-06-2001 01:24 PM

If no one gets around to making radio buttons I will for ya :)

Not much of a change of code really...

but I can't do it off the top of my head at work lol..

I usually on use drop downs.. cause they work for some of the stuff I have been doing lately :)

RobAC... pm if you want me to change the custom hack to radio buttons instead of drop downs :)

Ruth 07-06-2001 05:52 PM

BreadC, we need both drop down and radio buttons :D

thanks

Mutt 07-10-2001 02:43 AM

I updated the directions to add radio buttons over the weekend, but couldn't get on the site to post em. I'll post it after work tomorrow. I orgiginally just made then standard Yes No radio buttons, but started to change it so they could have any value and you could have more than 2. will post it asap.

Ruth 07-13-2001 04:55 PM

Mutt please post them as soon as you can....can't wait longer :D

thanks

Mutt 07-15-2001 04:02 PM

I'll try and finish it up today. I though of a nicer way to do it and would like to make it clean before posting. busy working on the vb code buttons today but I'm sure I'll get to it

Ruth 07-17-2001 11:47 AM

Mutt...are you still working on it?

wilth 07-18-2001 04:38 PM

great work mutt

snyx 07-18-2001 06:33 PM

damnit mutt! ya did a good job! like a charm!

snyx

LOL, mutt . . . .

JWS 07-20-2001 02:20 PM

I'm interested in this as well....

debsync 07-23-2001 05:44 AM

I installed this and it works great outside of the control panel (when a user wants to change a profile field in his own user cp the drop down menu appears as it should).. But in the admin CP, when I go to 'add users', the custom field that I added does not show the drop down options.. It only shows an empty field just like the other profile fields there.. Any suggestions?

Mutt 07-23-2001 10:08 PM

opps, I didn't change the cp. I'll get to it.

here's the newest file. I thought I had uploaded this already. sorry for the delay

NEW - add selections just like the last one, but now you can choose between input box, select box, or radio button.

Ruth 07-23-2001 10:16 PM

great work Mutt :)

Thanks

Ruth 07-23-2001 11:30 PM

Mutt, i'm not sure but the drop down menu is not working in register.php

when i enter the values
-
X
Y
Z

i get -XYZ in the register.php

Did i do something wrong?

Thanks :)

debsync 07-24-2001 01:29 AM

works great for me! this is one of the coolest hacks! but it will be even better when the dropdown lists and radio buttons appear in the admin cp under 'users --> add/find' ;)) I wish I knew how to add that feature myself, but I'm not too good with php yet ;)

anyway keep up the good work Mutt! ;)

VirtueTech 07-31-2001 03:23 PM

I have a queston:

I got this error in my Admin CP when I edited a non-select or 'mutt' field in my custom profile fields editor.

Warning: Unlink failed (No such file or directory) in /web/pbc2/forums/admin/profilefield.php on line 107

The directory exists and I am able to create select fields....and there are even "X.file" files in the /admin/profile directory....but there are no "X.files" for the other custom profile fields....so the script gives me that error above.

I know...or I think and hope....this error is not a big deal. But I wanted to point it out.

caislander 07-31-2001 07:15 PM

Mutt,

Very cool hack, now if someone would just make it so these fields are searchable ;)

Later

ldydvr 08-01-2001 12:02 PM

Is what is happening to VirtueTech happening to everyone using this?

Ruth 08-02-2001 11:01 AM

did anyone try this with 2.0.3 ?

Mutt 08-03-2001 03:39 AM

works in 2.03

updated to include modifications to user.php
(now works when editing profiles from the cp)

enjoy
Mutt

please post any bugs you find or let me know any ideas for additions


VirtueTech - fixed your problem :)

VirtueTech 08-03-2001 03:42 AM

Mutt you rule :)

Mutt 08-03-2001 03:46 AM

VirtueTech

I just changed the download above to include a fix for your error. you better redownload you were just too fast for me

Ruth 08-03-2001 03:48 AM

You are great Mutt :D

i wonder if you can add a feature like when someone choose OTHER from a drop down menu, they must fill in a near by box.

just a suggestion,

Thanks again :)

dxb 08-04-2001 01:15 PM

man your great mutt thanks for the hack and the fast update for it :)

and another thing can you explain the country flag addition again because I couldnt understad what exactly I should do it the other thread

thanks anyway :)

debsync 08-06-2001 02:42 PM

oops nm I got it ;)

illogicalx 08-07-2001 02:27 AM

waoooow

Mutt nice , it's a great hack :)

i used it for gender in 2.0.3

it's work gooooood


only i was haveing one problim when i made a field with drop down menu and i made that field a required field in registertion template .

it wasn't work but when i changed it to optional field it's work great :)

one more thing if i want to use an image instead of a text for exp:

if gender = Male >>>> then i'll have in the member list a male image instead of a text MALE .

how can i do that :) .


that is all .....

thanks

LuBi 08-26-2001 04:45 PM

Thanks, worked great on my site. Just what I was looking for!

tamarian 09-07-2001 01:29 AM

Hi Mutt,

For some reason, the hack only works for the modify profile. On the registration part, is quite buggy. It displays a text field if the field is required. If the field is not required, it displays the radio buttons for all custom fields, if the ones created the usual way before the hack. I unistalled, reinstalled (on a test server) and the behavior is re-producable.

LuBi 09-07-2001 01:44 AM

Sorry to hear, works good on my server take a look.

Suprascene.com Forums

tamarian 09-07-2001 02:01 AM

Hi Lubi,

Can you test and see what happens if you make automobile a mandatory field?

LuBi 09-14-2001 11:37 PM

Quote:

Originally posted by tamarian
Hi Lubi,

Can you test and see what happens if you make automobile a mandatory field?

Don't know how, but I would like to move some up to the mandatory ones. If you haven't figures out how to fix your problem please inform me and i'll do what I can.

Mutt 09-17-2001 02:02 AM

I'll have to update my directions. I've changed this hack. the version I'm using now adds 2 fields to to the profile table. now you can pick, input text, radio, select, or textarea. you can set allow, vbcode, images, smiles, html. I also made sure it works with required fields, and handled some cp stuff that I missed before. Like I said, I don't have directions ready. it's a bit more work. I'll try and get to it next weekend

ethank 09-17-2001 04:14 AM

Quote:

Originally posted by Mutt
I'll have to update my directions. I've changed this hack. the version I'm using now adds 2 fields to to the profile table. now you can pick, input text, radio, select, or textarea. you can set allow, vbcode, images, smiles, html. I also made sure it works with required fields, and handled some cp stuff that I missed before. Like I said, I don't have directions ready. it's a bit more work. I'll try and get to it next weekend
Well....damn :) Just put this on my site.

I changed it a bit to have an option for a "hidden" field, which the profile editor uses to make category like dividers in the profile. This let me group profile fields together and have instructions on how to fill them in using "hidden" profile fields. Check the registration thing on murmurs.com for an example (the Feaks Map).

Ethan

numerodix 09-17-2001 05:03 PM

This may come off as a silly question but how do you put in the custom fields where you want to in the user profile. That is normally they all come one after the other, how do you put each one where you want them to be. Ie first the name, then the gender, then the # posts, then the rest of the custom fields below that again. How do you manipulate them as you would the normal fields?

BradC 09-17-2001 11:10 PM

if you are talking about the actual user's profile..

go into your admin cp..

then go to edit templates,

show all.

then go down to this template: getinfo

in that template is the profile template, so you can take that... open it up in your favorite program.. or in notepad, and change it around to be like you want it too... but bare in mind if you do it to one you might as well do it to all of them.. so you don't have double of one field.

also... to find the field info.. to know what it is..

go to your custom fields in the admin cp, figure out what number it is (i.e. field5, field4) and then add it into the database like

$userinfo[field5]

I think that is how you do it..

Soul Lord XL 09-18-2001 01:24 AM

Ack! When I go to do anything heres what the error message says:

Parse error: parse error in /usr/home/s/h/shenlong/public_html/vbb/member.php on line 1236

Here is my line 1263 on Member.PHP:

Quote:

FilePath="admin/profile/$profilefield[profilefieldid].file";
what is wrong with that?

By the way, i am a little unclear on this, is this right, its my register_customfields:

Quote:

<tr>
<td bgcolor="$bgcolor"><normalfont><b>$profilefield[title]:</b></normalfont><br>
<smallfont>$profilefield[description]</smallfont></td>
<td bgcolor="$bgcolor"><normalfont> $TheField normalfont></td>
</tr>
thanks


All times are GMT. The time now is 09:14 AM.

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.01253 seconds
  • Memory Usage 1,810KB
  • 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
  • (4)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
  • (40)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