Skip to:
Content
Pages
Categories
Search
Top
Bottom

Link to a private message

Viewing 10 replies - 1 through 10 (of 10 total)
  • @l-tic

    Participant

    Can someone help me, please?

    @l-tic

    Participant

    I really need this function. No one?

    @henrywright-1

    Member

    @l-tic unless the person clicking the link is involved in the conversation, linking to a private message will surely result in a 404?

    <a href="/<?php echo bp_core_get_username( $user_id ); ?>/messages/view/<?php echo $thread_id; ?>/" title="Message">Message</a>

    @l-tic

    Participant

    Yes, it’s involved in the conversation.. But it would look more elegant, if the user would be redirected to the exact page.
    And yes, i get a 404 error.

    @henrywright-1

    Member

    You’ll need the $user_id and $thread_id; for the link to work.

    @l-tic

    Participant

    Ok.
    The user id of the admin is mostly ‘1’, right?
    So I would use this one:
    <a href=”/<?php echo bp_core_get_username( 1 );
    Is this correct?

    By thread id you mean the id of the specific user profile page?
    If so, how do I get this id?

    @henrywright-1

    Member

    The user ID of the admin is usually 1. That assumes you have just one administrator and that was the first user created when you set up BP. The thread ID is the ID of the private message. You can get this from the URL. It’ll end something like /view/86. It is the digit that you want.

    @l-tic

    Participant

    As for the user ID, it’s clear.
    But I can’t read out the thread ID because to see the profile of a user, I have to set the permalinks settings to the name of the article.
    And if I go to the profile with the default permalink setting, it gave me a 404.

    @henrywright-1

    Member

    article?

    @l-tic

    Participant

    Mine is in German, sry.
    The 5th setting. So one before costum.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Link to a private message’ is closed to new replies.
Skip to toolbar