WordPress.org

Ready to get started?Download WordPress

Forums

BuddyPress Groups Extras
[resolved] [closed] one field for all groups (15 posts)

  1. jankowalski
    Member
    Posted 7 months ago #

    how do i create a field for all groups?

    http://wordpress.org/plugins/buddypress-groups-extras/

  2. Slava UA
    Member
    Plugin Author

    Posted 7 months ago #

    Create a set of fields in wp-admin area, with only 1 field. Apply it to all groups.

  3. jankowalski
    Member
    Posted 7 months ago #

    got it. how do i show it during new group registration process?

  4. Slava UA
    Member
    Plugin Author

    Posted 7 months ago #

    Currently there is no way to do this.

  5. jankowalski
    Member
    Posted 7 months ago #

    OK, i m trying to figure it out how it works..
    I created a field and aplied for all groups. But i have to go to each group extra tab now and import field set... otherwise it doesnt show up

  6. Slava UA
    Member
    Plugin Author

    Posted 7 months ago #

    Apply it to all groups.

    in wp-admin area

    This can all be done in plugin admin area.

  7. jankowalski
    Member
    Posted 7 months ago #

    Ok, making progres... i have my dropdown menu.. how can I filter groups and display all groups with specific option?

  8. Slava UA
    Member
    Plugin Author

    Posted 7 months ago #

  9. jankowalski
    Member
    Posted 7 months ago #

    i d pay for it if this would have option to show the fields in group registration... do you plan to add it?

  10. Slava UA
    Member
    Plugin Author

    Posted 7 months ago #

    Not in search extension - it's a separate task.

    In future - perhaps I will add.

  11. jankowalski
    Member
    Posted 7 months ago #

    ok, please mail me when it s done. i d buy this plugin then.

  12. jankowalski
    Member
    Posted 7 months ago #

    one more thing..
    with this code

    <?php $field_id = 1598;
    $field = get_post($field_id);
    $field->desc = get_post_meta($field_id, 'bpge_field_desc', true);
    $field->options = json_decode($field->post_content);
    echo '<div class="field_data">';
        if ( is_array($field->options) )
            $data = implode(', ', $field->options);
        else
            $data = $field->post_content;
        echo 'woj. ' . $data . '';
    echo '</div>';?>
    <?php bp_group_description_excerpt(); ?>

    i am able to display content of the field 1958 at any page. but this field is global and each group has introduced diferent option, so how do i call this field in single group view?

  13. jankowalski
    Member
    Posted 7 months ago #

    ok, i found the way

    <?php
    // define the group ID
    $group_id = $bp->groups->current_group->id;
    
    // get all fields data (almost)
    $fields = bpge_get_group_fields('publish', $group_id);
    
    // display the content
    echo '<div class="extra-data">';
        foreach($fields as $field){
            $field->options = json_decode($field->post_content);
            echo '<p title="' . ( ! empty($field->desc)  ? esc_attr($field->desc) : '')  .'">' . $field->post_title .': ';
    
            if ( is_array($field->options) )
                $data = implode(', ', $field->options);
            else
                $data = $field->post_content;
    
            // and now display field content
            echo '' . $data . '</p>';
        }
    echo '</div>';
    
    ?>

    actually it shows all fields for curent groups, but it better then nothing. if you could let me know if i cab separate thoe field and display only the one i need, i would be greatful. thanks

  14. Slava UA
    Member
    Plugin Author

    Posted 7 months ago #

    Have you read Tutorials page in admin area?

  15. jankowalski
    Member
    Posted 7 months ago #

    yes, this code comes from tutorial. but as i said it shows all fields for particular group. how do i show single field for all groups?

    There is a tutorial for single field of single group, but in my case I neeed to show single field which is global, so when i paste it into individual group template the result has to be diferent for each group. i test your field tutorial and it shows particular data of specific group and in this case display the same result for all groups....

    i hope you get an idea what i am trying to do...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.