Advertisement:

Author Topic: @mention members  (Read 169430 times)

Offline aegersz

  • Sophist Member
  • *****
  • Posts: 1,354
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: @mention members
« Reply #560 on: January 11, 2018, 04:38:23 PM »
i expect so as mentioning yourself makes no sense
Linux CentOS VPS running SMF 2.0 with 140+ mods installed (the full h/w and s/w can be seen at http://forum.drugs-and-users.org/index.php/topic,3301)

Offline thunderchld

  • Semi-Newbie
  • *
  • Posts: 67
Re: @mention members
« Reply #561 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.

Offline aegersz

  • Sophist Member
  • *****
  • Posts: 1,354
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: @mention members
« Reply #562 on: January 12, 2018, 07:50:27 PM »
you can mention yourself from the same logon ?

doesn't work for me.
Linux CentOS VPS running SMF 2.0 with 140+ mods installed (the full h/w and s/w can be seen at http://forum.drugs-and-users.org/index.php/topic,3301)

Offline icarus911

  • Newbie
  • *
  • Posts: 3
Re: @mention members
« Reply #563 on: January 12, 2018, 11:41:07 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


Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,796
    • Arantor on GitHub
Re: @mention members
« Reply #564 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)
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

Offline ErtugrulBEKTIK

  • Semi-Newbie
  • *
  • Posts: 47
Re: @mention members
« Reply #565 on: January 23, 2018, 10:24:22 AM »
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.

Offline aegersz

  • Sophist Member
  • *****
  • Posts: 1,354
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: @mention members
« Reply #566 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
Linux CentOS VPS running SMF 2.0 with 140+ mods installed (the full h/w and s/w can be seen at http://forum.drugs-and-users.org/index.php/topic,3301)

Offline Fencejumper09

  • Newbie
  • *
  • Posts: 3
Re: @mention members
« Reply #567 on: March 08, 2018, 02:19:52 PM »
Does this Mod work with 2.0.14?

Do any specific changes need to be made?

Offline d3vcho(void)

  • Lead Localizer
  • SMF Hero
  • *
  • Posts: 2,655
  • Gender: Male
  • Be prepared for hell
    • d3vcho on GitHub
Re: @mention members
« Reply #568 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.

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 4,802
  • Gender: Male
    • i30 Owners Club
Re: @mention members
« Reply #569 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.

Online Rock Lee

  • SMF Hero
  • ******
  • Posts: 1,634
  • Gender: Male
  • Digitalizando un nuevo mundo :D
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Re: @mention members
« Reply #570 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!
¡Regresando como cual Fenix! ~ Bomber Code © 2018
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Offline Fencejumper09

  • Newbie
  • *
  • Posts: 3
Re: @mention members
« Reply #571 on: March 08, 2018, 03:29:35 PM »
Seems to be working great on our forum! Thank you all!

Offline Drakkon

  • Semi-Newbie
  • *
  • Posts: 28
Re: @mention members
« Reply #572 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.

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 4,802
  • Gender: Male
    • i30 Owners Club
Re: @mention members
« Reply #573 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?


Offline Drakkon

  • Semi-Newbie
  • *
  • Posts: 28
Re: @mention members
« Reply #574 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.

Offline Shambles

  • SMF Hero
  • ******
  • Posts: 4,802
  • Gender: Male
    • i30 Owners Club
Re: @mention members
« Reply #575 on: March 28, 2018, 08:00:02 AM »
Using the Curve theme?

Offline Drakkon

  • Semi-Newbie
  • *
  • Posts: 28
Re: @mention members
« Reply #576 on: March 28, 2018, 11:29:30 PM »
Thank you for your help. It was just a permissions issue with the test account.

Offline mitek

  • Semi-Newbie
  • *
  • Posts: 59
Re: @mention members
« Reply #577 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

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 68,796
    • Arantor on GitHub
Re: @mention members
« Reply #578 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.
To assume is to hope that those who came before had the presence of mind and capacity to implement the dreams of those who would come after.

Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.