Welcome Guest ( Log In | Register )

> IPS Related Information

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 :

  1. Host & publish images
  2. Host and link Blogs
  3. Integrate all that to the Invision Power Board

Reply to this topicStart new topic
> IPS Tutorials: NickTheGreek's Blog - Scorpions (reunion) Simple Modifications > Option groups in custom profile fields
post 24 Jun 2009, 07:32 PM
Post #1

yourforum Robot
Group Icon

Group: Private Members
Posts: 196629
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 ) )

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
[group]=Swedish Cars
[group]=German Cars
View the full article
Go to the top of the page
Bookmark this: Post to Del.icio.usPost to DiggPost to FacebookPost to GooglePost to SlashdotPost to StumbleUponPost to TechnoratiPost to YahooMyWeb
+Quote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 14th November 2019 - 08:38 AM
Skin and Graphics by Dan Ellis and Anubis. Hosting by Forums & More 2005-2011.
InvisionGames - Your #1 Arcade Games Repository | AllSigs - Signatures for all | Rock Band + Guitar Hero = RockHero ! | The Remoters - Remote Assistance | FileMiners - You ask, We find