Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: Dragooon on May 02, 2014, 01:07:58 PM

Title: @mention members
Post by: Dragooon on May 02, 2014, 01:07:58 PM
@mentions tag mod
Link to mod (http://custom.simplemachines.org/mods/index.php?mod=3860)
By: Dragooon (mail[at]dragooon.net)
Licensed under: Simplified BSD (2-Clause) License
Source: http://github.com/Dragooon/smf-mentions

About


Allows members to tag others via @<username>, shows up under Profile and members can set to be notified via e-mail. Adds a new permission enabling membergroups to be granted permission to mention others. Supports active suggestions while mentioning in posts as well as quick reply.

Third party libraries



Changelog


Version 1.1.2:
- Some JS fixes
- Add option to enable mention's emails for existing users

Version 1.1.1:
- Fix for saving admin settings
- Fix for mentions after editing post
- (Potential) fix for suggestions not working

Version 1.1:
- Add active suggestions while mentioning someone, works in quick reply as well as full post page (normal and WYSIWYG editor).
- Add Scheduled Task for removing seen mentions before specified days
- Allow setting whether e-mail mentions should be enabled by default or not (defaulted to enable)
- Fix for making mentions case insensitive (@admin = @AdMIn = @adMIN =@Admin)
- Support names with "@" in them, simply mention them normally (@Test@member will work fine)
- Some code cleanup
Title: Re: @mention members
Post by: Apostaganha on May 02, 2014, 02:44:35 PM
this is brutal, unfortunatly doesnt work for user with usernames with spaces and users with usernames with spaces, dots etc...
Title: Re: @mention members
Post by: Dragooon on May 02, 2014, 03:01:24 PM
It does? At least it should, did you try?
Title: Re: @mention members
Post by: Apostaganha on May 02, 2014, 03:05:10 PM
Quote from: Dragooon on May 02, 2014, 03:01:24 PM
It does? At least it should, did you try?

yes :s

how do you mention a user with a strange username like "Brunó Algum"?
Title: Re: @mention members
Post by: Dragooon on May 02, 2014, 03:08:07 PM
Simply @Brunó Algum should do the trick? Are you sure that doesn't work?

EDIT: Just tried with the same username on localhost, worked just fine for me. Make sure the name is exactly the same and the user can see the post he/she is being mentioned in and that you're not mentioning yourself
Title: Re: @mention members
Post by: Apostaganha on May 02, 2014, 03:26:15 PM
YOU ARE RIGHT IT WORKS!

man this ir so brutalllll
Title: Re: @mention members
Post by: Dragooon on May 02, 2014, 03:27:49 PM
Quote from: Apostaganha on May 02, 2014, 03:26:15 PM
YOU ARE RIGHT IT WORKS!

man this ir so brutalllll
Awesome! Glad you like it, still needs a little work since currently it requires username to be exactly the same (even case).
Title: Re: @mention members
Post by: Apostaganha on May 02, 2014, 03:29:56 PM
how do you delete your mentions from the list?
Title: Re: @mention members
Post by: Dragooon on May 02, 2014, 03:31:23 PM
Quote from: Apostaganha on May 02, 2014, 03:29:56 PM
how do you delete your mentions from the list?
Oh...you don't :P. I didn't add any delete functionality, if the post is gone the mention won't show up though.
Title: Re: @mention members
Post by: Apostaganha on May 02, 2014, 03:34:05 PM
it will be hudge in my forum in a couple of days :s
Title: Re: @mention members
Post by: Dragooon on May 02, 2014, 03:35:01 PM
Quote from: Apostaganha on May 02, 2014, 03:34:05 PM
it will be hudge in my forum in a couple of days :s
It's a paginated list, if that's what you're worried about. And I don't think it should cause performance issues, but if it does I can create a scheduled task to routinely delete seen mentions after a while.
Title: Re: @mention members
Post by: Apostaganha on May 02, 2014, 03:38:48 PM
is there an option to force everyone to receive the emais by default? and turn off if they want to?
Title: Re: @mention members
Post by: Dragooon on May 02, 2014, 03:40:26 PM
Quote from: Apostaganha on May 02, 2014, 03:38:48 PM
is there an option to force everyone to receive the emais by default?
Hm, not at the moment. You can do run these queries and force them manually if you really wish to
ALTER TABLE smf_members MODIFY email_mentions tinyint(1) NOT NULL DEFAULT 1;
UPDATE smf_members SET email_mentions = 1;
Title: Re: @mention members
Post by: Apostaganha on May 02, 2014, 04:10:38 PM
ty Dragooon, this plugin its awesome, great work, Thanks!
Title: Re: @mention members
Post by: 4Kstore on May 02, 2014, 06:01:58 PM
Quote from: Apostaganha on May 02, 2014, 04:10:38 PM
ty Dragooon, this plugin its awesome, great work, Thanks!

x2! great job man!
Title: Re: @mention members
Post by: Antes on May 02, 2014, 06:15:35 PM
Thanks for the release, you're awesome! :)
Title: Re: @mention members
Post by: iorkara on May 02, 2014, 08:40:36 PM
Awesome! I've been looking for something like this, good work mate. I might just wait for next update that allows admin to enable all users to receive an email by default.
Title: Re: @mention members
Post by: Realinfo on May 03, 2014, 01:11:16 AM
seems good, but tell that, It aromatically suggest some tag names ( like in Facebook) or we have to add manually only
Title: Re: @mention members
Post by: Gluz on May 03, 2014, 03:41:35 AM
As I said in the other thread, works like a charm, just missing that feature the username suggestion(I taught that is was already implemented .__.), and it would be great that one can delete the mentions already seen in own profiles, just like the PMs.

Also I'm interested in the scheduled task to delete seen mentions, and keep only unseen for that users who disappear for long time.
Title: Re: @mention members
Post by: Dragooon on May 03, 2014, 05:03:50 AM
Real time suggestions thing is something I plan on doing, I haven't abandoned the idea (it's not hard actually, I just didn't get the time).
Title: Re: @mention members
Post by: Adrek on May 03, 2014, 01:15:02 PM
Great modification! Good work Dragooon :)
Title: Re: @mention members
Post by: NoPasaran on May 04, 2014, 06:51:37 AM
Great mod ..


but there is a letter problem..


for example..


if i write


@nopasaran


is not going notice..


@NoPasaran is true spelling..


i think important problems
Title: Re: @mention members
Post by: Dragooon on May 04, 2014, 07:56:46 AM
Quote from: NoPasaran on May 04, 2014, 06:51:37 AM
Great mod ..


but there is a letter problem..


for example..


if i write


@nopasaran


is not going notice..


@NoPasaran is true spelling..


i think important problems
Fix for this:
Code (Find (Sources/Mentions.php)) Select
    foreach ($members as $member)
    {
        if (strpos($msgOptions['body'], '@' . $member['real_name']) === false
            || (!in_array(1, $member['groups']) && count(array_intersect($member['groups'], $member_groups)) == 0))
            continue;

        $msgOptions['body'] = str_replace('@' . $member['real_name'], '[member=' . $member['id'] . ']' . $member['original_name'] . '[/member]', $msgOptions['body']);

        // Why would an idiot mention themselves?
        if ($user_info['id'] == $member['id'])
            continue;

        $msgOptions['mentions'][] = $member;
    }

Code (Replace) Select
    foreach ($members as $member)
    {
        if (stripos($msgOptions['body'], '@' . $member['real_name']) === false
            || (!in_array(1, $member['groups']) && count(array_intersect($member['groups'], $member_groups)) == 0))
            continue;

        $msgOptions['body'] = str_ireplace('@' . $member['real_name'], '[member=' . $member['id'] . ']' . $member['original_name'] . '[/member]', $msgOptions['body']);

        // Why would an idiot mention themselves?
        if ($user_info['id'] == $member['id'])
            continue;

        $msgOptions['mentions'][] = $member;
    }
Title: Re: @mention members
Post by: Biology Forums on May 04, 2014, 11:23:40 AM
I thought you were going to charge for this?
Title: Re: @mention members
Post by: Dragooon on May 04, 2014, 11:32:27 AM
Quote from: Liam_michael on May 04, 2014, 11:23:40 AM
I thought you were going to charge for this?
Changed my mind
Title: Re: @mention members
Post by: FrizzleFried on May 04, 2014, 11:23:37 PM
FYI - Mod does not seem to work when editing... example...

I wrote a post I forgot to add the @ before the name of the person... I edited and went back in and added the @... it didn't work.

Title: Re: @mention members
Post by: Dragooon on May 05, 2014, 01:14:02 AM
Is the name correct? I fixed this issue while the mod was being reviewed. Remember that currently the name is case sensitive.
Title: Re: @mention members
Post by: Tallypop on May 05, 2014, 02:51:08 AM
Bless you for this.
Title: Re: @mention members
Post by: Rhindeer on May 05, 2014, 02:54:45 AM
You are my freakin' hero. *___*
Title: Re: @mention members
Post by: Dragooon on May 05, 2014, 05:25:32 AM
Can anyone help me by testing my latest changes (they're in the mod's GitHub repository (http://github.com/Dragooon/smf-mentions))? I've done light testing and I think they're fine, but I want to be sure before releasing it on the mod site. Here is a a summary of changes

- Add active suggestions while mentioning someone, works in quick reply as well as full post page (normal and WYSIWYG editor).
- Add Scheduled Task for removing seen mentions before specified days
- Allow setting whether e-mail mentions should be enabled by default or not (defaulted to enable)
- Fix for making mentions case insensitive (@admin = @AdMIn = @adMIN =@Admin)
- Some code cleanup
Title: Re: @mention members
Post by: lurkalot on May 05, 2014, 07:07:06 AM
Quote from: Dragooon on May 05, 2014, 05:25:32 AM
Can anyone help me by testing my latest changes (they're in the mod's GitHub repository (http://github.com/Dragooon/smf-mentions))?


Looking good from here, testing it on a local install atm.  Liking the "active suggestions while mentioning someone"  Nice work. ;)
Title: Re: @mention members
Post by: Dragooon on May 05, 2014, 07:09:48 AM
Quote from: lurkalot on May 05, 2014, 07:07:06 AM
Quote from: Dragooon on May 05, 2014, 05:25:32 AM
Can anyone help me by testing my latest changes (they're in the mod's GitHub repository (http://github.com/Dragooon/smf-mentions))?


Looking good from here, testing it on a local install atm.  Liking the "active suggestions while mentioning someone"  Nice work. ;)
Thanks! If you have any suggestions let me know
Title: Re: @mention members
Post by: lurkalot on May 05, 2014, 07:37:42 AM
Thanks.  Have noticed, and this might just be my testbed.  If I uninstall the mod it leaves the tags in,

What was there when mod installed = @lurkapo how you doing?

When mod un-installed it shows = @lurkapo how you doing?
Title: Re: @mention members
Post by: FrizzleFried on May 05, 2014, 10:59:53 AM
Quote from: Dragooon on May 05, 2014, 01:14:02 AM
Is the name correct? I fixed this issue while the mod was being reviewed. Remember that currently the name is case sensitive.

The name is correct and I used the code you posted above to fix "case sensitivity" issue which works when not in edit mode.  I'll test again though when I have time and get back to you.  Just something I noticed last night when I came across it.  Otherwise it seems to be working great.
Title: Re: @mention members
Post by: FrizzleFried on May 05, 2014, 11:50:59 AM
I found another problem.  My membership are always looking for ways to screw with me and other members (it's the type of forum we have).  One of them mentioned a member "a bunch of times" in a single post.  I am trying to find out what "a bunch of times" means but it crashed the post to a white screen.  I can't get in to the post to determine how many times the jackwad mentioned the member but it appears that at a certain number it crashes the post to a white screen.  You might want to add a "limit" to the number of mentions permitted per post.
Title: Re: @mention members
Post by: Dragooon on May 05, 2014, 11:55:25 AM
Can you check your error logs for any errors?
Title: Re: @mention members
Post by: FrizzleFried on May 05, 2014, 12:04:02 PM
Quote from: Dragooon on May 05, 2014, 11:55:25 AM
Can you check your error logs for any errors?

I see nothing apparent... and accessing the post that "white screens" does not produce an error. 
Title: Re: @mention members
Post by: FrizzleFried on May 05, 2014, 12:06:24 PM
OK... the user didn't know exactly how many times... 100 to 150 times was his estimate.

But you see how this could become a problem (even if it didn't white screen the post).... who wants 150 mentions sent to their profile from the same post?

Title: Re: @mention members
Post by: Dragooon on May 05, 2014, 12:07:20 PM
There must be something else, because I just mentioned a member 300 times on my localhost and it worked fine. And an user will only get a single mention per post regardless of how many times they were mentioned
Title: Re: @mention members
Post by: FrizzleFried on May 05, 2014, 12:12:32 PM
I will ask if he did anything else.  Any suggestion on how I can get in an read what he did if I am getting a white screen?
Title: Re: @mention members
Post by: Dragooon on May 05, 2014, 12:13:45 PM
Quote from: FrizzleFried on May 05, 2014, 12:12:32 PM
I will ask if he did anything else.  Any suggestion on how I can get in an read what he did if I am getting a white screen?
Wait, you're getting a white screen when trying to open the post? That can't be mentions then since it doesn't do anything when a post is being viewed. Try uninstalling the mod to be sure
Title: Re: @mention members
Post by: FrizzleFried on May 05, 2014, 12:20:45 PM
OK.... just used PHPMyAdmin to check out the post.... yup... a hundred plus mentions... and that is it.

Not a single character more.  Just mention after mention.

Not sure what is white screening the post if not the tag over and over?!?

Title: Re: @mention members
Post by: Dragooon on May 05, 2014, 12:26:17 PM
Is it the same member 100 times over?
Title: Re: @mention members
Post by: margarett on May 05, 2014, 12:28:24 PM
That is probably related to SMF 2.0.7 and the memory issues when parsing BBC, unfortunately...
Dragooon, for you to reproduce it you need to lower your memory_limit in php.ini

Just guessing, but that's probably the case.
Title: Re: @mention members
Post by: Dragooon on May 05, 2014, 12:30:56 PM
Ah, lowering my memory_limit to 32M crashed my local site as well. Maybe ask your host to raise it to 64M or ban the stupid user :P
Title: Re: @mention members
Post by: FrizzleFried on May 05, 2014, 12:36:06 PM
Quote from: Dragooon on May 05, 2014, 12:26:17 PM
Is it the same member 100 times over?

Yes sir.. me... over and over and over.

As soon as I removed that post via PHPMYADMIN (I deleted the mentions and just added a couple words of text) it uncrashed the post.  No more white screen.
Title: Re: @mention members
Post by: margarett on May 05, 2014, 12:36:38 PM
Yup, exactly the same here, but I needed a bit over 100 mentions :P
Title: Re: @mention members
Post by: FrizzleFried on May 05, 2014, 12:37:17 PM
Quote from: Dragooon on May 05, 2014, 12:13:45 PM
Quote from: FrizzleFried on May 05, 2014, 12:12:32 PM
I will ask if he did anything else.  Any suggestion on how I can get in an read what he did if I am getting a white screen?
Wait, you're getting a white screen when trying to open the post? That can't be mentions then since it doesn't do anything when a post is being viewed. Try uninstalling the mod to be sure

I was getting a white screen when I went to page 2 (pagination).  As soon as I removed the last post of the thread ... the one with 100+ mentions... the post now comes up fine.
Title: Re: @mention members
Post by: FrizzleFried on May 05, 2014, 12:38:33 PM
Quote from: Dragooon on May 05, 2014, 12:30:56 PM
Ah, lowering my memory_limit to 32M crashed my local site as well. Maybe ask your host to raise it to 64M or ban the stupid user :P

Ah... is there a mod or setting to limit the number of BBC tags that can be used in a post?
Title: Re: @mention members
Post by: FrizzleFried on May 05, 2014, 12:41:11 PM
OK... I have access to PHP.ini on my server.  Where is the setting that I need to increase to 64M?

EDIT: Found it.... and it's already at 64M.  Maybe I need to go to 96M?  128M?  Maybe there was much more than 150 mentions (it was a ballpark guess)....?
Title: Re: @mention members
Post by: margarett on May 05, 2014, 12:42:17 PM
memory_limit=32M
Increase it to 128M if you have access to it ;)

Don't forget to restart Apache after changing it
Title: Re: @mention members
Post by: FrizzleFried on May 05, 2014, 12:43:51 PM
Quote from: margarett on May 05, 2014, 12:42:17 PM
memory_limit=32M
Increase it to 128M if you have access to it ;)

Don't forget to restart Apache after changing it

Ah... I can't restart Apache... I have access to the server via Cpanel...

Title: Re: @mention members
Post by: margarett on May 05, 2014, 12:44:52 PM
But is it your server? If so, you can access it via SSH or whatever.
If not, you really need to ask your host...
Title: Re: @mention members
Post by: Dragooon on May 05, 2014, 12:51:40 PM
128M should cover posts up to SMF's limit of 20k characters (unless you've increased that as well).

Also, I've pushed a new update which changes the way I'm parsing mentions in posts. This'll allow user names with @ symbol to be mentioned without escaping the @, like @K@: What's up? But I'd like someone to help me test it since I did this really quickly and with little testing.
Title: Re: @mention members
Post by: FrizzleFried on May 05, 2014, 12:58:20 PM
Quote from: margarett on May 05, 2014, 12:44:52 PM
But is it your server? If so, you can access it via SSH or whatever.
If not, you really need to ask your host...

Yeah,  I need to ask my host.  Not my server.
Title: Re: @mention members
Post by: FrizzleFried on May 05, 2014, 01:00:57 PM
Also... a few users have asked about deleting mentions.  I posted that the update will include mentions being deleted ever X number of hours (admin defined).  They're asking if it would be possible to simply have mentions delete themselves as they are clicked on.  At the same time,  they complained that if they have multiple mentions and they visit the mention page,  even if they don't click any mentions,  the # next to PROFILE disappears.  In a perfect world,  if you have 10 mentions,  and it says 10 mentions,  you'd visit the mention page,  click one... visit that post... your profile would then show [9] mentions and the 10th one that you visited would no longer be in the mentions screen.

Doable?
Title: Re: @mention members
Post by: FrizzleFried on May 05, 2014, 01:03:19 PM
I also heard from one user who suggested changing the way the mentions are parsed.  He said:

QuoteThis mod is really query intensive and I highly suggest you remove it.

The author shouldn't have implemented it like that, rather than be member=1 for FrizzleFried it should be member=FrizzleFried and when the user clicks the link it looks up the Id and sends the user to the right profile page. That way there is only one query when a user clicks the link, rather than one every time the post is viewed.

It just so happens this was the genius who broke the post....

Title: Re: @mention members
Post by: Dragooon on May 05, 2014, 01:05:53 PM
Quote from: FrizzleFried on May 05, 2014, 01:03:19 PM
I also heard from one user who suggested changing the way the mentions are parsed.  He said:

QuoteThis mod is really query intensive and I highly suggest you remove it.

The author shouldn't have implemented it like that, rather than be member=1 for FrizzleFried it should be member=FrizzleFried and when the user clicks the link it looks up the Id and sends the user to the right profile page. That way there is only one query when a user clicks the link, rather than one every time the post is viewed.

It just so happens this was the genius who broke the post....


What? That's not how the mod works? It doesn't do a single query, the format of bbcode is @<name>, it needs name and ID to generate a valid URL. As margarrett said, it's SMF's BBC parser consuming most of the memory.
Title: Re: @mention members
Post by: FrizzleFried on May 05, 2014, 01:10:37 PM
Quote from: Dragooon on May 05, 2014, 01:05:53 PM
What? That's not how the mod works? It doesn't do a single query, the format of bbcode is @<name>, it needs name and ID to generate a valid URL. As margarrett said, it's SMF's BBC parser consuming most of the memory.

Keep in mind... this is the genius who broke the post...

:D  I let him know he's none-to-bright.

:)

Title: Re: @mention members
Post by: FrizzleFried on May 05, 2014, 02:46:18 PM
My members have found another "maybe" bug.  I say "maybe" because the "bug" happens when you don't use the mod properly.

My members have started changing the name on the tag,  but still tagging people (again,  my site is a fun "locker room" type of site)... when a member tagged @FRITZ and I noticed that it was linked to my profile but I had not gotten a mention.  I had noticed prior that if you create a post with a proper tag @FrizzleFried then went back and edited the name to something else,  the mention remains linked to my profile and I still have a mention in the profile... this time no mention in the profile.  I asked him how he created the mention.

He wrote out the tag manually:  @@FRITZ ... which did NOT create a mention but does create a link to the users profile in the post itself...

I figured I'd let you know that... though since he didn't use the mention properly ... I'm not sure if it's really a bug.
Title: Re: @mention members
Post by: Dragooon on May 05, 2014, 03:04:13 PM
That's not really a valid use case, the member BBC is simply to assist the mod but the actual usage is to follow @ by an username. Can you help me by trying out the latest mod from GitHub? I'd like to see if your hillybilly members can break it further.
Title: Re: @mention members
Post by: FrizzleFried on May 05, 2014, 04:14:18 PM
Hahaha... I didn't see a .zip of the file there... which files should I download/replace or am I missing something?
Title: Re: @mention members
Post by: fapencio on May 05, 2014, 06:10:54 PM
Thanks Dragooon for this mod, is awesome!!!!  ;D

i add 2 languages:  spanish_es-utf8  and  spanish_latin-utf8

regards!

Title: Re: @mention members
Post by: Gluz on May 05, 2014, 07:28:05 PM
I noticed that the member suggestions appear a little down in Opera, sometimes is not in the visible area of the page, but in Chrome and Firefox seems to be OK.

I add to my own site my translation, but I think I'm going to use the fapencio's language files ;D
Title: Re: @mention members
Post by: Dragooon on May 06, 2014, 12:07:08 AM
Quote from: FrizzleFried on May 05, 2014, 04:14:18 PM
Hahaha... I didn't see a .zip of the file there... which files should I download/replace or am I missing something?
Download all the files using the link on bottom right, you'd need to extract the zip and package it again using the same files.


Quote from: Gluz on May 05, 2014, 07:28:05 PM
I noticed that the member suggestions appear a little down in Opera, sometimes is not in the visible area of the page, but in Chrome and Firefox seems to be OK.

I add to my own site my translation, but I think I'm going to use the fapencio's language files ;D
Are you using the current version from GH?
Title: Re: @mention members
Post by: fapencio on May 06, 2014, 12:08:25 AM
Quote from: Gluz on May 05, 2014, 07:28:05 PM
I noticed that the member suggestions appear a little down in Opera, sometimes is not in the visible area of the page, but in Chrome and Firefox seems to be OK.

I add to my own site my translation, but I think I'm going to use the fapencio's language files ;D

hazlo Gluz, pero nadie los ha descargado todavía, quien quiera usarlos ahí se los dejo, saludos
Title: Re: @mention members
Post by: Dragooon on May 06, 2014, 03:28:02 AM
Quote from: FrizzleFried on May 05, 2014, 04:14:18 PM
Hahaha... I didn't see a .zip of the file there... which files should I download/replace or am I missing something?
Actually, I've attached the latest version. Anyone else willing to test this for me, please feel free and let me know how it is

This is really untested, do not blame me if your server crashes, steals your wife or worst
Title: Re: @mention members
Post by: nsno on May 06, 2014, 01:07:42 PM
How many extra queries does this run on your site?

As in, will this tip the server over the edge on busy forums?
Title: Re: @mention members
Post by: Dragooon on May 06, 2014, 01:32:37 PM
Quote from: nsno on May 06, 2014, 01:07:42 PM
How many extra queries does this run on your site?

As in, will this tip the server over the edge on busy forums?
It should not, I've tried to optimise it so that it doesn't cause too much burden. Basically it adds atleast 2 queries (simple single table selects) every time someone is posting a mention (none otherwise) along with n number of inserts depending upon how many mentions are there in the said post. It doesn't add any additional query on every page load or while viewing a post.
Title: Re: @mention members
Post by: nsno on May 06, 2014, 05:06:15 PM
Quote from: Dragooon on May 06, 2014, 01:32:37 PM
Quote from: nsno on May 06, 2014, 01:07:42 PM
How many extra queries does this run on your site?

As in, will this tip the server over the edge on busy forums?
It should not, I've tried to optimise it so that it doesn't cause too much burden. Basically it adds atleast 2 queries (simple single table selects) every time someone is posting a mention (none otherwise) along with n number of inserts depending upon how many mentions are there in the said post. It doesn't add any additional query on every page load or while viewing a post.

that's good news

and I've just realised that I used your SMF4Mobile plugin, so I know you are a clean coder

no extra queries per page load is excellent news

how do mentions work (without downloading it)? ? is it in the post area or is it a bbcode dropdown box?
Title: Re: @mention members
Post by: Dragooon on May 06, 2014, 05:25:46 PM
Quote from: nsno on May 06, 2014, 05:06:15 PM
Quote from: Dragooon on May 06, 2014, 01:32:37 PM
Quote from: nsno on May 06, 2014, 01:07:42 PM
How many extra queries does this run on your site?

As in, will this tip the server over the edge on busy forums?
It should not, I've tried to optimise it so that it doesn't cause too much burden. Basically it adds atleast 2 queries (simple single table selects) every time someone is posting a mention (none otherwise) along with n number of inserts depending upon how many mentions are there in the said post. It doesn't add any additional query on every page load or while viewing a post.

that's good news

and I've just realised that I used your SMF4Mobile plugin, so I know you are a clean coder

no extra queries per page load is excellent news

how do mentions work (without downloading it)? ? is it in the post area or is it a bbcode dropdown box?
Simply by typing @username, it picks it up and mentions the user. The post can be from post page or quick reply
Title: Re: @mention members
Post by: nsno on May 06, 2014, 06:08:19 PM
but the queries are only used once someone uses the @ symbol?

very, very impressive work if that's the case!
Title: Re: @mention members
Post by: iorkara on May 06, 2014, 07:16:16 PM
Quote from: Dragooon on May 05, 2014, 05:25:32 AM
Can anyone help me by testing my latest changes (they're in the mod's GitHub repository (http://github.com/Dragooon/smf-mentions))? I've done light testing and I think they're fine, but I want to be sure before releasing it on the mod site. Here is a a summary of changes

- Add active suggestions while mentioning someone, works in quick reply as well as full post page (normal and WYSIWYG editor).
- Add Scheduled Task for removing seen mentions before specified days
- Allow setting whether e-mail mentions should be enabled by default or not (defaulted to enable)
- Fix for making mentions case insensitive (@admin = @AdMIn = @adMIN =@Admin)
- Some code cleanup

I'm very, very excited about these new updates. Fantastic work here, very much appreciated. I will wait for a official release, I'm a SMF Beginner... But yeah, this is amazing!
Title: Re: @mention members
Post by: Gluz on May 07, 2014, 02:28:15 AM
Quote from: Dragooon on May 06, 2014, 12:07:08 AM
Quote from: Gluz on May 05, 2014, 07:28:05 PM
I noticed that the member suggestions appear a little down in Opera, sometimes is not in the visible area of the page, but in Chrome and Firefox seems to be OK.
Are you using the current version from GH?

Yup, restored a backup of the forum to clean install and installed the zip with the last files.

But only in Opera is misaligned, in Chrome and Firefox appear just below the line where I typing. This is an issue of the Caret.js with Textareas in Opera 12, just Textareas and just in Opera =< 12.17, all the other browsers(Firefox, Chrome, Opera Next) work as they should except for IE as it never works like it should :-\ Tested in the demo page of Caret.js

Maybe should open an issue in their github to see if they could fix that, but I think is more by the Opera engine side.

Very little people uses that browser(<1% of my forum users say the statics), so is not a big deal to keep it that way in my forum, but for those with a lot of activity and enabled to all the users could be a problem.
Title: Re: @mention members
Post by: Dragooon on May 07, 2014, 02:40:25 AM
Quote from: nsno on May 06, 2014, 06:08:19 PM
but the queries are only used once someone uses the @ symbol?

very, very impressive work if that's the case!
Yes, it needs it to search for respective members to make the mention. Otherwise no query for you!
Title: Re: @mention members
Post by: Dragooon on May 07, 2014, 03:17:44 AM
Quote from: Gluz on May 07, 2014, 02:28:15 AM
Quote from: Dragooon on May 06, 2014, 12:07:08 AM
Quote from: Gluz on May 05, 2014, 07:28:05 PM
I noticed that the member suggestions appear a little down in Opera, sometimes is not in the visible area of the page, but in Chrome and Firefox seems to be OK.
Are you using the current version from GH?

Yup, restored a backup of the forum to clean install and installed the zip with the last files.

But only in Opera is misaligned, in Chrome and Firefox appear just below the line where I typing. This is an issue of the Caret.js with Textareas in Opera 12, just Textareas and just in Opera =< 12.17, all the other browsers(Firefox, Chrome, Opera Next) work as they should except for IE as it never works like it should :-\ Tested in the demo page of Caret.js

Maybe should open an issue in their github to see if they could fix that, but I think is more by the Opera engine side.

Very little people uses that browser(<1% of my forum users say the statics), so is not a big deal to keep it that way in my forum, but for those with a lot of activity and enabled to all the users could be a problem.
Okay, I'll take a look into this in a while. Since it's Opera only it doesn't get much priority (plus it's working, so that's a win). Can you try the latest version I attached a few posts above (or get it directly from GitHub)? I did some fundamental changes in parsing mentions (mostly to eliminate the need for escaping @ symbol in usernames) and want to make sure it doesn't cause further issues before I release it. For 1.1 I guess I'm done, I'll focus on making deleting/marking mentions as read more interactive/better in future releases along with other ideas I get.
Title: Re: @mention members
Post by: Apostaganha on May 07, 2014, 08:34:25 AM
It stoped working today :shock:
Title: Re: @mention members
Post by: Dragooon on May 07, 2014, 08:39:41 AM
Quote from: Apostaganha on May 07, 2014, 08:34:25 AM
It stoped working today :shock:
What stopped working? Which version are you using?
Title: Re: @mention members
Post by: Apostaganha on May 07, 2014, 08:41:07 AM
Quote from: Dragooon on May 07, 2014, 08:39:41 AM
Quote from: Apostaganha on May 07, 2014, 08:34:25 AM
It stoped working today :shock:
What stopped working? Which version are you using?


i translated for portuguese and boommm
Title: Re: @mention members
Post by: Dragooon on May 07, 2014, 08:42:28 AM
Quote from: Apostaganha on May 07, 2014, 08:41:07 AM
Quote from: Dragooon on May 07, 2014, 08:39:41 AM
Quote from: Apostaganha on May 07, 2014, 08:34:25 AM
It stoped working today :shock:
What stopped working? Which version are you using?


i translated for portuguese and boommm
You mind giving me more information? boommm is no documented quantity or value...what did you do exactly and what is not working?
Title: Re: @mention members
Post by: Apostaganha on May 07, 2014, 08:43:42 AM
already deleted the translation files and nothing... im usuing the original files
Title: Re: @mention members
Post by: Dragooon on May 07, 2014, 08:44:31 AM
Quote from: Apostaganha on May 07, 2014, 08:43:42 AM
already deleted the translation files and nothing... im usuing the original files
Uninstall and install again
Title: Re: @mention members
Post by: Apostaganha on May 07, 2014, 08:46:44 AM
i wans expect this, i had no problem instaling!
Title: Re: @mention members
Post by: Dragooon on May 07, 2014, 08:47:46 AM
Quote from: Apostaganha on May 07, 2014, 08:46:44 AM
i wans expect this, i had no problem instaling!
Eh...which files did you restore? How did you restore? What did you restore? Why did you restore?
Title: Re: @mention members
Post by: Apostaganha on May 07, 2014, 09:30:17 AM
my bad, everything is ok, sorry.
Title: Re: @mention members
Post by: Dragooon on May 08, 2014, 10:29:26 AM
Uploaded version 1.1 to mod site
Title: Re: @mention members
Post by: Apostaganha on May 08, 2014, 12:10:30 PM
Quote from: Dragooon on May 08, 2014, 10:29:26 AM
Uploaded version 1.1 to mod site

To update, uninstall the current one, delete and upload the new version?
Title: Re: @mention members
Post by: Dragooon on May 08, 2014, 12:13:27 PM
Quote from: Apostaganha on May 08, 2014, 12:10:30 PM
Quote from: Dragooon on May 08, 2014, 10:29:26 AM
Uploaded version 1.1 to mod site

To update, uninstall the current one, delete and upload the new version?
Yup
Title: Re: @mention members
Post by: Apostaganha on May 08, 2014, 12:16:55 PM
brilliant once more ;)
Title: Re: @mention members
Post by: Apostaganha on May 08, 2014, 12:31:21 PM
The plugin "Board Viewers Mod" stop wroking :s
Title: Re: @mention members
Post by: Dragooon on May 08, 2014, 12:33:26 PM
Quote from: Apostaganha on May 08, 2014, 12:31:21 PM
The plugin "Board Viewers Mod" stop wroking :s
What does that have to do with this?
Title: Re: @mention members
Post by: FrizzleFried on May 08, 2014, 01:36:33 PM
When uninstalling the first version,  should I remove all data associated with this mod or leave that unchecked?
Title: Re: @mention members
Post by: Dragooon on May 08, 2014, 01:51:29 PM
Quote from: FrizzleFried on May 08, 2014, 01:36:33 PM
When uninstalling the first version,  should I remove all data associated with this mod or leave that unchecked?
Leave it unchecked
Title: Re: @mention members
Post by: FrizzleFried on May 08, 2014, 03:43:50 PM
When are the suggestions supposed to come in to play?   I just tried in the QUICK REPLY section and nothing popped up when I put in @Friz ...

Also,  like mentioned above... it breaks another mod when this one is installed (the Board Viewers Mod)...

EDIT: Uninstalling the Board Viewers mod doesn't help with the suggestions issue I am having.  I assume when I type @Friz it's supposed to suggest @FrizzleFried ... right?
Title: Re: @mention members
Post by: Dragooon on May 08, 2014, 03:51:04 PM
Quote from: FrizzleFried on May 08, 2014, 03:43:50 PM
When are the suggestions supposed to come in to play?   I just tried in the QUICK REPLY section and nothing popped up when I put in @Friz ...

Also,  like mentioned above... it breaks another mod when this one is installed (the Board Viewers Mod)...

EDIT: Uninstalling the Board Viewers mod doesn't help with the suggestions issue I am having.  I assume when I type @Friz it's supposed to suggest @FrizzleFried ... right?
Yeah, can I have a link to your site and a test account?
Title: Re: @mention members
Post by: FrizzleFried on May 08, 2014, 03:54:35 PM
PM Sent...
Title: Re: @mention members
Post by: langel on May 08, 2014, 07:33:41 PM
Well, with a great mod like this, what is the benefit of paying by this mod?: http://www.smfpacks.com/mentionsmod/

I mean, that differentiates at the two? moreover of the price jeje
Title: Re: @mention members
Post by: Arantor on May 08, 2014, 07:36:06 PM
The paid one has integration into other paid mods by the same author (which the free one, by a different author, does not)

The paid one is also written by someone with a less than stellar record of providing support, even for their own products, as can be found in many conversations here. The author of the free one, by comparison, has history of good conduct in that regard.
Title: Re: @mention members
Post by: langel on May 08, 2014, 07:46:04 PM
Quote from: Arantor on May 08, 2014, 07:36:06 PM
The paid one is also written by someone with a less than stellar record of providing support, even for their own products, as can be found in many conversations here.

Mmm, unfortunately i have read a lot about it and that attitude is incredible  :(

Thanks arantor is all i wanted to know :)
Title: Re: @mention members
Post by: OverTa[k]e on May 08, 2014, 10:03:28 PM
Thanks, but package installed smoothly, but it did not work on me..
Title: Re: @mention members
Post by: Dragooon on May 09, 2014, 03:09:29 AM
Quote from: BA on May 08, 2014, 10:03:28 PM
Thanks, but package installed smoothly, but it did not work on me..
More information? What did not work? Is it not mentioning? If so, do you have the permissions set?
Title: Re: @mention members
Post by: Alex_Ita on May 09, 2014, 04:48:01 AM
Great work @Dragooon. Very very nice! Compliments!

Just one problem in my smf 2.0.7

when I modify a post, mention mod doens't work. The mod reads the active nickname but when I approve the modified post, the nickname it's not linkable.

Any suggestion?
Title: Re: @mention members
Post by: Dragooon on May 09, 2014, 05:09:15 AM
Quote from: Alex_Ita on May 09, 2014, 04:48:01 AM
Great work @Dragooon. Very very nice! Compliments!

Just one problem in my smf 2.0.7

when I modify a post, mention mod doens't work. The mod reads the active nickname but when I approve the modified post, the nickname it's not linkable.

Any suggestion?
So you're modified posts becomes unapproved and then it doesn't link? I'll test this later
Title: Re: @mention members
Post by: Alex_Ita on May 09, 2014, 05:12:11 AM
I explain:

if I modify a post and I Add new mention, this mention doesn't work.
Title: Re: @mention members
Post by: OverTa[k]e on May 09, 2014, 05:23:32 AM
Quote from: Dragooon on May 09, 2014, 03:09:29 AM
More information? What did not work? Is it not mentioning? If so, do you have the permissions set?


(http://i.hizliresim.com/1PLL6D.png)
(http://i.hizliresim.com/rL335M.png)
Title: Re: @mention members
Post by: strano on May 09, 2014, 05:50:19 AM
Great mod, but i've two little problems.

The active suggestions don't work and if i disable the default mentions email from the admin panel, after the redirect the option is still checked.
Title: Re: @mention members
Post by: Dragooon on May 09, 2014, 05:54:23 AM
Quote from: strano on May 09, 2014, 05:50:19 AM
Great mod, but i've two little problems.

The active suggestions don't work and if i disable the default mentions email from the admin panel, after the redirect the option is still checked.
Sorry about the option not saving, stupid bug. I'll fix it in a few. What other mods do you have installed?
Title: Re: @mention members
Post by: Dragooon on May 09, 2014, 06:06:41 AM
Quote from: BA on May 09, 2014, 05:23:32 AM
Quote from: Dragooon on May 09, 2014, 03:09:29 AM
More information? What did not work? Is it not mentioning? If so, do you have the permissions set?
That doesn't help me...is it not giving suggestions or is it not mentioning?
Title: Re: @mention members
Post by: Dragooon on May 09, 2014, 06:09:59 AM
Quote from: Alex_Ita on May 09, 2014, 05:12:11 AM
I explain:

if I modify a post and I Add new mention, this mention doesn't work.
Sorry, stupid bug. I've attached an updated package which fixes admin area and modify posts, please try this
Title: Re: @mention members
Post by: strano on May 09, 2014, 06:25:33 AM
Quote from: Dragooon on May 09, 2014, 05:54:23 AM
Quote from: strano on May 09, 2014, 05:50:19 AM
Great mod, but i've two little problems.

The active suggestions don't work and if i disable the default mentions email from the admin panel, after the redirect the option is still checked.
Sorry about the option not saving, stupid bug. I'll fix it in a few. What other mods do you have installed?
These are the mods.
The mod about the reply editor, sceditor, isn't enabled. While markitup, still a mod about reply editor, it's enabled only for the quick reply,  but the active suggestions don't work in the quick and the normal reply.

PM to New Members    1.2     
2.   Pretty URLs    1.1.1a
3.   SEO Sitemap    2.2.1     
4.   SMF4iPhone-Mod    1.1
5.   cbi 1.0    1.7.8   
6.   Default Avatar    2.3     
7.   Cumulus Congestus    1.0   
8.   SimplePortal    2.3.5     
9.   Tapatalk SMF 2.0 RC5/Final Plugin    3.9.1 
10.   Separate the sticky topics    1.0.0     
11.   Simple Youtube Video Embedder/BBC    1.1 
12.   SMF Staff Page    1.7     
13.   Invitation Message In Your Face (IMIYF)    0.3.2     
14.   Bookmarks    2.5     
15.   SMF 2.0.7 Update    1.0     
16.   @mention members    1.1 
17.   The Rules    1.31 
18.   SCEditor4Smf    0.5.1   
19.   ENotify    2.0.2     
20.   Add Facebook Like, Tweet, and Google +1    1.0.3a     
21.   Optimus Brave    1.8.7     
22.   Menu_Icons    1.0     
23.   markItUp! for SMF    0.5.4     
24.   Like Posts    1.3.1     
25.   Tapatalk SMF 2.0 Plugin    3.9.2 
Title: Re: @mention members
Post by: OCJ on May 09, 2014, 06:29:12 AM
Im having big site problems after using this.

I downloaded the first version and installed today - didnt work. I came here and saw it had been updated so installed the 1.1 version - that worked.

The drop down autofill was not displaying.

But getting odd behaviour in the forum. After logging out I was not redirected to the forum as usual but login page - now visitors cannot access the site - only login screen.

I uninstalled and deleted but still guests cannot see the forum - only login screen
Title: Re: @mention members
Post by: OCJ on May 09, 2014, 06:36:15 AM
I think a site file was damaged perhaps as some feature and settings options were changed. MAybe the ~backup copy was used.
Whos online was set to 'off' which has never been that way and was working minutes before that.

There is a warning though from SMF

QuoteFailed to make backup of Settings.php - make sure Settings_bak.php exists and is writable.
Maybe uninstall resulted in old file being used.
Title: Re: @mention members
Post by: Dragooon on May 09, 2014, 06:37:42 AM
Quote from: strano on May 09, 2014, 06:25:33 AM
Quote from: Dragooon on May 09, 2014, 05:54:23 AM
Quote from: strano on May 09, 2014, 05:50:19 AM
Great mod, but i've two little problems.

The active suggestions don't work and if i disable the default mentions email from the admin panel, after the redirect the option is still checked.
Sorry about the option not saving, stupid bug. I'll fix it in a few. What other mods do you have installed?
These are the mods.
The mod about the reply editor, sceditor, isn't enabled. While markitup, still a mod about reply editor, it's enabled only for the quick reply,  but the active suggestions don't work in the quick and the normal reply.

PM to New Members    1.2     
2.   Pretty URLs    1.1.1a
3.   SEO Sitemap    2.2.1     
4.   SMF4iPhone-Mod    1.1
5.   cbi 1.0    1.7.8   
6.   Default Avatar    2.3     
7.   Cumulus Congestus    1.0   
8.   SimplePortal    2.3.5     
9.   Tapatalk SMF 2.0 RC5/Final Plugin    3.9.1 
10.   Separate the sticky topics    1.0.0     
11.   Simple Youtube Video Embedder/BBC    1.1 
12.   SMF Staff Page    1.7     
13.   Invitation Message In Your Face (IMIYF)    0.3.2     
14.   Bookmarks    2.5     
15.   SMF 2.0.7 Update    1.0     
16.   @mention members    1.1 
17.   The Rules    1.31 
18.   SCEditor4Smf    0.5.1   
19.   ENotify    2.0.2     
20.   Add Facebook Like, Tweet, and Google +1    1.0.3a     
21.   Optimus Brave    1.8.7     
22.   Menu_Icons    1.0     
23.   markItUp! for SMF    0.5.4     
24.   Like Posts    1.3.1     
25.   Tapatalk SMF 2.0 Plugin    3.9.2 
Can I have a link and test account on your site?
Title: Re: @mention members
Post by: Dragooon on May 09, 2014, 06:38:45 AM
Quote from: igirisjin on May 09, 2014, 06:29:12 AM
Im having big site problems after using this.

I downloaded the first version and installed today - didnt work. I came here and saw it had been updated so installed the 1.1 version - that worked.

The drop down autofill was not displaying.

But getting odd behaviour in the forum. After logging out I was not redirected to the forum as usual but login page - now visitors cannot access the site - only login screen.

I uninstalled and deleted but still guests cannot see the forum - only login screen
Uhm, sounds like you're having some php errors? Can you check the hosting error logs?
Title: Re: @mention members
Post by: strano on May 09, 2014, 06:47:32 AM
Quote from: Dragooon on May 09, 2014, 06:37:42 AM
Quote from: strano on May 09, 2014, 06:25:33 AM
Quote from: Dragooon on May 09, 2014, 05:54:23 AM
Quote from: strano on May 09, 2014, 05:50:19 AM
Great mod, but i've two little problems.

The active suggestions don't work and if i disable the default mentions email from the admin panel, after the redirect the option is still checked.
Sorry about the option not saving, stupid bug. I'll fix it in a few. What other mods do you have installed?
These are the mods.
The mod about the reply editor, sceditor, isn't enabled. While markitup, still a mod about reply editor, it's enabled only for the quick reply,  but the active suggestions don't work in the quick and the normal reply.

PM to New Members    1.2     
2.   Pretty URLs    1.1.1a
3.   SEO Sitemap    2.2.1     
4.   SMF4iPhone-Mod    1.1
5.   cbi 1.0    1.7.8   
6.   Default Avatar    2.3     
7.   Cumulus Congestus    1.0   
8.   SimplePortal    2.3.5     
9.   Tapatalk SMF 2.0 RC5/Final Plugin    3.9.1 
10.   Separate the sticky topics    1.0.0     
11.   Simple Youtube Video Embedder/BBC    1.1 
12.   SMF Staff Page    1.7     
13.   Invitation Message In Your Face (IMIYF)    0.3.2     
14.   Bookmarks    2.5     
15.   SMF 2.0.7 Update    1.0     
16.   @mention members    1.1 
17.   The Rules    1.31 
18.   SCEditor4Smf    0.5.1   
19.   ENotify    2.0.2     
20.   Add Facebook Like, Tweet, and Google +1    1.0.3a     
21.   Optimus Brave    1.8.7     
22.   Menu_Icons    1.0     
23.   markItUp! for SMF    0.5.4     
24.   Like Posts    1.3.1     
25.   Tapatalk SMF 2.0 Plugin    3.9.2 
Can I have a link and test account on your site?
i've sent you a pm :)
Title: Re: @mention members
Post by: OCJ on May 09, 2014, 06:49:30 AM
Cant see anything in the server logs.

Seems I dont have a backup of the settings file.
Title: Re: @mention members
Post by: Dragooon on May 09, 2014, 06:52:57 AM
Quote from: igirisjin on May 09, 2014, 06:49:30 AM
Cant see anything in the server logs.

Seems I dont have a backup of the settings file.

Can you access admin area? Can I have a link/FTP account on your site
Title: Re: @mention members
Post by: OCJ on May 09, 2014, 06:56:24 AM
I put a copy back of the settings - renamed settings_bak.

Guests can view the site again - it was set to off in the options. For some reason  several settings were  changed or reset after using this mod. It might be something else (another mod effect) but it happened only when I used this mod.

At the moment site looks normal.
Title: Re: @mention members
Post by: Alex_Ita on May 09, 2014, 07:13:58 AM
Quote from: Dragooon on May 09, 2014, 06:09:59 AM
Sorry, stupid bug. I've attached an updated package which fixes admin area and modify posts, please try this
Thanks for your kindly reply.
Now your mod works fine!

Thank you.

Here you are italian translate.
Title: Re: @mention members
Post by: Dragooon on May 09, 2014, 07:27:46 AM
Quote from: igirisjin on May 09, 2014, 06:56:24 AM
I put a copy back of the settings - renamed settings_bak.

Guests can view the site again - it was set to off in the options. For some reason  several settings were  changed or reset after using this mod. It might be something else (another mod effect) but it happened only when I used this mod.

At the moment site looks normal.
Might be a glitch, the mod shouldn't cause settings corruption (doesn't even touch that area).
Title: Re: @mention members
Post by: titanium79 on May 09, 2014, 07:37:24 AM
The installation of the mod involves an automatic reset some settings, it happened to me, after installing visitors no longer saw the forum, you must go to ADMIN, and check the options again.
Title: Re: @mention members
Post by: Dragooon on May 09, 2014, 07:38:46 AM
Quote from: titanium79 on May 09, 2014, 07:37:24 AM
The installation of the mod involves an automatic reset some settings, it happened to me, after installing visitors no longer saw the forum, you must go to ADMIN, and check the options again.
What options?
Title: Re: @mention members
Post by: titanium79 on May 09, 2014, 07:41:46 AM
ADMIN > configuration > features and options

Title: Re: @mention members
Post by: Dragooon on May 09, 2014, 07:50:22 AM
Quote from: titanium79 on May 09, 2014, 07:41:46 AM
ADMIN > configuration > features and options


What about it? Which options does it reset?
Title: Re: @mention members
Post by: Apostaganha on May 09, 2014, 08:45:43 AM
Quote from: FrizzleFried on May 08, 2014, 03:43:50 PM
When are the suggestions supposed to come in to play?   I just tried in the QUICK REPLY section and nothing popped up when I put in @Friz ...

Also,  like mentioned above... it breaks another mod when this one is installed (the Board Viewers Mod)...

EDIT: Uninstalling the Board Viewers mod doesn't help with the suggestions issue I am having.  I assume when I type @Friz it's supposed to suggest @FrizzleFried ... right?


the nwe version dangeriously clean all features and options setups, theres no problem with the the Board Viewers Mod
Title: Re: @mention members
Post by: Apostaganha on May 09, 2014, 08:46:01 AM
Quote from: Dragooon on May 09, 2014, 07:50:22 AM
Quote from: titanium79 on May 09, 2014, 07:41:46 AM
ADMIN > configuration > features and options


What about it? Which options does it reset?

almost all
Title: Re: @mention members
Post by: Dragooon on May 09, 2014, 09:19:12 AM
Quote from: Apostaganha on May 09, 2014, 08:46:01 AM
Quote from: Dragooon on May 09, 2014, 07:50:22 AM
Quote from: titanium79 on May 09, 2014, 07:41:46 AM
ADMIN > configuration > features and options


What about it? Which options does it reset?

almost all
You mean it resets all SMF options or all of it's options?
Title: Re: @mention members
Post by: Dragooon on May 09, 2014, 09:28:43 AM
Ohh, if you're having the settings reset use the 1.1.1 version, it should fix that as well
Title: Re: @mention members
Post by: Dragooon on May 09, 2014, 09:36:32 AM
Uploaded 1.1.1 officially to mod site, please tell me if this fixes for those who were having problems suggesting members. Uninstall old one and install the latest
Title: Re: @mention members
Post by: FrizzleFried on May 09, 2014, 12:06:21 PM
I did notice this mod wiped out the settings in the the GENERAL screen of the FEATURED AND OPTIONS admin page.  Everything that was checked became unchecked.

That is the only page I noticed an issue on.
Title: Re: @mention members
Post by: Apostaganha on May 09, 2014, 12:11:28 PM
Quote from: FrizzleFried on May 09, 2014, 12:06:21 PM
I did notice this mod wiped out the settings in the the GENERAL screen of the FEATURED AND OPTIONS admin page.  Everything that was checked became unchecked.

That is the only page I noticed an issue on.


x2
Title: Re: @mention members
Post by: Dragooon on May 09, 2014, 12:21:20 PM
Yeah I fixed that with 1.1.1
Title: Re: @mention members
Post by: strano on May 09, 2014, 01:50:06 PM
I've intstalled the 1.1.1 but the problems persist :(
Title: Re: @mention members
Post by: Dragooon on May 09, 2014, 01:58:51 PM
Quote from: strano on May 09, 2014, 01:50:06 PM
I've intstalled the 1.1.1 but the problems persist :(
Which?
Title: Re: @mention members
Post by: Adrek on May 09, 2014, 02:20:18 PM
Updated from 1.0 to 1.1.1 and suggestions feature works fine :)
But please, do some cleanup in package, there are lots of MAC files (starting with dot).
Title: Re: @mention members
Post by: Dragooon on May 09, 2014, 02:33:35 PM
Quote from: phantomm on May 09, 2014, 02:20:18 PM
Updated from 1.0 to 1.1.1 and suggestions feature works fine :)
But please, do some cleanup in package, there are lots of MAC files (starting with dot).
Ah sorry, missed them this time. Updated the package
Title: Re: @mention members
Post by: delitoo on May 09, 2014, 04:50:05 PM
If it could notify by PM it would be great !
Title: Re: @mention members
Post by: delitoo on May 09, 2014, 05:32:36 PM
Working fine for me but no one has received any emails yet. Notifications are set to instant and they are being received for topic replies but nothing about a mention.
Title: Re: @mention members
Post by: Dragooon on May 09, 2014, 05:35:07 PM
Are email notifications enabled in Profile -> Mentions?
Title: Re: @mention members
Post by: delitoo on May 09, 2014, 06:27:21 PM
edit: Actually they weren't :/

Title: Re: @mention members
Post by: Gluz on May 09, 2014, 07:47:41 PM
Quote from: BA on May 09, 2014, 05:23:32 AM
Quote from: Dragooon on May 09, 2014, 03:09:29 AM
More information? What did not work? Is it not mentioning? If so, do you have the permissions set?


(http://i.hizliresim.com/1PLL6D.png)
(http://i.hizliresim.com/rL335M.png)
You should check in Admin > Permissions > Any group that you want to be able to mention members.

(http://puu.sh/8FYrl.png)
Title: Re: @mention members
Post by: strano on May 10, 2014, 05:35:53 AM
Quote from: Dragooon on May 09, 2014, 01:58:51 PM
Quote from: strano on May 09, 2014, 01:50:06 PM
I've intstalled the 1.1.1 but the problems persist :(
Which?
Active suggestions still didn't work  :-\

Also with tapatalk the tag isn't recognised.
Title: Re: @mention members
Post by: Dragooon on May 10, 2014, 05:38:40 AM
Quote from: strano on May 10, 2014, 05:35:53 AM
Quote from: Dragooon on May 09, 2014, 01:58:51 PM
Quote from: strano on May 09, 2014, 01:50:06 PM
I've intstalled the 1.1.1 but the problems persist :(
Which?
Active suggestions still didn't work  :-\

Also with tapatalk the tag isn't recognised.
Tapatalk uses it's own routing and models for handling posts, so I'd need to modify their files themselves. Can you PM me FTP access to your site?
Title: Re: @mention members
Post by: Alpay on May 10, 2014, 06:42:13 AM
Hello,
At the end of a beautiful mod :)

I'm testing on a few sites, E mail does not work..
Email send nice, but functions like a personal message, do you think?
Title: Re: @mention members
Post by: Dragooon on May 10, 2014, 06:46:09 AM
Quote from: Alpay on May 10, 2014, 06:42:13 AM
Hello,
At the end of a beautiful mod :)

I'm testing on a few sites, E mail does not work..
Email send nice, but functions like a personal message, do you think?

Does email work or it is not sending e-mails? Make sure it's enabled in Profile > Mentions. I'll take a look at PMs later
Title: Re: @mention members
Post by: Alpay on May 10, 2014, 06:59:32 AM
Ah.. ok sorry ^^
Thank you for everything and modification update/writting ^^

Regards.
Title: Re: @mention members
Post by: ryan_dwight on May 10, 2014, 07:27:15 AM
I just installed this and it works but how to setup all members to received notification via email?
Title: Re: @mention members
Post by: Dragooon on May 10, 2014, 07:41:48 AM
Quote from: ryan_dwight on May 10, 2014, 07:27:15 AM
I just installed this and it works but how to setup all members to received notification via email?
Update to 1.1.2 and tick the checkbox to enable for existing members. Or run this query
UPDATE smf_members SET email_mentions = 1
Replace smf_ with your prefix
Title: Re: @mention members
Post by: Alpay on May 10, 2014, 10:23:37 AM
@Dragooon;
  Sites that use JavaScript library you have any suggestions for me?

  mention.js ;
  if (typeof iframe[0] != 'undefined')

  mention.js ;
  var $ used;
  var $x   
   
  changed?
Title: Re: @mention members
Post by: Dragooon on May 10, 2014, 10:34:19 AM
Quote from: Alpay on May 10, 2014, 10:23:37 AM
@Dragooon;
  Sites that use JavaScript library you have any suggestions for me?

  mention.js ;
  if (typeof iframe[0] != 'undefined')

  mention.js ;
  var $ used;
  var $x   
   
  changed?
Uhm I'm not sure what you're asking, what library are you using? Can I have a link to your site (and a test account)
Title: Re: @mention members
Post by: Badboy on May 10, 2014, 02:14:08 PM
Thx for the mod. But suggestions both not working with turkish characters (http://en.wikipedia.org/wiki/Wikipedia:Turkish_characters) (using utf8) and with spaced usernames (like @bad boy).
Title: Re: @mention members
Post by: Dragooon on May 10, 2014, 02:23:22 PM
Suggestions with spaced usernames are tough to handle, I'll take a look at UTF-8 compatibility later
Title: Re: @mention members
Post by: Badboy on May 10, 2014, 03:00:25 PM
Ok thx. Do you have any plan about suggestions on quick modify (display page)?
Title: Re: @mention members
Post by: NoPasaran on May 10, 2014, 04:41:13 PM
for example


user name nopasaran


i write @nop , forum members show its good..


but user name [nopasaran]


i write @[ , forum members does not show


:)


understand me   ;D  ;D
Title: Re: @mention members
Post by: Dragooon on May 10, 2014, 05:11:32 PM
Quote from: Badboy on May 10, 2014, 03:00:25 PM
Ok thx. Do you have any plan about suggestions on quick modify (display page)?
It should already be working

Quote from: NoPasaran on May 10, 2014, 04:41:13 PM
for example


user name nopasaran


i write @nop , forum members show its good..


but user name [nopasaran]


i write @[ , forum members does not show


:)


understand me   ;D  ;D
It will work but it will not show suggestions if the names start without an alphabet
Title: Re: @mention members
Post by: iorkara on May 10, 2014, 08:25:57 PM
So I finally got round to installing this Mod (1.1.2). It works flawlessly.

Thank you for this amazing Mod, great work!
Title: Re: @mention members
Post by: b.williams127 on May 11, 2014, 09:30:57 AM
Hi, I have the mod "SCEditor4Smf" installed, which changes the default post editor and quick reply editor. The active suggestions are not showing up. Is there a way to get around this? I guess its because I am not using the default editor.
Title: Re: @mention members
Post by: Badboy on May 11, 2014, 10:49:28 AM
"Undefined index: approved" error on log when modify a post which contain mentions ;)

File Subs-Post.php.
Code (LINE) Select
mentions_process_store($msgOptions['mentions'], $msgOptions['id'], $msgOptions['subject'], $msgOptions['approved']);

Edit: No problem with @Badboy, just problem when we use like @Badboy
Title: Re: @mention members
Post by: Alex_Ita on May 11, 2014, 03:08:13 PM
another problem...

after mention, forum sends two email to notice users.

Any suggest?
Title: Re: @mention members
Post by: Dragooon on May 11, 2014, 03:12:26 PM
Quote from: Alex_Ita on May 11, 2014, 03:08:13 PM
another problem...

after mention, forum sends two email to notice users.

Any suggest?
Attach Subs-Posts.php here

Quote from: Badboy on May 11, 2014, 10:49:28 AM
"Undefined index: approved" error on log when modify a post which contain mentions ;)

File Subs-Post.php.
Code (LINE) Select
mentions_process_store($msgOptions['mentions'], $msgOptions['id'], $msgOptions['subject'], $msgOptions['approved']);

Edit: No problem with @Badboy, just problem when we use like @Badboy
Thanks, is post moderation disabled on your forum?
Title: Re: @mention members
Post by: Badboy on May 11, 2014, 03:19:12 PM
No, post moderation is enabled in core settings.
Title: Re: @mention members
Post by: Alex_Ita on May 11, 2014, 03:19:35 PM
here you are
Title: Re: @mention members
Post by: Dragooon on May 11, 2014, 03:27:03 PM
Quote from: Alex_Ita on May 11, 2014, 03:19:35 PM
here you are
You had modification's changes applied twice, I've cleaned it up. Replace the file with the attached one
Title: Re: @mention members
Post by: Dragooon on May 11, 2014, 03:33:13 PM
Quote from: Badboy on May 11, 2014, 03:19:12 PM
No, post moderation is enabled in core settings.
That's strange, is it when a post is posted or modified/
Title: Re: @mention members
Post by: Badboy on May 11, 2014, 03:37:45 PM
Just modified.
Title: Re: @mention members
Post by: Dragooon on May 11, 2014, 03:40:04 PM
Ah okay, find both instances of
mentions_process_store($msgOptions['mentions'], $msgOptions['id'], $msgOptions['subject'], $msgOptions['approved']);
and replace them with
mentions_process_store($msgOptions['mentions'], $msgOptions['id'], $msgOptions['subject'], isset($msgOptions['approved']) ? $msgOptions['approved'] : 1);
in Subs-Post.php
Title: Re: @mention members
Post by: Alex_Ita on May 11, 2014, 03:41:28 PM
Thank you Dragooon. A lot of thanks.

You're very kind.

Your file works fine.
Title: Re: @mention members
Post by: Badboy on May 11, 2014, 04:01:01 PM
Quote from: Dragooon on May 11, 2014, 03:40:04 PM
Ah okay, find both instances of
mentions_process_store($msgOptions['mentions'], $msgOptions['id'], $msgOptions['subject'], $msgOptions['approved']);
and replace them with
mentions_process_store($msgOptions['mentions'], $msgOptions['id'], $msgOptions['subject'], isset($msgOptions['approved']) ? $msgOptions['approved'] : 1);
in Subs-Post.php
Thx works.
Title: Re: @mention members
Post by: JustOneOldMan on May 11, 2014, 05:48:49 PM
Quick question.  Just downloaded and installed the mod.  Installation went well, and when I use the @ <username> in a post it comes up with name suggestions fine.  Everything looks good, except I don't see any notifications anywhere.  I'm using my admin login and a test login to test it.

I don't have the email notifications enabled, but I'm not seeing anything related in the "Profile" menu dropdown as shown in the mod page images, nor is there a number beside the menu item.  I do have Permissions set, number of days to delete mentions, and activated the scheduled task.

Apparently I'm missing something, though.  It appears to be working, but no notifications.  I do have other mods installed.  Looks like just the mod I need, any thoughts would be appreciated...

SMF 2.0.7
Title: Re: @mention members
Post by: OCJ on May 11, 2014, 11:09:03 PM
Installed the latest version - works ok.

@username is linked to profile.
I can see the mention menu tab in the profile.
The email notifications are working.

But
I can't get any drop down auto-selection though in the message editor.
Perhaps another mod Im using?

Do the javascript files need manually uploading to custom themes?






1.    Register Redirect    1.0    
2.    Edit All Message Titles    0.1.1    
3.    BoardColor    V1    
4.    Remove "Last edit" mod    0.2.5    
5.    Simple Hide BBC - Hide the Goodies from Lurkers    1.0    
6.    Menu Editor Lite    1.0.5    
7.    Ohara YouTube Embed    1.2    
8.    Akismet Spam Blocking    1.2    
9.    Look But No Read    1.3    
10.    Auto Lock Old Topics    2.0    
11.    Advanced Language Menu    3.0.1    
12.    Post Template Mod    0.1.3    
13.    FancyBox 4 SMF    0.5    
14.    Optimus Brave    1.8.7    
15.    Admin Notepad    2.0.2    
16.    Hide ip stuff for users    1.04    
17.    Remove Post Count    1.0.2    
18.    Topic Descriptions    1.3    
19.    Send Locked Topics To Bottom    1.0    
20.    SimpleColorizer    1.1    
21.    Email Template Editor    1.0
22.    Disable to send EMail with Forum-System for Users lower than Admin    1.0    
23.    PM Warning    1.0    
24.    Order Custom Profile Fields    1.1.1    
25.    Scrolling Buttons    0.3    
26.    Users Online Today    2.0.3    
27.    Topic Author    0.1    
28.    @mention members    1.1.2    
29.    SimplePortal    2.3.5    
30.    Avatar on Member List    2.0    
31.    Force Topic Read On Login Mod    2.1    
32.    MetaTags Modification    2.0.2    
33.    mp notification style    v0.2    
34.    Drafts    2.0.5    
35.    Expire Attachments mod    1.0


Title: Re: @mention members
Post by: bfeist on May 12, 2014, 10:55:52 AM
Quote from: iorkara on May 10, 2014, 08:25:57 PM
So I finally got round to installing this Mod (1.1.2). It works flawlessly.

Thank you for this amazing Mod, great work!

+1! Great mod. The only part that caught me out was that I needed to allow mentions within permissions for non-administrators before it would work for all users.
Title: Re: @mention members
Post by: ileami on May 12, 2014, 12:20:11 PM
Great Mod,
can I show the mention notify on upper section?
I've tried with this code
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li><li><a href="', $scripturl, '?action=profile;area=mentions">', $txt['mentions'] . (!empty($user_settings['unread_mentions']) ? ' [' . $user_settings['unread_mentions'] . ']' : ''), '</a></li>'
but It shows only Mention link, not number of unread mention.
Any suggestion?
Thanks,
Lia
Title: Re: @mention members
Post by: Badboy on May 12, 2014, 01:28:02 PM
@ileami open index.template.php

In addition to your code;

Code (FIND) Select
function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;


Code (REPLACE) Select
function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings, $user_settings;
Title: Re: @mention members
Post by: b.williams127 on May 12, 2014, 02:57:33 PM
Another great feature would be to somehow integrate with eNotify  :)
Title: Re: @mention members
Post by: ileami on May 12, 2014, 03:12:41 PM
Quote from: Badboy on May 12, 2014, 01:28:02 PM
@ileami open index.template.php

In addition to your code;

Code (FIND) Select
function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;


Code (REPLACE) Select
function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings, $user_settings;


It Works! Great and thank You so much Badboy  :) :) :)
Title: Re: @mention members
Post by: JustOneOldMan on May 12, 2014, 03:39:51 PM
I've tried this on three of my forums now (all 2.0.7) and all do the same thing.  Everything installs correctly, permissions set, works as it should in post (name suggestions come up), but I still can't see any indication anywhere that there has been a mention.

I'm sure after three installs on different forums with different mods installed and getting the same results it must be something I'm missing or doing wrong, but I can't see what.  Any ideas would be greatly appreciated...
Title: Re: @mention members
Post by: Dragooon on May 12, 2014, 03:47:10 PM
Quote from: JustOneOldMan on May 12, 2014, 03:39:51 PM
I've tried this on three of my forums now (all 2.0.7) and all do the same thing.  Everything installs correctly, permissions set, works as it should in post (name suggestions come up), but I still can't see any indication anywhere that there has been a mention.

I'm sure after three installs on different forums with different mods installed and getting the same results it must be something I'm missing or doing wrong, but I can't see what.  Any ideas would be greatly appreciated...
Which language are you using? Profile -> Mentions is where it should show the mentions and you cannot mention yourself
Title: Re: @mention members
Post by: JustOneOldMan on May 12, 2014, 04:13:09 PM
Thanks, Dragoon.  I'm using myself and a test member to test it.  But I'm not seeing anything under "Profile" except the standard stuff.  And no indication anywhere there was a mention.

Tested it with a couple members too, and they're not seeing anything either.  Their names come up as I start to type in the post fine, but after posting none of us are seeing anything...
Title: Re: @mention members
Post by: lurkalot on May 12, 2014, 04:23:50 PM
Quote from: JustOneOldMan on May 12, 2014, 03:39:51 PM
I've tried this on three of my forums now (all 2.0.7) and all do the same thing.  Everything installs correctly, permissions set, works as it should in post (name suggestions come up), but I still can't see any indication anywhere that there has been a mention.

I'm sure after three installs on different forums with different mods installed and getting the same results it must be something I'm missing or doing wrong, but I can't see what.  Any ideas would be greatly appreciated...

Do you have the Ultimate Profile mod installed on all of them?  By the way I just mentioned you, (I think) Joom?
Title: Re: @mention members
Post by: JustOneOldMan on May 12, 2014, 04:26:50 PM
Yes I do, lurk.  Figured you were somebody from here. :P

Have UP installed on all of them...
Title: Re: @mention members
Post by: lurkalot on May 12, 2014, 04:34:52 PM
Quote from: JustOneOldMan on May 12, 2014, 04:26:50 PM
Yes I do, lurk.  Figured you were somebody from here. :P

Have UP installed on all of them...

I was just wondering if the Ultimate profile mod is the problem.  I'm assuming the mentions mod works with it?  Click your profile from the main menu, then put you mouse cursor over the "Profile info" tab.  You'll see mentions at the bottom of that dropdown.  Click it, any mentions in there?

Edit:  I can see you just mentioned me.  But there's no notification on the profile tab
Title: Re: @mention members
Post by: JustOneOldMan on May 12, 2014, 04:40:23 PM
I do see Mentions there, lurk.  But not on the main menu "Profile" option.  And if I click on that option I can see the list of Mentions.

Just no indication without going to the Profile, Profile Info, then clicking on Mentions...
Title: Re: @mention members
Post by: lurkalot on May 12, 2014, 04:43:05 PM
Quote from: JustOneOldMan on May 12, 2014, 04:40:23 PM
I do see Mentions there, lurk.  But not on the main menu "Profile" option.  And if I click on that option I can see the list of Mentions.

Just no indication without going to the Profile, Profile Info, then clicking on Mentions...

Just a hunch, I think it's something to do with the Ultimate Profile mod.  Hopefully Dragooon can confirm this.
Title: Re: @mention members
Post by: JustOneOldMan on May 12, 2014, 04:45:55 PM
Bet you're right, lurk.  Figured it had to be something like that.  Or the modified menu system.


May just not be able to use it with the other mods.  I figured this would be a lot easier than members using the shoutbox to tell another member to check out a post, but it might just not work out...
Title: Re: @mention members
Post by: lurkalot on May 12, 2014, 04:48:42 PM
Quote from: JustOneOldMan on May 12, 2014, 04:45:55 PM
Bet you're right, lurk.  Figured it had to be something like that.  Or the modified menu system...

Modified menu system could well be the cause too.  Are you using a menu mod? or did you edit it yourself? 
Title: Re: @mention members
Post by: JustOneOldMan on May 12, 2014, 04:50:16 PM
I had been editing it myself, but a while back I installed "Menu Editor Lite".  That's probably the issue...
Title: Re: @mention members
Post by: Biology Forums on May 12, 2014, 06:20:32 PM
Awesome modification, just installed it on http://homeworkclinic.com!
Title: Re: @mention members
Post by: OCJ on May 12, 2014, 10:44:34 PM

QuoteI do see Mentions there, lurk.  But not on the main menu "Profile" option.  And if I click on that option I can see the list of Mentions.

Just no indication without going to the Profile, Profile Info, then clicking on Mentions...

QuoteI had been editing it myself, but a while back I installed "Menu Editor Lite".  That's probably the issue...

Same here... only on Profil info tab, and Im using menu editor lite. But thats life, cant have everything. I guess you can add a menu tab using the editor.
Title: Re: @mention members
Post by: Arantor on May 12, 2014, 10:47:19 PM
Yeah, Menu Editor Lite ditches the entire menu and replaces it with its own, breaking anything that would otherwise add to the menu.
Title: Re: @mention members
Post by: JustOneOldMan on May 13, 2014, 01:13:09 AM
Yup.  Can't do it this week, but as igirisjin mentioned I'll try adding an option and see if I can get it to work, including the numbers.  Outside Menu Editor Lite somewhere...
Title: Re: @mention members
Post by: lurkalot on May 13, 2014, 01:59:49 AM
Quote from: Arantor on May 12, 2014, 10:47:19 PM
Yeah, Menu Editor Lite ditches the entire menu and replaces it with its own, breaking anything that would otherwise add to the menu.

I also remember it takes out the PM notifications as well.  I think we've found the culprit. ;)
Title: Re: @mention members
Post by: JustOneOldMan on May 13, 2014, 02:04:02 AM
Yup, that was it.  Thanks for the help, lurkalot and Arantor.

I wasn't going to mess with it till the weekend, but I just went ahead and added the option.  Took all of 2 minutes.  I put it up in the header beside the user's avatar under the time line.  Works great, with numbers.  I'll just have to tell users where to look when they come in.

Thanks again for all the help, I should have realized it was the menu thing.  Too long without sleep - that's what I'm using for an excuse and sticking to it... ;)
Title: Re: @mention members
Post by: Dragooon on May 13, 2014, 05:27:19 AM
/me sees a lot of new posts
/me sees everyone is happy and have resolved their issues
/me goes back to sleep
Title: Re: @mention members
Post by: JustOneOldMan on May 13, 2014, 10:36:04 AM
Quote from: Dragooon on May 13, 2014, 05:27:19 AM
/me sees a lot of new posts
/me sees everyone is happy and have resolved their issues
/me goes back to sleep

:P :P :P

Great mod, Dragooon.  Few bumps getting it up and running, but all because of other mods.  Enjoy the nap... ;)
Title: Re: @mention members
Post by: JustOneOldMan on May 13, 2014, 11:10:30 AM
Forgot to mention that I also added it to the TinyPortal "User Information" block.  Works great there as well...
Title: Re: @mention members
Post by: beawoodget on May 14, 2014, 07:07:54 AM
Like this mod, but can't get it working:

Install went fine, I set the permissions, but I can't Enable mentions e-mail for current members: I check the button and I save, but the button remains unchecked.
The "mentions" field appears in the profile submenu, but  when I enter @<username> in a post, no suggestion appear.
Using smf 2.0.7

Any idea/fix, did I missed something?

Thank you
Title: Re: @mention members
Post by: Dragooon on May 14, 2014, 07:12:33 AM
QuoteInstall went fine, I set the permissions, but I can't Enable mentions e-mail for current members: I check the button and I save, but the button remains unchecked.
It'll remain unchecked, it's a one time thing to enable for current members.

QuoteThe "mentions" field appears in the profile submenu, but  when I enter @<username> in a post, no suggestion appear.
If you submit, does it mention properly?
Title: Re: @mention members
Post by: ryan_dwight on May 14, 2014, 07:15:30 AM
Quote from: beawoodget on May 14, 2014, 07:07:54 AM
Like this mod, but can't get it working:

Install went fine, I set the permissions, but I can't Enable mentions e-mail for current members: I check the button and I save, but the button remains unchecked.
The "mentions" field appears in the profile submenu, but  when I enter @<username> in a post, no suggestion appear.
Using smf 2.0.7

Any idea/fix, did I missed something?

Thank you
same here
It appears to be uncheck but if you check your members profile, they are checked.
Only in the admin panel is unchecked.
But it works fine.
On the suggestion issue try chrome because in firefox it doesnt work for me.
Title: Re: @mention members
Post by: beawoodget on May 14, 2014, 07:18:48 AM
Quote from: Dragooon on May 14, 2014, 07:12:33 AM
If you submit, does it mention properly?

Just tested:
yes mention appear in profile info, but nothing indicates that there is a new mention (like PM does, with a number between bracket in the menu), and no mail is sent to the user.
So a mentioned member knows about he is mentioned, only if checking "mention" in his profile menu. Is that normal?
Title: Re: @mention members
Post by: Dragooon on May 14, 2014, 07:23:36 AM
Quote from: beawoodget on May 14, 2014, 07:18:48 AM
Quote from: Dragooon on May 14, 2014, 07:12:33 AM
If you submit, does it mention properly?

Just tested:
yes mention appear in profile info, but nothing indicates that there is a new mention (like PM does, with a number between bracket in the menu), and no mail is sent to the user.
So a mentioned member knows about he is mentioned, only if checking "mention" in his profile menu. Is that normal?
There should be a number besides Profile for number of mentions
Title: Re: @mention members
Post by: beawoodget on May 14, 2014, 07:26:41 AM
Yes, but no number besides Profile for number of mentions for me
and no mail sent (user is set with valid email, mention notification by email is checked, and user can be emailed by other members)
Title: Re: @mention members
Post by: Dragooon on May 14, 2014, 07:28:44 AM
Quote from: beawoodget on May 14, 2014, 07:26:41 AM
Yes, but no number besides Profile for number of mentions for me
and no mail sent (user is set with valid email, mention notification by email is checked, and user can be emailed by other members)
Does it show up in Profile > Mentions? If so, can you try again? Make sure it's a different user and he/she has permission to mention other members
Title: Re: @mention members
Post by: beawoodget on May 14, 2014, 07:34:27 AM
Quote from: Dragooon on May 14, 2014, 07:28:44 AM
Quote from: beawoodget on May 14, 2014, 07:26:41 AM
Yes, but no number besides Profile for number of mentions for me
and no mail sent (user is set with valid email, mention notification by email is checked, and user can be emailed by other members)
Does it show up in Profile > Mentions? If so, can you try again? Make sure it's a different user and he/she has permission to mention other members

Yes it shows up in the list when clicking on mention submenu. But still no number in the menu.
Still no mail sent and no suggestion.
User has permission to mention other members.
Also tried with admin account and another user. 
Title: Re: @mention members
Post by: Dragooon on May 14, 2014, 10:13:11 AM
Which mods do you have installed/
Title: Re: @mention members
Post by: beawoodget on May 14, 2014, 03:03:06 PM
Quote from: Dragooon on May 14, 2014, 10:13:11 AM
Which mods do you have installed/

My mods: @mention members
and: Share This Topic, Adk Portal, Vimeo Embedder BBC Mod, Advanced Reputation System, Tapatalk SMF 2.0 RC5/Final Plugin, Progress Bar BBCode (CSS3 version), Aeva Media
Title: Re: @mention members
Post by: mtron on May 17, 2014, 08:32:48 AM
Hello Dragooon!

Thanks for releasing this mod. I really look forward to getting this great stuff to work. The 'Mention' menu item shows up in the Profile menu but the Table is not populated with the mentions. (user permissions for members set).

My SMF Version is 2.0.7 with these mods:
1. Drafts 2.0.2 
2. SimplePortal 2.3.5 
3. Float BBCODE 1.0.2 
4. Highlight Search Keywords 1.24 
5. SMFPacks Shoutbox 1.0.4 
6. Disable 'last edit by...' for Administrators 1.9 
7. Hide ip stuff for users 1.04 
8. Registered Links 3.0 
9. EU Cookie 1.1 
10. Simple Youtube Video Embedder/BBC 1.1 
11. Wikipedia BBC 1.0.1 
12. My Posts SMF2 1.1 
13. Simple Image Upload 1.4.0 
14. Resize Attached Images 2.4.1 
15. Forum Firewall 1.1.6 
16. KeyCAPTCHA for SMF 2.7 
17. Enhanced PM Popup 1.0.1 
18. SMF 2.0.7 Update 1.0 
19. Tapatalk SMF 2.0 Plugin 3.9.3 
20. Quick Spoiler 0.9.4 
21. @mention members 1.1.2
     

Do you have any idea which mod might cause the malfunction?

Thanks!
Title: Re: @mention members
Post by: Dragooon on May 17, 2014, 08:34:58 AM
How are you creating the post? Are suggestions working? How are you mentioning the user?
Title: Re: @mention members
Post by: mtron on May 17, 2014, 08:39:53 AM
Created as admin a new post in a existing topic mentioning another fellow admin. Suggestions show up and work. I then asked my mate to mention me in a post but neither me nor him got a line in the 'Profile - Mentions' Menu item.

EDIT: Sorry, it seems the problem is with some letters in the username of my mate. I just tried the mention with another user and suddenly it worked. The problematic Username is: Læncer
The letter 'æ' is defined in ISO-8859-1 (Pre-UTF-8 Middle European Latin Character set) http://en.wikipedia.org/wiki/%C3%86
Title: Re: @mention members
Post by: FrizzleFried on May 20, 2014, 10:53:27 AM
My members have been messing around again.  One posted the following (see attachment).  Every one of those names are correct names of users on my forum.  Why didn't they ALL become mentions?   Odd,  eh?

Also notice that we have a member named TOK and one named TOKEN420... and that it mentioned @TOK twice... leaving the "EN420" un-linked.... and unmentioned.
Title: Re: @mention members
Post by: Dragooon on May 20, 2014, 11:12:49 AM
QuoteMy members have been messing around again.  One posted the following (see attachment).  Every one of those names are correct names of users on my forum.  Why didn't they ALL become mentions?   Odd,  eh?
Can all of them see the board the member posted that in?
Title: Re: @mention members
Post by: ryan_dwight on May 20, 2014, 11:21:21 AM
Quote from: Dragooon on May 20, 2014, 11:12:49 AM
QuoteMy members have been messing around again.  One posted the following (see attachment).  Every one of those names are correct names of users on my forum.  Why didn't they ALL become mentions?   Odd,  eh?
Can all of them see the board the member posted that in?
this answers my question. Because i tested on a board exclusive for staff. But still the email notification doesnt function.
Title: Re: @mention members
Post by: Dragooon on May 20, 2014, 12:21:15 PM
Quote from: ryan_dwight on May 20, 2014, 11:21:21 AM
Quote from: Dragooon on May 20, 2014, 11:12:49 AM
QuoteMy members have been messing around again.  One posted the following (see attachment).  Every one of those names are correct names of users on my forum.  Why didn't they ALL become mentions?   Odd,  eh?
Can all of them see the board the member posted that in?
this answers my question. Because i tested on a board exclusive for staff. But still the email notification doesnt function.
Do the normal forum e-mails such as PM notifications function?
Title: Re: @mention members
Post by: FrizzleFried on May 20, 2014, 12:28:30 PM
Quote from: Dragooon on May 20, 2014, 11:12:49 AM
QuoteMy members have been messing around again.  One posted the following (see attachment).  Every one of those names are correct names of users on my forum.  Why didn't they ALL become mentions?   Odd,  eh?
Can all of them see the board the member posted that in?

Yes.
Title: Re: @mention members
Post by: FrizzleFried on May 20, 2014, 12:30:20 PM
Also note that @FrizzleFried is unmentioned (unlinked)... I know if you mention just @FrizzleFried it works.... but for some reason it didn't in that post.
Title: Re: @mention members
Post by: Dragooon on May 20, 2014, 12:37:50 PM
Quote from: FrizzleFried on May 20, 2014, 12:30:20 PM
Also note that @FrizzleFried is unmentioned (unlinked)... I know if you mention just @FrizzleFried it works.... but for some reason it didn't in that post.
Man your members are some of the biggest trolls I've seen. Are you sure they can see the board? Can you PM me the post's text?
Title: Re: @mention members
Post by: FrizzleFried on May 20, 2014, 12:40:53 PM
Quote from: Dragooon on May 20, 2014, 12:37:50 PM
Quote from: FrizzleFried on May 20, 2014, 12:30:20 PM
Also note that @FrizzleFried is unmentioned (unlinked)... I know if you mention just @FrizzleFried it works.... but for some reason it didn't in that post.
Man your members are some of the biggest trolls I've seen. Are you sure they can see the board? Can you PM me the post's text?

100% positive.  It's in the general forum... which everyone can see.

Your account is still active on my board if you want to check it out.... it's in the general forum titled "Dr. Nick" ...

I can paste the contents of the post if you want... I looked and the ones that are links have the tags... the ones that don't don't.... and the whole post consists of just the image tag + all the mentions.  That is it.

PS: My forum is an off-shoot of another because they're too "uptight" at the other forum.  Essentially it's a "locker room" mentality ... a fun place to screw around.

So yeah... we're all a bunch of trolls... but we smile a lot.  The "motto" of the place is "NOT UNFUN".

:)
Title: Re: @mention members
Post by: Dragooon on May 20, 2014, 12:42:08 PM
Quote from: FrizzleFried on May 20, 2014, 12:40:53 PM
Quote from: Dragooon on May 20, 2014, 12:37:50 PM
Quote from: FrizzleFried on May 20, 2014, 12:30:20 PM
Also note that @FrizzleFried is unmentioned (unlinked)... I know if you mention just @FrizzleFried it works.... but for some reason it didn't in that post.
Man your members are some of the biggest trolls I've seen. Are you sure they can see the board? Can you PM me the post's text?

100% positive.  It's in the general forum... which everyone can see.

Your account is still active on my board if you want to check it out.... it's in the general forum titled "Dr. Nick" ...

I can paste the contents of the post if you want... I looked and the ones that are links have the tags... the ones that don't don't.... and the whole post consists of just the image tag + all the mentions.  That is it.

Are you sure he was tagging their display names (by which they go around in the forum)?
Title: Re: @mention members
Post by: FrizzleFried on May 20, 2014, 12:43:03 PM
Quote from: Dragooon on May 20, 2014, 12:42:08 PM
Quote from: FrizzleFried on May 20, 2014, 12:40:53 PM
Quote from: Dragooon on May 20, 2014, 12:37:50 PM
Quote from: FrizzleFried on May 20, 2014, 12:30:20 PM
Also note that @FrizzleFried is unmentioned (unlinked)... I know if you mention just @FrizzleFried it works.... but for some reason it didn't in that post.
Man your members are some of the biggest trolls I've seen. Are you sure they can see the board? Can you PM me the post's text?

100% positive.  It's in the general forum... which everyone can see.

Your account is still active on my board if you want to check it out.... it's in the general forum titled "Dr. Nick" ...

I can paste the contents of the post if you want... I looked and the ones that are links have the tags... the ones that don't don't.... and the whole post consists of just the image tag + all the mentions.  That is it.

Are you sure he was tagging their display names (by which they go around in the forum)?

100%  Look... even my name is tagged but not mentioned.  We don't use alternative names on the forum.
Title: Re: @mention members
Post by: Dragooon on May 20, 2014, 12:43:34 PM
Quote from: FrizzleFried on May 20, 2014, 12:43:03 PM
Quote from: Dragooon on May 20, 2014, 12:42:08 PM
Quote from: FrizzleFried on May 20, 2014, 12:40:53 PM
Quote from: Dragooon on May 20, 2014, 12:37:50 PM
Quote from: FrizzleFried on May 20, 2014, 12:30:20 PM
Also note that @FrizzleFried is unmentioned (unlinked)... I know if you mention just @FrizzleFried it works.... but for some reason it didn't in that post.
Man your members are some of the biggest trolls I've seen. Are you sure they can see the board? Can you PM me the post's text?

100% positive.  It's in the general forum... which everyone can see.

Your account is still active on my board if you want to check it out.... it's in the general forum titled "Dr. Nick" ...

I can paste the contents of the post if you want... I looked and the ones that are links have the tags... the ones that don't don't.... and the whole post consists of just the image tag + all the mentions.  That is it.

Are you sure he was tagging their display names (by which they go around in the forum)?

100%  Look... even my name is tagged but not mentioned.  We don't use alternative names on the forum.
Can't you, like, ban this guy or something? :P. I'll take a look
Title: Re: @mention members
Post by: FrizzleFried on May 20, 2014, 12:44:52 PM
The guy who posted this one is one of my MODERATORS...

:D

Title: Re: @mention members
Post by: Dragooon on May 20, 2014, 12:47:12 PM
Quote from: FrizzleFried on May 20, 2014, 12:44:52 PM
The guy who posted this one is one of my MODERATORS...

:D
Oh dear god :|
Title: Re: @mention members
Post by: FrizzleFried on May 20, 2014, 12:48:29 PM
******... the members took off and kept replying with mentions on the post and has killed the thread due to that MEMORY issue we talked about earlier.

It looks like this mod needs a LIMIT set to it somehow else people are going to kill threads left and right with mentions.

:(

Unless a limit can be added... I'm going to have to pull the mod.

:(

Title: Re: @mention members
Post by: Dragooon on May 20, 2014, 12:52:09 PM
Quote from: FrizzleFried on May 20, 2014, 12:48:29 PM
******... the members took off and kept replying with mentions on the post and has killed the thread due to that MEMORY issue we talked about earlier.

It looks like this mod needs a LIMIT set to it somehow else people are going to kill threads left and right with mentions.

:(

Unless a limit can be added... I'm going to have to pull the mod.

:(


This is true if they decide to spam any kind of BBC, it's just easier to spam with this.
Title: Re: @mention members
Post by: FrizzleFried on May 20, 2014, 12:52:54 PM
...and I have yet to find a way to limit BBC in a post.  I really wish someone would write that mod... LIMIT BBC mod...

>sigh<
Title: Re: @mention members
Post by: Dragooon on May 20, 2014, 12:56:04 PM
Quote from: FrizzleFried on May 20, 2014, 12:52:54 PM
...and I have yet to find a way to limit BBC in a post.  I really wish someone would write that mod... LIMIT BBC mod...

>sigh<
A *better* solution would be to make the BBC parser use less memory
Title: Re: @mention members
Post by: FrizzleFried on May 20, 2014, 12:57:05 PM
Quote from: Dragooon on May 20, 2014, 12:56:04 PM
Quote from: FrizzleFried on May 20, 2014, 12:52:54 PM
...and I have yet to find a way to limit BBC in a post.  I really wish someone would write that mod... LIMIT BBC mod...

>sigh<
A *better* solution would be to make the BBC parser use less memory

I'm all for that as well.  :D

I fixed the thread by deleting the response with the other 300 mentions...

Title: Re: @mention members
Post by: Arantor on May 20, 2014, 12:58:29 PM
To drastically reduce memory usage in the parser requires a rewrite. However it is possible to reduce memory usage with the changes from 2.0.7. I know, I already provided the details to the team. I'm just hoping they test it more thoroughly than I asked them to for 2.0.7.
Title: Re: @mention members
Post by: Dragooon on May 20, 2014, 01:02:26 PM
Quote from: FrizzleFried on May 20, 2014, 12:57:05 PM
Quote from: Dragooon on May 20, 2014, 12:56:04 PM
Quote from: FrizzleFried on May 20, 2014, 12:52:54 PM
...and I have yet to find a way to limit BBC in a post.  I really wish someone would write that mod... LIMIT BBC mod...

>sigh<
A *better* solution would be to make the BBC parser use less memory

I'm all for that as well.  :D

I fixed the thread by deleting the response with the other 300 mentions...


I figured out why it wasn't working, the members name were being cut off internally. To fix,

Code (Mentions.php (find)) Select
if (count($matches[count($matches) - $i]) > 60)
{
    $depth--;
    break;
}

Code (Replace) Select
if (count($matches[count($matches) - $i]) > 60)
{
    $depth--;
    continue;
}

Although I guess something like 128M limit will help your forum in this scenarios. Atleast it won't go boom
Title: Re: @mention members
Post by: FrizzleFried on May 20, 2014, 01:32:08 PM
Is that code limiting the number of mentions?   Maybe I want to keep it as-is?  I am guessing if I fix it,  it will be easier for the users to "break" a post...

Am I guessing right that the issue comes up because the number of mentions hit 60?

Title: Re: @mention members
Post by: Dragooon on May 20, 2014, 02:23:00 PM
Quote from: FrizzleFried on May 20, 2014, 01:32:08 PM
Is that code limiting the number of mentions?   Maybe I want to keep it as-is?  I am guessing if I fix it,  it will be easier for the users to "break" a post...

Am I guessing right that the issue comes up because the number of mentions hit 60?
Nope, that code doesn't limit anything. it's a part of identifying possible usernames code and a username can be maximum 60 characters. So it won't really help with the members breaking everything part
Title: Re: @mention members
Post by: NoPasaran on May 21, 2014, 04:52:51 PM
tapatalk not supported :(

have any solution ?
Title: @mention members in spanish
Post by: fapencio on May 21, 2014, 06:36:09 PM
Hi, good job with the new version, is awesome!   :laugh:

i add the translate to spanish:

STEP 1:
in:
./Themes/default/languages/Modifications.spanish_es-utf8.php
and/or
./Themes/default/languages/Modifications.spanish_latin-utf8.php
Find (at the end of the file):
?>
Add Before:
$txt['mentions'] = 'Menciones';

STEP 2:
download the php files which are attachments in this post:

Mentions.spanish_es-utf8
Mentions.spanish_latin-utf8

upload both files to:
./Themes/default/languages/

refresh f5, thats all

enjoy
   
Title: Re: @mention members
Post by: margarett on May 21, 2014, 07:20:12 PM
Quote from: NoPasaran on May 21, 2014, 04:52:51 PM
tapatalk not supported :(

have any solution ?
Tapatalk uses it's own set of files, including Sources, they don't respect hooks, etc, so... The solution is not to use Tapatalk :P
Title: Re: @mention members
Post by: Adrek on May 25, 2014, 02:52:36 PM
I have small problem with one username.

It contains  <")))/
Username <")))/ and mod doesn't recognize it as username. I'm using version 1.1.2, and it worked fine on 1.0.
Github version doesn't fix it.
Title: Re: @mention members
Post by: ExSpirit on May 29, 2014, 09:13:49 AM
When someone does the mention in topic every time someone opens that topis I get strange error in my error log files:

QuoteUndefined index: online
File: /usr/home/public_html/Themes/default/languages/Mentions.english.php (main sub template - eval?)
Line: 275

In my Display.template.php I am using $message['member']['online']['is_online'] to check is user is online or not and that works, but I don't know why this error is shown.
Title: Re: @mention members
Post by: Arantor on May 29, 2014, 09:16:02 AM
Are there any guest posts (or posts from deleted users) on that page? If so, $message['member']['online'] wouldn't exist.

Also, I'd be willing to bet the issue is on line 275 of Display.template.php rather than Mentions.english.php. Any time the eval? is listed, it's almost never the actual place it says it was.
Title: Re: @mention members
Post by: ExSpirit on May 29, 2014, 09:30:45 AM
Arantor; that's it, I had one post from guest. I removed it and looks like it's working great now. Thanks.
Title: Re: @mention members
Post by: Squash on May 30, 2014, 06:47:57 PM
The one issue I notice is if a user posts their email address and if the part of it after @ matches anyone forum names it assumes it should tag them. It makes it impossible to post links to some email addresses.

Is there a to stop the app from mentioning if their are letters before the @ symbol? So it recognizes it's an email not a mention.
Title: Re: @mention members
Post by: Dragooon on May 31, 2014, 01:25:21 AM
This is a slightly hacky fix but it should work. Open Mentions.php, find

foreach ($string as $char)
{
if ($char == '@')
Replace
foreach ($string as $k => $char)
{
if ($char == '@' && (!isset($string[$k - 1]) || $string[$k - 1] != ' '))
Title: Re: @mention members
Post by: Squash on May 31, 2014, 01:39:06 AM
I did it and it did not fix the issue.....
Title: Re: @mention members
Post by: Dragooon on May 31, 2014, 01:40:36 AM
Oh I did opposite of what I was going for :P

Try replacing the find with this
foreach ($string as $k => $char)
{
if ($char == '@' && (!isset($string[$k - 1]) || $string[$k - 1] == ' '))
Title: Re: @mention members
Post by: Squash on May 31, 2014, 01:50:01 AM
Quote from: Dragooon on May 31, 2014, 01:40:36 AM
Oh I did opposite of what I was going for :P

Try replacing the find with this
foreach ($string as $k => $char)
{
if ($char == '@' && (!isset($string[$k - 1]) || $string[$k - 1] == ' '))

That fixed it...thank you so much for helping me with this. It actually may be something you want to permanently want to change in the mod.
Title: Re: @mention members
Post by: Dragooon on May 31, 2014, 01:52:33 AM
Quote from: Squash on May 31, 2014, 01:50:01 AM
Quote from: Dragooon on May 31, 2014, 01:40:36 AM
Oh I did opposite of what I was going for :P

Try replacing the find with this
foreach ($string as $k => $char)
{
if ($char == '@' && (!isset($string[$k - 1]) || $string[$k - 1] == ' '))

That fixed it...thank you so much for helping me with this. It actually may be something you want to permanently want to change in the mod.
Yeah I'll see if I can implement a better fix
Title: Re: @mention members
Post by: vkmaxx on June 01, 2014, 07:03:36 PM
Nice work, I have small form so I wasn't aware of the problem...
Title: Re: @mention members
Post by: daigiatyhon on June 03, 2014, 09:52:23 PM
hi Dragooon, thanks for this mod. Can this Mod send message to Inbox? Now it notify to Profile/Mentions and Mentions notice is not show when user login then him maybe dont know when him was tagged.
Title: Re: @mention members
Post by: iorkara on June 05, 2014, 06:44:03 AM
Hello Dragooon,

I've been using this Mod for a while now and I just want to say thank you.

I have run into an issue, actually one or two of my users. They have reported that nothing works when they type @ symbol followed by a letter.

They've reported:
Using Firefox version: 29.0.1

On my end:
SMF: 2.0.7
@mentions: 1.1.2

I have tested the Mod using Firefox 29.0.1 on my end and it works flawless.

I'm unsure why some of my users are having a problem.

Any help is very much appreciated.
Title: Re: @mention members
Post by: Dragooon on June 05, 2014, 07:11:36 AM
Define nothing works? They can't post or they can't mention?
Title: Re: @mention members
Post by: iorkara on June 05, 2014, 07:24:24 AM
Quote from: Dragooon on June 05, 2014, 07:11:36 AM
Define nothing works? They can't post or they can't mention?

Ah! My bad. I meant to say. They cannot mention.
Title: Re: @mention members
Post by: 4LP3RUZ1 on June 06, 2014, 04:23:27 AM
Good mod, I like it.

I'll be waiting for UTF8 and space functionality, currently it doesn't pick up most of my member names
Title: Re: @mention members
Post by: Dragooon on June 06, 2014, 04:25:26 AM
Quote from: 4LP3RUZ1 on June 06, 2014, 04:23:27 AM
Good mod, I like it.

I'll be waiting for UTF8 and space functionality, currently it doesn't pick up most of my member names
Uhm...it's supposed to work with UTF-8 and spaces, what doesn't work?
Title: Re: @mention members
Post by: 4LP3RUZ1 on June 06, 2014, 04:29:53 AM
For example for a username starting with "Hüseyin"

if I enter the "ü" it wont work

Also another problem,
My usernames are formatted like this:

"Name Surname (userid)"

So if there are like 500 members with names "Alper" it only displays some of them, and then when I enter the space to go to the surname, it wont work again.
Title: Re: @mention members
Post by: Dragooon on June 06, 2014, 04:31:07 AM
If you simply type @Hüseyin, does it create the mention? It might not show the suggestions but if you type the full name it should mention, same with Name Surname (userid), try mentioning them even if it doesn't show suggestions.
Title: Re: @mention members
Post by: 4LP3RUZ1 on June 06, 2014, 04:33:30 AM
Ok i tried it and it works, so my problem is with the suggestions.

Because of my username policy it is very difficult for anyone to use it without suggestions though because it means you have to memorize userids :)
Title: Re: @mention members
Post by: Dragooon on June 06, 2014, 04:36:46 AM
Hm, but they do remember surnames right? So allowing suggestions to incorporate spaces should do the trick?
Title: Re: @mention members
Post by: 4LP3RUZ1 on June 06, 2014, 04:39:42 AM
+ UTF8 characters, yes

suggestions disappear when a UTF8 character is entered
Title: Re: @mention members
Post by: Dragooon on June 06, 2014, 05:17:59 AM
Okay, this is lightly tested (and that too in 2.1 :P). Open Themes/default/mentions.js, replace the entire file with

/**
* Javascript interface for active suggestions while posting
*
* @author ******iz Garg <[email protected]>
* @copyright 2014 ******iz Garg
* @license Simplified BSD (2-Clause) License
*/

var mentionInit = function()
{
    var fails = [];

    var config = {
        at: '@',
        data: [],
        show_the_at: true,
        limit: 10,
        callbacks: {
            matcher: function(flag, subtext, should_start_with_space) {
                var match = '', started = false;
                var string = subtext.split('');
                for (var i = 0; i < string.length; i++)
                {
                    if (string[i] == flag && (!should_start_with_space || i == 0 || /[\s\n]/gi.test(string[i - 1])))
                    {
                        started = true;
                        match = '';
                    }
                    else if (started)
                        match = match + string[i];
                }

                if (match.length > 0)
                    return match;

                return null;
            },
            remote_filter: function (query, callback) {
                if (typeof query == 'undefined' || query.length < 2 || query.length > 60)
                    return;

                for (i in fails)
                    if (query.substr(0, fails[i].length) == fails[i])
                        return;

                $.ajax({
                    url: smf_scripturl + '?action=suggest;' + smf_sessvar + '=' + smf_sessid + ';xml',
                    method: 'GET',
                    data: {
                        search: query,
                        suggest_type: 'member'
                    },
                    success: function (data) {
                        var members = $(data).find('smf > items > item');
                        if (members.length == 0)
                            fails[fails.length] = query;

                        var callbackArray = [];
                        $.each(members, function (index, item) {
                            callbackArray[callbackArray.length] = {
                                name: $(item).text()
                            };
                        });

                        callback(callbackArray);
                    }
                });
            }
        }
    };

    if (typeof $.fn.atwho == 'undefined' && typeof jQuery.fn.atwho != 'undefined')
    {
        var iframe = jQuery('#html_message');

        if (typeof iframe[0] != 'undefined')
            jQuery(iframe[0].contentDocument.body).atwho(config);
        jQuery('textarea[name=message]').atwho(config);
    }
    else
    {
        var iframe = $('#html_message');
        if (typeof iframe[0] != 'undefined')
            $(iframe[0].contentDocument.body).atwho(config);
        $('textarea[name=message]').atwho(config);
    }
};

var atWhoElement = document.createElement('script');
atWhoElement.src = atwho_url;
atWhoElement.type = 'text/javascript';
atWhoElement.onload = mentionInit;

if (typeof $ == 'undefined' || (parseInt($.fn.jquery.substr(0, 1)) == 1 && parseInt($.fn.jquery.substr(2, 3)) < 8) || jQuery.fn.jquery != $.fn.jquery)
{
    var scriptElement = document.createElement('script');
    scriptElement.src = jquery_url;
    scriptElement.type = 'text/javascript';

    scriptElement.onload = function () {
        document.body.appendChild(atWhoElement);
    };

    document.body.appendChild(scriptElement);
}
else
    document.body.appendChild(atWhoElement);


Does it work better?
Title: Re: @mention members
Post by: Adrek on June 06, 2014, 08:38:48 AM
Quote from: phantomm on May 25, 2014, 02:52:36 PM
I have small problem with one username.

It contains  <")))/
Username <")))/ and mod doesn't recognize it as username. I'm using version 1.1.2, and it worked fine on 1.0.
Github version doesn't fix it.
I can add that suggestions work with this username, but mentions do not.
Title: Re: @mention members
Post by: Dragooon on June 06, 2014, 09:39:58 AM
Quote from: phantomm on June 06, 2014, 08:38:48 AM
Quote from: phantomm on May 25, 2014, 02:52:36 PM
I have small problem with one username.

It contains  <")))/
Username <")))/ and mod doesn't recognize it as username. I'm using version 1.1.2, and it worked fine on 1.0.
Github version doesn't fix it.
I can add that suggestions work with this username, but mentions do not.
So...you cannot mention but it shows up in the popup while posting?
Title: Re: @mention members
Post by: Adrek on June 06, 2014, 10:25:16 AM
Yes, username is not linked, but can be selected from dropdown suggestion list
Title: Re: @mention members
Post by: Dragooon on June 06, 2014, 10:29:36 AM
I think that's fantastic :P
Title: Re: @mention members
Post by: Adrek on June 06, 2014, 10:46:37 AM
It would be if user was mentioned...
Title: Re: @mention members
Post by: Dragooon on June 06, 2014, 11:27:01 AM
Quote from: phantomm on June 06, 2014, 10:46:37 AM
It would be if user was mentioned...
Hmm, I can't see why it wouldn't work. Are you sure the username is exact followed by @?
Title: Re: @mention members
Post by: Adrek 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 <")))/
Title: Re: @mention members
Post by: Arantor on June 06, 2014, 11:30:32 AM
Probably due to the "? I'm assuming there's a call to htmlspecialchars or similar somewhere between receiving the user input and checking it against the list of people in the DB?
Title: Re: @mention members
Post by: Dragooon on June 06, 2014, 11:32:14 AM
Quote from: Arantor on June 06, 2014, 11:30:32 AM
Probably due to the "? I'm assuming there's a call to htmlspecialchars or similar somewhere between receiving the user input and checking it against the list of people in the DB?
God damn you're probably right, it does a htmlspecialchars_decode but the username itself in the body is htmlspecialchar'd.
Title: Re: @mention members
Post by: Arantor on June 06, 2014, 11:32:59 AM
So it is in the members table too ;)
Title: Re: @mention members
Post by: 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)));
Title: Re: @mention members
Post by: Adrek on June 06, 2014, 12:37:54 PM
Now it works :) Thanks for fix.
Title: Re: @mention members
Post by: 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?
Title: Re: @mention members
Post by: Squash on June 07, 2014, 10:59:01 PM
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'd agree this is a better option vs email....
Title: Re: @mention members
Post by: Coldplay on June 08, 2014, 01:37:50 PM
Hello :)
I have some problems with this mod, sorry for refreshing and my bad english :)

So i instal mod, and only i can write @JADSF and show me the rest of the name. And if someone try to tag person with ID, some members get notification, some dont... Can you pls help me? :(

Thx
Title: Re: @mention members
Post by: Dragooon on June 08, 2014, 02:06:39 PM
1) Make sure they have the permission to mention members
2) Make sure the members they're tagging can see the post.
Title: Re: @mention members
Post by: MechSpecs on June 09, 2014, 06:15:51 PM
Great mod!

Is there a way to make the auto-suggest work with SCEditor4Smf?
Title: Re: @mention members
Post by: strano on June 10, 2014, 04:37:28 AM
An idea.
is it possible to modify this great mod for emulate the notify on the quote?
Title: Re: @mention members
Post by: Coldplay on June 11, 2014, 12:48:08 AM
Quote from: Dragooon on June 08, 2014, 02:06:39 PM
1) Make sure they have the permission to mention members
Do i have that option or?
Thx a lot for helping me :)
Title: Re: @mention members
Post by: 4LP3RUZ1 on June 11, 2014, 01:43:26 AM
Quote from: Dragooon on June 06, 2014, 05:17:59 AM
Okay, this is lightly tested (and that too in 2.1 :P). Open Themes/default/mentions.js, replace the entire file with

/**
* Javascript interface for active suggestions while posting
*
* @author ******iz Garg <[email protected]>
* @copyright 2014 ******iz Garg
* @license Simplified BSD (2-Clause) License
*/

var mentionInit = function()
{
    var fails = [];

    var config = {
        at: '@',
        data: [],
        show_the_at: true,
        limit: 10,
        callbacks: {
            matcher: function(flag, subtext, should_start_with_space) {
                var match = '', started = false;
                var string = subtext.split('');
                for (var i = 0; i < string.length; i++)
                {
                    if (string[i] == flag && (!should_start_with_space || i == 0 || /[\s\n]/gi.test(string[i - 1])))
                    {
                        started = true;
                        match = '';
                    }
                    else if (started)
                        match = match + string[i];
                }

                if (match.length > 0)
                    return match;

                return null;
            },
            remote_filter: function (query, callback) {
                if (typeof query == 'undefined' || query.length < 2 || query.length > 60)
                    return;

                for (i in fails)
                    if (query.substr(0, fails[i].length) == fails[i])
                        return;

                $.ajax({
                    url: smf_scripturl + '?action=suggest;' + smf_sessvar + '=' + smf_sessid + ';xml',
                    method: 'GET',
                    data: {
                        search: query,
                        suggest_type: 'member'
                    },
                    success: function (data) {
                        var members = $(data).find('smf > items > item');
                        if (members.length == 0)
                            fails[fails.length] = query;

                        var callbackArray = [];
                        $.each(members, function (index, item) {
                            callbackArray[callbackArray.length] = {
                                name: $(item).text()
                            };
                        });

                        callback(callbackArray);
                    }
                });
            }
        }
    };

    if (typeof $.fn.atwho == 'undefined' && typeof jQuery.fn.atwho != 'undefined')
    {
        var iframe = jQuery('#html_message');

        if (typeof iframe[0] != 'undefined')
            jQuery(iframe[0].contentDocument.body).atwho(config);
        jQuery('textarea[name=message]').atwho(config);
    }
    else
    {
        var iframe = $('#html_message');
        if (typeof iframe[0] != 'undefined')
            $(iframe[0].contentDocument.body).atwho(config);
        $('textarea[name=message]').atwho(config);
    }
};

var atWhoElement = document.createElement('script');
atWhoElement.src = atwho_url;
atWhoElement.type = 'text/javascript';
atWhoElement.onload = mentionInit;

if (typeof $ == 'undefined' || (parseInt($.fn.jquery.substr(0, 1)) == 1 && parseInt($.fn.jquery.substr(2, 3)) < 8) || jQuery.fn.jquery != $.fn.jquery)
{
    var scriptElement = document.createElement('script');
    scriptElement.src = jquery_url;
    scriptElement.type = 'text/javascript';

    scriptElement.onload = function () {
        document.body.appendChild(atWhoElement);
    };

    document.body.appendChild(scriptElement);
}
else
    document.body.appendChild(atWhoElement);


Does it work better?

Sorry for the late reply,

This is awesome! It seems to work!
Title: PLEASE HELP!
Post by: youngking on June 11, 2014, 05:23:33 AM
I've just added the @mention mod on my forums the mod works and all but now in my admin panel I cant manage my forums boards it gives me an internal server error. Everything else in the ACP works besides "forum>boards" please help. Thank you
Title: Re: PLEASE HELP!
Post by: Shambles on June 11, 2014, 05:35:28 AM
Did you get any warnings during the installation process?


Quote from: Kindred on June 02, 2014, 09:38:52 PM
... Also, please note that "help" or variations of that are not useful titles...
Title: Re: PLEASE HELP!
Post by: Acans on June 11, 2014, 05:37:05 AM
Merging with the Mods Support Topic...

Done, remember to post any issues you are having with modifications in their support topic. The author is usually the best person to speak to about it.
Title: Re: @mention members
Post by: iorkara on June 12, 2014, 08:04:18 PM
I have attached an image to this post showing an issue I have run into. I tried to welcome a few new members to the forum. Everything worked fine, pop-ups and clicked on names. Then posted. Then I get the following (see image). Some mentions have worked and some haven't.

Also, some users have reported that they cannot mention at all.
Title: Re: @mention members
Post by: MechSpecs on June 12, 2014, 08:11:03 PM
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?
Title: Re: @mention members
Post by: GL700Wing on June 20, 2014, 08:05:54 AM
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']);
Title: Re: @mention members
Post by: UndergroundVol on June 20, 2014, 10:46:03 PM
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);
Title: Re: @mention members
Post by: GL700Wing on June 21, 2014, 12:41:10 AM
Like the attached file - see lines 268 and 269
Title: Re: @mention members
Post by: Sigyn on June 22, 2014, 07:34:19 AM
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).
Title: Re: @mention members
Post by: Steelio on June 30, 2014, 04:08:07 AM
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)));

Title: Re: @mention members
Post by: Dragooon on June 30, 2014, 04:50:23 AM
Spaces shouldn't cause problems, are you sure with the space the username is exact?
Title: Re: @mention members
Post by: Steelio on June 30, 2014, 04:58:57 AM
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
Title: Re: @mention members
Post by: Dragooon on June 30, 2014, 05:10:30 AM
Go to Admin > Members > Permissions and search the page for mention's one.
Title: Re: @mention members
Post by: Steelio on June 30, 2014, 05:32:40 AM
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
Title: Re: @mention members
Post by: Elizabeth II 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.
Title: Re: @mention members
Post by: 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?
Title: Re: @mention members
Post by: Phphelp on July 01, 2014, 08:52:55 PM
That's for the great mod, I just installed it!
Title: Re: @mention members
Post by: Dragooon on July 02, 2014, 02:40:43 AM
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
Title: Re: @mention members
Post by: becometa on July 06, 2014, 04:33:01 AM
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
Title: Re: @mention members
Post by: langel on July 08, 2014, 01:45:00 PM
Hello everyone! Is possible to change appearance of the mentions, just as in the personal messages?

Something like this:
(http://imags.aplicacionesmart.com/images/captureof.png)

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>]';
Title: Re: @mention members
Post by: Badboy on July 08, 2014, 02:59:36 PM
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'] . ']' : '');
}
Title: Re: @mention members
Post by: langel on July 09, 2014, 12:11:23 AM
Thanks for the tip, everything went perfectly  :)

Regards!
Title: Re: @mention members
Post by: Mstcool on July 12, 2014, 10:39:44 AM
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?
Title: Re: @mention members
Post by: timidapsin on July 20, 2014, 01:17:22 PM
is it possible to allow the mentions appear as a tab instead of in Profile,
As shown in the attachment below.
Title: Re: @mention members
Post by: MechSpecs on July 20, 2014, 01:38:42 PM
Make an entry with the link in your Subs

Something like this...


),
'mentions' => array(
'title' => 'Mentions',
'href' => 'http://www.DOMAIN.com/forum/index.php?action=profile;area=mentions',
'show' => true,
'sub_buttons' => array(
),

),

Title: Re: @mention members
Post by: timidapsin on July 20, 2014, 02:01:20 PM
Quote from: MechSpecs on July 20, 2014, 01:38:42 PM
Make an entry with the link in your Subs

Something like this...


),
         'mentions' => array(
            'title' => 'Mentions',
            'href' => 'http://www.DOMAIN.com/forum/index.php?action=profile;area=mentions',
            'show' => true,
            'sub_buttons' => array(
            ),

         ),


Please i am a novice in php coding can you give me detailed explanation, Thanks :)
Title: Re: @mention members
Post by: timidapsin on July 20, 2014, 05:48:01 PM
i have already added it but it doesnt notify when a user has a new mention
Title: Re: @mention members
Post by: Badboy on July 20, 2014, 07:03:17 PM
After changing Subs.php. Open Sources/Mentions.php

Code (FIND) Select
$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'] . ']' : '');


Code (REPLACE) Select
$menu_buttons['mentions']['title'] .=  (!empty($user_settings['unread_mentions']) ? ' [' . $user_settings['unread_mentions'] . ']' : '');
Title: Re: @mention members
Post by: MechSpecs on July 20, 2014, 07:52:42 PM
This would actually be a great option for the author to put into the code as I am sure a good number of people would use something like this
Title: Re: @mention members
Post by: timidapsin on July 21, 2014, 12:15:49 AM
Quote from: Badboy on July 20, 2014, 07:03:17 PM
After changing Subs.php. Open Sources/Mentions.php

Code (FIND) Select
$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'] . ']' : '');


Code (REPLACE) Select
$menu_buttons['mentions']['title'] .=  (!empty($user_settings['unread_mentions']) ? ' [' . $user_settings['unread_mentions'] . ']' : '');
Its working fine now thanks
Title: Re: @mention members
Post by: timidapsin on July 21, 2014, 12:21:17 AM
I have 1 more problem, how do i make the Mentions tab visible for only logged users, it currently shows for even guests
Title: Re: @mention members
Post by: MechSpecs on July 26, 2014, 09:08:06 PM
I tested this mod on one of my more stock sites and the pop-up name suggestion thing works great!!!! Awesome feature...

Too bad it doesn't work for the add on editor that I mentioned above :(
Title: Re: @mention members
Post by: Michael Pfaff on July 29, 2014, 06:12:07 PM
This is amazing. However, for some reason, it won't allow me to save the " Enable mentions e-mail for current members
Only check this if you'd like existing members to have their e-mails enabled".

When I check it and save, it refreshes and the box is unchecked. Any way to set this to checked via code?
Title: Re: @mention members
Post by: Chalky on July 29, 2014, 07:12:41 PM
I've noticed the same thing with the checkbox losing its check when you hit save. It does actually remember the setting though so seems it's just aesthetic  :)
Title: Re: @mention members
Post by: Michael Pfaff on July 29, 2014, 08:06:40 PM
Quote from: Chalky on July 29, 2014, 07:12:41 PM
I've noticed the same thing with the checkbox losing its check when you hit save. It does actually remember the setting though so seems it's just aesthetic  :)

I think you're right. Thanks man.
Title: Re: @mention members
Post by: Mstcool on July 29, 2014, 11:58:46 PM
Quote from: Michael Pfaff on July 29, 2014, 06:12:07 PM
This is amazing. However, for some reason, it won't allow me to save the " Enable mentions e-mail for current members
Only check this if you'd like existing members to have their e-mails enabled".

When I check it and save, it refreshes and the box is unchecked. Any way to set this to checked via code?

Hey, I said the same thing a while ago but everyone ignored my reply lol. :p
Title: Re: @mention members
Post by: Michael Pfaff on July 30, 2014, 08:36:57 AM
Quote from: Mstcool on July 29, 2014, 11:58:46 PM
Quote from: Michael Pfaff on July 29, 2014, 06:12:07 PM
This is amazing. However, for some reason, it won't allow me to save the " Enable mentions e-mail for current members
Only check this if you'd like existing members to have their e-mails enabled".

When I check it and save, it refreshes and the box is unchecked. Any way to set this to checked via code?

Hey, I said the same thing a while ago but everyone ignored my reply lol. :p

Haha. Yeah, I think like Chalky said, it still works but the checkbox just doesn't "appear" checked.
Title: Re: @mention members
Post by: meemzo on August 01, 2014, 08:45:10 PM
It worked and now it stopped.   :(  At first I thought it was a conflict with another mod, but I did a clean install on a newly created sub-forum and it stopped working there.  I can't find out where to go to enable or change settings.  Can someone be of assistance?  Version 1.1 of mod 2.0.8 and 2.07 smf.

I actually got it to add the member link AFTER it posts by downloading a file upthread, but the drop down fill/search doesn't work.
Title: Re: @mention members
Post by: Michael Pfaff on August 01, 2014, 10:50:20 PM
Having a weird issue where names are being confused with other names in the post.
Title: Re: @mention members
Post by: stammtisch on August 02, 2014, 05:33:57 PM
After installing this mod, there are some strange lines of PHP visible on the top of every site. Even after the uninstalling of the MOD:

$txt['mentions'] = 'Mentions'; $txt['scheduled_task_removeMentions'] = 'Remove seen mentions'; $txt['scheduled_task_desc_removeMentions'] = 'Automatically removes seen mentions older than the specified days'; $txt['mentions'] = 'Mentions'; $txt['scheduled_task_removeMentions'] = 'Remove seen mentions'; $txt['scheduled_task_desc_removeMentions'] = 'Automatically removes seen mentions older than the specified days';

Do you have an idea what's going wrong there? In an other board everything works as is should. 

Just mark the invisble text in the area top of the header.

I just found out that it must have something to do with the database, because after installing the software again the error comes with importing the old database.
Title: Re: @mention members
Post by: Rain Forest on August 08, 2014, 08:07:13 AM
Thank you for this amazing mod! :)
Title: Re: @mention members
Post by: Michael Pfaff on August 08, 2014, 08:33:23 AM
Quote from: Soft Drink on August 08, 2014, 08:07:13 AM
Thank you for this amazing mod! :)

Agreed. This mod is amazing!
Title: Re: @mention members
Post by: Gluz on August 15, 2014, 08:32:41 PM
Quote from: Michael Pfaff on July 30, 2014, 08:36:57 AM
Quote from: Mstcool on July 29, 2014, 11:58:46 PM
Quote from: Michael Pfaff on July 29, 2014, 06:12:07 PM
This is amazing. However, for some reason, it won't allow me to save the " Enable mentions e-mail for current members
Only check this if you'd like existing members to have their e-mails enabled".

When I check it and save, it refreshes and the box is unchecked. Any way to set this to checked via code?

Hey, I said the same thing a while ago but everyone ignored my reply lol. :p

Haha. Yeah, I think like Chalky said, it still works but the checkbox just doesn't "appear" checked.

That is a One time use setting, as the new members have the e-mail notification enabled by default, you only need to apply that setting once, 'cause the code of the MOD verify for that checkbox to execute some code, but it only need to be executed once, unless you want to change everyone e-mail notification setting again.
Title: Re: @mention members
Post by: Mooby The Golden Sock on August 21, 2014, 01:29:13 PM
Is there a way for a member to opt out of mention notifications and/or block specific members from sending them mentions?  We've had some members who don't want to know when people on their ignore list mention them.
Title: Re: @mention members
Post by: Rain Forest on August 23, 2014, 05:06:11 AM
Quote from: Dragooon on May 11, 2014, 03:40:04 PM
Ah okay, find both instances of
mentions_process_store($msgOptions['mentions'], $msgOptions['id'], $msgOptions['subject'], $msgOptions['approved']);
and replace them with
mentions_process_store($msgOptions['mentions'], $msgOptions['id'], $msgOptions['subject'], isset($msgOptions['approved']) ? $msgOptions['approved'] : 1);
in Subs-Post.php

I had the same issue! This one works for me too :)
Title: Re: @mention members
Post by: Kimmie on August 31, 2014, 01:07:06 PM
Not sure if this has been mentioned before (no pun intended..lol), but if someone has a blank space in their name, the drop down list will not find them. How do I fix this?


Thanks :)
Title: Re: @mention members
Post by: Dragooon on August 31, 2014, 01:16:09 PM
Quote from: Kimmie on August 31, 2014, 01:07:06 PM
Not sure if this has been mentioned before (no pun intended..lol), but if someone has a blank space in their name, the drop down list will not find them. How do I fix this?


Thanks :)
Uh I fixed this for 2.1, not sure if I backported that to this mod. If not, I can take a look ina  few days.
Title: Re: @mention members
Post by: Kimmie on August 31, 2014, 01:20:04 PM
Quote from: Dragooon on August 31, 2014, 01:16:09 PM
Quote from: Kimmie on August 31, 2014, 01:07:06 PM
Not sure if this has been mentioned before (no pun intended..lol), but if someone has a blank space in their name, the drop down list will not find them. How do I fix this?


Thanks :)
Uh I fixed this for 2.1, not sure if I backported that to this mod. If not, I can take a look ina  few days.


That would be awesome thanks :). I was just told that none of the current themes will work with 2.1 so chances are, many will not be upgrading to it any time soon.
Title: Re: @mention members
Post by: Arantor on August 31, 2014, 01:21:08 PM
It was honestly no different going from 1.1 to 2.0 though ;)
Title: Re: @mention members
Post by: Kimmie on August 31, 2014, 01:22:46 PM
Quote from: ⬔ on August 31, 2014, 01:21:08 PM
It was honestly no different going from 1.1 to 2.0 though ;)


That was a HUGE headache lol.
Title: Re: @mention members
Post by: Arantor on August 31, 2014, 01:27:55 PM
This is no different. While it's a pain, sure, and I know full well I won't be migrating some of my stuff to 2.1 for a while for the same reason, the changes are necessary to accommodate mobile/tablet *and* they're necessary to streamline the theme to avoid all the main_block images and so on.

I'm just worrying about the fun of porting my gallery to 2.1 when it's done... that's complex.
Title: Re: @mention members
Post by: ryan_dwight on September 02, 2014, 05:25:36 AM
Im not sure if there is a setting for this, but I can't find it.

when someone mention a regular member to a hidden board, can we disable the notification?

not sure if there is a conflict with the user info mod
with the bbcode [user]member[/user]
and if you will post it it will become @member which is same as mention.
Title: Re: @mention members
Post by: butch2k on September 06, 2014, 04:49:50 PM
Hi Dragooon,

A small bug i noticed in mentions_process_store function.

The $subject parameter is being used to initialize $replacements['POSTNAME'] but a few lines later $subject is also used to store the result of an str_replace. Since this is located in a loop $replacements['POSTNAME'] ends up being replaced by the result of the str_replace for the next emails... You need to change the name of the variable storing the str_repalce from $subject to $emailsubject or whatever.
Title: Re: @mention members
Post by: JeneeB53 on September 12, 2014, 10:44:32 PM
What happens if a member is mentioned in a board they don't have access to?  For example, what if one of my mods accidentally uses the 'mention' of a member in a private thread in the mod board?  I hope my moderators know better - but they may not!
Title: Re: @mention members
Post by: Kimmie on September 14, 2014, 03:11:50 PM
Quote from: JeneeB53 on September 12, 2014, 10:44:32 PM
What happens if a member is mentioned in a board they don't have access to?  For example, what if one of my mods accidentally uses the 'mention' of a member in a private thread in the mod board?  I hope my moderators know better - but they may not!


Chances are, all that will happen is when that member tries to view it, they will get the "this board is either missing or is off limits to you" message.
Title: Re: @mention members
Post by: sunilimon on September 16, 2014, 05:06:23 PM
Hi Dragooon, sorry buy my system gives two mails when my users are mentioned, I checked for duplied lines but I didn't found something. Could you help me? Thank you very much! :D
Title: Re: @mention members
Post by: Troytime on September 30, 2014, 12:13:28 AM
When there are multiple people mentioned, the mention notification email contains incorrect text.

Example, here is an email I received (my username is Troy). Winz mentioned me, but also immediately mentioned Heyjude in the same reply.

--
Hello Troy!

Winz mentioned you in the post "Heyjude, you have been mentioned at a post in Weber Kettle Club Forums", you can view the post at XXXXXXXXXXXX
--
Title: Re: @mention members
Post by: butch2k on September 30, 2014, 08:05:16 AM
Quote from: Troytime on September 30, 2014, 12:13:28 AM
When there are multiple people mentioned, the mention notification email contains incorrect text.

Example, here is an email I received (my username is Troy). Winz mentioned me, but also immediately mentioned Heyjude in the same reply.

--
Hello Troy!

Winz mentioned you in the post "Heyjude, you have been mentioned at a post in Weber Kettle Club Forums", you can view the post at XXXXXXXXXXXX
--

it's the bug i mentionned above.
Title: Re: @mention members
Post by: Elizabeth II on October 01, 2014, 09:06:39 AM
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.

Is there any fix to this??
Title: Re: @mention members
Post by: butch2k on October 02, 2014, 07:04:11 AM
In mentions_process_store replace the $subject by an $emailsubject at two places:


loadLanguage('Mentions');

$emailsubject= str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_subject']);
$body = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_body']);
sendmail($mention['email_address'],$emailsubject, $body);
Title: Re: @mention members
Post by: Kimmie on October 05, 2014, 02:25:39 PM
Just noticed that if you modify an existing post and add a mention, it doesn't notify them of it at the top like it does when you add a mention to a new post. It still lists it on their mentions page, just not the notification at the top . This is causing some of my mods to miss mentions unless they go to their mentions page to look and see if they have been mentioned.

Is there a way to fix this? Thanks :)
Title: Re: @mention members
Post by: Kornak on October 06, 2014, 02:47:56 AM
Hi Dragooon, this plugin its awesome! But its not work with user have russian name (@Алексей / @Влада )
How i can fix it?
I read topic & i make that ->
Quote from: Dragooon on June 06, 2014, 05:17:59 AM
Okay, this is lightly tested (and that too in 2.1 :P). Open Themes/default/mentions.js, replace the entire file with

/**
* Javascript interface for active suggestions while posting
*
* @author ******iz Garg <[email protected]>
* @copyright 2014 ******iz Garg
* @license Simplified BSD (2-Clause) License
*/

var mentionInit = function()
{
    var fails = [];

    var config = {
        at: '@',
        data: [],
        show_the_at: true,
        limit: 10,
        callbacks: {
            matcher: function(flag, subtext, should_start_with_space) {
                var match = '', started = false;
                var string = subtext.split('');
                for (var i = 0; i < string.length; i++)
                {
                    if (string[i] == flag && (!should_start_with_space || i == 0 || /[\s\n]/gi.test(string[i - 1])))
                    {
                        started = true;
                        match = '';
                    }
                    else if (started)
                        match = match + string[i];
                }

                if (match.length > 0)
                    return match;

                return null;
            },
            remote_filter: function (query, callback) {
                if (typeof query == 'undefined' || query.length < 2 || query.length > 60)
                    return;

                for (i in fails)
                    if (query.substr(0, fails[i].length) == fails[i])
                        return;

                $.ajax({
                    url: smf_scripturl + '?action=suggest;' + smf_sessvar + '=' + smf_sessid + ';xml',
                    method: 'GET',
                    data: {
                        search: query,
                        suggest_type: 'member'
                    },
                    success: function (data) {
                        var members = $(data).find('smf > items > item');
                        if (members.length == 0)
                            fails[fails.length] = query;

                        var callbackArray = [];
                        $.each(members, function (index, item) {
                            callbackArray[callbackArray.length] = {
                                name: $(item).text()
                            };
                        });

                        callback(callbackArray);
                    }
                });
            }
        }
    };

    if (typeof $.fn.atwho == 'undefined' && typeof jQuery.fn.atwho != 'undefined')
    {
        var iframe = jQuery('#html_message');

        if (typeof iframe[0] != 'undefined')
            jQuery(iframe[0].contentDocument.body).atwho(config);
        jQuery('textarea[name=message]').atwho(config);
    }
    else
    {
        var iframe = $('#html_message');
        if (typeof iframe[0] != 'undefined')
            $(iframe[0].contentDocument.body).atwho(config);
        $('textarea[name=message]').atwho(config);
    }
};

var atWhoElement = document.createElement('script');
atWhoElement.src = atwho_url;
atWhoElement.type = 'text/javascript';
atWhoElement.onload = mentionInit;

if (typeof $ == 'undefined' || (parseInt($.fn.jquery.substr(0, 1)) == 1 && parseInt($.fn.jquery.substr(2, 3)) < 8) || jQuery.fn.jquery != $.fn.jquery)
{
    var scriptElement = document.createElement('script');
    scriptElement.src = jquery_url;
    scriptElement.type = 'text/javascript';

    scriptElement.onload = function () {
        document.body.appendChild(atWhoElement);
    };

    document.body.appendChild(scriptElement);
}
else
    document.body.appendChild(atWhoElement);


Does it work better?

Quote from: Dragooon on May 31, 2014, 01:40:36 AM
Oh I did opposite of what I was going for :P

Try replacing the find with this
foreach ($string as $k => $char)
{
if ($char == '@' && (!isset($string[$k - 1]) || $string[$k - 1] == ' '))

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)));
But russian name don't work (
PS Sorry, my english bad i know.  :-\
Title: Re: @mention members
Post by: Rain Forest on October 16, 2014, 08:27:49 AM
In error log when someone is using the Search button..

Apply Filter: Only show the error messages of this URL
../forums/index.php?action=search2
Apply Filter: Only show the errors with the same message
8: Undefined index: title
Apply Filter: Only show the errors from this file
File: /../Themes/default/languages/Mentions.english.php (body_above sub template - eval?)
Line: 391



Apply Filter: Only show the error messages of this URL
..forums/index.php?action=search2
Apply Filter: Only show the errors with the same message
8: Undefined index: href
Apply Filter: Only show the errors from this file
File: /../forums/Themes/default/languages/Mentions.english.php (body_above sub template - eval?)
Line: 390


After disable the eval.. it says this:

../forums/index.php?action=search2
Apply Filter: Only show the errors with the same message
8: Undefined index: title
Apply Filter: Only show the errors from this file
File: ../forums/Themes/writer/index.template.php
Line: 391


Line 391:    

<span class="', isset($button['is_last']) ? 'last ' : '', 'firstlevel">', $button['title'], '</span>


Apply Filter: Only show the error messages of this URL
../forums/index.php?action=search2
Apply Filter: Only show the errors with the same message
8: Undefined index: href
Apply Filter: Only show the errors from this file
File: /../forums/Themes/writer/index.template.php
Line: 390


Line 390:    

<a class="', $button['active_button'] ? 'active ' : '', 'firstlevel" href="', $button['href'], '"', isset($button['target']) ? ' target="' . $button['target'] . '"' : '', '>

Title: Re: @mention members
Post by: portex1 on October 23, 2014, 08:46:59 AM
Hi.
The mod is great, but it doesn't work with usernames with spaces.
I tried it as admin (which has all permissions) and still doesn't work. But it works with other usernames. How to fix this?
Title: Re: @mention members
Post by: Kimmie on October 28, 2014, 12:51:38 PM
Quote from: Kimmie on August 31, 2014, 01:07:06 PM
Not sure if this has been mentioned before (no pun intended..lol), but if someone has a blank space in their name, the drop down list will not find them. How do I fix this?


Thanks :)



Quote from: Kimmie on October 05, 2014, 02:25:39 PM
Just noticed that if you modify an existing post and add a mention, it doesn't notify them of it at the top like it does when you add a mention to a new post. It still lists it on their mentions page, just not the notification at the top . This is causing some of my mods to miss mentions unless they go to their mentions page to look and see if they have been mentioned.

Is there a way to fix this? Thanks :)


Any idea when these two issues will be fixed? Thanks )
Title: Re: @mention members
Post by: Mr. Jinx on October 28, 2014, 02:20:32 PM
Quote from: Kimmie on August 31, 2014, 01:07:06 PM
Not sure if this has been mentioned before (no pun intended..lol), but if someone has a blank space in their name, the drop down list will not find them. How do I fix this?
Try this: http://www.simplemachines.org/community/index.php?topic=522005.msg3704608#msg3704608
Please note: "Themes/default/mentions.js" should be "Themes/default/scripts/mentions.js"
Title: Re: @mention members
Post by: Mr. Jinx on October 30, 2014, 01:24:07 PM
Quote from: butch2k on October 02, 2014, 07:04:11 AM
In mentions_process_store replace the $subject by an $emailsubject at two places:


loadLanguage('Mentions');

$emailsubject= str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_subject']);
$body = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_body']);
sendmail($mention['email_address'],$emailsubject, $body);

Thanks for this correction!

Anyone know how to fix if a username is starting with a special character?
For example @<username> doesn't work.
Title: Re: @mention members
Post by: Kimmie on October 31, 2014, 07:54:35 PM
Quote from: Mr. Jinx on October 28, 2014, 02:20:32 PM
Quote from: Kimmie on August 31, 2014, 01:07:06 PM
Not sure if this has been mentioned before (no pun intended..lol), but if someone has a blank space in their name, the drop down list will not find them. How do I fix this?
Try this: http://www.simplemachines.org/community/index.php?topic=522005.msg3704608#msg3704608
Please note: "Themes/default/mentions.js" should be "Themes/default/scripts/mentions.js"


I do not feel comfortable  completely changing someone else's files like that. If it worked I would assume the mod auth would have already updated the mod with the changes. Thnks anyways.
Title: Re: @mention members
Post by: Mr. Jinx on November 01, 2014, 05:02:10 AM
??? Dragooon is the creator of this mod, and he is suggesting the change. If you don't trust him, why did you install it anyway?
Title: Re: @mention members
Post by: Mr. Jinx on November 01, 2014, 01:32:47 PM
Dutch translation:

Download: Mentions.dutch.php (http://www.simplemachines.org/community/index.php?action=dlattach;topic=522005.0;attach=236818)

and

In Modifications.dutch.php add:
$txt['mentions'] = 'Vermeldingen';
$txt['scheduled_task_removeMentions'] = 'Verwijder vermeldingen die gezien zijn';
$txt['scheduled_task_desc_removeMentions'] = 'Verwijdert vermeldingen die gezien zijn en ouder dan het opgegeven aantal dagen';
Title: Re: @mention members
Post by: Dragooon on November 01, 2014, 05:10:16 PM
Quote from: Kimmie on October 31, 2014, 07:54:35 PM
Quote from: Mr. Jinx on October 28, 2014, 02:20:32 PM
Quote from: Kimmie on August 31, 2014, 01:07:06 PM
Not sure if this has been mentioned before (no pun intended..lol), but if someone has a blank space in their name, the drop down list will not find them. How do I fix this?
Try this: http://www.simplemachines.org/community/index.php?topic=522005.msg3704608#msg3704608
Please note: "Themes/default/mentions.js" should be "Themes/default/scripts/mentions.js"


I do not feel comfortable  completely changing someone else's files like that. If it worked I would assume the mod auth would have already updated the mod with the changes. Thnks anyways.
Uh I haven't had much time to support the mod due to real life and 2.1 (whatever little time I am getting I'm trying to put into 2.1) but that change should help with things. I would've suggested pulling the JS directly from 2.1 but I don't remember what changes there are between 2.0 and 2.1 (if any) so for now I'd avoid that.
Title: Re: @mention members
Post by: aquagrrl on November 07, 2014, 03:01:24 PM
Sorry to intrude - I'm getting no drop down at all when installing this mod. I have a custom theme - is there possibly something I need to put in my theme to make it work? I didn't see any instructions indicating as such. Conversely, any known conflicting mods?

I see you're busy, just hoping you have time to point me in the right direction. Tried both WYSIWYG and without.
Title: Re: @mention members
Post by: Rain Forest on November 08, 2014, 05:19:17 AM
Quote from: aquagrrl on November 07, 2014, 03:01:24 PM
Sorry to intrude - I'm getting no drop down at all when installing this mod. I have a custom theme - is there possibly something I need to put in my theme to make it work? I didn't see any instructions indicating as such. Conversely, any known conflicting mods?

I see you're busy, just hoping you have time to point me in the right direction. Tried both WYSIWYG and without.

Did you put the mentions.css in your customtheme/css/ folder?

Also put the mentions.js & jquery.atwho.js in your customtheme/scripts folder and Mentions.english.php and Mentions.english-utf8.php in your customtheme/languages folder.
Title: Re: @mention members
Post by: aquagrrl on November 10, 2014, 03:38:51 PM
I feel like a dolt.  :-[ There are two mentions mods, and had the other installed. Not sure why it didn't work, but I installed this one, which was the one I wanted all along and after refreshing, it worked perfectly. Those files didn't need to be installed in the custom theme.

Thanks for the help though! It was looking for files that didn't exist that tipped me off I was doing something wrong.
Title: Re: @mention members
Post by: gorbi on November 13, 2014, 01:49:46 AM
I am sorry, is it possible to implement the combination @all?
Title: Re: @mention members
Post by: Mr. Jinx on November 13, 2014, 11:54:45 AM
Anyone know how to fix if a username is starting with a special character?
For example @<username> doesn't work.
Title: Re: @mention members
Post by: Dragooon on November 26, 2014, 01:55:15 PM
To those having problems with UTF-8 usernames and spaces etc, can you try the attached package?
Title: Re: @mention members
Post by: butch2k on November 27, 2014, 05:25:15 AM
Dragoon could you take into account my PR for fixing incorrect email subject when multiple users are mentionned in one post.
Title: Re: @mention members
Post by: Dragooon on November 27, 2014, 05:28:36 AM
Quote from: butch2k on November 27, 2014, 05:25:15 AM
Dragoon could you take into account my PR for fixing incorrect email subject when multiple users are mentionned in one post.
Ah I missed it before, I've merged it on GH. I'll post an updated 1.1.3 if the one I attached checks out.
Title: Re: @mention members
Post by: Elizabeth II on November 27, 2014, 10:59:16 AM
Could you look into an issue where mentions in profile don't go away once read? Also I've noticed that [1] appears randomly on occasions when I haven't even been mentioned.
Title: Re: @mention members
Post by: waplist on November 28, 2014, 01:12:17 PM
It doesnt work properly .it doesnt show error when creating post but shows error when modifying post.it shows parse_mentions error even when i dont mention anyone
Title: Re: @mention members
Post by: br360 on November 29, 2014, 02:30:25 AM
My site is https, and when I get a mention, I'll go into profile>>Mentions and everything is fine. However, as soon as I open any of the topics in the "Posts mentioning  my username" in my profile, the link in my browser now becomes http. Any idea how I can fix this?
Title: Re: @mention members
Post by: Mr. Jinx on November 29, 2014, 03:50:59 AM
Quote from: waplist on November 28, 2014, 01:12:17 PM
It doesnt work properly .it doesnt show error when creating post but shows error when modifying post.it shows parse_mentions error even when i dont mention anyone
What version are you using? The one from the modification site, or the one Dragooon just posted?

Quote from: br360 on November 29, 2014, 02:30:25 AM
My site is https, and when I get a mention, I'll go into profile>>Mentions and everything is fine. However, as soon as I open any of the topics in the "Posts mentioning  my username" in my profile, the link in my browser now becomes http. Any idea how I can fix this?
My site is also https only, but mention links are fine. They are all https.
Anyway, don't you have redirects setup? I have redirected all http urls to https in case someone is using http. It's also better for search enginges to prevent duplicate content. Make sure you make a permanent (301) redirection.
Title: Re: @mention members
Post by: waplist on November 29, 2014, 10:03:15 AM
@Mr.Jinx i downloaded it from mod site. Version is 1.1.2
Is it latest?
Title: Re: @mention members
Post by: Arantor on November 29, 2014, 10:06:37 AM
No, there is a provisional copy of 1.1.3 attached to this thread.
Title: Re: @mention members
Post by: waplist on December 01, 2014, 07:24:11 AM
Where? i didnt find 1.1.3
Title: Re: @mention members
Post by: Dragooon on December 01, 2014, 07:32:54 AM
Quote from: waplist on December 01, 2014, 07:24:11 AM
Where? i didnt find 1.1.3
http://www.simplemachines.org/community/index.php?topic=522005.msg3766946#msg3766946
Title: Re: @mention members
Post by: waplist on December 01, 2014, 07:42:09 AM
Thanks working fine
Title: Re: @mention members
Post by: br360 on December 01, 2014, 10:41:50 PM
I just noticed a small little thing when receiving an email notification. The message received is-

$txt['mentions_subject'] = 'MENTIONNAME, you have been mentioned at a post in ' . $context['forum_name'];

Probably should be "you have been mentioned in a post at", and not "you have been mentioned at a post in"

Small thing but for those grammar nazis... ;)
Title: Re: @mention members
Post by: mazdagaraj on December 05, 2014, 02:11:56 PM
Does Tapatalk works ?
I could not run :(
Title: Re: @mention members
Post by: Arantor on December 05, 2014, 02:16:46 PM
I do not expect Tapatalk to work with this mod since Tapatalk clones all of the core SMF code and almost no mod touches it (and given the fragility of Tapatalk, that's probably a good thing)
Title: Re: @mention members
Post by: mazdagaraj on December 11, 2014, 04:17:14 AM
I get this error
Can you help me?
Title: Re: @mention members
Post by: margarett on December 11, 2014, 07:30:29 AM
Please disable template evaluation (search your admin panel for "eval" without quotes) so that the real error location is revealed ;)
Title: Re: @mention members
Post by: mazdagaraj on December 11, 2014, 07:59:36 AM
Quote from: margarett on December 11, 2014, 07:30:29 AM
Please disable template evaluation (search your admin panel for "eval" without quotes) so that the real error location is revealed ;)
Thank you
Is there any disadvantage of this?
Title: Re: @mention members
Post by: margarett on December 11, 2014, 08:25:13 AM
No ;)

Now check your error log again ;)
Title: Re: @mention members
Post by: Arantor on December 11, 2014, 10:02:00 AM
Would have been Register.template.php, lines 202-204 from the error...
Title: Re: @mention members
Post by: NaviJan on January 07, 2015, 03:16:49 AM
Hi there,

Is there a way to disable to mention tag in a post?

This because if I put a email adres in a post and the username is the same as a domainname the mention tag goes before the mailto tag.

Greetings,
Jan
Title: Re: @mention members
Post by: tranhiep_116 on January 07, 2015, 05:13:05 AM
that very cold thanks for it
Title: Re: @mention members
Post by: BonoVox on January 14, 2015, 10:03:16 AM
Hello, thanks for the mod but, is there a way to receive a notification like the mention's mod when you get quoted? like in vBulletin.
Title: Re: @mention members
Post by: PokémonS on January 14, 2015, 03:18:32 PM
Great mod, thanks! 'w'
Just a little wish. Just like Messages (x), I want Profle (x) and Mentions (x) gets bold please. 'w'

(http://puu.sh/ewezR.png)
Title: Re: @mention members
Post by: BonoVox on January 16, 2015, 07:13:08 PM
Where can I place a class to add a bubble notification instead of the default one?, I got the CSS but I don't know where is located the part of the amount of mentions, in the navbar.
Title: Re: @mention members
Post by: Divaksh on January 19, 2015, 04:02:49 PM
I'm using the welcome topic mod which creates a new thread automatically when s user get registered.
Everything works fine in that mod, in this mod.

But if I want to mention newly registered member in that automatically created thread then this mod doesn't work.

I use @[username] in that thread to mention the newly registered member. [username] automatically gets replaced with the actual username but in that thread no users link appears(mention doesnt work)

Please help in solving this issue.
Thanks. :)
Title: Re: @mention members
Post by: zapiy on January 31, 2015, 07:53:44 AM
Getting loads of errors like

Apply Filter: Only show the error messages of this URL
http://www.>>>>>>>>>>/index.php?action=register
Apply Filter: Only show the errors with the same message
8: Undefined index: title
Apply Filter: Only show the errors from this file
File: /var/www/vhosts/>>>>>>>>>>>>>>>>>>>>co.uk/httpdocs/Sources/Mentions.php
Line: 45


Also we get no alerts that someone has been mentioned, i assume the above is linked to that?

Any help please?
Title: Re: @mention members
Post by: diablo3x.dk on February 10, 2015, 02:02:01 PM
This looks like something I've always wanted on my forum. Thank you for developing this fine mod, @Dragooon... Oh... Dragooon ;)

One question - and apologies if you have answered this question once already - but is there any way to make each mention result in a PM notification via Private Messages?

Thanks.
Title: Re: @mention members
Post by: zapiy on February 11, 2015, 02:52:31 PM
Is ther no longer any support for this?
Title: Re: @mention members
Post by: PokémonS on February 18, 2015, 10:58:59 AM
Quote from: PokémonS on January 14, 2015, 03:18:32 PM
Great mod, thanks! 'w'
Just a little wish. Just like Messages (x), I want Profle (x) and Mentions (x) gets bold please. 'w'

(http://puu.sh/ewezR.png)

Still looking for this. 'w'
Title: Re: @mention members
Post by: Gluz on February 19, 2015, 03:05:24 PM
I noticed that when a user gets a lot of mentions and it's paginated the base url of the mentions pages are wrong, and find the problem in /Sources/mentions.php:

Original:
// Set the options for the list component.
$listOptions = array(
'id' => 'mentions_list',
'title' => sprintf($txt['mentions_profile_title'], $context['member']['name']),
'items_per_page' => 20,
'base_href' => $scripturl . '?action=profile;area=tracking;sa=user;u=' . $memID,
'default_sort_col' => 'time',
'get_items' => array(
'function' => 'list_getMentions',
'params' => array(
'lm.id_mentioned = {int:current_member}',
array('current_member' => $memID),
),
),


Fixed:
// Set the options for the list component.
$listOptions = array(
'id' => 'mentions_list',
'title' => sprintf($txt['mentions_profile_title'], $context['member']['name']),
'items_per_page' => 20,
'base_href' => $scripturl . '?action=profile;area=mentions;u=' . $memID,
'default_sort_col' => 'time',
'get_items' => array(
'function' => 'list_getMentions',
'params' => array(
'lm.id_mentioned = {int:current_member}',
array('current_member' => $memID),
),
),


Just notice that the area is not tracking, is mentions and that way the pagination in mentions can be accessible.
Title: Re: @mention members
Post by: Kimmie on March 06, 2015, 07:19:13 AM
Found a bug. If you have more than one page of mentions on your profile you cannot click on page 2 or 3, etc. It takes you to "track user". You can see where it is linking me to when I hover my mouse over page 3. Page 2 is the same only it says start = 20



(http://i.imgur.com/V8CDmSr.png)
Title: Re: @mention members
Post by: margarett on March 06, 2015, 07:29:37 AM
@Kimmie, the fix is the post before yours...
Title: Re: @mention members
Post by: Kimmie on March 10, 2015, 01:13:26 AM
Quote from: margarett on March 06, 2015, 07:29:37 AM
@Kimmie, the fix is the post before yours...

Thanks :). I was in a hurry when I posted mine so I was in and out


EDIT: Now I have another problem. Pages 2 and 3 are now blank


(http://i.imgur.com/GSAPMIf.png)


I copied and pasted his code, as you can see here:

(http://i.imgur.com/6W6yfUY.png)
Title: Re: @mention members
Post by: Gwenwyfar on March 14, 2015, 08:29:43 AM
Brazilian Portuguese translation attached here.

And a suggestion: This mod becomes much more useful if you don't have the @ in the post. This way you could write a normal phrase with the name and have a mention in it, and also use the @ if you want to :)
Title: Re: @mention members
Post by: Sorunome on March 16, 2015, 07:23:07 AM
Suggestion: don't have @mentions parse inside of [code] tags
Title: Re: @mention members
Post by: TLMB on March 23, 2015, 08:25:05 AM
Just a quick...

THANK YOU!

This mod rocks.
Title: Re: @mention members
Post by: ashter on March 31, 2015, 04:55:42 AM
while using this mod @mentions,
we have encounted a problem with topics not displaying, when an existing topic is cliked on it just displays a blank white page,
the same effect also applies to trying to create a new topic too,

the error message for this is, '"fatal error: Call to undefined function mentions_post_scripts() in /mnt/vol4/home/f/l/flygil/public_html/flygility/Sources/Display.php on line 70"

the relevant part of the sources/display.php

70  mentions_post_scripts();
71 // What are you gonna display if these are empty?!
72 if (empty($topic))
73 fatal_lang_error('no_board', false);

(full display.php script attached)

which points to it being related to the plugin "@mentions"
and indeed, when this plugin was unistalled everything worked fine.

it was working ok, but suddenly started giving the error mentioined above,
no changes were made to any scripts or mods etc before the errors started,

the only thing i can track down is to one member adding a mention to an existing post?

my question is, what needs changing in order for this mod to work ?

using smf 2.09

with these mods added

1.    RSS Feed Icon    1.1    
2.    @mention members 1.1.2    
3.    httpBL    2.5.1    
4.    InLine Attachments    
5.    SMF Quiz    1.1.0    
6.    List Of Users In Topic or Board 1.1    
7.    Stop Forum Spam    1.0    
8.    Add Social Media Icons To Profiles  1.2.0    
9.    Board Icons    1.0    
10.    video bbc   
11.    SimplePortal    2.3.6    
12.    Custom Copyright    1.0.4    
13.    Hide Content    1.1.3
14.    iurl Bbc [iurl]    1.0    
15.    FixCopy    2.0    
16.    Socialize    1.8    
17.    Remove SMF Logo    1.4    
18.    FlowPlayer    1.2    
19.    ENotify    2.0.2    
20.    OS & Browser Detection 1.5    
21.    Drafts    2.1    
22.    Default Avatar    2.3    
23.    SMF Gallery Pro    7.0.2    
24.    Users Online Today    2.1    
25.    URL Popup    1.0.2    
26.    Super Simple Thread Tags    1.1a    
27.    6 Custom buttons / tabs with Sub Menus (4) 0.5    
28.    Like Posts    2.0.3    
29.    Add Favicon.ico Support 1.101    
30.    Disable Right Click    4.1.2    
31.    Add Facebook Like, Tweet, and Google +1 1.0.3a    
32.    SMF Arcade    2.6    
33.    Do not enter    1.1
Title: Re: @mention members
Post by: Gwenwyfar on March 31, 2015, 05:46:23 AM
I can confirm this happens, though I haven't seen it myself, I've had a member say a specific topic (with many mentions) sometimes opens a blank page. The only mod I have in common with ashter besides mentions is Drafts, too, and mentions is my most recently installed one.

I've been having the same topic lock itself randomly, but I'm not sure yet if its related.
Title: Re: @mention members
Post by: margarett on April 01, 2015, 10:15:11 AM
@Fortytwo: You need to check your PHP error logs. It might happen that your available memory for PHP is exhausted.

Although I remember testing this MOD when it was submitted and posted like 100+ mentions

@ashter: was the MOD correctly installed? It seems to me that there is something missing, as you have an undefined function that the MOD clearly should add...

/me finds funny the usage of the @mentions here ehehehehe

Title: Re: @mention members
Post by: ashter on April 01, 2015, 12:00:59 PM
Quote from: margarett on April 01, 2015, 10:15:11 AM
@Fortytwo: You need to check your PHP error logs. It might happen that your available memory for PHP is exhausted.

Although I remember testing this MOD when it was submitted and posted like 100+ mentions

@ashter: was the MOD correctly installed? It seems to me that there is something missing, as you have an undefined function that the MOD clearly should add...

/me finds funny the usage of the @mentions here ehehehehe

i wondered if that may be the case, but don't know enough about php to figure out what the causes may be myself:-[

anyway, i uninstalled it and deleted it, and tried again with a fresh install, but got the same results :(
so having uninstalled and deleted it again, i download a fresh copy of the mod from the smf site,
uploaded and installed it, and it is now working !
seems like my first copy of the mod was corrupted in some way or the install did not go as plannned, but the fresh copy worked as it should have  :)

many thanks for the advice  :)

i'm beginning to think that the number of forums out there would drastically reduce in numbers if it were not for the great support found here on the smf community boards ::)  ;D
its very much appreciated, thanks.
Title: Re: @mention members
Post by: Gwenwyfar on April 01, 2015, 01:14:53 PM
Quote from: margarett on April 01, 2015, 10:15:11 AM
@Fortytwo: You need to check your PHP error logs. It might happen that your available memory for PHP is exhausted.

Although I remember testing this MOD when it was submitted and posted like 100+ mentions

@ashter: was the MOD correctly installed? It seems to me that there is something missing, as you have an undefined function that the MOD clearly should add...

/me finds funny the usage of the @mentions here ehehehehe
There are probably hundreds of mentions all over the forum already too, but that specific topic has a ton in the same post/page, some of which should not work (they have characters which are not supported yet, and people are using the base code + id). I haven't heard anyone else complain about any other topic, at least, and that one has been acting weird already.

Nothing relevant shows on smf logs, and on php logs there's just a bunch of unrelated "undefined index" errors. I'm leaving this one aside for the time being, I have no idea what could be causing one specific topic to lock itself or open a blank page, it isn't on logs like moderation either. Specially when it happens so randomly, been over a week without a case now.

:P
Title: Re: @mention members
Post by: LocMax on April 03, 2015, 05:45:36 AM
Erm, I am unable to use the mention feature on members who have symbols in their name like [] () and such. Any fix for it?

EDIT: eh, is this mod the same as the one from smfpacks? We bought the one from there, so... is there any difference?
Title: Re: @mention members
Post by: br360 on April 03, 2015, 04:17:24 PM
Quote from: LocMax on April 03, 2015, 05:45:36 AM
Erm, I am unable to use the mention feature on members who have symbols in their name like [] () and such. Any fix for it?

EDIT: eh, is this mod the same as the one from smfpacks? We bought the one from there, so... is there any difference?

Version1-1-3 is the newest version that will work with symbols like the examples you posted. This link will direct you right to the download-  http://www.simplemachines.org/community/index.php?topic=522005.msg3766946#msg3766946

This is similar to the smfpacks one, but they aren't the same. The differences are that the smfpacks mentions mod will show the person's avatar when using the autosearch; and in regards to being notified of being mentioned- this mod will have a notification in your profile tab, while the smfpacks mod will send you a PM that you were mentioned.

Not sure if the smfpacks mod works with being able to find the above symbols though.
Title: Re: @mention members
Post by: Gwenwyfar on April 03, 2015, 05:36:48 PM
Quote from: br360 on April 03, 2015, 04:17:24 PM
Quote from: LocMax on April 03, 2015, 05:45:36 AM
Erm, I am unable to use the mention feature on members who have symbols in their name like [] () and such. Any fix for it?

EDIT: eh, is this mod the same as the one from smfpacks? We bought the one from there, so... is there any difference?

Version1-1-3 is the newest version that will work with symbols like the examples you posted. This link will direct you right to the download-  http://www.simplemachines.org/community/index.php?topic=522005.msg3766946#msg3766946

This is similar to the smfpacks one, but they aren't the same. The differences are that the smfpacks mentions mod will show the person's avatar when using the autosearch; and in regards to being notified of being mentioned- this mod will have a notification in your profile tab, while the smfpacks mod will send you a PM that you were mentioned.

Not sure if the smfpacks mod works with being able to find the above symbols though.
Ahh, thought the version on the mod site was the most recent. Thanks for that, accents don't work on the version I have :)

And I think the locking problem I have is unrelated to this one, after all. I'll go notify the other mod author about that one :P But it still doesn't explain the blank pages.
Title: Re: @mention members
Post by: PokémonS on April 07, 2015, 03:13:46 AM
Quote from: PokémonS on February 18, 2015, 10:58:59 AM
Quote from: PokémonS on January 14, 2015, 03:18:32 PM
Great mod, thanks! 'w'
Just a little wish. I want Profle (x) and Mentions (x) gets bold please. 'w'

(http://puu.sh/ewezR.png)

Still looking for this. 'w'

Again, still looking for this. 'w'
Title: Re: @mention members
Post by: Professor Sea on April 07, 2015, 05:20:04 AM
This seems like an excellent mod, how did I not notice it sooner?  ;D
Title: Re: @mention members
Post by: Kimmie on April 11, 2015, 01:12:50 PM
Quote from: Kimmie on March 10, 2015, 01:13:26 AM
Quote from: margarett on March 06, 2015, 07:29:37 AM
@Kimmie, the fix is the post before yours...

Thanks :). I was in a hurry when I posted mine so I was in and out


EDIT: Now I have another problem. Pages 2 and 3 are now blank


(http://i.imgur.com/GSAPMIf.png)


I copied and pasted his code, as you can see here:

(http://i.imgur.com/6W6yfUY.png)


Any fix for this yet? Thanks
Title: Re: @mention members
Post by: Gluz on April 13, 2015, 03:03:48 AM
Quote from: PokémonS on April 07, 2015, 03:13:46 AM
Again, still looking for this. 'w'

In my 3 sites the Themes have bold on all the menu, so I didn't notice that it doesn't get bold as the PM does.

Anyway, the fix is really easy, in /Sources/Mentions.php:
Code (Search) Select
$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'] . ']' : '');


Code (Replace) Select
$menu_buttons['profile']['sub_buttons']['mentions'] = array(
'title' => (!empty($user_settings['unread_mentions']) ? '<b>' : '') . $txt['mentions'] . (!empty($user_settings['unread_mentions']) ? ' [' . $user_settings['unread_mentions'] . ']</b>' : ''),
'href' => $scripturl . '?action=profile;area=mentions',
'show' => true,
);
$menu_buttons['profile']['title'] =  (!empty($user_settings['unread_mentions']) ? '<b>' : '') . $txt['profile'] . (!empty($user_settings['unread_mentions']) ? ' [' . $user_settings['unread_mentions'] . ']</b>' : '');






Quote from: Kimmie on April 11, 2015, 01:12:50 PM
Any fix for this yet? Thanks

I tested in my sites with the code I posted before, and the users that have a lot of mentions and gets paginated work well, pages 2 and so on display notifications as intended.

Just to be sure, the link of the page 2 go to something like this?
?action=profile;area=mentions;u={id};sort=time;start=20

If yes, then I really don't know what's going on, I only change a little things and fix the URL but as for the query that count and display notifications I didn't touch anything.
Title: Re: @mention members
Post by: PokémonS on April 16, 2015, 03:26:37 PM
Quote from: Gluz on April 13, 2015, 03:03:48 AM
Quote from: PokémonS on April 07, 2015, 03:13:46 AM
Again, still looking for this. 'w'

In my 3 sites the Themes have bold on all the menu, so I didn't notice that it doesn't get bold as the PM does.

Anyway, the fix is really easy, in /Sources/Mentions.php:
Code (Search) Select
$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'] . ']' : '');


Code (Replace) Select
$menu_buttons['profile']['sub_buttons']['mentions'] = array(
'title' => (!empty($user_settings['unread_mentions']) ? '<b>' : '') . $txt['mentions'] . (!empty($user_settings['unread_mentions']) ? ' [' . $user_settings['unread_mentions'] . ']</b>' : ''),
'href' => $scripturl . '?action=profile;area=mentions',
'show' => true,
);
$menu_buttons['profile']['title'] =  (!empty($user_settings['unread_mentions']) ? '<b>' : '') . $txt['profile'] . (!empty($user_settings['unread_mentions']) ? ' [' . $user_settings['unread_mentions'] . ']</b>' : '');






Quote from: Kimmie on April 11, 2015, 01:12:50 PM
Any fix for this yet? Thanks

I tested in my sites with the code I posted before, and the users that have a lot of mentions and gets paginated work well, pages 2 and so on display notifications as intended.

Just to be sure, the link of the page 2 go to something like this?
?action=profile;area=mentions;u={id};sort=time;start=20

If yes, then I really don't know what's going on, I only change a little things and fix the URL but as for the query that count and display notifications I didn't touch anything.

It works perfectly! Thanks!
Title: Re: @mention members
Post by: 420Connect.co.uk on April 19, 2015, 04:05:43 PM
Would it be possible to add a part of this MOD's code elsewhere to enable @tagging in other parts of your forum?

(e.g other mods that allow a 'posting' section. for example, ultimate profile comments.. - I have a few places that would be nice to have with work with but wondered if I could put something in my index template or something similar to allow @tagging everywhere?)

Many thanks
Title: Re: @mention members
Post by: Evad3 on April 22, 2015, 05:02:21 PM
I have a question about this mod...

Does it only have the option of email notifications, or can I also choose pop-up notifications?
Title: Re: @mention members
Post by: Rain Forest on April 22, 2015, 05:15:27 PM
Quote from: Evad3 on April 22, 2015, 05:02:21 PM
I have a question about this mod...

Does it only have the option of email notifications, or can I also choose pop-up notifications?
You can copy the pop up option from Private message to pop up this mention :)

(http://i.imgur.com/xx1jyvI.png)
http://www.simplemachines.org/community/index.php?topic=529541.msg3792498#msg3792498
Title: Re: @mention members
Post by: Evad3 on April 24, 2015, 05:31:07 AM
Quote from: Dragon FruitYou can copy the pop up option from Private message to pop up this mention :)
How is this done?
Title: Re: @mention members
Post by: Rain Forest on April 30, 2015, 09:33:24 AM
Quote from: Evad3 on April 24, 2015, 05:31:07 AM
Quote from: Dragon FruitYou can copy the pop up option from Private message to pop up this mention :)
How is this done?
You mean the bubble I did on the picture here above?
Title: Re: @mention members
Post by: FireDitto on May 29, 2015, 04:41:08 AM
I was wondering; Is there any chance of this being expanded to tag membergroups, by any chance?

Thanks!
Title: Re: @mention members
Post by: Elizabeth II on June 06, 2015, 12:10:19 PM
I posted here before, I have an issue with the mentions [1] in profile not removing.. The schedule task is enabled but the
Title: Re: @mention members
Post by: sangham.net on June 07, 2015, 02:30:07 AM
Seems to be a great mod. Is there a possibility to mention a link User (http://www.simplemachines.org/community/index.php?action=profile;u=95397) instead of it's tag @user?

So it would look nice and give other the change to look of whom is talked about. Or what to you think Mr Dragoon (http://www.simplemachines.org/community/index.php?action=profile;u=95397)?

So it would look nice and give other the change to look of whom is talked about. Or what to you think Mr @Dragoon?

What about doing it without @ but simply by matching the Username? Is there a possibility to send out a email of PM if mentioned?
Title: Re: @mention members
Post by: sangham.net on June 07, 2015, 09:36:52 AM
All wishes included! Wonderful mod!

the @ "Problem" can be fixed by just modify the html in mention.php

{
global $scripturl;

$bbc_tags[] = array(
'tag' => 'member',
'type' => 'unparsed_equals',
'before' => '<a href="' . $scripturl . '?action=profile;u=$1" class="mention">',
'after' => '</a>',
);
}


Sadhu!
Title: Re: @mention members
Post by: villasg on June 07, 2015, 09:37:57 AM
Hi sounds very nice .
have anyone tried if work in 2.0.10 version ?

Thanks

greek-utf8

$txt['mentions'] = 'Μνημονέυσεις';
$txt['scheduled_task_removeMentions'] = 'Κατάργηση των μνημονεύσεων ';
$txt['scheduled_task_desc_removeMentions'] = 'Καταργεί αυτόματα τις μνημονεύσεις που είναι παλαιότερες από τις καθορισμένες ημέρες';
Title: Re: @mention members
Post by: sangham.net on June 07, 2015, 10:54:46 AM
Oh yes, thanks for the indirect hint Villasg,

not sure if already exist, here formal German:

<?php
/**
 * Language file for mentions
 *
 * @author ******iz Garg <[email protected]>
 * @copyright 2014 ******iz Garg
 * @license Simplified BSD (2-Clause) License
 * transated by sangham 6.6.2015
 */

global $txt$context;

$txt['mentions_subject'] = 'Werte(r) MENTIONNAME, Sie wurden in einem Beitrag erwähnt: ' $context['forum_name'];
$txt['mentions_body'] = 'Werte(r) Herr/Frau MENTIONNAME!

Werte(r) Herr/Frau MEMBERNAME hatte Sie im Forum erwähnt. Um zu wissen worum es geht oder ging, können Sie dem Link POSTLINK folgen.

Hochachtungsvoll,
Metta und Mudita,
Ihr Team und die Klosterdiener des
$context['forum_name'];
$txt['mentions'] = 'Erwähnungen';
$txt['mentions_profile_title'] = 'Beiträge, die %s erwähnen';
$txt['mentions_post_subject'] = 'Betreff';
$txt['mentions_member'] = 'Erwähnt von';
$txt['mentions_post_time'] = 'Zeitpunkt der Erwähnung';
$txt['permissionname_mention_member'] = 'Erwähnen von Mitgliedern';
$txt['permissionhelp_mention_member'] = 'Erlauben Sie Mitgliedern andere Mitglieder anzumerken und diese Mittels dem @username Code zu benachrichtigen';
$txt['email_mentions'] = 'Bemerkung der Erwähnung via E-mail';
$txt['mentions_remove_days'] = 'Entferne Erwähnungen die älter als diese Tagesanzahl sind <div class="smalltext">Diese Option entfernt die Erwähnungen, die älter als die festgelegte Anzahl and Tagen ist. Gehen Sie sicher, daß sie den <a href="' $scripturl '?action=admin;area=scheduledtasks">Aufgabenplan hier</a> aktiviert haben</div>';
$txt['mentions_email_default'] = 'Aktivieren Sie Erwähnungs-Emails als Grundeinstellung <div class="smalltext">Wählen Sie das, wenn Sie wollen, daß Neue Mitglieder E-mailnachrichten bei ihrer Erwähnung als Standard bekommen (dies gilt nur für neue Anmeldungen)</div>';
$txt['mentions_permissions_notice'] = 'Bitte vergessen Sie nicht die Berechtigungen festzulegen, um den einzelnen Mitgliedern das Erwähnen anderer zu erlauben';
$txt['mentions_email_default_now'] = 'Aktivieren Sie die Erwähnungs-E-mail für bestehende Mitglieder<div class="smalltext">Wählen Sie dies nur, wenn Sie möchten, daß bestehende Mitglieder deren E-mails aktiviert haben sollen</div>';
Title: Re: @mention members
Post by: sangham.net on June 18, 2015, 09:38:41 AM
Not sure if this error has to do with the modification here (works perfect so far). It shows:

8: Undefined index: approved
File: /var/www/XXXX/Sources/Subs-Post.php


in the error-log and leads to this row:
2419:





mentions_process_store($msgOptions['mentions'], $msgOptions['id'], $msgOptions['subject'], $msgOptions['approved']);




Title: Re: @mention members
Post by: Sorunome on June 24, 2015, 04:01:13 PM
How do you mention members that have a space in their name?
Title: Re: @mention members
Post by: villasg on June 26, 2015, 06:07:53 AM
Thanks work great in 2.0.10
Title: Re: @mention members
Post by: Nixis on September 14, 2015, 05:58:26 PM
Guys, is there any possibility to turn off automatic PM when you get mentioned? Because people on forums currently get 2 mails because they get 1 PM and 1 Mention in Profile section.
Title: Re: @mention members
Post by: Gwenwyfar on September 15, 2015, 04:38:25 AM
Quote from: Nixis on September 14, 2015, 05:58:26 PM
Guys, is there any possibility to turn off automatic PM when you get mentioned? Because people on forums currently get 2 mails because they get 1 PM and 1 Mention in Profile section.
Have you checked the mod's options?
Title: Re: @mention members
Post by: Jingaling on September 18, 2015, 10:17:11 AM
Hi guys,

I've just started using this on my forum, and it's working great. @mentions are fine, and users are getting emails about them. However, they don't seem to be getting the "alert" (like a PM) on the actual site itself. There isn't even an option for "mentions" in my profile drop-down as you can see below:

(http://i.imgur.com/BCV1rDl.png)

I'm sure it's probably a problem with my theme, but any help would be appreciated.

Thanks.
Title: Re: @mention members
Post by: Gwenwyfar on September 18, 2015, 10:27:51 AM
Maybe that's because of your theme. That is nothing like the default smf menu, which is where it displays your mentions (total number like in PMs). You could try and edit that to display the mentions in there.
Title: Re: @mention members
Post by: Jingaling on September 18, 2015, 10:46:11 AM
Quote from: Fortytwo on September 18, 2015, 10:27:51 AM
Maybe that's because of your theme. That is nothing like the default smf menu, which is where it displays your mentions (total number like in PMs). You could try and edit that to display the mentions in there.

Thanks for coming back so quickly. I've been playing around with subs.php and I've managed to integrate "mentions" into the "My Messages" menu. However, I don't get the Mentions [1] alert in the menu when a new menu is added. The same way as you would when there's a new PM. How would I add this function?

Here's what I have added to the subs.php file:


'mentions' => array(
'title' => $txt['mentions'] . (!empty($user_settings['unread_mentions']) ? ' [' . $user_settings['unread_mentions'] . ']' : ''),
'href' => $scripturl . '?action=profile;area=mentions',
'show' => true,
'is_last' => true,
),


Thanks again!
Title: Re: @mention members
Post by: Gwenwyfar on September 18, 2015, 11:15:10 AM
Did the mod install with no errors in that theme?

You could try looking at the mod parser to find everything it modifies and see which changes are for the menu and see if those are correct/add them in that theme.

And which theme is that? Can't really give any specific instructions without knowing how's the code on it.
Title: Re: @mention members
Post by: Jingaling on September 18, 2015, 11:46:52 AM
Nope, no errors. The theme I'm using is "Redsy" http://custom.simplemachines.org/themes/index.php?lemma=2833 (http://custom.simplemachines.org/themes/index.php?lemma=2833) I've customised the CSS to theme it with my site, that's all I've changed.

I've ran the parser, but I see no mention of menu editing I'm running 2.0.10.

Thanks.
Title: Re: @mention members
Post by: Nixis on September 18, 2015, 02:29:18 PM
Quote from: Fortytwo on September 15, 2015, 04:38:25 AM
Quote from: Nixis on September 14, 2015, 05:58:26 PM
Guys, is there any possibility to turn off automatic PM when you get mentioned? Because people on forums currently get 2 mails because they get 1 PM and 1 Mention in Profile section.
Have you checked the mod's options?

Nothing there to disable PM's.
Title: Re: @mention members
Post by: Gwenwyfar on September 18, 2015, 04:26:18 PM
Quote from: Nixis on September 18, 2015, 02:29:18 PM
Nothing there to disable PM's.
Maybe its some SMF setting or a mod you have then, this is not from this mod (I don't receive any PMs from mentions on my forum and from some comments here this is how it works). You could also disable the emails if you don't find how to change that, then you only get one e-mail from the PM at least.

Quote from: kevq on September 18, 2015, 11:46:52 AM
Nope, no errors. The theme I'm using is "Redsy" http://custom.simplemachines.org/themes/index.php?lemma=2833 (http://custom.simplemachines.org/themes/index.php?lemma=2833) I've customised the CSS to theme it with my site, that's all I've changed.

I've ran the parser, but I see no mention of menu editing I'm running 2.0.10.

Thanks.
You could try asking the theme author for how to change this then. (I don't really have time to install a new theme just to see how it is, sorry :P)
Title: Re: @mention members
Post by: Gluz on September 18, 2015, 07:21:44 PM
The Theme Redsy hide the forum Profile dropdown from the Menu bar, and creates it's own, that's why it doesn't show.

And as this mod work with integration hooks, I'm not really sure if it need to call something else in Subs.php to get the code you added there in "My Messages".

The alternative is search in index.css:
#button_logout, #button_profile {
    display: none;
}

and replace with:
#button_logout {
    display: none;
}

Then you will have the original SMF Profile dropdown with the Mentions and the number of mentions.
Title: Re: @mention members
Post by: Jingaling on September 19, 2015, 01:09:07 PM
Quote from: Fortytwo on September 18, 2015, 04:26:18 PM
You could try asking the theme author for how to change this then. (I don't really have time to install a new theme just to see how it is, sorry :P)

I completely understand. I'll see if I can get hold of the theme author for assistance.

Thanks!
Title: Re: @mention members
Post by: noobest on September 21, 2015, 10:43:23 AM
Quote from: kevq on September 18, 2015, 10:17:11 AM
Hi guys,

I've just started using this on my forum, and it's working great. @mentions are fine, and users are getting emails about them. However, they don't seem to be getting the "alert" (like a PM) on the actual site itself. There isn't even an option for "mentions" in my profile drop-down as you can see below:

(http://i.imgur.com/BCV1rDl.png)

I'm sure it's probably a problem with my theme, but any help would be appreciated.

Thanks.

Hi, I had the same issue with Redsy theme and I think I've managed to solve it.

Edit index.template.php from Redsy theme and do as follows:

function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;


Add $menu_buttons, $user_settings:

function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings, $menu_buttons, $user_settings;


Then search:

<span>', $context['user']['name'], '</span> <span class="caret"></span>

And replace it with:

<span>', $context['user']['name'] , $menu_buttons['profile']['title'] .=  (!empty($user_settings['unread_mentions']) ? ' [' . $user_settings['unread_mentions'] . ']' : ''),'</span> <span class="caret"></span>

I'm not an expert, if someone finds any error please tell me.

Hope it helps.  :)
Title: Re: @mention members
Post by: Jingaling on September 21, 2015, 12:03:30 PM
Quote from: noobest on September 21, 2015, 10:43:23 AM
Hi, I had the same issue with Redsy theme and I think I've managed to solve it.

Thanks for the reply buddy. I've made those changes, and we are making progress, as you can see below, the [1] is now present when there's a mention. However, the "Mentions" menu still isn't present. Am I missing something?

(http://i.imgur.com/Kayn2pS.png)

Thanks!
Title: Re: @mention members
Post by: noobest on September 23, 2015, 03:20:05 AM
Quote from: kevq on September 21, 2015, 12:03:30 PM
Quote from: noobest on September 21, 2015, 10:43:23 AM
Hi, I had the same issue with Redsy theme and I think I've managed to solve it.

Thanks for the reply buddy. I've made those changes, and we are making progress, as you can see below, the [1] is now present when there's a mention. However, the "Mentions" menu still isn't present. Am I missing something?

(http://i.imgur.com/Kayn2pS.png)

Thanks!



Hi kevq, lets modify index.template.php again.

Search this:

<li class="divider"></li>

Add before:

<li><a href="' , $scripturl , '?action=profile;area=mentions"><i class="fa fa-comments fa-fw"></i>' , $txt['mentions'] , $menu_buttons['mentions']['title'] .=  (!empty($user_settings['unread_mentions']) ? ' [' . $user_settings['unread_mentions'] . ']' : ''),'</a></li>

Again, I don't guarantee this is the correct way as I'm not a professional programmer. Any advice will be welcomed.
Title: Re: @mention members
Post by: Jingaling on September 23, 2015, 04:33:09 AM
Quote from: noobest on September 23, 2015, 03:20:05 AM
Hi kevq, lets modify index.template.php again.

Search this:

<li class="divider"></li>

Add before:

<li><a href="' , $scripturl , '?action=profile;area=mentions"><i class="fa fa-comments fa-fw"></i>' , $txt['mentions'] , $menu_buttons['mentions']['title'] .=  (!empty($user_settings['unread_mentions']) ? ' [' . $user_settings['unread_mentions'] . ']' : ''),'</a></li>

Again, I don't guarantee this is the correct way as I'm not a professional programmer. Any advice will be welcomed.

That worked perfectly, thank you so much for the assistance, really appreciated!

(http://i.imgur.com/YpzFRUL.png)
Title: Re: @mention members
Post by: FireDitto on September 26, 2015, 12:12:58 AM
Quote from: FireDitto on May 29, 2015, 04:41:08 AM
I was wondering; Is there any chance of this being expanded to tag membergroups, by any chance?

Thanks!

I'd still love this added feature, if possible :)
Title: Re: @mention members
Post by: Koda on September 27, 2015, 07:09:56 PM
Awesome mod!

Are there any plans to enable PM sending or a homepage notification of tags?  Email is great but I do not want to be sending too many emails to my members, and would rather PMs or something like the "show unread posts" tab at the top of the forum.  Great mod either way though, thank you!
Title: Re: @mention members
Post by: zapiy on October 05, 2015, 02:00:14 PM
Quote from: zapiy on January 31, 2015, 07:53:44 AM
Getting loads of errors like

Apply Filter: Only show the error messages of this URL
http://www.>>>>>>>>>>/index.php?action=register
Apply Filter: Only show the errors with the same message
8: Undefined index: title
Apply Filter: Only show the errors from this file
File: /var/www/vhosts/>>>>>>>>>>>>>>>>>>>>co.uk/httpdocs/Sources/Mentions.php
Line: 45


Also we get no alerts that someone has been mentioned, i assume the above is linked to that?

Any help please?

Still getting these errors by the bucket load, any help please guys?
Title: Re: @mention members
Post by: noobest on October 06, 2015, 03:42:06 PM
Quote from: kevq on September 23, 2015, 04:33:09 AM
Quote from: noobest on September 23, 2015, 03:20:05 AM
Hi kevq, lets modify index.template.php again.

Search this:

<li class="divider"></li>

Add before:

<li><a href="' , $scripturl , '?action=profile;area=mentions"><i class="fa fa-comments fa-fw"></i>' , $txt['mentions'] , $menu_buttons['mentions']['title'] .=  (!empty($user_settings['unread_mentions']) ? ' [' . $user_settings['unread_mentions'] . ']' : ''),'</a></li>

Again, I don't guarantee this is the correct way as I'm not a professional programmer. Any advice will be welcomed.

That worked perfectly, thank you so much for the assistance, really appreciated!

(http://i.imgur.com/YpzFRUL.png)

Hey mate, got some news. Checking the Error Log I noticed some mistakes after editing our index.template.php, check it out and you will see four "undefined index" errors with "title", "profile" and "mentions". May they weren't fatal errors but I managed to fix it.

We don't need anything related to $menu_buttons so delete $menu_buttons from:

function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings, $menu_buttons, $user_settings;


Like this:

function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings, $user_settings;



Find:

<span>', $context['user']['name'] , $menu_buttons['profile']['title'] .=  (!empty($user_settings['unread_mentions']) ? ' [' . $user_settings['unread_mentions'] . ']' : ''),'</span> <span class="caret"></span>

And again, lets delete that $menu_buttons:

<span>', $context['user']['name'] , (!empty($user_settings['unread_mentions']) ? ' [' . $user_settings['unread_mentions'] . ']' : ''),'</span> <span class="caret"></span>

Same here:

<li><a href="' , $scripturl , '?action=profile;area=mentions"><i class="fa fa-comments fa-fw"></i>' , $txt['mentions'] , $menu_buttons['mentions']['title'] .=  (!empty($user_settings['unread_mentions']) ? ' [' . $user_settings['unread_mentions'] . ']' : ''),'</a></li>

Fixed:

<li><a href="' , $scripturl , '?action=profile;area=mentions"><i class="fa fa-comments fa-fw"></i>' , $txt['mentions'] , (!empty($user_settings['unread_mentions']) ? ' [' . $user_settings['unread_mentions'] . ']' : ''),'</a></li>

Cheers!  ;)


Title: Re: @mention members
Post by: Yorel on November 10, 2015, 01:35:02 PM
Hi all:

We just installed the mod in our forum (2.0.7) but several issues. It doesn't auto-complete the nick of the users, do I have to install the js libraries in the forum as well?. When I install I got this screen:

(http://i.imgbox.com/UrQhegQ9.png)

In step 8 it appears jump file and 9, 10 Extract tree, it seems there is several problems when installing the mod (although the installation process is successfully after all).

Thanks for the help
Title: Re: @mention members
Post by: margarett on November 10, 2015, 05:34:30 PM
First things first, you should really update your forum as you're several versions behind.

About the installation, there's nothing wrong. The MOD is just skipping (in step 8) that file because you don't have it in your system (and you don't need it). It seems that there are no errors in the installation.

This MOD heavily depends on JavaScript, most likely you have other MOD which is causing conflicts with this one... Use your browser's developer tools to check for any obvious errors.
Title: Re: @mention members
Post by: omen666 on November 13, 2015, 05:42:05 PM
No errors for me works absolutely fine expect for one thing.  When you view the mention in testing via the profile and look at the post it still says that you have 1 notification/mention.  It does not remove the number 1 even though you have looked at the post/thread.  Even if I delete the thread it says that there is 1 mention
Title: Re: @mention members
Post by: omen666 on November 13, 2015, 07:53:47 PM
Quote from: omen666 on November 13, 2015, 05:42:05 PM
No errors for me works absolutely fine expect for one thing.  When you view the mention in testing via the profile and look at the post it still says that you have 1 notification/mention.  It does not remove the number 1 even though you have looked at the post/thread.  Even if I delete the thread it says that there is 1 mention
Seems they disappear after a while?
Title: Re: @mention members
Post by: Yorel on November 14, 2015, 03:21:04 PM
@margarett, thanks for answering. It's already fixed, I didn't realize about the text in Mentions area (Please remember to set permissions to allow individual members to mention others). Once I allowed to mention to the group we could mention other members.

Next time I got to read everything  :-\
Title: Re: @mention members
Post by: Yorel on November 16, 2015, 02:45:03 AM
Quote from: Dragooon on May 02, 2014, 03:08:07 PM
Simply @Brunó Algum should do the trick? Are you sure that doesn't work?

EDIT: Just tried with the same username on localhost, worked just fine for me. Make sure the name is exactly the same and the user can see the post he/she is being mentioned in and that you're not mentioning yourself

Hi Dragooon

In this post you said mention to users with space works and it does because we got several users with username that begins with "El[space]xxxx". If you write @el the mod suggests you several nicks with and without spaces but not the name we are looking for El Guñi.

The nick of this user, El Guñi, is correct in the database (I just confirmed it), the post could be seen by the user...I wrote the whole nick @El Guñi and hit the Post button but it didn't work either.

Now we got 2.0.11 version
Title: Re: @mention members
Post by: Yorel on November 17, 2015, 03:34:54 AM
Un update about my last post.

We found out nicks with space works, when you write down 'el' the mod shows you 10 users that match that string. The problem is when you hit space button those 10 users dissappear and, moreover, if the user you are looking for isn't in the list of those 10 users you can't mention him/her.

Regards
Title: Re: @mention members
Post by: Leinnan on December 13, 2015, 07:19:27 PM
How to get number of unreaded mentions in index.template.php?
Title: Re: @mention members
Post by: ZamaTata on December 14, 2015, 12:06:57 PM
Very nice mod.. working fine in 2.0.11
Title: Re: @mention members
Post by: Sigyn on January 10, 2016, 09:05:56 AM
Quote from: Sigyn on June 22, 2014, 07:34:19 AM
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).
I am still having this issue with the ' in names being unable to be tagged. Is there a solution to this problem? *Edit* And if not, is there a way to make the dropdown of names display with the first letter of a name? Ex. @A would result in a drop down of names that start with "A"?
Title: Re: @mention members
Post by: Shambles on January 17, 2016, 02:14:02 PM
Quick question.

Is use of the accompanying bbcode [mention=nn]...[/mention] intended to cause/force a mention, or is that there just to provide a @mention link with no notifications?

Great mod BTW... slick and highly useful.
Title: Re: @mention members
Post by: br360 on January 17, 2016, 03:29:44 PM
Quote from: Sigyn on January 10, 2016, 09:05:56 AM
Quote from: Sigyn on June 22, 2014, 07:34:19 AM
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).
I am still having this issue with the ' in names being unable to be tagged. Is there a solution to this problem? *Edit* And if not, is there a way to make the dropdown of names display with the first letter of a name? Ex. @A would result in a drop down of names that start with "A"?

If you are using version 1.1.2, try uninstalling it and then install 1.1.3. Usernames like Z'lud should work with that one. Here is the link to download 1.1.3- http://www.simplemachines.org/community/index.php?topic=522005.msg3766946#msg3766946
Title: Re: @mention members
Post by: aegersz on January 17, 2016, 08:28:09 PM
i forgot the Permissions changes need to be done but now it's done and running well.

handy mod.

thanks.
Title: Re: @mention members
Post by: Sigyn on January 18, 2016, 01:30:21 AM
Quote from: br360 on January 17, 2016, 03:29:44 PM
Quote from: Sigyn on January 10, 2016, 09:05:56 AM
Quote from: Sigyn on June 22, 2014, 07:34:19 AM
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).
I am still having this issue with the ' in names being unable to be tagged. Is there a solution to this problem? *Edit* And if not, is there a way to make the dropdown of names display with the first letter of a name? Ex. @A would result in a drop down of names that start with "A"?

If you are using version 1.1.2, try uninstalling it and then install 1.1.3. Usernames like Z'lud should work with that one. Here is the link to download 1.1.3- http://www.simplemachines.org/community/index.php?topic=522005.msg3766946#msg3766946
I had 1.1.2 installed, and apparently 1.1.3 as well. So I uninstalled both and the information included with the installs and reinstalled that version. I am still having the issue where the drop down doesn't show up for names with ' in them. If I want them to show I have to manually type in the @Member Name.


I would be more than happy to allow someone access to the admin section, but the installs have no errors when applied to my forum.
Title: Re: @mention members
Post by: roza on January 18, 2016, 02:21:00 PM
I believe this mod is a must-have one for the large communities so thank you Dragooon for making this. My forum language is utf-8 one and It's layout is RTL . I've tried both versions 1.1.2 and 1.1.3 but None of them showed active suggestions. I also tried the new content for mentions.js file with no success. Wondering where to look for the problem? Thanks in advance.
Title: Re: @mention members
Post by: Sigyn on January 22, 2016, 06:32:09 AM
Quote from: Sigyn on January 18, 2016, 01:30:21 AM
Quote from: br360 on January 17, 2016, 03:29:44 PM
Quote from: Sigyn on January 10, 2016, 09:05:56 AM
Quote from: Sigyn on June 22, 2014, 07:34:19 AM
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).
I am still having this issue with the ' in names being unable to be tagged. Is there a solution to this problem? *Edit* And if not, is there a way to make the dropdown of names display with the first letter of a name? Ex. @A would result in a drop down of names that start with "A"?

If you are using version 1.1.2, try uninstalling it and then install 1.1.3. Usernames like Z'lud should work with that one. Here is the link to download 1.1.3- http://www.simplemachines.org/community/index.php?topic=522005.msg3766946#msg3766946
I had 1.1.2 installed, and apparently 1.1.3 as well. So I uninstalled both and the information included with the installs and reinstalled that version. I am still having the issue where the drop down doesn't show up for names with ' in them. If I want them to show I have to manually type in the @Member Name.


I would be more than happy to allow someone access to the admin section, but the installs have no errors when applied to my forum.
I should mention, those who have spaces in parts of their name are able to be looked up, but still not those with apostrophes. We use UTF-8.
Title: Re: @mention members
Post by: Shambles on January 22, 2016, 06:41:17 AM
Try this change:

Sources/Mentions.php

Code (Find) Select
foreach ($matches as $match)
{
$match = preg_split('/([^\w])/', $match, -1, PREG_SPLIT_DELIM_CAPTURE);
for ($i = 1; $i <= count($match); $i++)
$names[] = htmlspecialchars(trim(implode('', array_slice($match, 0, $i))));
}


Code (Replace) Select

foreach ($matches as $match)
{
$match = preg_split('/([^\w])/', $match, -1, PREG_SPLIT_DELIM_CAPTURE);
for ($i = 1; $i <= count($match); $i++)
$names[] = trim(implode('', array_slice($match, 0, $i)));
}
Title: Re: @mention members
Post by: Sigyn on January 22, 2016, 07:46:55 AM
Quote from: Shambles on January 22, 2016, 06:41:17 AM
Try this change:

Sources/Mentions.php

Code (Find) Select
foreach ($matches as $match)
{
$match = preg_split('/([^\w])/', $match, -1, PREG_SPLIT_DELIM_CAPTURE);
for ($i = 1; $i <= count($match); $i++)
$names[] = htmlspecialchars(trim(implode('', array_slice($match, 0, $i))));
}


Code (Replace) Select

foreach ($matches as $match)
{
$match = preg_split('/([^\w])/', $match, -1, PREG_SPLIT_DELIM_CAPTURE);
for ($i = 1; $i <= count($match); $i++)
$names[] = trim(implode('', array_slice($match, 0, $i)));
}

After applying the edit; no change to the ability to tag those with ' in their names.
Title: Re: @mention members
Post by: roza on January 30, 2016, 11:51:16 AM
QuoteI believe this mod is a must-have one for the large communities so thank you Dragooon for making this. My forum language is utf-8 one and It's layout is RTL . I've tried both versions 1.1.2 and 1.1.3 but None of them showed active suggestions. I also tried the new content for mentions.js file with no success. Wondering where to look for the problem? Thanks in advance.

In addition to my above post I should say that if I mention a user just with the user@ format(instead of @user format), it will work and the user will received email and profile notifications. But still the drop down suggestions is not shown when mentioning.
Any opinion or comment on this issue would be appreciated. I use smf 2.0.11 with customized default curve theme and my installed mods are as follow:


1.   @mention members   1.1.3
2.   Private Profile   0.3.2
3.   PM Warning   1.0
4.   Highslide Image Viewer   1.7
5.   Dynamic_Memberlist   3.0
6.   Bookmarks   2.5
7.   Drafts   
8.   Change All Subjects   1.3
9.   CLAAN - Clickable Login Avatar & Name   1.2.2
10.   SA Chat   1.0a Rev120
11.   Reply Button In Every Post   1.0
12.   Say Thanks   1.3.3
13.   Theme Image Uploader   1.1.0
14.   SMF Gallery Lite   5.5.1
15.   Search Focus Dropdown   1.6.1
16.   Custom Copyright   1.0.4
17.   SMF 2.0.11 Update   1.0
18.   Board Icons   1.0
19.   Responsive Curve   1.0 Beta 5
20.   httpBL   2.5.1
21.   SimplePortal   2.3.6
Thanks in advance.
Title: Re: @mention members
Post by: aegersz on February 01, 2016, 07:16:38 AM
i have 76 mods all installed (some with minor bugs).

i agree, larger sites can really benefit by members not missing critical posts that pertain to them..
Title: Re: @mention members
Post by: butch2k on February 12, 2016, 05:02:51 PM
Quote from: Sigyn on January 22, 2016, 07:46:55 AM
Quote from: Shambles on January 22, 2016, 06:41:17 AM
Try this change:

Sources/Mentions.php

Code (Find) Select
foreach ($matches as $match)
{
$match = preg_split('/([^\w])/', $match, -1, PREG_SPLIT_DELIM_CAPTURE);
for ($i = 1; $i <= count($match); $i++)
$names[] = htmlspecialchars(trim(implode('', array_slice($match, 0, $i))));
}


Code (Replace) Select

foreach ($matches as $match)
{
$match = preg_split('/([^\w])/', $match, -1, PREG_SPLIT_DELIM_CAPTURE);
for ($i = 1; $i <= count($match); $i++)
$names[] = trim(implode('', array_slice($match, 0, $i)));
}

After applying the edit; no change to the ability to tag those with ' in their names.


use this code instead:


foreach ($matches as $match)
{
$match = preg_split('/([^\w])/', $match, -1, PREG_SPLIT_DELIM_CAPTURE);
for ($i = 1; $i <= count($match); $i++)
$names[] = htmlspecialchars(trim(implode('', array_slice($match, 0, $i))));
}
$names = array_unique(array_map('fix_apo', $names));


and add the following at the bottom of Mentions.php

function fix_apo($name){
return str_replace("'",'&#039;',$name);
}


it should do the trick, at least it does for me  ;)
Title: Re: @mention members
Post by: Sigyn on February 13, 2016, 12:38:30 PM
I added in your suggested code but it still refuses to find those with ' in their names. Perhaps I did it wrong? I'll attach the edited version of the Mentions.php code from Sources for anyone to look at if they wish.

Furthermore, some of the characters have a title before their name with an ' in the name, and while they display on the drop down if I search their title -- once I click it to insert the Mention it will display as  Weyrleader J instead of Weyrleader J'ren.
Title: Re: @mention members
Post by: Koppo on April 11, 2016, 07:02:15 AM
Hello,

I installed the mentions mod, it works fine. But I would like to make the mentions as an own button on the navigation bar. I am using the Core theme, i cant find any clue on how to edit the navigation bar as the wiki article seems outdated?! I cant find the code snippets related to the help article in index.template.php.

Would be great if someone could help me out  :'(

Regards
Title: Re: @mention members
Post by: Nícholas Carballo on April 24, 2016, 01:25:14 AM
Is there any chance to release a version for 1.1.x themes? Or someone could enlight me on how to do it? I want to add this feature on my forum.

Thanks.
Title: Re: @mention members
Post by: Arantor on April 24, 2016, 04:54:45 AM
It would need a complete rewrite to work on 1.1, which is largely not supported any more, I don't even know if it's getting security patches any more.
Title: Re: @mention members
Post by: James Gryphon on April 24, 2016, 10:50:06 PM
Quote from: Koppo on April 11, 2016, 07:02:15 AM
I installed the mentions mod, it works fine. But I would like to make the mentions as an own button on the navigation bar. I am using the Core theme, i cant find any clue on how to edit the navigation bar as the wiki article seems outdated?! I cant find the code snippets related to the help article in index.template.php.

Would be great if someone could help me out  :'(
Hey Koppo,
I made up a hack for my Core theme not too long ago to do just that. It's neither pretty nor likely follows approved coding practices, but if you want it anyway, I can take some time to go into the files I edited, figure out what I did and post the changes back here.

Right now my schedule's a little hectic, but I can get this done for you when I have some spare time this week (maybe Tuesday or Thursday).

~ James
Title: Re: @mention members
Post by: Arantor on April 24, 2016, 10:57:29 PM
Core theme in 2.0 does not require any changes to index.template.php since it's driven from the single menu code in setupMenuContext in Subs.php...
Title: Re: @mention members
Post by: Nícholas Carballo on April 25, 2016, 12:45:25 PM
Quote from: Arantor on April 24, 2016, 04:54:45 AM
It would need a complete rewrite to work on 1.1, which is largely not supported any more, I don't even know if it's getting security patches any more.
I'm sorry to hear that. SMF still releases security patches. I'm currently using 1.1.21
Would you recommend me to upgrade to 2.0? Would I need to change my theme or just adapt it?
Title: Re: @mention members
Post by: Arantor on April 25, 2016, 12:59:11 PM
SMF ha not patched some things in 1.1 and they won't ever be patched; if your host upgrades PHP, it probably won't work properly, as SMF 1.1 came out almost 10 years ago.

Upgrading to 2.0 should definitely be on the plans.
Title: Re: @mention members
Post by: Nícholas Carballo on April 25, 2016, 01:01:26 PM
Quote from: Arantor on April 25, 2016, 12:59:11 PM
SMF ha not patched some things in 1.1 and they won't ever be patched; if your host upgrades PHP, it probably won't work properly, as SMF 1.1 came out almost 10 years ago.

Upgrading to 2.0 should definitely be on the plans.
And what about my current theme?
Title: Re: @mention members
Post by: Arantor on April 25, 2016, 01:37:06 PM
The theme would need to be adapted, unfortunately, but depending on theme it might already have been converted.
Title: Re: @mention members
Post by: James Gryphon on April 28, 2016, 09:09:40 AM
All right, I have the Subs.php and Mentions.php files up, and here's what the hack I did looked like.

In Subs.php, I included this code right below the existing PM button.

Quote'pm' => array(
            'title' => $txt['pm_short'],
            'href' => $scripturl . '?action=pm',
            'show' => $context['allow_pm'],
            'sub_buttons' => array(
               'pm_read' => array(
                  'title' => $txt['pm_menu_read'],
                  'href' => $scripturl . '?action=pm',
                  'show' => allowedTo('pm_read'),
               ),
               'pm_send' => array(
                  'title' => $txt['pm_menu_send'],
                  'href' => $scripturl . '?action=pm;sa=send',
                  'show' => allowedTo('pm_send'),
                  'is_last' => true,
               ),
            ),
         ),
// Dirty mentions hack
'mentions' => array(
            'title' => 'Mentions',
            'href' => $scripturl . '?action=profile;area=mentions',
            'show' => !$user_info['is_guest'],
            'sub_buttons' => array(
            ),
         ),
      
That should add the Mention button to the menu bar. I believe the only thing that's needed to do after this is to edit the Mentions.php file to use the Mentions button instead of Profile. Look for the following text:
Quote$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'] . ']' : '');

And replace it with this:
Quote$menu_buttons['mentions']['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['mentions']['title'] .=  (!empty($user_settings['unread_mentions']) ? ' [' . $user_settings['unread_mentions'] . ']' : '');
l'm sure the code isn't pretty, and if you ever want to uninstall @mentions, you'll have to go back to these files later and remove these manually first. But it seemed to work for my forum.
Title: Re: @mention members
Post by: Arantor on April 28, 2016, 09:27:59 AM
Note that the 'tags' part in your Subs.php edit is for a different mod...
Title: Re: @mention members
Post by: James Gryphon on April 28, 2016, 09:33:15 AM
Good catch! I didn't notice (it's been a while since I've looked in or thought anything about those files, so I used the difference checker to help me out and didn't look too carefully at the results), but I'll remove that from the post ASAP.
Title: Re: @mention members
Post by: mktek on May 15, 2016, 05:31:58 PM
Hi Dragooon,

Thanks for this mod.

I use smf 2.0.x, mention 1.1.3

Language: Turkish ISO-8859-9

I'm having problems in the Turkish character. For example: "AL GÜLÜM"

How can I solve this problem?

Thanks...
Title: Re: @mention members
Post by: Miker1029 on May 23, 2016, 02:04:33 PM
Quote from: Steelio on June 30, 2014, 04:08:07 AM
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)));

I am Also Having this Problem, One of my test Accounts is "Black Death" and when you hit the Space the Drop-Down Goes away, I complete the Username (Death), and It doesn't send e-mail, Or make the "@Black Death" into a Clickable link...

Also, If I click the username in the drop down, It also Doesn't work, Same as above...

I searched here for "Space Username", and didn't see a fix.

Anyone have an Idea on how to fix this?

Thanks

Mike
Title: Re: @mention members
Post by: Gluz on June 01, 2016, 08:49:02 PM
Quote from: Miker1029 on May 23, 2016, 02:04:33 PM
I am Also Having this Problem, One of my test Accounts is "Black Death" and when you hit the Space the Drop-Down Goes away, I complete the Username (Death), and It doesn't send e-mail, Or make the "@Black Death" into a Clickable link...

Also, If I click the username in the drop down, It also Doesn't work, Same as above...

I searched here for "Space Username", and didn't see a fix.

Anyone have an Idea on how to fix this?

Thanks

Mike

Change the content of file /Themes/default/scripts/mentions.js to this (from the Github of the author):

/**
* Javascript interface for active suggestions while posting
*
* @author ******iz Garg <[email protected]>
* @copyright 2014 ******iz Garg
* @license Simplified BSD (2-Clause) License
*/

var mentionInit = function()
{
var fails = [];

var config = {
at: '@',
data: [],
show_the_at: true,
limit: 10,
callbacks: {
matcher: function(flag, subtext, should_start_with_space) {
var match = '', started = false;
var string = subtext.split('');
for (var i = 0; i < string.length; i++)
{
if (string[i] == flag && (!should_start_with_space || i == 0 || /[\s\n]/gi.test(string[i - 1])))
{
started = true;
match = '';
}
else if (started)
match = match + string[i];
}

if (match.length > 0)
return match;

return null;
},
remote_filter: function (query, callback) {
if (typeof query == 'undefined' || query.length < 2 || query.length > 60)
return;

for (i in fails)
if (query.substr(0, fails[i].length) == fails[i])
return;

$.ajax({
url: smf_scripturl + '?action=suggest;' + smf_sessvar + '=' + smf_sessid + ';xml',
method: 'GET',
data: {
search: query,
suggest_type: 'member'
},
success: function (data) {
var members = $(data).find('smf > items > item');
if (members.length == 0)
fails[fails.length] = query;

var callbackArray = [];
$.each(members, function (index, item) {
callbackArray[callbackArray.length] = {
name: $(item).text()
};
});

callback(callbackArray);
}
});
}
}
};

if (typeof $.fn.atwho == 'undefined' && typeof jQuery.fn.atwho != 'undefined')
{
var iframe = jQuery('#html_message');

if (typeof iframe[0] != 'undefined')
jQuery(iframe[0].contentDocument.body).atwho(config);
jQuery('textarea[name=message]').atwho(config);
}
else
{
var iframe = $('#html_message');
if (typeof iframe[0] != 'undefined')
$(iframe[0].contentDocument.body).atwho(config);
$('textarea[name=message]').atwho(config);
}
};

var atWhoElement = document.createElement('script');
atWhoElement.src = atwho_url;
atWhoElement.type = 'text/javascript';
atWhoElement.onload = mentionInit;

if (typeof $ == 'undefined' || (parseInt($.fn.jquery.substr(0, 1)) == 1 && parseInt($.fn.jquery.substr(2, 3)) < 8) || jQuery.fn.jquery != $.fn.jquery)
{
var scriptElement = document.createElement('script');
scriptElement.src = jquery_url;
scriptElement.type = 'text/javascript';

scriptElement.onload = function () {
document.body.appendChild(atWhoElement);
};

document.body.appendChild(scriptElement);
}
else
document.body.appendChild(atWhoElement);









Though this is not relevant for the issue with spaces in names, is worth to mention it and fix it (all from the author's Github).

In the /Sources/mentions.php file search:
if (count($matches[count($matches) - $i]) > 60)
{
$depth--;
break;
}


and replace for:
if (count($matches[count($matches) - $i]) > 60)
{
$depth--;
continue;
}



Find:
$subject = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_subject']);
$body = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_body']);
sendmail($mention['email_address'], $subject, $body);

and replace for:
$emailsubject = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_subject']);
$body = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_body']);
sendmail($mention['email_address'], $emailsubject, $body);



Find:
$subject = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_subject']);
$body = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_body']);
sendmail($row['email_address'], $subject, $body);

Replace for:
$emailsubject = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_subject']);
$body = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_body']);
sendmail($row['email_address'], $emailsubject, $body);



Find:
'base_href' => $scripturl . '?action=profile;area=tracking;sa=user;u=' . $memID,
Replace for:
'base_href' => $scripturl . '?action=profile;area=mentions;sa=user;u=' . $memID,
Title: Re: @mention members
Post by: Miker1029 on June 02, 2016, 05:07:45 PM
Ok, Good deal, Thanks for that!  Editing code now.

Mike
Title: Re: @mention members
Post by: Dream of Omnimaga on June 16, 2016, 11:26:17 PM
By the way, is this mod still being maintained? I was wondering because the bug mentioned at http://www.simplemachines.org/community/index.php?topic=522005.msg3748982#msg3748982 is still present in the latest version.
Title: Re: @mention members
Post by: Kindred on June 16, 2016, 11:32:37 PM
Last modification was May 2014... That bug was reported in sept 2014.
Title: Re: @mention members
Post by: Paracelsus on June 17, 2016, 03:48:28 AM
Quote from: Gluz on June 01, 2016, 08:49:02 PM
Quote from: Miker1029 on May 23, 2016, 02:04:33 PM
I am Also Having this Problem, One of my test Accounts is "Black Death" and when you hit the Space the Drop-Down Goes away, I complete the Username (Death), and It doesn't send e-mail, Or make the "@Black Death" into a Clickable link...

Also, If I click the username in the drop down, It also Doesn't work, Same as above...

I searched here for "Space Username", and didn't see a fix.

Anyone have an Idea on how to fix this?

Thanks

Mike

Change the content of file /Themes/default/scripts/mentions.js to this (from the Github of the author):

/**
* Javascript interface for active suggestions while posting
*
* @author ******iz Garg <[email protected]>
* @copyright 2014 ******iz Garg
* @license Simplified BSD (2-Clause) License
*/

var mentionInit = function()
{
var fails = [];

var config = {
at: '@',
data: [],
show_the_at: true,
limit: 10,
callbacks: {
matcher: function(flag, subtext, should_start_with_space) {
var match = '', started = false;
var string = subtext.split('');
for (var i = 0; i < string.length; i++)
{
if (string[i] == flag && (!should_start_with_space || i == 0 || /[\s\n]/gi.test(string[i - 1])))
{
started = true;
match = '';
}
else if (started)
match = match + string[i];
}

if (match.length > 0)
return match;

return null;
},
remote_filter: function (query, callback) {
if (typeof query == 'undefined' || query.length < 2 || query.length > 60)
return;

for (i in fails)
if (query.substr(0, fails[i].length) == fails[i])
return;

$.ajax({
url: smf_scripturl + '?action=suggest;' + smf_sessvar + '=' + smf_sessid + ';xml',
method: 'GET',
data: {
search: query,
suggest_type: 'member'
},
success: function (data) {
var members = $(data).find('smf > items > item');
if (members.length == 0)
fails[fails.length] = query;

var callbackArray = [];
$.each(members, function (index, item) {
callbackArray[callbackArray.length] = {
name: $(item).text()
};
});

callback(callbackArray);
}
});
}
}
};

if (typeof $.fn.atwho == 'undefined' && typeof jQuery.fn.atwho != 'undefined')
{
var iframe = jQuery('#html_message');

if (typeof iframe[0] != 'undefined')
jQuery(iframe[0].contentDocument.body).atwho(config);
jQuery('textarea[name=message]').atwho(config);
}
else
{
var iframe = $('#html_message');
if (typeof iframe[0] != 'undefined')
$(iframe[0].contentDocument.body).atwho(config);
$('textarea[name=message]').atwho(config);
}
};

var atWhoElement = document.createElement('script');
atWhoElement.src = atwho_url;
atWhoElement.type = 'text/javascript';
atWhoElement.onload = mentionInit;

if (typeof $ == 'undefined' || (parseInt($.fn.jquery.substr(0, 1)) == 1 && parseInt($.fn.jquery.substr(2, 3)) < 8) || jQuery.fn.jquery != $.fn.jquery)
{
var scriptElement = document.createElement('script');
scriptElement.src = jquery_url;
scriptElement.type = 'text/javascript';

scriptElement.onload = function () {
document.body.appendChild(atWhoElement);
};

document.body.appendChild(scriptElement);
}
else
document.body.appendChild(atWhoElement);









Though this is not relevant for the issue with spaces in names, is worth to mention it and fix it (all from the author's Github).

In the /Sources/mentions.php file search:
if (count($matches[count($matches) - $i]) > 60)
{
$depth--;
break;
}


and replace for:
if (count($matches[count($matches) - $i]) > 60)
{
$depth--;
continue;
}



Find:
$subject = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_subject']);
$body = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_body']);
sendmail($mention['email_address'], $subject, $body);

and replace for:
$emailsubject = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_subject']);
$body = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_body']);
sendmail($mention['email_address'], $emailsubject, $body);



Find:
$subject = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_subject']);
$body = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_body']);
sendmail($row['email_address'], $subject, $body);

Replace for:
$emailsubject = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_subject']);
$body = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_body']);
sendmail($row['email_address'], $emailsubject, $body);



Find:
'base_href' => $scripturl . '?action=profile;area=tracking;sa=user;u=' . $memID,
Replace for:
'base_href' => $scripturl . '?action=profile;area=mentions;sa=user;u=' . $memID,


Hi, unfortunately these changes don't solve the problem on tagging those with ' in their names, which has been reported by other users.

Can anyone find an effective solution for this?
Title: Re: @mention members
Post by: Miker1029 on June 17, 2016, 04:21:03 PM
Ya didn't work for me either, I even went to the GIT to see if I could find the Info, and nothing, and DL'd the ZIP from the GIT to try and resolve the issues, Guessing maybe It's not supported anymore, Really Dunno, Shame, It's a Nice MOD, With a Few Bug Fixes it'd be a Long Standing MOD, But as It stands the SPACE thing really is a Killer, As I've got 2600+ Users and Unfortunately didn't set things up for No Space in Users.....

If anyone else has Any ideas it'd be Appreciated..

Mike
Title: Re: @mention members
Post by: Boskonovic on June 28, 2016, 03:35:29 AM
Hello!

First of all Thank you for this Mod, really useful and future-oriented, something which would be absolutely needed in the 2.1.

I have one question:

I would like to expand the profile page where the mentions are displayed, to show their Status (read or new).
In the DB we have the "unseen" column, which is 0/1 and i would like to translate it to a string when displaying the mention list.

I tried to take a look at the "$ListOptions" variable and i have been able to include the new header and the column as well, but i don't know how to convert the boolean value to a string, inside this variable, using the different methods available in the List template (http://wiki.simplemachines.org/smf/Generic_List).


Let me know if the question is not clear enough.

Thank You
Title: Re: @mention members
Post by: Boskonovic on July 03, 2016, 06:29:06 AM
Hello!

I have been able to solve my issue, by using the "function" callback method.

I have also completed the translation to Italian (both standard and utf-8).
A piece of the strings is included directly in the "install-english.xml".

Best Regards
Title: Re: @mention members
Post by: tjbalon on July 05, 2016, 02:00:32 AM
For any of you dealing with users unable to visit previous mentions from their profile (action=profile;area=mentions) here's a quick fix you can perform in Sources/Mentions.php

Replace line 405 with:
'base_href' => $scripturl . '?action=profile;area=mentions',
Title: Re: @mention members
Post by: Parenting-Furkids on August 26, 2016, 11:33:27 AM
I installed this mod with no issues or warnings that there were any problems.  Long story short... decided to uninstall mod.  No issues with the actual uninstall. 
However, members kept getting fatal errors.  It looks like pieces of the mod were left behind when the mod was uninstalled.
I didn't want to mess with file pieces, code, etc. so I restored my forum to a previous working back-up.  That didn't fix the fatal errors. 
I have been removing the line of code that is mentioned in the fatal error messages.  Is that a good thing to do, or am I only asking for trouble? 
Title: Re: @mention members
Post by: JerzyLS on August 26, 2016, 01:40:19 PM
QuoteIs that a good thing to do, or am I only asking for trouble?

Let's paste here the error log and file.
Title: Re: @mention members
Post by: br360 on August 26, 2016, 01:45:42 PM
You should be removing any bit of code left behind from the mod- but you should make sure you remove all of it from any files that were edited because of the mod.

To make sure you are removing all code, go to the page where you would download it, and then look for "Manual Install Instructions for SMF"

Find your version in the drop down list and then press the parse button. Then just reverse everything you see in the instructions (the parse shows how to manually install, and you are doing the opposite)

Make sure to back up first just in case you accidentally remove more code than you should in any of the files
Title: Re: @mention members
Post by: Oceander on August 29, 2016, 06:34:08 AM
This is a very handy mod.  Thank you so much to the developer.

Not to be a whinger, but I would just say that it would be handy to be able to delete old mentions.  The usefulness is largely a one or two shot deal - which is huge, btw, so please don't take as a criticism - and I'm just a little worried my database may quickly fill up and start dragging since I know many of the members in the forum I manage are heavy @mention users.
Title: Re: @mention members
Post by: SychO on August 29, 2016, 11:52:08 AM
members getting fake mentions (inexistant, never actually mentioned)

Does anyone know how I can stop that from happening ?

Thanks.
Title: Re: @mention members
Post by: Parenting-Furkids on September 05, 2016, 01:01:29 PM
Quote from: br360 on August 26, 2016, 01:45:42 PM
You should be removing any bit of code left behind from the mod- but you should make sure you remove all of it from any files that were edited because of the mod.

To make sure you are removing all code, go to the page where you would download it, and then look for "Manual Install Instructions for SMF"

Find your version in the drop down list and then press the parse button. Then just reverse everything you see in the instructions (the parse shows how to manually install, and you are doing the opposite)

Make sure to back up first just in case you accidentally remove more code than you should in any of the files

Thanks!


Title: Re: @mention members
Post by: coltp45 on September 10, 2016, 06:38:37 PM
Hi, recently I installed the theme Exodus for smf 2.0.11 and installed mentions ok.  But when a user mention another no show the mention in the menu.

(http://i.imgur.com/CIZ6K8Z.png)

I need that the mention shows in the new perfil menu  mark with the red square.  Is posible do that?
Title: Re: @mention members
Post by: Kindred on September 10, 2016, 07:59:27 PM
If you install a new theme after installing mods, then you need to manually update that theme with any mod edits
Title: Re: @mention members
Post by: coltp45 on September 10, 2016, 10:07:17 PM
(http://i.imgur.com/q08vsBf.png)

Quote from: Kindred on September 10, 2016, 07:59:27 PM
If you install a new theme after installing mods, then you need to manually update that theme with any mod edits

First I install the theme and then the mod.  Install ok but I don't now what file need to be change in the new theme to show that you have mentions.

(http://i.imgur.com/23N6Vpf.png)
Title: Re: @mention members
Post by: coltp45 on September 11, 2016, 06:21:18 PM
Can't edit my post sorry.


(http://i.imgur.com/QnPE9Ae.png)

Title: Re: @mention members
Post by: lahmfan on October 25, 2016, 02:28:05 PM
Quote from: ExSpirit on May 29, 2014, 09:13:49 AM
When someone does the mention in topic every time someone opens that topis I get strange error in my error log files:

QuoteUndefined index: online
File: /usr/home/public_html/Themes/default/languages/Mentions.english.php (main sub template - eval?)
Line: 275

In my Display.template.php I am using $message['member']['online']['is_online'] to check is user is online or not and that works, but I don't know why this error is shown.
have you gotten a response to this?
Title: Re: @mention members
Post by: d3vcho on October 25, 2016, 02:32:06 PM
The solution might be to disable template evals (Admin > Configuration > Server Settings > General > Disable evaluation of templates) as its doesn't exactly tells you where the errors are.

Regards :)
Title: Re: @mention members
Post by: lahmfan on October 25, 2016, 02:37:14 PM
Quote from: d3vcho on October 25, 2016, 02:32:06 PM
The solution might be to disable template evals (Admin > Configuration > Server Settings > General > Disable evaluation of templates) as its doesn't exactly tells you where the errors are.

Regards :)
i love you, thank you!
Title: Re: @mention members
Post by: Kindred on October 25, 2016, 06:27:33 PM
probably because $message is not a valid array in whatever file is calling it.
What works in Display.template.php will probably NOT work in any other file - almost definitely NOT in a language file
Title: Re: @mention members
Post by: James Gryphon on October 26, 2016, 05:27:48 PM
After creating a new SMF 2.0.12 forum some time ago, I installed the mod and applied the hack I previously described here (http://www.simplemachines.org/community/index.php?topic=522005.msg3872249#msg3872249) to get the Mentions button in the menu bar.

I just noticed not too long ago, though, that the Mentions button doesn't light up when you're at that page; instead, the Profile button does. It seemed like I was able to fix this on a SMF 2.0.11 forum some time ago, but I don't remember what I did, or if anything's changed in .12 that would mess my fix up.

I wondered if it had to do with "Mentions" being an 'area' that's listed under the Profile action, and if creating a new action would help, but I don't have the foggiest where to start doing that, if that is the trouble.

I've burned a few hours at this and haven't gotten anywhere, so I figured that it was worth asking about it here. Thanks in advance for any help y'all can provide.
Title: Re: @mention members
Post by: GL700Wing on October 29, 2016, 12:02:12 AM
Quote from: James Gryphon on October 26, 2016, 05:27:48 PM
After creating a new SMF 2.0.12 forum some time ago, I installed the mod and applied the hack I previously described here (http://www.simplemachines.org/community/index.php?topic=522005.msg3872249#msg3872249) to get the Mentions button in the menu bar.

I just noticed not too long ago, though, that the Mentions button doesn't light up when you're at that page; instead, the Profile button does. It seemed like I was able to fix this on a SMF 2.0.11 forum some time ago, but I don't remember what I did, or if anything's changed in .12 that would mess my fix up.

I wondered if it had to do with "Mentions" being an 'area' that's listed under the Profile action, and if creating a new action would help, but I don't have the foggiest where to start doing that, if that is the trouble.

I've burned a few hours at this and haven't gotten anywhere, so I figured that it was worth asking about it here. Thanks in advance for any help y'all can provide.

I had the same problem and it occurs because the Mentions mod installs a line of code too high up in an array in both Sources/Admin.php and Sources/ManageSettings.php.

Search for the word mentions in Sources/Admin.php and move the 'mentions' line to after the 'general' line as follows:
                        'general' => array($txt['mods_cat_modifications_misc']),
                        'mentions' => array($txt['mentions']),


Search for the word mentions in Sources/ManageSettings.php and move the 'mentions' line to after the 'general' line as follows:
        'general' => 'ModifyGeneralModSettings',
        'mentions' => 'ModifyMentionsSettings',
Title: Re: @mention members
Post by: James Gryphon on October 29, 2016, 05:17:27 AM
I'm sorry to be a hassle, friend, but I checked those files and it looks like both of those files are already good. :-\ That being the case, I'm at a loss what could be off. It seems like this whole process is rather finicky.
Title: Re: @mention members
Post by: GL700Wing on October 29, 2016, 09:58:05 AM
Quote from: James Gryphon on October 29, 2016, 05:17:27 AM
I'm sorry to be a hassle, friend, but I checked those files and it looks like both of those files are already good. :-\ That being the case, I'm at a loss what could be off. It seems like this whole process is rather finicky.
I misunderstood your problem initially but I think I may have found the solution!

In Sources/Subs.php search for
    if (isset($context['menu_buttons'][$context['current_action']]))
        $current_action = $context['current_action'];


and replace it with:
    if (!empty($_GET['action']) && !empty($_GET['area']) && $_GET['action'] == 'profile' && $_GET['area'] == 'mentions')
        $current_action = 'mentions';
    elseif (isset($context['menu_buttons'][$context['current_action']]))
        $current_action = $context['current_action'];

Title: Re: @mention members
Post by: James Gryphon on October 29, 2016, 03:00:00 PM
It works beautifully! Thanks so much for the tweak. :)
Title: Re: @mention members
Post by: GL700Wing on October 29, 2016, 07:44:28 PM
Glad to be of assistance although I've just realised the following solution is much better (it puts the custom code after the if/elseif block) as it doesn't involve changing any existing lines of code which may cause issues for subsequent upgrades/mods ...

In Sources/Subs.php search for
    $current_action = 'moderate';

    $context['menu_buttons'][$current_action]['active_button'] = true;


and replace it with:
    $current_action = 'moderate';

    if (!empty($_GET['action']) && !empty($_GET['area']) && $_GET['action'] == 'profile' && $_GET['area'] == 'mentions')
        $current_action = 'mentions';

    $context['menu_buttons'][$current_action]['active_button'] = true;
Title: Re: @mention members
Post by: Kratos_ILM on December 01, 2016, 12:05:02 PM
Hey, I have a problem.

I install this mod, he told me installatin is ok and after thaI have this error :

Parse error: syntax error, unexpected T_ARRAY, expecting ')' in /home/nintendob/www/forum/Sources/Mentions.php on line 16

And I dont understand why :(

Can u help me ?
Title: Re: @mention members
Post by: d3vcho on December 01, 2016, 12:09:33 PM
Hello!

Can you please attach your file so we can have a look?

Regards :)
Title: Re: @mention members
Post by: Kratos_ILM on December 01, 2016, 12:10:59 PM
Yes ! It's this file !

Thx for help !
Title: Re: @mention members
Post by: d3vcho on December 01, 2016, 12:16:44 PM
The file seems correct in that line. Are you sure you didn't receive any errors while installing? I'd suggest reinstalling it.

Regards :)
Title: Re: @mention members
Post by: Kratos_ILM on December 01, 2016, 12:22:27 PM
I have this so I dont know why... :'(

And 4 installations, 4 fails !
Title: Re: @mention members
Post by: Kratos_ILM on December 01, 2016, 03:07:40 PM
U can't help me ? :(
Title: Re: @mention members
Post by: Kratos_ILM on December 03, 2016, 04:26:10 AM
Hello,

I up this topic, I dont have solution :(
Title: Re: @mention members
Post by: Shambles on December 03, 2016, 05:49:37 AM
The file you attached above will not produce the error you are seeing. Did you just attach what was in the mod package? If so, we need to see what is being executed on your website.
Title: Re: @mention members
Post by: memokal on December 05, 2016, 04:44:47 PM
Hello, i know i ask amateur questions. But it says you have to enable invidual members to mention others. But i cant find where can i enable it.

Help please
Title: Re: @mention members
Post by: br360 on December 05, 2016, 08:49:05 PM
Go to Admin>>Permissions>>General Permissions. Then under the General section, make sure that you check "Mention members." You are going to have to do this for each membergroup you have that you want to be able to @mention other members
Title: Re: @mention members
Post by: Sigyn on December 06, 2016, 05:18:35 PM
Quote from: Paracelsus on June 17, 2016, 03:48:28 AM
Quote from: Gluz on June 01, 2016, 08:49:02 PM
Quote from: Miker1029 on May 23, 2016, 02:04:33 PM
I am Also Having this Problem, One of my test Accounts is "Black Death" and when you hit the Space the Drop-Down Goes away, I complete the Username (Death), and It doesn't send e-mail, Or make the "@Black Death" into a Clickable link...

Also, If I click the username in the drop down, It also Doesn't work, Same as above...

I searched here for "Space Username", and didn't see a fix.

Anyone have an Idea on how to fix this?

Thanks

Mike

Change the content of file /Themes/default/scripts/mentions.js to this (from the Github of the author):

/**
* Javascript interface for active suggestions while posting
*
* @author ******iz Garg <[email protected]>
* @copyright 2014 ******iz Garg
* @license Simplified BSD (2-Clause) License
*/

var mentionInit = function()
{
var fails = [];

var config = {
at: '@',
data: [],
show_the_at: true,
limit: 10,
callbacks: {
matcher: function(flag, subtext, should_start_with_space) {
var match = '', started = false;
var string = subtext.split('');
for (var i = 0; i < string.length; i++)
{
if (string[i] == flag && (!should_start_with_space || i == 0 || /[\s\n]/gi.test(string[i - 1])))
{
started = true;
match = '';
}
else if (started)
match = match + string[i];
}

if (match.length > 0)
return match;

return null;
},
remote_filter: function (query, callback) {
if (typeof query == 'undefined' || query.length < 2 || query.length > 60)
return;

for (i in fails)
if (query.substr(0, fails[i].length) == fails[i])
return;

$.ajax({
url: smf_scripturl + '?action=suggest;' + smf_sessvar + '=' + smf_sessid + ';xml',
method: 'GET',
data: {
search: query,
suggest_type: 'member'
},
success: function (data) {
var members = $(data).find('smf > items > item');
if (members.length == 0)
fails[fails.length] = query;

var callbackArray = [];
$.each(members, function (index, item) {
callbackArray[callbackArray.length] = {
name: $(item).text()
};
});

callback(callbackArray);
}
});
}
}
};

if (typeof $.fn.atwho == 'undefined' && typeof jQuery.fn.atwho != 'undefined')
{
var iframe = jQuery('#html_message');

if (typeof iframe[0] != 'undefined')
jQuery(iframe[0].contentDocument.body).atwho(config);
jQuery('textarea[name=message]').atwho(config);
}
else
{
var iframe = $('#html_message');
if (typeof iframe[0] != 'undefined')
$(iframe[0].contentDocument.body).atwho(config);
$('textarea[name=message]').atwho(config);
}
};

var atWhoElement = document.createElement('script');
atWhoElement.src = atwho_url;
atWhoElement.type = 'text/javascript';
atWhoElement.onload = mentionInit;

if (typeof $ == 'undefined' || (parseInt($.fn.jquery.substr(0, 1)) == 1 && parseInt($.fn.jquery.substr(2, 3)) < 8) || jQuery.fn.jquery != $.fn.jquery)
{
var scriptElement = document.createElement('script');
scriptElement.src = jquery_url;
scriptElement.type = 'text/javascript';

scriptElement.onload = function () {
document.body.appendChild(atWhoElement);
};

document.body.appendChild(scriptElement);
}
else
document.body.appendChild(atWhoElement);









Though this is not relevant for the issue with spaces in names, is worth to mention it and fix it (all from the author's Github).

In the /Sources/mentions.php file search:
if (count($matches[count($matches) - $i]) > 60)
{
$depth--;
break;
}


and replace for:
if (count($matches[count($matches) - $i]) > 60)
{
$depth--;
continue;
}



Find:
$subject = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_subject']);
$body = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_body']);
sendmail($mention['email_address'], $subject, $body);

and replace for:
$emailsubject = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_subject']);
$body = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_body']);
sendmail($mention['email_address'], $emailsubject, $body);



Find:
$subject = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_subject']);
$body = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_body']);
sendmail($row['email_address'], $subject, $body);

Replace for:
$emailsubject = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_subject']);
$body = str_replace(array_keys($replacements), array_values($replacements), $txt['mentions_body']);
sendmail($row['email_address'], $emailsubject, $body);



Find:
'base_href' => $scripturl . '?action=profile;area=tracking;sa=user;u=' . $memID,
Replace for:
'base_href' => $scripturl . '?action=profile;area=mentions;sa=user;u=' . $memID,


Hi, unfortunately these changes don't solve the problem on tagging those with ' in their names, which has been reported by other users.

Can anyone find an effective solution for this?


I apologize if I missed the response to this despite my reading to the end of the thread... Has there been a solution yet? I never received a response to my uploaded code on page 23? I believe it was.
Title: Re: @mention members
Post by: James Gryphon on December 16, 2016, 07:51:50 AM
I have text at the top of the page in index.template.php that's designed to mimic the "You have x new messages" message from the Classic theme in SMF 1. That said, I've been trying to add mentions to it and it refuses to load the number. Have a look at the current code:

if ($context['user']['is_logged']) {
if ($context['user']['unread_messages'] == 0) {
if ($context['user']['is_logged'] == 0) // This is here for debugging purposes, to force the forum to use the second statement
echo '
<li id="name">', $txt['hello_member_ndt'], ' <em>', $context['user']['name'], '</em>! ', '<a href="', $scripturl, '?action=pm">', 'You have ', '0', ' new messages', '</a>', ' and ', '<a href="', $scripturl, '?action=profile;area=mentions">', '0', ' new mentions.', '</a></li>';
else echo '
<li id="name">', $txt['hello_member_ndt'], ' <em>', $context['user']['name'], '</em>! ', '<a href="', $scripturl, '?action=pm">', 'You have ', '0', ' new messages', '</a>', ' and ', ' <em>','<a href="', $scripturl, '?action=profile;area=mentions">', $context['member']['unread_mentions'], ' new mentions</em>.', '</a></li>'; }


If I substitute 'is_logged'  for 'unread_mentions' it reads it fine, displaying "1 new mentions". With 'unread_mentions', though, it's just left blank: "and new mentions".

What am I missing?
Title: Re: @mention members
Post by: Kindred on December 16, 2016, 08:58:56 AM
not every variable is loaded into the context array at every point in the code...

unread_messages has probably not been loaded at the point that you trigger this display.
Title: Re: @mention members
Post by: James Gryphon on December 16, 2016, 11:44:37 AM
Quote from: Kindred on December 16, 2016, 08:58:56 AM
unread_messages has probably not been loaded at the point that you trigger this display.
So, how can that be done?
Title: Re: @mention members
Post by: Kindred on December 16, 2016, 12:32:52 PM
figure out where it is loaded and either move your display to that point or move the loading to sooner...

I have no idea how to program it... I just know how to debug issues. :P

or forget about it. :D
Title: Re: @mention members
Post by: James Gryphon on December 16, 2016, 05:43:45 PM
Quote from: Kindred on December 16, 2016, 12:32:52 PM
figure out where it is loaded and either move your display to that point or move the loading to sooner...

I have no idea how to program it... I just know how to debug issues. :P

or forget about it. :D
I'm sorry to say that's not exactly helpful, when figuring out where/if it is loaded is my problem. ;)

Anyone else want to take a crack at it?
Title: Re: @mention members
Post by: ninjawarrior on January 08, 2017, 11:17:51 AM
This is a great mod, makes it more interactive.

However, would like to have permissions:
1. Limit the members/membergroups that can use this function
2. Disable some members from being tagged (eg. admin, mods etc.)
Title: Re: @mention members
Post by: B20 on January 09, 2017, 07:35:19 PM
Possibility of mentioning an entire membergroup would be nice

Quote from: ninjawarrior on January 08, 2017, 11:17:51 AM
This is a great mod, makes it more interactive.

However, would like to have permissions:
1. Limit the members/membergroups that can use this function
2. Disable some members from being tagged (eg. admin, mods etc.)
1. You can limit membergroups. Toggle it on membergroup permissions (General)
Title: Re: @mention members
Post by: Bob Perry of Web Presence Consulting on January 11, 2017, 11:53:54 AM
Quote from: B20 on January 09, 2017, 07:35:19 PM
Possibility of mentioning an entire membergroup would be nice

Quote from: ninjawarrior on January 08, 2017, 11:17:51 AM
This is a great mod, makes it more interactive.

However, would like to have permissions:
1. Limit the members/membergroups that can use this function
2. Disable some members from being tagged (eg. admin, mods etc.)
1. You can limit membergroups. Toggle it on membergroup permissions (General)

Yep, what he said, those options are already a part of the module located in the Permissions admin menu... each member group you have set up can be toggled on or off among other things if i remember, it is a great mod and you'll know if it is installed correctly if the auto-fill username lookup functions properly after you type in the @ sign and the first three characters of the user you wish to "mention"
Title: Re: @mention members
Post by: Bob Perry of Web Presence Consulting on January 12, 2017, 04:33:09 AM
Quote from: Bob Perry on January 11, 2017, 11:53:54 AM
Quote from: B20 on January 09, 2017, 07:35:19 PM
Possibility of mentioning an entire membergroup would be nice

Quote from: ninjawarrior on January 08, 2017, 11:17:51 AM
This is a great mod, makes it more interactive.

However, would like to have permissions:
1. Limit the members/membergroups that can use this function
2. Disable some members from being tagged (eg. admin, mods etc.)
1. You can limit membergroups. Toggle it on membergroup permissions (General)

Yep, what he said, those options are already a part of the module located in the Permissions admin menu... each member group you have set up can be toggled on or off among other things if i remember, it is a great mod and you'll know if it is installed correctly if the auto-fill username lookup functions properly after you type in the @ sign and the first three characters of the user you wish to "mention"

However, I don't think you can @membergroups by name of group, haven't tested that....
Title: Re: @mention members
Post by: Gluz on January 15, 2017, 07:40:36 PM
Quote from: Sigyn on December 06, 2016, 05:18:35 PM
I apologize if I missed the response to this despite my reading to the end of the thread... Has there been a solution yet? I never received a response to my uploaded code on page 23? I believe it was.
I installed this in another Forum, and tested with a username with ' in it.

Just one fix to the code in /Sources/Mentions.php:
Code (Search) Select
$body = htmlspecialchars_decode(preg_replace('~<br\s*/?\>~', "\n", str_replace('&nbsp;', ' ', $msgOptions['body'])), ENT_QUOTES);

Code (Replace) Select
$body = preg_replace('~<br\s*/?\>~', "\n", str_replace('&nbsp;', ' ', $msgOptions['body']));
Title: Re: @mention members
Post by: 420SA on January 22, 2017, 03:21:48 AM
I have a slight issue which has been going on for a while now. Its to do with the number next to the Profile button in the menu which indicates that I have an unread mention such as Profile[1]

That number won't disappear once i have viewed the mentions page or the post with the mention in it. No matter what I do it just doesn't disappear, unless I edit it in the database. This of course happens to members as well.

Anyone's assistance would be greatly appreciated
Title: Re: @mention members
Post by: Bob Perry of Web Presence Consulting on January 23, 2017, 10:33:31 AM
Quote from: 420SA on January 22, 2017, 03:21:48 AM
I have a slight issue which has been going on for a while now. Its to do with the number next to the Profile button in the menu which indicates that I have an unread mention such as Profile[1]

That number won't disappear once i have viewed the mentions page or the post with the mention in it. No matter what I do it just doesn't disappear, unless I edit it in the database. This of course happens to members as well.

Anyone's assistance would be greatly appreciated

In the mentions admin area section, what is the number in the first box that refers to removing the notice after such and such number of days?

Title: Re: @mention members
Post by: Route on February 09, 2017, 05:10:52 PM
Just installed it on latest version of SMF. When @mention someone in a post there is no notification on the user profile for example " Profile[1] ". How can i fix that?
Title: Re: @mention members
Post by: Adrek on February 09, 2017, 05:32:48 PM
maybe you have installed any Menu editor mod?
Title: Re: @mention members
Post by: Route on February 09, 2017, 05:39:27 PM
Quote from: phantomm on February 09, 2017, 05:32:48 PM
maybe you have installed any Menu editor mod?

Oh yea. Have menu editor lite. Didn't think that can be a issue with this 2 mods. Any idea how to fix that ?
Title: Re: @mention members
Post by: Adrek on February 09, 2017, 05:41:54 PM
don't think that lite version has option to show notification counters in menu - you also won't see numbers for new PM in menu
Title: Re: @mention members
Post by: Rosss on May 13, 2017, 01:02:34 PM
Hey guys, so I installed SMFPacks advanced editor, and this stopped working. I tried looking through everything and can't seem to find the reason why it won't work. Any help would be appreciated!
Title: Re: @mention members
Post by: ceekay27 on July 02, 2017, 04:15:52 PM
I have tried to install in on SMF 2.0.14 and it recommends that I don't install it. I'm new to the back end of forums, so will this ruin my forum if I do install it?
Title: Re: @mention members
Post by: br360 on July 02, 2017, 05:10:01 PM
Never install a mod that is giving you error warnings but what is the exact message you are getting when trying to install? 
Title: Re: @mention members
Post by: ceekay27 on July 05, 2017, 10:02:06 AM
Thanks for the reply. I decided to purchase one instead :)
Title: Re: @mention members
Post by: Sigyn on July 11, 2017, 02:48:17 PM
Quote from: Gluz on January 15, 2017, 07:40:36 PM
Quote from: Sigyn on December 06, 2016, 05:18:35 PM
I apologize if I missed the response to this despite my reading to the end of the thread... Has there been a solution yet? I never received a response to my uploaded code on page 23? I believe it was.
I installed this in another Forum, and tested with a username with ' in it.

Just one fix to the code in /Sources/Mentions.php:
Code (Search) Select
$body = htmlspecialchars_decode(preg_replace('~<br\s*/?\>~', "\n", str_replace('&nbsp;', ' ', $msgOptions['body'])), ENT_QUOTES);

Code (Replace) Select
$body = preg_replace('~<br\s*/?\>~', "\n", str_replace('&nbsp;', ' ', $msgOptions['body']));

I made this edit and cache refreshed my site before attempting to tag with a ' in it. The names do show up in the drop down, however clicking on them only inserts the part before the ' in the name.

For example, tagging a member named Br'lon only inserts @Br -spaceshere-
Title: Re: @mention members
Post by: aegersz on August 01, 2017, 05:33:01 PM
Hi, i checked my Scheduled Task log and this mod doesn't make an entry in the log at all.

is that normal ?
Title: Re: @mention members
Post by: br360 on August 01, 2017, 08:37:52 PM
Did you check to make sure that "Remove seen mentions" was enabled in your scheduled tasks?
Title: Re: @mention members
Post by: aegersz on August 01, 2017, 09:54:49 PM
yes I did and even ran it manually but still no entry in the log. can you check on your system to see if it does log at all please ?
Title: Re: @mention members
Post by: br360 on August 01, 2017, 10:23:21 PM
Sure, I will check now. How many days did you set in the mentions settings for "Remove mentions older than these days'?
Title: Re: @mention members
Post by: br360 on August 01, 2017, 10:28:24 PM
Just ran the task and I don't see any log entries either. Odd that there is no log but running the Remove seen mentions task did work as it should when I ran it
Title: Re: @mention members
Post by: Shambles on August 02, 2017, 04:12:51 AM
Scheduled tasks have to return boolean 'true' to be logged.

scheduled_removeMentions does not do that.

Sources/Mentions.php
Code (find) Select
function scheduled_removeMentions()
{
global $modSettings, $smcFunc;

$smcFunc['db_query']('', '
DELETE FROM {db_prefix}log_mentions
WHERE time < {int:time}
  AND unseen = 0',
array(
'time' => time() - ((!empty($modSettings['mentions_remove_days']) ? $modSettings['mentions_remove_days'] : 0) * 86400),
)
);
}



Code (Replace with) Select
function scheduled_removeMentions()
{
global $modSettings, $smcFunc;

$smcFunc['db_query']('', '
DELETE FROM {db_prefix}log_mentions
WHERE time < {int:time}
  AND unseen = 0',
array(
'time' => time() - ((!empty($modSettings['mentions_remove_days']) ? $modSettings['mentions_remove_days'] : 0) * 86400),
)
);

return true;
}
Title: Re: @mention members
Post by: Lord991 on August 11, 2017, 03:54:36 PM
Hi guys,

we are getting some errors from this mod lately, if there is some fix in topic can someone refer us to that. Thx so much.

Forum version: SMF 2.0.13

8: Undefined index: approved
File: /public_html/forum/Sources/Subs-Post.php
Line: 2416


On line 2416 there is:
==>2416: mentions_process_store($msgOptions['mentions'], $msgOptions['id'], $msgOptions['subject'], $msgOptions['approved']);
Title: Re: @mention members
Post by: Shambles on August 14, 2017, 07:24:16 AM
Quote from: aegersz on August 01, 2017, 05:33:01 PM
Hi, i checked my Scheduled Task log and this mod doesn't make an entry in the log at all.

Did you try the change I suggested above?

Quote from: Shambles on August 02, 2017, 04:12:51 AM
Scheduled tasks have to return boolean 'true' to be logged.
Title: Re: @mention members
Post by: Cruiser79 on August 16, 2017, 08:02:30 AM
Hi all.

New admin of a forum here, installed the mod yesterday.

I would like to know which code lines should I change in order to "translate" the new menu options to Greek.

For example, Mentions under Profile should look like Με ανέφεραν

Also, I wand to change all other verbal statements that appear on my forum to Greek for this mod

Thanks in advance
Title: Re: @mention members
Post by: Kindred on August 16, 2017, 08:24:31 PM
I believe, like most mods, the file would be modification.YOURLANGAUGE.php
Title: Re: @mention members
Post by: Cruiser79 on August 18, 2017, 05:02:52 AM
Thanks for your reply.

As a temporary solution, I changed mentions.english.php and mentions.english-utf8.php verbal statements to Greek. My forum has very few non-Greek members so it won't be a problem.

Another question: I use SMFPacks WYSIWYG Editor, not the SMF default. In such case, there is no dropdown menu to autocomplete username after a few letters. However, after syntax @username and posting on a topic, the "tag" works perfectly. Any ideas on how to have a dropdown on SMFPacks WYSIWYG Editor?
Title: Re: @mention members
Post by: Shambles on August 18, 2017, 05:22:27 AM
Quote from: Cruiser79
Any ideas on how to have a dropdown on SMFPacks WYSIWYG Editor?

Why not ask them on smfpacks.com - did you pay for it? It's not really relevant in the @mentions support thread ;)
Title: Re: @mention members
Post by: Cruiser79 on August 27, 2017, 10:53:10 AM
Quote from: Shambles on August 18, 2017, 05:22:27 AM
Quote from: Cruiser79
Any ideas on how to have a dropdown on SMFPacks WYSIWYG Editor?

Why not ask them on smfpacks.com - did you pay for it? It's not really relevant in the @mentions support thread ;)

I am sorry I wasn't clear enough, I meant having a dropdown using @mention members
Title: Re: @mention members
Post by: WhiteRozePetals on August 29, 2017, 09:55:28 PM
Hello,

Somehow my mentions modification got corrupted or a missing file. It was causing issue on my website so it wasn't working. I was getting this error:
Warning: require_once(/home/rozeh/forum.decadencescans.com/Sources/Mentions.php): failed to open stream: Permission denied in /home/rozeh/forum.decadencescans.com/Sources/Load.php on line 325

Fatal error: require_once(): Failed opening required '/home/rozeh/forum.decadencescans.com/Sources/Mentions.php' (include_path='.:/usr/local/lib/php:/usr/local/php5/lib/pear') in /home/rozeh/forum.decadencescans.com/Sources/Load.php on line 325


I deleted the mentions.php and then it ended up working so I was able to get into my admin panel. I then went to uninstall the mod and it would give me a 500 error. So then I read up on some articles on how to manually uninstall the mod (basically follow the code backwards.) I did this but the mod is still showing up in my installed packages (but not in the browse packages sections) so I can't try to reinstall a clean version because when I download the package and hit install it says it's already installed.

Any help is greatly appreciated. :)
Title: Re: @mention members
Post by: aegersz on November 11, 2017, 10:51:48 PM
this doesn't seem to work for member names of only a single character.

is there a way around this ?

yeah i know it's odd that one of my guys has a single capital letter but it still ought to work.
Title: Re: @mention members
Post by: Gluz on November 12, 2017, 01:11:01 AM
In /Themes/default/scripts/mentions.js change:
if (query.length < 2)
to:
if (query.length < 1)

With that the member suggestion drop down will show when typing only one letter after the @, the Mention itself works without modify that file, because it search through any possible member name.
Title: Re: @mention members
Post by: aegersz on November 12, 2017, 01:32:32 AM
thank you SO much - i was thinking that a minimum of one character would return a cumbersome list of member names but the guys name fortunately is "Z".

i should've looked at the code myself - sorry to bother but you were prompt regardless !

appreciated ... i have been looking up the member's id and then adding into the BBCode. I got tired of that and am happy now.

It's a great mod and i'm surprised that Simple Machines haven't adopted it !
Title: Re: @mention members
Post by: aegersz on November 12, 2017, 03:08:23 AM
my first Javascript change  ... note when implementing Javscript code modifications - clear the browser cache afterwards to reload the script because (this may help somebody else as novices like me (there must be others out there)) I have just learned that website scripts run in one of two places [source: http://www.codeconquest.com/website/client-side-vs-server-side/]:

QuoteJavaScript is an example of the client side (also called the front-end) and PHP is an example of the server side (also called the back-end).

The client of a website refers to the web browser that is viewing it. The server of a website is, of course, the server that hosts it
Title: Re: @mention members
Post by: Arantor on November 12, 2017, 06:02:01 AM
Quote from: aegersz on November 12, 2017, 01:32:32 AM
It's a great mod and i'm surprised that Simple Machines haven't adopted it !


You should maybe check out 2.1 before making bold claims like that ;)
Title: Re: @mention members
Post by: aegersz on November 12, 2017, 06:23:47 AM
funny you should "mention" that because i was thinking EXACTLY the same thing shortly after posting and asking myself why am i not running my favorite "forumware" (an original term of mine) latest release because it would have to be Simple Machines' flagship offering and why wouldn't they include such a facility ?

i also was wondering if there are plans for an upgrade path to 2.1 from 2.0(.nn) ?

i am defintely going to install the latest beta cut because it's only a test system and i want to use my existing database clone.

i guess my plethora of mods will be a HUGE issue and probably prevent me from actually ever migrating to it but at least it will keep me occupied, enlightened and the bold claims will stop ... :-X
Title: Re: @mention members
Post by: aegersz on November 12, 2017, 11:51:03 PM
Yes of course there is an upgrade path. sorry to go off-topic.
[/derail]

yes, this is a very useful mod that has been rapidly adopted by my members and used frequently.
Title: Re: @mention members
Post by: icarus911 on January 08, 2018, 01:38:20 PM
8: Undefined index: mentions
File: /var/www/html/Sources/Admin.php
Line: 199

Anyone else have this error?
Title: Re: @mention members
Post by: franhaselden on January 10, 2018, 03:28:11 PM
Just installed but seem to be having a few issues:

1) The admin checkbox "Enable mentions e-mail for current members" doesn't persist on save
2) The mentions don't seem to work. Typing @ will autopredict member names, and when posted they do link to the member, but the mentions panel for my own account shows no mentions and I receive no email.
Title: Re: @mention members
Post by: franhaselden on January 11, 2018, 05:13:51 AM
Follow-up.

Some members don't see the auto-complete popup at all.
Some members type names in with the @ symbol but when posted the name doesn't link or go bold (my <a> css) like expected.
Some members are receiving mentions, others are not. I've been mentioned 5 times now yet I've only ever got one mention on my panel.
I can't seem to pin down any consistent issue, just that the mention feature most regularly doesn't work.
Title: Re: @mention members
Post by: aegersz on January 11, 2018, 05:29:54 AM
mentions will only display a subset of the full list if the partial member name mentioned is too short.

check your error log because IME, mentions works well but your config and possible unforseen errors may cause such unreiability.

yes, look for errors please ... i assume that you don't get a notifications email and/or the Profile[n] indicator is not displayed.

Title: Re: @mention members
Post by: franhaselden on January 11, 2018, 07:32:05 AM
I can't see any error that pertains to the mentions mod.

It isn't a case of too short names. For example, my username is Francesca and even typing the full name out some members do not see any pop-up. Also, even if they just post @Francesca without the pop-up, should the mentions mod not still ping the mention once the post is published? It seems to for some people, but not for others.

It works intermittently. I did once see the [] notification in the profile banner, and also have one mention listed on my Mentions page. But that is it, just the once. Other members have more success and others are never able to post mentions nor see them themselves.
Title: Re: @mention members
Post by: aegersz on January 11, 2018, 07:53:04 AM
no - the popup MUST run as it generates the BBCode with the member's id contained within and NOT the member's name !

otherwise you have to do it manually and that involves the tedious lookup of the member's id from the database or member list AND needs to be inserted into the BBCode.

as an admin, go and hit Modify on the posts that are you think might be causing this unreliability - you can inspect the post for the correct BBCode generation.

when you select the member name from the javascript popup, it should add a blank character also.

if all is well so far then i can't help you further and you need to wait for the mod writer or someone with more knowledge on this than myself.

i hope this helps.
Title: Re: @mention members
Post by: franhaselden on January 11, 2018, 08:57:37 AM
Quoteno - the popup MUST run as it generates the BBCode with the member's id contained within and NOT the member's name !

That's weird. I just tested this out. I wrote a member name like @member. The pop-up showed up, but I did not click it. When I posted, the username had been capitalised to @Member (as the user's name does indeed look) and links to their profile. So is it not based on the click of the pop-up, just that the pop-up at least shows?

I can see that several members have tried to mention me but indeed they are not links when I inspect. However these are the members that are reporting when they search @Francesca that no pop-up shows up so obviously it's that part of the mod that is not kicking off for some members. I wonder if it's something to do with their system specs. Do you know of any part of the mod that might require modern browsers, perhaps some are running older browsers. Though most are on Chrome or Firefox which should be evergreen. I will investigate further.

Also, is it correct you cannot mention yourself? I have a few times tried writing @Francesca myself. I can select my name form the pop-up and confirm that the name when posted then converts to my member ID instead. However, I don't see this mention. Is this deliberate.
Title: Re: @mention members
Post by: aegersz on January 11, 2018, 04:38:23 PM
i expect so as mentioning yourself makes no sense
Title: Re: @mention members
Post by: thunderchld on January 12, 2018, 08:50:18 AM
I have a generic account we use for posting some items, and i'm able to @Mention myself. I mostly do it so people have a quick, while reading, button to press to complete the action I'm asking of them.
Title: Re: @mention members
Post by: aegersz on January 12, 2018, 07:50:27 PM
you can mention yourself from the same logon ?

doesn't work for me.
Title: Re: @mention members
Post by: icarus911 on January 12, 2018, 11:41:07 PM
 :-[
Quote from: icarus911 on January 08, 2018, 01:38:20 PM
8: Undefined index: mentions
File: /var/www/html/Sources/Admin.php
Line: 199

Anyone else have this error?

For anyone who cares I fixed this by adding im ./Sources/Admin.php


                  'mentions' => array($txt['mentions']),

after                   // Mod Authors for a "ADD AFTER" on this line. Ensure you end your change with a comma. For example:
Not before like the parse for 2.0.15 suggest

Title: Re: @mention members
Post by: Arantor on January 13, 2018, 04:10:25 PM
For anyone looking, I solved the ' problem with a different change to that which was suggested earlier.

Specifically for me on a test 2.0.15 install with this mod, edit Mentions.php:
Code (find) Select
$names = array_unique(array_map('trim', $names));

Code (add after) Select

foreach ($names as $k => $v) {
$names[$k] = $smcFunc['htmlspecialchars']($v, ENT_QUOTES);
}


Someone with more energy than me might want to check if 2.1 has the same problem and whether the same fix is relevant (odds are pretty good, Dragooon wrote the mod and then made it a core feature later)
Title: Re: @mention members
Post by: ErtugrulBEKTIK on January 23, 2018, 10:24:22 AM
Quote from: Route on February 09, 2017, 05:39:27 PM
Oh yea. Have menu editor lite. Didn't think that can be a issue with this 2 mods. Any idea how to fix that ?
I have solved the problem.

1) First, add a child button to Profile section. Name the button as Mentions and select link type external link.
2) Set the external link url as "http your_forum/index.php?action=profile;area=mentions"
3) Than change codes below.

Code ("Find") Select
$buttons[$value['id_button']] = array(
'title' => $value['name'],
'href' => $value['href'],
'show' => true,
'target' => $value['target'],
'sub_buttons' => array(
),
'is_last' => $value['id_button'] == $menu_editor['last_button'] ? !$context['right_to_left'] : '',
'level' => 0
);
// Do we have Children?
if (!empty($menu_editor['children']['actual'][$value['id_button']]))
{
$buttons[$value['id_button']]['sub_buttons'] = array();
foreach ($menu_editor['children']['actual'][$value['id_button']] as $act => $sub_value)
{
// Introduce the Grandchildren - If we have any.
if (!empty($menu_editor['grandchildren']['actual'][$sub_value['id_button']]))
$temp[$sub_value['id_button']]['sub_buttons'] = $menu_editor['grandchildren']['actual'][$sub_value['id_button']];
else
$temp[$sub_value['id_button']]['sub_buttons'] = array();

// Actually add the Children!
$buttons[$sub_value['id_parent']]['sub_buttons'][$sub_value['id_button']] = array(
'title' => $sub_value['title'],


Code ("Replace") Select
// lets check if there are some unread mentions and add the count if any
$title = '';
f ($user_settings['unread_mentions'] > 0 && $value['href'] == $scripturl . '?action=profile')
$title = $value['name'] .' [<strong>' . $user_settings['unread_mentions'] . '</strong>]';
else
$title = $value['name'];
// there goes the menu item
$buttons[$value['id_button']] = array(
'title' => $title,
'href' => $value['href'],
'show' => true,
'target' => $value['target'],
'sub_buttons' => array(
),
'is_last' => $value['id_button'] == $menu_editor['last_button'] ? !$context['right_to_left'] : '',
'level' => 0
);
// Do we have Children?
if (!empty($menu_editor['children']['actual'][$value['id_button']]))
{
$buttons[$value['id_button']]['sub_buttons'] = array();
foreach ($menu_editor['children']['actual'][$value['id_button']] as $act => $sub_value)
{
// lets check again if there are some unread mentions and add the count if any to children
$title = '';
if ($user_settings['unread_mentions'] > 0 && $sub_value['href'] == 'http your_forum/index.php?action=profile;area=mentions')
$title = $sub_value['title'] .' [<strong>' . $user_settings['unread_mentions'] . '</strong>]';
else
$title = $sub_value['title'];
// Introduce the Grandchildren - If we have any.
if (!empty($menu_editor['grandchildren']['actual'][$sub_value['id_button']]))
$temp[$sub_value['id_button']]['sub_buttons'] = $menu_editor['grandchildren']['actual'][$sub_value['id_button']];
else
$temp[$sub_value['id_button']]['sub_buttons'] = array();

// Actually add the Children!
$buttons[$sub_value['id_parent']]['sub_buttons'][$sub_value['id_button']] = array(
'title' => $title,


Be careful while you are replacing. Change "http your_forum/index.php?action=profile;area=mentions" section in code to you.
Title: Re: @mention members
Post by: aegersz on March 01, 2018, 01:59:45 PM
has anyone bothered to adapt this to SimplePortal's Shoutbox ?

I have done the basic work of adding the BBC code as javascript won't work here as the (minimal) main db logic lives in Sources/Subs-Post.php and is configured for posts, of course.

I may follow this up later if nobody has ... maybe it is waste of time but i still think it could be a handy way of alerting a member (via email) also from the Shoutbox.

it involves getting into SimplePortal's Shoutbox logic to add the above when processing the manually entered BBC code for a member (cumbersome, i know)

or can anyone think of an easy way to alert a member like this mod, from the SP Shoutbox ?

reciprocally linked to Simple Portal's site > https://simpleportal.net/index.php?topic=14516
Title: Re: @mention members
Post by: Fencejumper09 on March 08, 2018, 02:19:52 PM
Does this Mod work with 2.0.14?

Do any specific changes need to be made?
Title: Re: @mention members
Post by: d3vcho on March 08, 2018, 02:21:26 PM
Yes, it should work for 2.0.14 as well. No extra changes that I'm aware of.
Title: Re: @mention members
Post by: Shambles on March 08, 2018, 02:22:27 PM
Quote
Does this Mod work with 2.0.14?
Works fine in my 2.0.15 accounts - no special treatment required.
Title: Re: @mention members
Post by: -Rock Lee- on March 08, 2018, 03:27:52 PM
No problem with 2.0.15 can only conflict with another mod but it is solved quickly...


Regards!
Title: Re: @mention members
Post by: Fencejumper09 on March 08, 2018, 03:29:35 PM
Seems to be working great on our forum! Thank you all!
Title: Re: @mention members
Post by: Drakkon on March 28, 2018, 06:32:11 AM
I'm running SMF 2.0.15. When I go to mentions the posts where I'm being mentioned don't show up.
Title: Re: @mention members
Post by: Shambles on March 28, 2018, 07:13:53 AM
Quote from: Drakkon
When I go to mentions the posts where I'm being mentioned don't show up.
Does a link to the post show up in your "mentions" menu? If so, do you mean when you click it, it doesn't bring up the post? Could it be that you've been mentioned in a post to which you have no access?

Title: Re: @mention members
Post by: Drakkon on March 28, 2018, 07:16:32 AM
I just fresh installed SMF 2.0.15 and I am the admin. I made a second account to test the mentions. The number 1 appears next to profile indicating a new mention. When I click on mentions there is nothing there.
Title: Re: @mention members
Post by: Shambles on March 28, 2018, 08:00:02 AM
Using the Curve theme?
Title: Re: @mention members
Post by: Drakkon on March 28, 2018, 11:29:30 PM
Thank you for your help. It was just a permissions issue with the test account.
Title: Re: @mention members
Post by: mitek on July 03, 2018, 12:00:29 AM
It is a really good mod HOWEVER there are certain forums where I do NOT want mentions to work, and no matter how many time I try to pick and choose forums and save those settings it reverts  back to the default of "enable mentions for all boards

There should be a drop down or something in that enable all boards field that gives you teh option too pick and choose forums you want it to work in, because liek I said no matter how many times I select teh forums I want to have access to mentions, every time it reverts right back to all forums enabled and its causing problems when someone tags a mod, they then have access to at least read a forum where they may not be allowed.

Its probably just a fluke but its irritating so I had to turn mentions off completely. I really like this mod but it does need some work especially from the permissions side

There should be some way to get a do not enable mentions in all forum and then choose the forums where you allow mentions

Thanks for real.. its a great idea but it is simply being problematic for me.

eGeekiel at Mitek
Title: Re: @mention members
Post by: Arantor on July 03, 2018, 01:19:42 AM
FYI you're going to hate 2.1 when it's out, it's exclusively on or off, not board by board.
Title: Re: @mention members
Post by: brettuk on July 27, 2018, 10:12:06 AM
By default, when a user mentions another user, it links to their profile. Is there any way we can by default add a rel="nofollow" to these links? So, Google doesn't follow them or pass linking equity to profile pages?
Title: Re: @mention members
Post by: Arantor on July 27, 2018, 12:27:12 PM
What about everywhere else that profile pages are linked?
Title: Re: @mention members
Post by: brettuk on July 29, 2018, 04:51:03 AM
Quote from: Arantor on July 27, 2018, 12:27:12 PM
What about everywhere else that profile pages are linked?

Ideally I need all of those with rel nofollow too, but it's a big job!
Title: Re: @mention members
Post by: Arantor on July 29, 2018, 05:26:13 AM
No, ideally what you need is not having the links there at all. nofollow has long been discouraged.
Title: Re: @mention members
Post by: boydster on August 14, 2018, 02:30:15 PM
Hello, I'm trying to implement this on a test/dev environment right now and running into some trouble. I moved everything, including the install.php, into the root directory, then ran path/to/root/install.php. I can now give permissions for Mentions to different membergroups. I can see a "Mentions" option in user profiles. But nothing is populating the Mention lists.

Further, when I type a reply, and write something like "@user2 this is a test" (without quotation marks) there is no autocomplete. I've tried this under multiple user accounts, referencing other users. No autocomplete. No new entry in the Mentions list.

I can see caret.js and jquery.atwho.js are both in my default scripts directory.

What am I missing here? Testing on SMF 2.0.14 and 2.0.15.
Title: Re: @mention members
Post by: Kindred on August 14, 2018, 04:35:18 PM
why are you not using the package manager to install the mod?
Title: Re: @mention members
Post by: boydster on August 14, 2018, 05:25:25 PM
Wow. I... I don't even have a wise response for that. I hadn't tried that functionality yet. In fact, I had already implemented the Public Ban list on my test setup just from making the manual updates to the code.

Thanks for showing me the easy way! It's working perfectly now.
Title: Re: @mention members
Post by: CyanGaming on August 16, 2018, 11:35:53 AM
I don't know what's happening, but my mentions aren't showing up. When people mention me, they're getting deleted before I even see them. Not sure if this was caused by me mentioning myself 1 time? I have no idea why it's happening, but it seems to work fine on other people's profiles.
Title: Re: @mention members
Post by: Mick. on September 16, 2018, 05:08:06 PM
Pretty sweet mod bruh! Imma run off and see if I can make @mentions work with SimplePortal Shoutbox.  :o
Title: Re: @mention members
Post by: palmdoc on October 22, 2018, 11:06:23 AM
Nice mod. I get the autocomplete for regular members but I can't seem to tag admin. Bug or feature?
Title: Re: @mention members
Post by: brettuk on October 30, 2018, 05:45:06 PM
Good mod, I have been using this for a while now - thank you.

do you know which file I need to edit to change the <a href=""> code? As I would like to add a rel="nofollow" to these links.

Cheers.
Title: Re: @mention members
Post by: WantSome on November 28, 2018, 05:11:17 PM
Hi!  I'm really loving this mod, been using it for a while.

Is it possible to add the function to mention everybody in the userbase?  Would that cause a massive issue?

I'd like to use it for certain global announcements and newsletters to draw member's attention to these posts that often get overlooked.

Thanks!
Title: Re: @mention members
Post by: delta5 on December 02, 2018, 11:48:46 AM
Can anyone please tell me what is happening here?

Undefined
https://www.fedupwithliberals.com/index.php?action=post2;start=0;msg=6236;de99a09=b377e7c144d4d0f108734e60dbd27bcf;board=71
8: Undefined index: approved
/home/s7x1c79cv7ls/public_html/Sources/Subs-Post.php
Line: 2416


2405: function modifyPost(&$msgOptions, &$topicOptions, &$posterOptions)
2406: {
2407: global $user_info, $modSettings, $smcFunc, $context;
2408:
2409: $topicOptions['poll'] = isset($topicOptions['poll']) ? (int) $topicOptions['poll'] : null;
2410: $topicOptions['lock_mode'] = isset($topicOptions['lock_mode']) ? $topicOptions['lock_mode'] : null;
2411: $topicOptions['sticky_mode'] = isset($topicOptions['sticky_mode']) ? $topicOptions['sticky_mode'] : null;
2412:
2413:
2414: mentions_process_post($msgOptions, $topicOptions, $posterOptions);
2415: if (!empty($msgOptions['mentions']))
==>2416: mentions_process_store($msgOptions['mentions'], $msgOptions['id'], $msgOptions['subject'], $msgOptions['approved']);
2417: // This is longer than it has to be, but makes it so we only set/change what we have to.
2418: $messages_columns = array();
2419: if (isset($posterOptions['name']))
2420: $messages_columns['poster_name'] = $posterOptions['name'];
2421: if (isset($posterOptions['email']))
2422: $messages_columns['poster_email'] = $posterOptions['email'];
2423: if (isset($msgOptions['icon']))
2424: $messages_columns['icon'] = $msgOptions['icon'];
2425: if (isset($msgOptions['subject']))
2426: $messages_columns['subject'] = $msgOptions['subject'];
2427: if (isset($msgOptions['body']))
2428: {
2429: $messages_columns['body'] = $msgOptions['body'];
2430:
2431: if (!empty($modSettings['search_custom_index_config']))
2432: {
2433: $request = $smcFunc['db_query']('', '
2434: SELECT body
2435: FROM {db_prefix}messages
2436:


—edit — please use code bbc tags and do some cleaning of the output
Title: Re: @mention members
Post by: landyvlad on December 03, 2018, 09:50:10 PM
Quote from: WantSome on November 28, 2018, 05:11:17 PM
Hi!  I'm really loving this mod, been using it for a while.

Is it possible to add the function to mention everybody in the userbase?  Would that cause a massive issue?

I'd like to use it for certain global announcements and newsletters to draw member's attention to these posts that often get overlooked.

Thanks!

I agree. If this was practical to do, it'd be very useful for the reasons WantSome describes.
Title: Re: @mention members
Post by: delta5 on December 04, 2018, 12:44:09 AM
Update: I went from PHP 7.0 to 7.1, and this error and a few others have not returned so far.
Title: Re: @mention members
Post by: North East Man on December 23, 2018, 09:39:50 AM
This is a great mod, although it seems like there is an issue with using it on an iPad. 

When you tap the @ plus user name it just hangs.  You can't type any more, move down to the next line, can't do anything.  Sometimes after clicking in other fields like the subject and back to the message it unblocks and allows you to type the rest of the message, but more and more often it just hangs and you have to leave the post and come back to it. 

Reported by several users.  Is this something that is know about and has a fix?
Title: Re: @mention members
Post by: landyvlad on January 01, 2019, 11:30:00 PM
Not related to this ,mod specifically but from time to time I have errors reported by members, and invariably they are using ipads / iphones.

Seems that these errors almost always commence after a new version of iOS is installed. In other words, Apple's fault.

Maybe see if that's the case.
Title: Re: @mention members
Post by: Mick. on January 29, 2019, 04:55:30 PM
Hey Dragooon, I really dig your mod. Today got this idea of implementing a tooltip showing the members avatar when hover the @mention. Not a big deal, just drafted the css and the html needed. Now just implement the php calls. Im working on it, I'll share the hack when done.

Concept here.... https://www.idesignsmf.com/index.php/page,page314.html
Title: Re: @mention members
Post by: efk on January 30, 2019, 09:48:53 AM
Not sure if this already exist, but if don't, is it possible to add for every member an option to disable notifications for mentions since its bugged, requiring few more clicks to get rid of notification and doesn't seem to cooperate with New post/topic in boards, always showing something New in board or notification on profile and require to check post twice using both methods to reach post. Not a problem but its annoying, I even threatened my members to stop mentioning my nick or plugin gonna be removed  :laugh:
Title: Re: @mention members
Post by: delta5 on February 07, 2019, 07:39:11 PM
Hi guys, can anyone tell me whats going on here? This is coming from a fresh install of 2.0.15 on PHP 7.1

Apply Filter: Only show the error messages of this member Sling Blade
Apply Filter: Only show the error messages of this IP address 73.212.203.223   
   Reverse chronological order of list Today at 07:12:07 PM
Apply Filter: Only show the error messages of this session 21a70068071f5aae6200c40f84b0296a
Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URLhttps://www.protrucker.net/index.php?Apply Filter: Only show the errors with the same message8: Undefined index: hidden_sApply Filter: Only show the errors from this file File: /home/s7x1c79cv7ls/public_html/protrucker/Themes/default/languages/Mentions.english.php (main sub template - eval?)
Line: 429

This is happening on two different forums.
Title: Re: @mention members
Post by: jsx on February 14, 2019, 12:39:35 PM
Why is this text not displayed here?

Allow members to tag other members and alert them via mentioning them via @username syntax

(https://i.imgur.com/qlJpkEO.png)

It must to cause some error.
Title: Re: @mention members
Post by: jsx on April 05, 2019, 04:04:24 AM
@Dragooon

The selection does not appear in this checkbox:

Enable mentions e-mail for current members

Whereas, the selection appears correctly in this checkbox:

Enable mentions e-mail by default
Title: Re: @mention members
Post by: landyvlad on April 09, 2019, 02:00:16 AM
For anyone wanting to explain to their forum members how this mod is used feel free to copy
http://gsx1400owners.org/forum/index.php?topic=477.0
to your hearts content.  Cheers
Title: Re: @mention members
Post by: grzeg8102 on September 24, 2019, 05:11:43 AM
Great mod! Very useful. Since I started being a user of a Discourse forum I dreamt of something similar in my my own SMF forum I'm running.

@Dragoon - I'm only missing the mod to run also on the recents page ("/index.php?action=recent"). Can you please add it? Hopefully it's nothing complex and only requires the function mentions_post_scripts(); to be called in one more place.

BTW. I'd like to share my CSS for it - it tries to mimic Discourse mention style. Attached
Title: Re: @mention members
Post by: Shambles on December 04, 2019, 02:34:33 PM
Under PHP 7.1, when unchecking Profile > Profile Info > Mentions > E-mail mention notifications:


(https://i.imgur.com/7OpexTm.jpg)


The (bool) cast within Mentions.php is no longer returning 0 when false; it's returning null, causing the above error.

Solution:

Sources/Mentions.php

Code (Find) Select

if (!empty($_POST['save']) && $user_info['id'] == $memID)
updateMemberData($memID, array('email_mentions' => (bool) !empty($_POST['email_mentions'])));


Code (Replace) Select

if (!empty($_POST['save']) && $user_info['id'] == $memID)
updateMemberData($memID, array('email_mentions' => empty($_POST['email_mentions']) ? 0 : 1));
Title: Re: @mention members
Post by: Arantor on December 04, 2019, 02:42:39 PM
(bool) returns true or false, which would need to be explicitly cast to numbers to make that work - false, by default, implicit casts to empty string, not 0, unless explicit-casting to int.
Title: Re: @mention members
Post by: Shambles on December 04, 2019, 02:48:18 PM
Yep - that's what was happening. Must have been different under 5.6 as that seemed to return 0?

With the change above it I now get 0 or 1 (obviously) instead of null or 1.
Title: Re: @mention members
Post by: Arantor on December 04, 2019, 02:52:48 PM
Nope, those semantics have never changed. I'm assuming it's just always been left ticked - unlike false, true will convert to 1 as far as the DB library cares.
Title: Re: @mention members
Post by: Shambles on December 04, 2019, 03:22:54 PM
I wonder how many people have tried to untick it? Not me, that's for sure.

I only spotted it when doing my routine checks on the error logs.


Quote... unlike false, true will convert to 1 ...

That implies the original code has always been imperfect, as far as setting a 0 or 1 into the int-only DB space.
Title: Re: @mention members
Post by: Arantor on December 04, 2019, 03:32:18 PM
Yup, it very likely has.
Title: Re: @mention members
Post by: Xpresskonami on December 14, 2019, 05:54:51 AM
Quote from: jsx on April 05, 2019, 04:04:24 AM
@Dragooon

The selection does not appear in this checkbox:

Enable mentions e-mail for current members

Whereas, the selection appears correctly in this checkbox:

Enable mentions e-mail by default

I Want to Enable mentions e-mail for current members. I select the box, and the box is not selecting... any solutions please
Title: Re: @mention members
Post by: jsx on December 24, 2019, 01:18:02 PM
Quote from: Xpresskonami on December 14, 2019, 05:54:51 AM
Quote from: jsx on April 05, 2019, 04:04:24 AM
@Dragooon

The selection does not appear in this checkbox:

Enable mentions e-mail for current members

Whereas, the selection appears correctly in this checkbox:

Enable mentions e-mail by default

I Want to Enable mentions e-mail for current members. I select the box, and the box is not selecting... any solutions please

Yes, but when you save this setting, this setting will work.
Title: Re: @mention members
Post by: jsx on February 15, 2020, 11:11:10 AM
Quote from: Shambles on December 04, 2019, 02:34:33 PM
Under PHP 7.1, when unchecking Profile > Profile Info > Mentions > E-mail mention notifications:


(https://i.imgur.com/7OpexTm.jpg)


The (bool) cast within Mentions.php is no longer returning 0 when false; it's returning null, causing the above error.

Solution:

Sources/Mentions.php

Code (Find) Select

if (!empty($_POST['save']) && $user_info['id'] == $memID)
updateMemberData($memID, array('email_mentions' => (bool) !empty($_POST['email_mentions'])));


Code (Replace) Select

if (!empty($_POST['save']) && $user_info['id'] == $memID)
updateMemberData($memID, array('email_mentions' => empty($_POST['email_mentions']) ? 0 : 1));


Such a mistake appears in the logs:

(https://i.imgur.com/rnyEvlm.png)

(https://i.imgur.com/PGJvgus.png)

Is this the same mistake you mentioned?
Title: Re: @mention members
Post by: Shambles on February 15, 2020, 12:40:04 PM
QuoteIs this the same mistake you mentioned?

Since it's a completely different error message from an entirely different region of Subs.php handling something not even close to a DB query, the answer has to be no.
Title: Re: @mention members
Post by: jsx on February 16, 2020, 03:47:28 AM
Can anyone help me solve this error?
Title: Re: @mention members
Post by: GL700Wing on February 16, 2020, 04:53:45 AM
Quote from: jsx on February 16, 2020, 03:47:28 AM
Can anyone help me solve this error?
https://www.simplemachines.org/community/index.php?topic=522005.msg3695332#msg3695332
Title: Re: @mention members
Post by: jsx on February 16, 2020, 12:23:26 PM
Quote from: GL700Wing on February 16, 2020, 04:53:45 AM
Quote from: jsx on February 16, 2020, 03:47:28 AM
Can anyone help me solve this error?
https://www.simplemachines.org/community/index.php?topic=522005.msg3695332#msg3695332

Thanks. :)
Title: Re: @mention members
Post by: rarecorp on April 16, 2020, 08:21:11 AM
Hello,

I was wondering if this mod or any other mods out there can tag a whole membergroup? Not a user-specific tag, but the whole user group that will be notified when tagged.

Thank you in advance.

Edit: I saw a mod https://www.smfpacks.com/mentionsmod/ -- but it seems to be paid, anything free mod similar to this one?
Title: Re: @mention members
Post by: Shambles on April 16, 2020, 08:58:00 AM
Is $9.99 over your budget?
Title: Re: @mention members
Post by: GL700Wing on April 30, 2020, 03:28:26 AM
I've been using this mod since just after it was released (I use it on multiple forums) and I've made two enhancements to suit my needs.






The first is, if the option 'Enable mentions e-mail by default' is enabled, to also notify a member by PM that they have been mentioned and then to only send an email message if the member does not receive email notifications of PMs.

In ./Sources/Mentions.php
Find:
sendmail($mention['email_address'], $subject, $body)
Replace With:
// Send the mention notification by PM.
sendpm(array('to' => array($mention['id']), 'bcc' => array()), $subject, $body);

// If the member being mentioned does not receive email notifications of PMs send a separate email message.
$result = $smcFunc['db_query']('', '
SELECT id_member, pm_email_notify
FROM {db_prefix}members
WHERE id_member = {int:mention_id}',
array(
'mention_id' => (int) array($mention['id']),
)
);
$row = $smcFunc['db_fetch_assoc']($result);
$smcFunc['db_free_result']($result);
$pmMailNotify = ($row['pm_email_notify']);
if ($pmMailNotify == 0)
sendmail($mention['email_address'], $subject, $body);







The second is to enable forum admins to fix incorrectly formatted mentions in existing posts (eg, '@ name' instead of '@name') and to have the corrected mention attributed to the post author (by default the corrected mention is attributed to the member editing the post).

In ./Sources/Mentions.php
Find:
function mentions_process_store(array $mentions, $id_post, $subject, $approved = true)
{
global $smcFunc, $txt, $user_info, $scripturl;

Replace With:
function mentions_process_store(array $mentions, $id_post, $subject, $approved = true, $pa_id = 0, $pa_name = null)
{
global $smcFunc, $txt, $user_info, $scripturl;

// Check if the user editing post is the same as the post author.
$mention_member_id = $user_info['id'];
$mention_member_name = $user_info['name'];
if ($pa_id != $user_info['id'])
{
$mention_member_id = $pa_id;
$mention_member_name = $pa_name;
}


Find:
array($id_post, $user_info['id'], $mention['id'], time()),
Replace With:
// Use $mention_member_id instead of $user_info['id'].
array($id_post, $mention_member_id, $mention['id'], time()),


Find:
'MEMBERNAME' => $user_info['name'],
Replace With:
// Use $mention_member_name instead of $user_info['name'].
'MEMBERNAME' => $mention_member_name,





In ./Sources/Post.php
Find:
if (!empty($topic_info['locked']) && !allowedTo('moderate_board'))
Add Before:
// Added pa_id to user_info to enable Admins to correct mentions in existing posts and have the mention attributed to the post author.
$user_info['pa_id'] = $row['id_member'];


Find:
$posterOptions = array(
'id' => $user_info['id'],
'name' => $_POST['guestname'],
'email' => $_POST['email'],
'update_post_count' => !$user_info['is_guest'] && !isset($_REQUEST['msg']) && $board_info['posts_count'],

Add After:
// Added pa_id and pa_name to enable Admins to correct mentions in existing posts and have the mention attributed to the post author.
'pa_id' => isset($_REQUEST['msg']) && !empty($topic) ? $user_info['pa_id'] : $user_info['id'],
'pa_name' => $_POST['guestname'],





In ./Sources/Subs-Post.php
Find:


mentions_process_post($msgOptions, $topicOptions, $posterOptions);
if (!empty($msgOptions['mentions']))
mentions_process_store($msgOptions['mentions'], $msgOptions['id'], $msgOptions['subject'], $msgOptions['approved']);

Replace With:
// If an Admin is modifying another member's post to correct mentions have the mention attributed to the post author.
if ($user_info['is_admin'] && isset($posterOptions['pa_id']) && ($posterOptions['id'] !== $posterOptions['pa_id']))
{
$pa_posterOptions = $posterOptions;
$pa_posterOptions['id'] = $posterOptions['pa_id'];
$pa_posterOptions['name'] = $posterOptions['pa_name'];
mentions_process_post($msgOptions, $topicOptions, $pa_posterOptions);
}
else
mentions_process_post($msgOptions, $topicOptions, $posterOptions);

if (!empty($msgOptions['mentions']))
// Fix for bug - see https://www.simplemachines.org/community/index.php?topic=522005.msg3695332#msg3695332
// Added $posterOptions['pa_id'] and $posterOptions['pa_name'] to enable Admins to correct mentions in existing posts and have the mention attributed to the post author.
mentions_process_store($msgOptions['mentions'], $msgOptions['id'], $msgOptions['subject'], isset($msgOptions['approved']) ? $msgOptions['approved'] : 1, $posterOptions['pa_id'], $posterOptions['pa_name']);

Title: Re: @mention members
Post by: landyvlad on April 30, 2020, 10:36:56 PM
Great idea.
Title: Re: @mention members
Post by: moyack on May 03, 2020, 10:08:08 AM
Hi:

I just found this small bug. In Mentions.english.php it's needed to add $scripturl global variable to avoid log errors.

Code (find) Select
global $txt, $context;

Code (replace) Select
global $txt, $context, $scripturl;
Title: Re: @mention members
Post by: Sectomy on July 13, 2020, 08:18:35 AM
hi,

i also have the Advanced Editor, in one thread theres a code you need to add to the mention mod, but i dont now where or which file, maybe anyone could help:

$('textarea[name=message]').add($('body.rich_editor', $('iframe#html_message').contents())).add($('body.advanced_editor', $('iframe#iframe_smfpacks_advanced_editor').contents())).add('#smfpacks_advanced_editor').atwho(mentions_config);
Title: Re: @mention members
Post by: North East Man on September 30, 2020, 05:31:34 PM
I realise this is no longer supported but does anyone know how to make the pop up suggestion list have more items on it.  It shows me 10 possible members but I have 5000 members and with popular names like John or Gill, it isn't showing all the possible matches.
Title: Re: @mention members
Post by: -Rock Lee- on September 30, 2020, 08:46:17 PM
You should reduce the number of matches as you apply more characters and I am not sure if it impacts negative this however it should change in file ../Themes/default/scripts/mentions.js line 17 just in case do not use very large values.


Regards!
Title: Re: @mention members
Post by: North East Man on October 01, 2020, 04:40:22 AM
Hi Rock Lee,

Thanks for that pointer.  I have now changed that number to 25 so now have up to 25 suggestions on the list - not enough to cover the most popular name, but covers most members.  Just had to clear the browser cache After making the change.

Title: Re: @mention members
Post by: -Rock Lee- on October 01, 2020, 02:00:14 PM
I was testing with a local website of mine and it could support up to 50 references, but without traffic and it is a small database, so depending on the type of host have up to 30 should work without problems. Sorry I forgot to mention the cache is something normal that many times does not allow you to see the modifications made.


Regards!
Title: Re: @mention members
Post by: ambre222 on November 13, 2020, 08:56:21 AM
Hello,
I got this error Illegal mix of collations for operation 'in'
Fichier: /home/attrapes/public_html/forum/Sources/Mentions.php
Ligne: 193
when trying to mention for instance someone with weird accents Mügan.
Is there a way to fix that without changing the encoding of the database ?
Title: Re: @mention members
Post by: Dephyrius on December 26, 2020, 12:03:21 PM
I realize that im liking missing something here, and am not sure what happened or what the last admin on our forums did after updating to 2.0.17 or what's happening. the @members mention mod shows its there, I click list files, they all seem to be there, but the mod doesn't work anymore. When I try and uninstall this is the screen I get and I'm not wanting to mess anything up in uninstalling and reinstalling it (which I suspect needs to be done).
Title: Re: @mention members
Post by: jsx on January 01, 2021, 05:24:15 AM
What could be the reason why new mentions do not appear in the list of mentions in user profile?
Title: Re: @mention members
Post by: -Rock Lee- on January 01, 2021, 10:47:57 PM
Quote from: Dephyrius on December 26, 2020, 12:03:21 PM
I realize that im liking missing something here, and am not sure what happened or what the last admin on our forums did after updating to 2.0.17 or what's happening. the @members mention mod shows its there, I click list files, they all seem to be there, but the mod doesn't work anymore. When I try and uninstall this is the screen I get and I'm not wanting to mess anything up in uninstalling and reinstalling it (which I suspect needs to be done).

Surely I replaced all the files with the new ones and did not leave the modification, you can try to see the parse of the mod (https://custom.simplemachines.org/mods/index.php?action=parse;mod=3860;attach=231215;smf_version=2.0.7) to install manually.


Regards!°
Title: Re: @mention members
Post by: shadav on January 24, 2021, 11:56:39 PM
Quote from: moyack on May 03, 2020, 10:08:08 AM
Hi:

I just found this small bug. In Mentions.english.php it's needed to add $scripturl global variable to avoid log errors.

Code (find) Select
global $txt, $context;

Code (replace) Select
global $txt, $context, $scripturl;

well I tried this but I am still getting tons of these errors
https://4rearth.info/index.php?
8: Undefined index: title
File: /Sources/Mentions.php
Line: 45
Title: Re: @mention members
Post by: jsx on February 08, 2021, 08:04:48 AM
@GL700Wing

Changing the codes in the Mentions.php file that you provided in this post (https://www.simplemachines.org/community/index.php?topic=522005.msg4054326#msg4054326) causes that new mentions to the user profile are not displayed.

Can you fix it?

I mean these codes for:

QuoteThe second is to enable forum admins to fix incorrectly formatted mentions in existing posts (eg, '@ name' instead of '@name') and to have the corrected mention attributed to the post author (by default the corrected mention is attributed to the member editing the post).
Title: Re: @mention members
Post by: jsx on February 08, 2021, 01:47:02 PM
@GL700Wing

Changing this code causes that the mention is not displayed in the mentions table in the user's profile.

Find:

array($id_post, $user_info['id'], $mention['id'], time()),

Replace With:

// Use $mention_member_id instead of $user_info['id'].
array($id_post, $mention_member_id, $mention['id'], time()),
Title: Re: @mention members
Post by: GL700Wing on February 08, 2021, 05:09:36 PM
Quote from: jsx on February 08, 2021, 01:47:02 PM
@GL700Wing

Changing this code causes that the mention is not displayed in the mentions table in the user's profile.
@JSX - Please do not bump messages within 24-48 hours and please do not PM me for support unless I ask you to (this is the second time you have done this!).
Title: Re: @mention members
Post by: jsx on February 09, 2021, 12:31:51 AM
1. First of all, I do not intentionally bump the post, after some time it is not possible to edit the post here in the forum. And after some time I did the test by replacing the codes one by one and came to the conclusion that this code prevents displaying a new mention in the table of mentions. So I added a post telling you which code is blocking the new mention. Did I do something wrong? No. So stop being rude.

2. This forum does not have a mentions system so @username does not work - so that's why I sent you a normal message to take a look at this bug! That it was a kindly private message. Just because users still reporting this problem to me, that there is no new mention in the mentions table. Did I do something wrong? No.

3. Before you add a generally available tutorial, check if everything works properly after changing the codes. And if someone detects a bug and reports it, just be friendly! Being nice isn't complicated. Unless you have a problem with that so okay.

4. If you want to be nasty then you should write it to me privately, not in the modification thread.

5. On October 25, 2020, I sent you a private message asking: "These changes (https://www.simplemachines.org/community/index.php?topic=522005.msg4054326#msg4054326) may be implement to "@mention members" package? I mean to install this mod with these changes already".

And I mentioned to you:

"I understand, that's why I ask in a private message if there is such a possibility to not clutter the help topic. If it is possible, then I will ask for help on this topic".

It's a normal question and you answered my questions and you had no problem.

I know that the forum is used to help and I just sent a private message kindly, that's all.
Title: Re: @mention members
Post by: GL700Wing on February 09, 2021, 05:32:38 PM
Quote from: jsx on February 09, 2021, 12:31:51 AM
1. First of all, I do not intentionally bump the post, after some time it is not possible to edit the post here in the forum. And after some time I did the test by replacing the codes one by one and came to the conclusion that this code prevents displaying a new mention in the table of mentions. So I added a post telling you which code is blocking the new mention. Did I do something wrong? No. So stop being rude.
Fair enough re not being able to edit your previous post.  I wasn't rude - I was polite ...

Quote2. This forum does not have a mentions system so @username does not work - so that's why I sent you a normal message to take a look at this bug! That it was a kindly private message. Just because users still reporting this problem to me, that there is no new mention in the mentions table. Did I do something wrong? No.
Did you do something wrong - in my opinion, and given that you sent the PM less than five minutes after you posted your second message here, Yes!

Quote3. Before you add a generally available tutorial, check if everything works properly after changing the codes. And if someone detects a bug and reports it, just be friendly! Being nice isn't complicated. Unless you have a problem with that so okay.
Apologies for not testing this fully and thank you for reporting the issue. My suggestion is that you remove the code change I suggested until I have time to investigate it. 

Quote4. If you want to be nasty then you should write it to me privately, not in the modification thread.
I wasn't nasty - I was polite ...
Title: Re: @mention members
Post by: GL700Wing on February 14, 2021, 06:57:07 PM
Quote from: jsx on January 01, 2021, 05:24:15 AM
What could be the reason why new mentions do not appear in the list of mentions in user profile?
Yes - if you implemented the second enhancement suggestion I made (https://www.simplemachines.org/community/index.php?topic=522005.msg4054326#msg4054326) I accidentally omitted another change that is required in ./Sources/Subs-Post.php and the reason I hadn't noticed it on the forums I use this enhancement on was because I had actually made that required change - apologies for any inconvenience this has caused.

The additional change required in ./Sources/Subs-Post.php is as follows:
Find:
// Alright, done now... we can abort now, I guess... at least this much is done.
ignore_user_abort($previous_ignore_user_abort);

if (!empty($msgOptions['mentions']))
mentions_process_store($msgOptions['mentions'], $msgOptions['id'], $msgOptions['subject'], $msgOptions['approved']);

Replace With:
// Alright, done now... we can abort now, I guess... at least this much is done.
ignore_user_abort($previous_ignore_user_abort);

if (!empty($msgOptions['mentions']))
// Fix for bug - see https://www.simplemachines.org/community/index.php?topic=522005.msg3695332#msg3695332
// Added $posterOptions['id'] and $posterOptions['name'] as these options are now required for mentions_process_store.
mentions_process_store($msgOptions['mentions'], $msgOptions['id'], $msgOptions['subject'], isset($msgOptions['approved']) ? $msgOptions['approved'] : 1, $posterOptions['id'], $posterOptions['name']);






The two enhancement suggestions (which includes the change shown above) are now as follows:

The first is, if the option 'Enable mentions e-mail by default' is enabled, to also notify a member by PM that they have been mentioned and then to only send an email message if the member does not receive email notifications of PMs.

In ./Sources/Mentions.php
Find:
sendmail($mention['email_address'], $subject, $body)
Replace With:
// Send the mention notification by PM.
sendpm(array('to' => array($mention['id']), 'bcc' => array()), $subject, $body);

// If the member being mentioned does not receive email notifications of PMs send a separate email message.
$result = $smcFunc['db_query']('', '
SELECT id_member, pm_email_notify
FROM {db_prefix}members
WHERE id_member = {int:mention_id}',
array(
'mention_id' => (int) array($mention['id']),
)
);
$row = $smcFunc['db_fetch_assoc']($result);
$smcFunc['db_free_result']($result);
$pmMailNotify = ($row['pm_email_notify']);
if ($pmMailNotify == 0)
sendmail($mention['email_address'], $subject, $body);






The second is to enable forum admins to fix incorrectly formatted mentions in existing posts (eg, '@ name' instead of '@name') and to have the corrected mention attributed to the post author (by default the corrected mention is attributed to the member editing the post).

In ./Sources/Mentions.php
Find:
function mentions_process_store(array $mentions, $id_post, $subject, $approved = true)
{
global $smcFunc, $txt, $user_info, $scripturl;

Replace With:
function mentions_process_store(array $mentions, $id_post, $subject, $approved = true, $pa_id, $pa_name)
{
global $smcFunc, $txt, $user_info, $scripturl;

// Check if the user editing post is the same as the post author.
$mention_member_id = $user_info['id'];
$mention_member_name = $user_info['name'];
if ($pa_id != $user_info['id'])
{
$mention_member_id = $pa_id;
$mention_member_name = $pa_name;
}


Find:
array($id_post, $user_info['id'], $mention['id'], time()),
Replace With:
// Use $mention_member_id instead of $user_info['id'].
array($id_post, $mention_member_id, $mention['id'], time()),


Find:
'MEMBERNAME' => $user_info['name'],
Replace With:
// Use $mention_member_name instead of $user_info['name'].
'MEMBERNAME' => $mention_member_name,





In ./Sources/Post.php
Find:
if (!empty($topic_info['locked']) && !allowedTo('moderate_board'))
Add Before:
// Added pa_id to user_info to enable Admins to correct mentions in existing posts and have the mention attributed to the post author.
$user_info['pa_id'] = $row['id_member'];



Find:
$posterOptions = array(
'id' => $user_info['id'],
'name' => $_POST['guestname'],
'email' => $_POST['email'],
'update_post_count' => !$user_info['is_guest'] && !isset($_REQUEST['msg']) && $board_info['posts_count'],

Add After:
// Added pa_id and pa_name to enable Admins to correct mentions in existing posts and have the mention attributed to the post author.
'pa_id' => isset($_REQUEST['msg']) && !empty($topic) ? $user_info['pa_id'] : $user_info['id'],
'pa_name' => $_POST['guestname'],





In ./Sources/Subs-Post.php
Find:


mentions_process_post($msgOptions, $topicOptions, $posterOptions);
if (!empty($msgOptions['mentions']))
mentions_process_store($msgOptions['mentions'], $msgOptions['id'], $msgOptions['subject'], $msgOptions['approved']);

Replace With:
// If an Admin is modifying another member's post to correct mentions have the mention attributed to the post author.
if ($user_info['is_admin'] && isset($posterOptions['pa_id']) && ($posterOptions['id'] !== $posterOptions['pa_id']))
{
$pa_posterOptions = $posterOptions;
$pa_posterOptions['id'] = $posterOptions['pa_id'];
$pa_posterOptions['name'] = $posterOptions['pa_name'];
mentions_process_post($msgOptions, $topicOptions, $pa_posterOptions);
}
else
mentions_process_post($msgOptions, $topicOptions, $posterOptions);

if (!empty($msgOptions['mentions']))
// Fix for bug - see https://www.simplemachines.org/community/index.php?topic=522005.msg3695332#msg3695332
// Added $posterOptions['pa_id'] and $posterOptions['pa_name'] to enable Admins to correct mentions in existing posts and have the mention attributed to the post author.
mentions_process_store($msgOptions['mentions'], $msgOptions['id'], $msgOptions['subject'], isset($msgOptions['approved']) ? $msgOptions['approved'] : 1, $posterOptions['pa_id'], $posterOptions['pa_name']);



Find:
// Alright, done now... we can abort now, I guess... at least this much is done.
ignore_user_abort($previous_ignore_user_abort);

if (!empty($msgOptions['mentions']))
mentions_process_store($msgOptions['mentions'], $msgOptions['id'], $msgOptions['subject'], isset($msgOptions['approved']));

Replace With:
// Alright, done now... we can abort now, I guess... at least this much is done.
ignore_user_abort($previous_ignore_user_abort);

if (!empty($msgOptions['mentions']))
// Fix for bug - see https://www.simplemachines.org/community/index.php?topic=522005.msg3695332#msg3695332
// Added $posterOptions['id'] and $posterOptions['name'] as these options are now required for mentions_process_store.
mentions_process_store($msgOptions['mentions'], $msgOptions['id'], $msgOptions['subject'], isset($msgOptions['approved']) ? $msgOptions['approved'] : 1, $posterOptions['id'], $posterOptions['name']);

Title: Re: @mention members
Post by: FragaCampos on February 16, 2021, 10:29:42 PM
I want to thank you for this, Shambles. I just installed this mod and I was having this error.
Your solution works perfectly (although I had to read all messages, because the error is not in text format, but in an image, which is not searchable).



Quote from: Shambles on December 04, 2019, 02:34:33 PM
Under PHP 7.1, when unchecking Profile > Profile Info > Mentions > E-mail mention notifications:


(https://i.imgur.com/7OpexTm.jpg)


The (bool) cast within Mentions.php is no longer returning 0 when false; it's returning null, causing the above error.

Solution:

Sources/Mentions.php

Code (Find) Select

if (!empty($_POST['save']) && $user_info['id'] == $memID)
updateMemberData($memID, array('email_mentions' => (bool) !empty($_POST['email_mentions'])));


Code (Replace) Select

if (!empty($_POST['save']) && $user_info['id'] == $memID)
updateMemberData($memID, array('email_mentions' => empty($_POST['email_mentions']) ? 0 : 1));

Title: Re: @mention members
Post by: FragaCampos on February 19, 2021, 06:13:01 PM
I'm also getting this error sometimes.
Could it be due to special chars like spaces and é,à,ç, etc.?


Quote from: ambre222 on November 13, 2020, 08:56:21 AM
Hello,
I got this error Illegal mix of collations for operation 'in'
Fichier: /home/attrapes/public_html/forum/Sources/Mentions.php
Ligne: 193
when trying to mention for instance someone with weird accents Mügan.
Is there a way to fix that without changing the encoding of the database ?
Title: Re: @mention members
Post by: FragaCampos on February 25, 2021, 09:49:22 PM
Ok, I managed to fix this with these modification and now it seems to accept special characters and spaces.
https://www.simplemachines.org/community/index.php?topic=522005.msg3877028#msg3877028




Quote from: ambre222 on November 13, 2020, 08:56:21 AM
Hello,
I got this error Illegal mix of collations for operation 'in'
Fichier: /home/attrapes/public_html/forum/Sources/Mentions.php
Ligne: 193
when trying to mention for instance someone with weird accents Mügan.
Is there a way to fix that without changing the encoding of the database ?
Title: Re: @mention members
Post by: kesulin on March 05, 2021, 04:18:14 AM
hi everyone,

is the download at the first post updated? Or i must fix all the last code manually?
Title: Re: @mention members
Post by: GL700Wing on March 05, 2021, 06:25:36 AM
Quote from: kesulin on March 05, 2021, 04:18:14 AM
hi everyone,

is the download at the first post updated? Or i must fix all the last code manually?
The mod package download at the first post has not been updated since May 2014 (ie, almost 7 years ago) so you'll need to read through all the posts in this topic and apply the fixes/changes you want/need.
Title: Re: @mention members
Post by: kesulin on March 05, 2021, 11:41:13 AM
nobody can sent me this mod updated?
Title: Re: @mention members
Post by: shadav on March 05, 2021, 11:46:21 AM
Quote from: kesulin on March 05, 2021, 11:41:13 AM
nobody can sent me this mod updated?
not without the permission of the mod creator
Title: Re: @mention members
Post by: shadav on March 17, 2021, 03:13:31 AM
still getting these warnings
Notice: Undefined index: title in /Sources/Mentions.php on line 45

line 45
$menu_buttons['profile']['title'] .=  (!empty($user_settings['unread_mentions']) ? ' [' . $user_settings['unread_mentions'] . ']' : '');
Title: Re: @mention members
Post by: GL700Wing on March 17, 2021, 06:31:57 AM
Quote from: shadav on March 17, 2021, 03:13:31 AM
still getting these warnings
Notice: Undefined index: title in /Sources/Mentions.php on line 45

line 45
$menu_buttons['profile']['title'] .=  (!empty($user_settings['unread_mentions']) ? ' [' . $user_settings['unread_mentions'] . ']' : '');
I've been using this mod on my forums for years and fortunately I haven't ever had this error.

However, while investigating this issue for you this evening I discovered that all line 45 does is also add the count for the number of unread mentions to the top-level 'Profile' menu (it's already added to the actual 'Mentions' menu by line 41) and if you don't mind it not *also* being there you can simply comment out line 45 (it won't affect your ability to uninstall the mod later as the file ./Sources/Mentions.php gets deleted when the mod is uninstalled).

Maybe not the answer you were looking for but it is a workaround ...
Title: Re: @mention members
Post by: shadav on March 17, 2021, 01:55:09 PM
thank you...if it doesn't mess up the function of the mod  :P
hm....seeing as I've moved my profile menu into a user menu, I really don't need that option anyways

thank you for looking into it, now no more notice warnings on my sites....  :laugh: now to work on the error logs  :P
Title: Re: @mention members
Post by: GL700Wing on March 17, 2021, 07:52:39 PM
Quote from: shadav on March 17, 2021, 01:55:09 PM
thank you...if it doesn't mess up the function of the mod  :P
You're welcome!

Quote
hm....seeing as I've moved my profile menu into a user menu, I really don't need that option anyways
That's probably why you were getting the error message ...
Title: Re: @mention members
Post by: shadav on March 17, 2021, 08:05:53 PM
I was getting the error before then in my logs but that might be why now it was showing as a notice in the header of the site visible to all...hm then again no because it hadn't shown before, only after changing hosts....maybe the other host was suppressing the errors  ???
oh well :D thank you for helping fix it
Title: Re: @mention members
Post by: aegersz on May 03, 2021, 04:58:03 AM
Will there be a SMF 2.1 version of this Mentions mod or is there similar functionality in SMF 2.1 ?

(if so, what is it ?)
Title: Re: @mention members
Post by: GL700Wing on May 03, 2021, 10:04:29 AM
Quote from: aegersz on May 03, 2021, 04:58:03 AM
Will there be a SMF 2.1 version of this Mentions mod or is there similar functionality in SMF 2.1 ?

(if so, what is it ?)
Mentions is a standard feature in SMF 2.1 ...
Title: Re: @mention members
Post by: aegersz on May 03, 2021, 10:39:52 AM
Excellent ! Thanks.
Title: Re: @mention members
Post by: aegersz on May 03, 2021, 10:59:45 AM
... but how does it work ?

I have no notification like the mod - is that right ? How do I see the notifications and is there an email ?
Title: Re: @mention members
Post by: Speed King on May 03, 2021, 11:32:47 AM
Quote from: aegersz on May 03, 2021, 10:59:45 AM
... but how does it work ?

I have no notification like the mod - is that right ? How do I see the notifications and is there an email ?

Open Alerts => Settings window, then check 'Receive alert' or 'Receive e-mail' right to  'When my @name is mentioned in a post'
Title: Re: @mention members
Post by: aegersz on May 03, 2021, 11:36:42 AM
Thanks but I am not getting any alerts (as is the default setting) or emails when I select it (on SMF 2.1 RC3)
Title: Re: @mention members
Post by: aegersz on May 04, 2021, 04:54:02 AM
Known bugs in 2.1 RC3. TBH, I preferred this mod over the RC3 version.

I think I will stick with 2.0.n for a fair while.
Title: Re: @mention members
Post by: jsx on May 29, 2021, 05:57:29 AM
@GL700Wing

Hi. I implemented this patch (https://www.simplemachines.org/community/index.php?topic=522005.msg4082149#msg4082149) and now everything is fine. Thank you for your help.
Title: Re: @mention members
Post by: GL700Wing on May 29, 2021, 06:47:14 PM
Quote from: jsx on May 29, 2021, 05:57:29 AM
@GL700Wing

Hi. I implemented this patch (https://www.simplemachines.org/community/index.php?topic=522005.msg4082149#msg4082149) and now everything is fine. Thank you for your help.
Thanks for letting me know and you're welcome.
Title: Re: @mention members
Post by: Roub1k on November 09, 2021, 08:39:24 PM
Good day everyone. I installed the mod on SMF v2.0.8 ( SMF2.1 mention notifications not working for me ) but there are no notifications. Settings are ok, i also implement the above patch as jsx mentioned but still nothing.

Any help?
Title: Re: @mention members
Post by: landyvlad on February 09, 2022, 07:15:17 PM
I am currently using this mod.

Presumably the mentions are held in the database.

When upgrading from 2.0.19 to 2.1.0 (full upgrade package) is it possible to carry over the mentions to the new forum? (Given that it's a core feature of the 2.1.x series, not a mod)

If so, how would I go about doing so please?
Title: Re: @mention members
Post by: Sebastiii on April 13, 2022, 02:06:31 PM
Hello :)
After upgrading from 2.0.18 to 2.0.19 :)
When going to "Profil -> Mentions" section to see all mentions tag, when unchecking the "E-mail mention notifications" checkbox, I'm getting :
Incorrect integer value: '' for column 'email_mentions' at row 1
File: ...\Sources\Subs.php
Line: 542

Everything was good in 2.0.18, is there a change in DB post that trigger this issue after going to 2.0.19 ?
Thanks.
Title: Re: @mention members
Post by: Arantor on April 13, 2022, 02:17:09 PM
@Sebastiii this is a known bug in the mod.

Quote from: Shambles on December 04, 2019, 02:34:33 PMUnder PHP 7.1, when unchecking Profile > Profile Info > Mentions > E-mail mention notifications:


(https://i.imgur.com/7OpexTm.jpg)


The (bool) cast within Mentions.php is no longer returning 0 when false; it's returning null, causing the above error.

Solution:

Sources/Mentions.php

Code (Find) Select
if (!empty($_POST['save']) && $user_info['id'] == $memID)
updateMemberData($memID, array('email_mentions' => (bool) !empty($_POST['email_mentions'])));

Code (Replace) Select
if (!empty($_POST['save']) && $user_info['id'] == $memID)
updateMemberData($memID, array('email_mentions' => empty($_POST['email_mentions']) ? 0 : 1));
Title: Re: @mention members
Post by: Sebastiii on April 13, 2022, 02:43:45 PM
Hi @Arantor
This is great :)
Thanks a lot

Title: Re: @mention members
Post by: sporty88 on July 04, 2022, 09:13:49 AM
Quote from: Apostaganha on May 02, 2014, 04:10:38 PMty Dragooon, this plugin its awesome, great work, Thanks!

Thanks for this!
Title: Re: @mention members
Post by: jsx on September 01, 2022, 05:41:26 AM
Quote from: landyvlad on February 09, 2022, 07:15:17 PMI am currently using this mod.

Presumably the mentions are held in the database.

When upgrading from 2.0.19 to 2.1.0 (full upgrade package) is it possible to carry over the mentions to the new forum? (Given that it's a core feature of the 2.1.x series, not a mod)

If so, how would I go about doing so please?

I have the same question. Is there any solution to transfer mentions from this mod to the mentions system in SMF 2.1?

@GL700Wing you know this mod well. What do you think, is it feasible?
Title: Re: @mention members
Post by: GL700Wing on September 02, 2022, 07:51:50 AM
Quote from: jsx on September 01, 2022, 05:41:26 AM
Quote from: landyvlad on February 09, 2022, 07:15:17 PMI am currently using this mod.

Presumably the mentions are held in the database.

When upgrading from 2.0.19 to 2.1.0 (full upgrade package) is it possible to carry over the mentions to the new forum? (Given that it's a core feature of the 2.1.x series, not a mod)

If so, how would I go about doing so please?

I have the same question. Is there any solution to transfer mentions from this mod to the mentions system in SMF 2.1?

@GL700Wing you know this mod well. What do you think, is it feasible?
@jsx I've thought about this but given that mentions are mostly considered to be transient/temporary in nature I don't think it's worth transferring them from SMF 2.0 to SMF 2.1.

That said, I haven't looked into what would be involved in transferring this mod's mentions from SMF 2.0 to SMF 2.1 and unfortunately I wouldn't be able to commit to doing something like this for at least a couple of months (upcoming planned holidays).
Title: Re: @mention members
Post by: Steve on September 02, 2022, 09:20:14 AM
Quote from: GL700Wing on September 02, 2022, 07:51:50 AM(upcoming planned holidays)
What?? Didn't they tell you when you joined the team that Australians aren't allowed to take holidays?  :P
Title: Re: @mention members
Post by: GL700Wing on September 02, 2022, 09:37:15 AM
Quote from: Steve on September 02, 2022, 09:20:14 AM
Quote from: GL700Wing on September 02, 2022, 07:51:50 AM(upcoming planned holidays)
What?? Didn't they tell you when you joined the team that Australians aren't allowed to take holidays?  :P
Yeah right - 4WD ready, camper trailer almost packed, Outback Australia calling ...  ;D

(And that's just September/October, November is motorcycling!)
Title: Re: @mention members
Post by: Steve on September 02, 2022, 09:48:40 AM
Have fun!  ;D
Title: Re: @mention members
Post by: jsx on September 03, 2022, 08:08:31 AM
Quote from: GL700Wing on September 02, 2022, 07:51:50 AM@jsx I've thought about this but given that mentions are mostly considered to be transient/temporary in nature I don't think it's worth transferring them from SMF 2.0 to SMF 2.1.

That said, I haven't looked into what would be involved in transferring this mod's mentions from SMF 2.0 to SMF 2.1 and unfortunately I wouldn't be able to commit to doing something like this for at least a couple of months (upcoming planned holidays).

I understand, thanks for the information. Maybe someday when you have time you will look at the solution of this. It would be nice to have such a solution.

I wish you a good holidays :)
Title: Re: @mention members
Post by: Kootch on October 02, 2022, 12:55:02 PM
Okay, I have 2.1.2 running.  I added this mod and started getting errors right away. I've tried installing and uninstalling a couple times.  I've tried to go in and wipe every mention of it in the database but I still keep getting errors.

How can I completely obliterate this mod from my site? For some reason I can't post screenshots here of the errors.

Suggestions?
Title: Re: @mention members
Post by: jsx on October 03, 2022, 08:15:30 AM
SMF 2.1 has its own built-in mentions system.
Title: Re: @mention members
Post by: Steve on October 03, 2022, 08:19:27 AM
You'll need to go to the mod link, select packages, select SMF version 2.0.7 and click parse. You'll need to ensure all the changes it made were removed.

This mod isn't compatible with 2.1.2 and as @jsx said, it's a built-in function of 2.1.2.
Title: Re: @mention members
Post by: Kootch on October 06, 2022, 10:54:20 PM
Quote from: jsx on October 03, 2022, 08:15:30 AMSMF 2.1 has its own built-in mentions system.

How do you use the built-in mentions system in 2.1?
Title: Re: @mention members
Post by: Shades. on October 06, 2022, 11:59:48 PM
Quote from: Kootch on October 06, 2022, 10:54:20 PMHow do you use the built-in mentions system in 2.1?
Admin>Features and Options>Mentions

Check to enable "Enable Mentions", Select & choose "Membergroups allowed to mention users", click save. Go to Admin>Permissions>General Permissions and under each membergroup find "Mention others via @name" and put a check beside it if you want that membergroup to be able to mention other members. Then go anywhere on your forum and type @member with "member" being the username of the member you're mentioning and that's it. They (the person you mentioned in the previous step) will then receive an alert that they had been mentioned.

Hope that helps! 8)
Title: Re: @mention members
Post by: Steve on October 07, 2022, 06:23:48 AM
Good explanation @Shades.
Title: Re: @mention members
Post by: Shades. on October 07, 2022, 02:54:47 PM
Quote from: Steve on October 07, 2022, 06:23:48 AMGood explanation @Shades.
Thanks, I try! O:)  ;D
Title: Re: @mention members
Post by: FragaCampos on March 03, 2023, 01:20:17 PM
After 2 years working on my forum, the mod stopped creating the link in the usernames' mention on posts. The rest seems to be working.
The only thing I did was install Quick Spoiler (https://custom.simplemachines.org/index.php?mod=2940).

I uninstalled the spoiler mod, but the problem persists, so I believe it messed some file which I can not detect.

Can someone give me a help on this, please?
Title: Re: @mention members
Post by: aegersz on June 01, 2023, 06:16:34 PM
It might be worth uninstalling and reinstalling the Mentions mod again.