The MU forums have moved to WordPress.org

Problem with Cimy Extra Fields - Blank page (5 posts)

  1. jskov
    Member
    Posted 15 years ago #

    I have read a lot about the Cimy USer Extra Fields plugin. frankly, it seems great. But, when I started trying to use it I found a problem:

    - It worked fine for 7-8 extra fields.
    - I need to have about 30 fields (don't ask, it is a non-conventional setup method)
    - Once I get past the 7-8 fields, the wp-signup.php page does not display the fields any more.

    Has anyone seen this same issue??? It is odd. I checked the documentation, and the only recomendation there is for a blank page, is to increast the memory limit in the php.ini file (my limit is already well above the recommended 12M).

    Please Help.

  2. levi.putna
    Member
    Posted 15 years ago #

    If you know PHP it is very easy to extend the user profiles in code. This is an example I used to add extra fields. I have used this same method to add over 20 new fields to a project I was working on.

    Just save your file to your mu-plugins folder.


    <?php
    /*
    Plugin Name: User Profile Extensions
    Plugin URI:
    Description: Adds an additional layer of control to user security.
    Version: 0.1 Alpha
    Author:
    Author URI:
    */

    add_action('show_user_profile', 'user_profile_extensions');
    add_action('edit_user_profile', 'user_profile_extensions');

    //save profile
    add_action('profile_update', 'user_profile_extensions_update');

    //what to do when a user is removed
    //add_action('delete_user', 'userphoto_delete_user');

    function user_profile_extensions(){

    global $profileuser;
    global $current_user;

    $userdata = get_userdata($profileuser->ID);

    $isSelf = $profileuser->ID == $current_user->ID;

    ?>

    <h3>Privacy</h3>
    <table class="form-table">
    <tbody>
    <tr>
    <th>
    <label for="privacy_profile">Profile</label>
    </th>
    <td>
    <select id="privacy_profile" name="privacy_profile">
    <option <?php if($userdata->privacy_profile == 'public' OR $userdata->privacy_profile == ''){echo 'selected="selected"';} ?> value="public">Public</option>
    <option <?php if($userdata->privacy_profile == 'members'){echo 'selected="selected"';} ?> value="members">Members Only</option>
    <option <?php if($userdata->privacy_profile == 'admin'){echo 'selected="selected"';} ?> value="admin">Admin Only</option>
    </select>
    </td>
    </tr>

    <tr>
    <th>
    <label for="privacy_basic_info">Basic Info</label>
    </th>
    <td>
    <select id="privacy_basic_info" name="privacy_basic_info">
    <option <?php if($userdata->privacy_basic_info == 'public' OR $userdata->privacy_profile == ''){echo 'selected="selected"';} ?> value="public">Public</option>
    <option <?php if($userdata->privacy_basic_info == 'members'){echo 'selected="selected"';} ?> value="members">Members Only</option>
    <option <?php if($userdata->privacy_basic_info == 'admin'){echo 'selected="selected"';} ?> value="admin">Admin Only</option>
    </select>
    </td>
    </tr>

    <tr>
    <th>
    <label for="privacy_personal_info">Personal Info</label>
    </th>
    <td>
    <select id="privacy_personal_info" name="privacy_personal_info">
    <option <?php if($userdata->privacy_personal_info == 'public'){echo 'selected="selected"';} ?> value="public">Public</option>
    <option <?php if($userdata->privacy_personal_info == 'members' OR $userdata->privacy_profile == ''){echo 'selected="selected"';} ?> value="members">Members Only</option>
    <option <?php if($userdata->privacy_personal_info == 'admin'){echo 'selected="selected"';} ?> value="admin">Admin Only</option>
    </select>
    </td>
    </tr>

    <tr>
    <th>
    <label for="privacy_contact_info">Contact Info</label>
    </th>
    <td>
    <select id="privacy_contact_info" name="privacy_contact_info">
    <option <?php if($userdata->privacy_contact_info == 'public'){echo 'selected="selected"';} ?> value="public">Public</option>
    <option <?php if($userdata->privacy_contact_info == 'members' OR $userdata->privacy_profile == ''){echo 'selected="selected"';} ?> value="members">Members Only</option>
    <option <?php if($userdata->privacy_contact_info == 'admin'){echo 'selected="selected"';} ?> value="admin">Admin Only</option>
    </select>
    </td>
    </tr>

    </tbody>
    </table>

    <?php
    }

    function user_profile_extensions_update($userID){
    $userdata = get_userdata($userID);

    update_usermeta($userID, "privacy_profile", $_POST['privacy_profile']);
    update_usermeta($userID, "privacy_basic_info", $_POST['privacy_basic_info']);
    update_usermeta($userID, "privacy_contact_info", $_POST['privacy_personal_info']);
    update_usermeta($userID, "privacy_personal_info", $_POST['privacy_personal_info']);
    }

    ?>

  3. andrea_r
    Moderator
    Posted 15 years ago #

    levi - why not wrap that up in a proper plugin and upload it to wpmudev? :)

  4. Cimmo
    Member
    Posted 15 years ago #

    You maybe want to support my plug-in to reach MU support
    http://www.marcocimmino.net/2009/01/21/cimy-user-extra-fields-for-wordpress-mu/

  5. kwatog
    Member
    Posted 14 years ago #

    sorry for bumping this thread.

    ei, levi! thanks for posting that up! the plugin that I made for wp.org didn't work for mu until I found your post and adjust my plugin accordingly.

    cimmo, your plugin is great but it creates new table. that would not sit well with mu. well, as far as I know (which isn't far).

About this Topic