Skip to:
Content
Pages
Categories
Search
Top
Bottom

G-Field – This plugin adds an additional field to group creation

  • Avatar of nit3watch
    nit3watch
    Participant

    @nit3watch

    Im trying to build a app that adds a additional field to groups so you can call the field with say the members map code used on buddypress.org but for groups.

    It saves the data from the group admin section, but doesn’t save on the innitial group creation in step 1. I build it off the group tags plugin ( @dwenaus ) and the problem is same for both but I can’t see where it’s going wrong. So if we could find the prob here, we could also correct the group tags plugin.. Also it saves to the group meta. I would prefer to save it as say ‘group name’ or ‘group description’ but thats abit beyond me for now.

    Here’s the plugin: http://pastebin.com/ngaup2Pf

Viewing 8 replies - 1 through 8 (of 8 total)
  • Avatar of r-a-y
    r-a-y
    Moderator

    @r-a-y

    @nit3watch – It looks like you’re only hooking into the save action after the group is created.

    Try adding another save action with “groups_create_group_step_save_group-details”:
    add_action( 'groups_create_group_step_save_group-details', 'gfield_save_field' );

    See if that works.

    Avatar of nit3watch
    nit3watch
    Participant

    @nit3watch

    @r-a-y tried it but still not saving on group creation :(

    My goal here is to have a base for other noobs to work off :P and if I could get it working with additions, I could compleate my current project..

    Avatar of Dwenaus
    Dwenaus
    Participant

    @dwenaus

    hey, I’m still actively developing this, but with the BP forum favourites feature removed, it’s tough to stay current. I’ll fix this and post an update. @nit3watch your work sounds interesting, I’d be interested to see what you are up to with the plugin. Also, I’d really like to create an admin panel for the plugin so that people can change their settings and not lose them on update, if you are serious about this plugin, a small donation would pay for this change. otherwise i’m too busy to add new features.

    Avatar of r-a-y
    r-a-y
    Moderator

    @r-a-y

    @nit3watch – I need more sleep! I deleted the previous posts to avoid confusion.

    You don’t need a core hack!

    Check out the revised code:
    http://pastebin.com/ZW4gp88m (updated again!)

    Avatar of nit3watch
    nit3watch
    Participant

    @nit3watch

    Thanks so much for the help @r-a-y was really a barrier on my current project.

    Avatar of nit3watch
    nit3watch
    Participant

    @nit3watch

    @r-a-y sorry last thing, if I use, say group tags and gfield, the gfield form over-wites the group tags form.

    Iv’e been reading up, and is this fixed by using add_filter? and if so, what do I set the priority to so that it wont conflict with similar plugins using ‘bp_after_group_details_creation_step’ ? Kinda like auto-incrementing the priority for each additional plugin?

    Avatar of r-a-y
    r-a-y
    Moderator

    @r-a-y

    @nit3watch – You have to remove the following hook:
    add_action( 'bp_after_group_details_creation_step', 'gfield_add_field_form' );

    Also remove the conditional that Derek put in.

    Here’s the updated code, no need to add any filters:

    http://pastebin.com/JrEbHMsh

    Avatar of nit3watch
    nit3watch
    Participant

    @nit3watch

    Thanks again. I understand now.

Viewing 8 replies - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.