• Welcome to Simple Machines Community Forum. Please login or sign up.
January 28, 2022, 12:19:07 PM

News:

SMF 2.0.19 has been released! Please update. Read more.


@mention members

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

Previous topic - Next topic

Gluz

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']));
QuoteThink in spanish, habla en inglés.

420SA

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

Bob Perry of Web Presence Consulting

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?

Best Regards,
Bob Perry



"The world is moving so fast these days that the man who says it can't be done is generally interrupted by someone doing it." Elbert Hubbard

Route

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?

Adrek

maybe you have installed any Menu editor mod?
Polskie wsparcie SMF na simplemachines.org

the simplest solution is most likely the right one

Route

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 ?

Adrek

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
Polskie wsparcie SMF na simplemachines.org

the simplest solution is most likely the right one

Rosss

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!

ceekay27

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?

br360

Never install a mod that is giving you error warnings but what is the exact message you are getting when trying to install? 

ceekay27

Thanks for the reply. I decided to purchase one instead :)

Sigyn

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-

aegersz

Hi, i checked my Scheduled Task log and this mod doesn't make an entry in the log at all.

is that normal ?
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

br360

Did you check to make sure that "Remove seen mentions" was enabled in your scheduled tasks?

aegersz

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

br360

Sure, I will check now. How many days did you set in the mentions settings for "Remove mentions older than these days'?

br360

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

Shambles

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

Lord991

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

Shambles

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.

Advertisement: