@mention members

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

Previous topic - Next topic

aegersz

i expect so as mentioning yourself makes no sense
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

thunderchld

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.

aegersz

you can mention yourself from the same logon ?

doesn't work for me.
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

icarus911

 :-[
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


Arantor

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)

ErtugrulBEKTIK

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.

aegersz

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

Fencejumper09

Does this Mod work with 2.0.14?

Do any specific changes need to be made?

d3vcho

Yes, it should work for 2.0.14 as well. No extra changes that I'm aware of.
"Greeting Death as an old friend, they departed this life as equals"

Shambles

Quote
Does this Mod work with 2.0.14?
Works fine in my 2.0.15 accounts - no special treatment required.

-Rock Lee-

No problem with 2.0.15 can only conflict with another mod but it is solved quickly...


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Fencejumper09

Seems to be working great on our forum! Thank you all!

Drakkon

I'm running SMF 2.0.15. When I go to mentions the posts where I'm being mentioned don't show up.

Shambles

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?


Drakkon

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.

Shambles


Drakkon

Thank you for your help. It was just a permissions issue with the test account.

mitek

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
KCF Private Forum

Arantor

FYI you're going to hate 2.1 when it's out, it's exclusively on or off, not board by board.

brettuk

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?

Advertisement: