Support » Fixing WordPress » Mentions in P2

  • 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 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?



Viewing 12 replies - 1 through 12 (of 12 total)
  • Was just wondering the same thing. Anyone?

    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.

    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.

    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.

    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.

    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.

    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?

    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.

    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.

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

    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.

    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.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Mentions in P2’ is closed to new replies.