WordPress.org

Ready to get started?Download WordPress

Forums

Mentions in P2 (13 posts)

  1. Tom
    Member
    Posted 4 years ago #

    Hi,

    Has anyone tried the mentions options in the latest version of P2? I don't understand how it works. It appears to create a new tag under the taxonomy of example.com/mentions/ however P2 does not seem to call it anywhere and when I try and use the name in the tag it box it does not appear. There away to show a list of mentions by default. Any thoughts?

    Thanks,

    T

  2. jmunn
    Member
    Posted 4 years ago #

    Was just wondering the same thing. Anyone?

  3. jmunn
    Member
    Posted 4 years ago #

    Curious if anyone is really using the @username mentions feature yet? It seems like it would be a great addition but I think it only recognizes users with roles on the site. I'm using it on P2 on wpmu and "allowing all users to post" so it doesn't recognize usernames. Anyone have any input or experience playing with it.

    I'm psyched on this feature by the way and also hoping that automattic does release a twitter api plugin at some point.

  4. docflo
    Member
    Posted 4 years ago #

    The "Mentions" feature works, but it's a bit flaky. Put one @mention in front of a post and it gets recognized, put more than one and it won't work anymore.

    Furthermore: It's not really "@username" it's @whatever, so it is actually just another way to add tags to your post.

  5. jmunn
    Member
    Posted 4 years ago #

    I did notice that when there are two names that are identical up to a point it would not recognize the longer one. I was trying to mention @username but it instead linked to @user even though both exist.

  6. nakedoptions
    Member
    Posted 4 years ago #

    Does anybody know how to kill this function? It's really messing up my blog and I can't figure out how to do away with it.

  7. jmunn
    Member
    Posted 4 years ago #

    I assume you can just comment out the appropriate chunk of code in functions.php of p2? Not on my computer right now to check though.

  8. caleb45
    Member
    Posted 4 years ago #

    I'd also like to understand better what's going on with @mentions.

    Right now it's taking me to siteurl/mentions/ which doesn't exist.

    I see it's working on the demo blog
    Was this code taken out partially or is it just incomplete?

  9. jmunn
    Member
    Posted 4 years ago #

    It is actually doing something on the demo blog you linked to Caleb. Here are the mentions to raanan and the page you linked to actually shows that post lower down. But they work like tags and don't go to the author page like you would expect the way twitter does. They don't seem to work in comments on the demo blog and they don't seem to pick up on all my users in my wordpress mu setup.

  10. caleb45
    Member
    Posted 4 years ago #

    Jmunn, thanks but I wasn't clear. Yes it is working on the demo blog. But I find that it isn't working on my installs.

  11. jmunn
    Member
    Posted 4 years ago #

    Apologies. Your post looks rather clear on a second, slower reading.

  12. dukados
    Member
    Posted 3 years ago #

    hi all,
    after reading all related posts and experimenting i found the solution :
    go to wp-content/themes/p2 and find functions.php

    on line 51 (more or less) find :
    $name_map[$name]['replacement'] = '<a href="' . esc_url( '/mentions/' . $username ) . '/">' . esc_html( $name ) . '</a>';

    and replace it by
    $name_map[$name]['replacement'] = '<a href="' . esc_url( '/?mentions=' . $username ) . '">' . esc_html( $name ) . '</a>';

    works like a charme for me.
    hope you all can use this hack.

  13. azadik
    Member
    Posted 3 years ago #

    Hi i did it but doesnt work. maybe problem is for my plugin. I installed plugin "Theme My Login" (good plugin :) ) and changed the code like this:

    wp-content/themes/p2 and find functions.php on line 51:

    $name_map[$name]['replacement'] = '<a href="' . esc_url( '/mentions/' . $username ) . '/">' . esc_html( $name ) . '</a>';

    replaced by:

    $name_map[$name]['replacement'] = '<a href="' . esc_url( '/?mentions=' . $username ) . '&action=profile">' . esc_html( $name ) . '</a>';

    it lists all mentioned posts for that profile.
    so i have question, how can i make it work only for current user?
    because its seen for all users now.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags