Skip to:
Content
Pages
Categories
Search
Top
Bottom

Link to a private message

Viewing 10 replies - 1 through 10 (of 10 total)
  • Avatar of L-tic
    L-tic
    Participant

    @l-tic

    Can someone help me, please?

    Avatar of L-tic
    L-tic
    Participant

    @l-tic

    I really need this function. No one?

    Avatar of Henry
    Henry
    Participant

    @henrywright-1

    @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>

    Avatar of L-tic
    L-tic
    Participant

    @l-tic

    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.

    Avatar of Henry
    Henry
    Participant

    @henrywright-1

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

    Avatar of L-tic
    L-tic
    Participant

    @l-tic

    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?

    Avatar of Henry
    Henry
    Participant

    @henrywright-1

    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.

    Avatar of L-tic
    L-tic
    Participant

    @l-tic

    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.

    Avatar of Henry
    Henry
    Participant

    @henrywright-1

    article?

    Avatar of L-tic
    L-tic
    Participant

    @l-tic

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

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

You must be logged in to reply to this topic.