Skip to:
Content
Pages
Categories
Search
Top
Bottom

"customize" groups creation


  • ayatango
    Participant

    @ayatango

    Hi,
    I would like to let users creating groups with a specific pattern only: “Tango and […]”.
    Users should enter words only for […], so all the groups will be named like this. For example, I am an user and I want to create a group about literature, I should insert literature as a group title, and my group will automatically be named “Tango and literature”.
    Is there a solution to do this?

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

  • shanebp
    Moderator

    @shanebp

    Take a look at this hook
    do_action( 'groups_created_group', $group->id, $group );

    in buddypress\bp-groups\bp-groups-functions.php ~L. 161

    Use that hook to connect to a function that changes the submitted name.


    ayatango
    Participant

    @ayatango

    Could you give me a more detailed hint about how to do it?
    Thanks,
    Andrei


    danbp
    Moderator

    @danbp

    If it is only cosmetic and for all your groups, you can try to add the extra title text with CSS ::before selector.


    ayatango
    Participant

    @ayatango

    Yes, this is exactly what I’d like to get.

    Can you suggest what is the element for :before selector?
    I suppose I have to edit CSS with this:

    element::before {
    content: “Tango and “;
    }

    but I don’t know what is the ‘element’ in order to work for groups titles.

    Thanks again!


    danbp
    Moderator

    @danbp

    It’s a bit theme dependant, but by default the element is a:

    Example with twenty thirteen:
    .entry-header .entry-title a::before { content:'Tango and ';}

    Not ideal, because it is not useable on the group directory itself, and where it affects also the create a group button.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘"customize" groups creation’ is closed to new replies.
Skip to toolbar