@mention members

Started by Dragooon, May 02, 2014, 01:07:58 PM

Previous topic - Next topic

MechSpecs

Quote from: MechSpecs on June 09, 2014, 06:15:51 PM
Great mod!

Is there a way to make the auto-suggest work with SCEditor4Smf?

So nobody has been able to make this happen yet with the SCEditor4SMF so that the popup auto-suggest activates?

GL700Wing

#281
Quote from: Alb0 on June 07, 2014, 12:07:00 AM
Would it be possible to actually notify member(s) through PM(s) in the forum instead of E-Mail?
I only discovered this mod yesterday - many thanks to Dragooon!! - and I've just worked out how to get the notification sent as a PM (the good thing about sending a PM is that the member will *also* receive an email message if they have enabled the 'Notify by email every time you receive a personal message' option in the 'Personal Messages' part of their profile).

In ./Sources/Mentions.php
Find:
sendmail($mention['email_address'], $subject, $body);

Add after:
sendpm(array('to' => array($mention['id']), 'bcc' => array()), $subject, $body);



I also decided to use a slightly different message for the body of the PM so I added the following to the end of ./Themes/default/languages/Mentions.english.php and ./Themes/default/languages/Mentions.english-utf8.php:

$txt['mentions_body_pm'] = 'Hello MENTIONNAME!

I mentioned you in the following post: POSTLINK

Regards,
MEMBERNAME';



To use the PM body message format above you'll also need to add the following line to ./Sources/Mentions.php:
Find:
sendpm(array('to' => array($mention['id']), 'bcc' => array()), $subject, $body);

Insert before:
$body = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_body_pm']);
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

UndergroundVol

Like this?


sendmail($mention['email_address'], $subject, $body);
sendpm(array('to' => array($mention['id']), 'bcc' => array()), $subject, $body);









$body = str_replace(array_keys($replacements), array_values($replacements), $txt                                   ['mentions_body_pm']);

         sendpm(array('to' => array($mention['id']), 'bcc' => array()), $subject, $body);

GL700Wing

Like the attached file - see lines 268 and 269
Life doesn't have to be perfect to be wonderful ...

Slava
Ukraini!
"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

Sigyn

Cheers Dragoon, great app.
I am having a small issue where a member of my forum (dragonsriseau.com), Z'lud, cannot be tagged by the @mention code. It seems to work for my other members (and subAccounts), but for some reason his wont work. Any ideas?

*Edit* It seems it doesn't work for a couple members (so far those with ' in their display names).

Steelio

thanks for this Dragoon!

i do have an issue similar to Sigyn, except my issue is that the mentions doesnt seem to work if there is a space between the user's name.
for example:

@Dr Who
@Keyser Soze

... btw i applied the tweak you mentioned below, hoping this will fix my issue, but it doesnt. i'm still having the same problem :(

Quote from: Dragooon on June 06, 2014, 12:33:50 PM
Quote from: phantomm on June 06, 2014, 11:29:24 AM
It's selected from dropdown so yes, I'm sure it is followed by @ sign, exactly like this:
@Username <")))/
Try this, open mentions.php
Code (Find) Select
$names = array_unique(array_map('trim', $names));
Code (Replace) Select
$names = array_unique(array_map('htmlspecialchars', array_map('trim', $names)));


Dragooon

Spaces shouldn't cause problems, are you sure with the space the username is exact?

Steelio

Quote from: Dragooon on June 30, 2014, 04:50:23 AM
Spaces shouldn't cause problems, are you sure with the space the username is exact?
yes it is exact.

sorry, i just tested this with my admin account and i can do mentions with usernames with spaces.
it looks like a member of mine cant do the mentions. you said earlier about checking the permissions, im trying to find out where i should go check for your mod? this member who can do mentions belongs to the regular member user group

Dragooon

Go to Admin > Members > Permissions and search the page for mention's one.

Steelio

Quote from: Dragooon on June 30, 2014, 05:10:30 AM
Go to Admin > Members > Permissions and search the page for mention's one.
*smacks self*

i need another pair of eyes on top of the four i already have.

thanks Dragoon!  ;D

Elizabeth II

There seems to be an issue with mentions number in Profile not resetting.. For example if you get mentioned and get Profile [1] and go on metions and back off it is still there and does not go unless I clear the forum cache.

mabley

Amazing mod! It could be really helpful.

Did I read that you are able to mention membergroups as well and each member would get a notification?  Like @Avengers and all of the Avengers would assemble?

Phphelp

That's for the great mod, I just installed it!

Dragooon

Quote from: mabley on July 01, 2014, 05:02:44 PM
Amazing mod! It could be really helpful.

Did I read that you are able to mention membergroups as well and each member would get a notification?  Like @Avengers and all of the Avengers would assemble?
No that's not possible, plus it'll be a pretty bad idea IMO

becometa

#294
Quote from: Britannia360 on June 30, 2014, 07:12:40 PM
There seems to be an issue with mentions number in Profile not resetting.. For example if you get mentioned and get Profile [1] and go on metions and back off it is still there and does not go unless I clear the forum cache.

Same here. It happens when i delete the mentioned post from Profile -> Posts Mentioning Me

@edit: it occurs even when deleting post normally

langel

#295
Hello everyone! Is possible to change appearance of the mentions, just as in the personal messages?

Something like this:


Thank you!

PD: The appearance of the personal messages I made it the change to a <span id> in:
$context['menu_buttons']['pm']['title'] .= ' [<strong>' . $context['user']['unread_messages'] . '</strong>]';
Me podran vetar de mil foros pero nunca me callaran!!

Badboy

Make the change like personal messages. In Sources/Mentions.php

Code (FIND) Select
function mentions_menu(array &$menu_buttons)
{
global $txt, $scripturl, $smcFunc, $user_info, $user_settings;

loadLanguage('Mentions');

$menu_buttons['profile']['sub_buttons']['mentions'] = array(
'title' => $txt['mentions'] . (!empty($user_settings['unread_mentions']) ? ' [' . $user_settings['unread_mentions'] . ']' : ''),
'href' => $scripturl . '?action=profile;area=mentions',
'show' => true,
);
$menu_buttons['profile']['title'] .=  (!empty($user_settings['unread_mentions']) ? ' [' . $user_settings['unread_mentions'] . ']' : '');
}
Nothing is true, everything is permitted.

langel

Thanks for the tip, everything went perfectly  :)

Regards!
Me podran vetar de mil foros pero nunca me callaran!!

Mstcool

How come the check mark automatically unchecks itself after I check it? I am talking about the following one: Enable mentions e-mail for current members


After I click save, it unchecks itself, howcome?

timidapsin

is it possible to allow the mentions appear as a tab instead of in Profile,
As shown in the attachment below.

Advertisement: