IPS Tutorials: NickTheGreek's Blog - Scorpions (reunion) Simple Modifications > Option groups in custom profile fields |
|
|||||||||
This section is focused on Invision Power Services products...
IPS, widely praised for the continuous efforts aimed to a stable, fast and efficient board system has brought to us Invision Power Board, but not only that..
Invision Power Gallery & Invision Community Blog allow the forum members :
IPS Tutorials: NickTheGreek's Blog - Scorpions (reunion) Simple Modifications > Option groups in custom profile fields |
24 Jun 2009, 07:32 PM
Post
#1
|
|
yourforum Robot Group: Private Members Posts: 196639 Joined: 12-July 05 From: RSS World Member No.: 125 |
This article will create an option group tag for the custom profile dropdown as seen at w3schools.com - HTML Optgroup Tag.
Modifying IPB 3.0.X Files Open ips_kernel/classCustomFields.php and replace line 508 if( in_array( $ov, $def_values ) ) with if( $ov == '[group]') { $this->parsed .= "<optgroup label='$td'>\n"; } elseif( $ov == '[/group]') { $this->parsed .= "</optgroup>\n"; } elseif( in_array( $ov, $def_values ) ) Adding Custom Field In the ACP -> Members -> Custom Profile Fields -> Add Field Fill in the appropriate fields. 'Option Content (for drop downs)' will contain a layout similar to the following example: 0=Nothing Selected
View the full article
[group]=Swedish Cars volvo=Volvo saab=Saab [/group] [group]=German Cars mercedes=Mercedes audi=Audi [/group] |
|
Lo-Fi Version | Time is now: 19th April 2024 - 04:26 AM |
Skin and Graphics by Dan Ellis and Anubis. Hosting by Forums & More © 2005-2011. |