Skip to:
Content
Pages
Categories
Search
Top
Bottom

Create Group button on Groups Page

  • So basically, I want to put a “Create a Group” button on the Groups page.

    a href=”members/**THIS IS WHERE I NEED HELP**/groups/create/”>Create a Group

    Is currently what I’m using. However, the:

    **THIS IS WHERE I NEED HELP**

    needs to be the username of the current user.

    So basically if it’s JoeSmith

    his URL would be :

    members/JoeSmith/groups/create/

    Thanks

    -Nick

Viewing 4 replies - 1 through 4 (of 4 total)
  • @sbrajesh

    Participant

    How about this one.

    <?php
    global $bp;
    if(is_user_logged_in()):?>
    <a href="<?php echo $bp->loggedin_user->domain;?>groups/create">Create a Group Now</a>
    <?php endif;?>

    Edit: doh! I had missed f of href earlier

    Thank you very much, worked perfectly.

    Just for the future, how do you put the code in that little gray box? just for readability.

    Thanks again

    @sbrajesh

    Participant

    you are most welcome :)

    For code highlighting in forum posts use backtick character.

    It is written just below the form you used to post, just see below the post button text :)

    Haha, I should start reading things.

    Thanks again

    Just a test

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Create Group button on Groups Page’ is closed to new replies.
Skip to toolbar