News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

@mention members

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

Previous topic - Next topic

Jingaling

#420
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!

Gwenwyfar

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.
"It is impossible to communicate with one that does not wish to communicate"

Jingaling

Nope, no errors. The theme I'm using is "Redsy" 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.

Nixis

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.

Gwenwyfar

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 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)
"It is impossible to communicate with one that does not wish to communicate"

Gluz

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.

Jingaling

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!

noobest

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:



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.  :)

Jingaling

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?



Thanks!

noobest

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?



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.

Jingaling

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!


FireDitto

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 :)
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

Koda

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!

zapiy

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?
www.maturevideogamer.co.uk
www.consoleplanet.co.uk
www.retrovideogamer.co.uk

noobest

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!



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



Yorel

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:



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

margarett

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.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

omen666

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

omen666

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?

Yorel

@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  :-\

Advertisement: