![]() |
Someone asked for this and here it is. Hopefully the documentation is clear enough and I didn't miss anything. Post here with any problems and/or comments.
This hack adds a select field (dropdown menu) to the profile. *Make sure to backup everything first!* |
can you add form Textarea support plz!!
thank you! |
Here you go. Untested, but should work.
|
What is the difference between this and the other hack like it created by mutt (I think thats what his name was)
|
thankx m8
|
Mine only requires adding two templates and modifying a couple of lines in register.php and member.php and doesn't use text files that must be opened and read from.
|
thx a ton doode!
your the best ! =) |
doh!
it works great, except for one thing: when its displaying the custom textarea field in the Getinfo template (to view a members profile), the text thats entered in the textarea box doesnt have any linebreaks, so its displayed in one long line. I know about a php function called "nl2br()" that is supposed to display multiline text with <br>'s instead of hidden carriege returns, BUT when I add it to getinfo_customfields, it doesnt do anything.. This is the code that I need to modify to display line breaks: Code:
<tr> thx -Colin |
Assuming the linebreaks were added to the db:
In member.php find this in the "getinfo" action segment (should be around line 1200): $profilefield[value]=$userinfo[$profilefieldname]; Change it to this: if ($profilefieldname == "fieldX") //where X is the field number { $profilefield[value]=nl2br($userinfo[$profilefieldname]); } else { $profilefield[value]=$userinfo[$profilefieldname]; } |
sweet thank you!
I just noticed one more little issue, the max input for custom fields is 250 characters so if a user types more then that it cuts it off.. I've changed the max input value in the Admin CP to 1000 chars but it still cuts it off at 250, I guess vbb has an internal max of 250. admin cp: Quote:
Thank you very much for all of your help, I really appreciate it Treszoks. |
All times are GMT. The time now is 12:35 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|