Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • @mattheoh

    Participant

    I made some tests… seems to work with this plugin : https://fr.wordpress.org/plugins/user-meta/
    Maybe User Meta is the good solution (cause I will never use all the possibilities of Groups- So it’s to complicate the solution using them)
    I will go further tomorrow, but anyway thanks a lot for the idea of user meta.

    @mattheoh

    Participant

    Don’t use groups.
    Use user_meta: https://codex.wordpress.org/Function_Reference/add_user_meta
    And the field should be picked up by your export plugin.

    I thought about it … but how to add a button / checkbox in an article which fulfill the user_meta ?
    Didn’t find anything about it…

    @mattheoh

    Participant

    it’s always the same for each link ? YES

    OK , I didn’t know ! thanks

    Groupes is french. If you use your mentionned code, you have to enter the slug used on your site, in your language. If it’s english, try ‘groups‘ instead.

    Of course, I would have correct it myself.
    with your code I managed to insert the slug article

    $href = get_home_url().'/groupes/'.get_the_slug($id).'/join?_wpnonce=6b826ee77d';
    But I will be stuck with the nonce cause it’s proper for each group :-/

    Also this will never work like you expect.
    bp_loggedin_user_domain() output gives your-site.com/members/username/groups/

    OK thanks for the precision

    And i suppose there is no utility to invite from within a post, a user to join a group of which he’s already member of ?!!!
    Can you better explain the relation between post, author and join group ?
    Do you mean, an author can invite readers to join (selectively) a group he’s member of ?

    You’re right, I m going to clarify my needs by the begining ! 😉
    In fact, I want to post some articles to talk about some contests / tests.
    Only identified buddypress members will be able to see this articles (I make a restriction on them)
    At the end of the articles, I wanted to add a button , that give them the possibility to participate to the test.
    In fact, I don’t car using groups… I just need to register people who wants to participate (and then be able to do an export with export user data plugin that I m using actually)
    I thought using groups to qualify this people, cause I thought it was the easier way… (When I write an article about a new test, I create a new group… So people when they click on participate button, update automatically their profile by joining the group related to the article – that’s why I wanted to put the same slug for group and article)
    My final aim is just to export these infos… (complete profile informations and groups particpations)
    So you’re right if someone is already member of a group (so has already clicked on this button), he shouldn’t be able to see the button (or ideally, a different message “you have always sent your participation”)

    I hope it’s a little more comprehensible !
    If you think group is not the good solution, I m listening 😉
    My final purpose is just that user can be tagged as participant and that I can export this information)

    Thanks a lot to have read this cause it was a bit long 😉

    @mattheoh

    Participant

    Hi thanks for your answer ! I appreciate that.

    I have two questions / remarks

    1/ I need the name of the group to be dynamic , it won’t be always the same in the different posts- I mean : it can be a button for joining “group horses” in article 1, “group dogs” in article 2 …
    that’s why I wanted to use the slug of article (and put the same slug for the group) – But if we use a shortcode (that I think is the best) , I ll just have to add the variable as you said…

    2/ the Nonce is not dynamic ??!! It’s always the same for each link ?!
    cause when I tried that in single PHP :
    <?php echo '<a href=" '.wp_nonce_url( bp_loggedin_user_domain() . '/groupes/' . get_the_slug() '/join') .' ">join group</a>'; ?>
    I had a security alert “Are you sure you want to do that ?”

    Thanks again for your time.

    @mattheoh

    Participant

    Unfortunately for me , this kind of problem doesn’t seem very popular ! :-/
    So just an up message to wish you a good easter week-end :-p

Viewing 5 replies - 1 through 5 (of 5 total)
Skip to toolbar