Version: , by Mutt
Developer Last Online: Mar 2013
Version: 2.2.x
Rating:
Released: 07-02-2001
Last Update: Never
Installs: 29
No support by the author.
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
i dont use vbhacker, try this, in admin/profilefeild
it says find this
PHP Code:
$DB_site->query("INSERT INTO profilefield (profilefieldid,title,description,required,hidden,maxlength,size,displayorder,editable) VALUES (NULL,'".addslashes($title)."','".addslashes($description)."',$required,$hidden,'$maxlength','$size','$displayorder','$editable')");
but its not there, search for this instead
PHP Code:
$DB_site->query("INSERT INTO profilefield
i think its about line 40, copy the entire line, and replace it with this
PHP Code:
$DB_site->query("INSERT INTO profilefield (profilefieldid,title,description,required,hidden,maxlength,size,displayorder,editable,type,options) VALUES (NULL,'".addslashes($title)."','".addslashes($description)."',$required,$hidden,'$maxlength','$size','$displayorder', '$editable',$type,'".addslashes($options)."')");
further down we have another thats like this in the same php file, it ask u to find this
PHP Code:
$DB_site->query("UPDATE profilefield SET title='".addslashes($title)."',description='".addslashes($description)."',required=$required,hidden=$hidden,maxlength='$maxlength',size='$size',displayorder='$displayorder',editable='$editable' WHERE profilefieldid=$profilefieldid");
but again it is not there, so instead search for this
PHP Code:
$DB_site->query("UPDATE profilefield SET
copy the entire line, (close to line 100)
and replace it with this
PHP Code:
$DB_site->query("UPDATE profilefield SET title='".addslashes($title)."',description='".addslashes($description)."',required=$required,hidden=$hidden,maxlength='$maxlength',size='$size',displayorder='$displayorder',editable='$editable',type=$type,options='".addslashes($options)."' WHERE profilefieldid=$profilefieldid");
besides that use Nombs attachment and this should work fine in 2.3.0