News:

Wondering if this will always be free?  See why free is better.

Main Menu

@mention members

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

Previous topic - Next topic

Yorel

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

Yorel

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

Leinnan

How to get number of unreaded mentions in index.template.php?

ZamaTata

Very nice mod.. working fine in 2.0.11

Sigyn

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

Shambles

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.

br360

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

aegersz

i forgot the Permissions changes need to be done but now it's done and running well.

handy mod.

thanks.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Sigyn

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.

roza

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.

Sigyn

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.

Shambles

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)));
}

Sigyn

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.

roza

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.

aegersz

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..
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

butch2k

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  ;)

Sigyn

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.

Koppo

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

Nícholas Carballo

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.

Arantor

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.

Advertisement: