Advertisement:

Author Topic: @mention members  (Read 186752 times)

Offline Jingaling

  • Semi-Newbie
  • *
  • Posts: 44
    • Motorbike Community
Re: @mention members
« Reply #420 on: September 18, 2015, 10:46:11 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:

Code: [Select]
'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!
« Last Edit: September 18, 2015, 10:58:12 AM by kevq »

Offline Gwenwyfar

  • Great Wizard's familiar
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,269
  • Gender: Female
Re: @mention members
« Reply #421 on: September 18, 2015, 11:15:10 AM »
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.

Offline Jingaling

  • Semi-Newbie
  • *
  • Posts: 44
    • Motorbike Community
Re: @mention members
« Reply #422 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.

Offline Nixis

  • Newbie
  • *
  • Posts: 6
Re: @mention members
« Reply #423 on: September 18, 2015, 02:29:18 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.

Offline Gwenwyfar

  • Great Wizard's familiar
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,269
  • Gender: Female
Re: @mention members
« Reply #424 on: September 18, 2015, 04:26: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.

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)

Offline Gluz

  • Sr. Member
  • ****
  • Posts: 985
  • Gender: Male
Re: @mention members
« Reply #425 on: September 18, 2015, 07:21:44 PM »
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:
Code: [Select]
#button_logout, #button_profile {
    display: none;
}
and replace with:
Code: [Select]
#button_logout {
    display: none;
}
Then you will have the original SMF Profile dropdown with the Mentions and the number of mentions.
Need help with PHP, HTML, CSS, Themes or MODs?

Quote
Think in spanish, habla en inglés.

Offline Jingaling

  • Semi-Newbie
  • *
  • Posts: 44
    • Motorbike Community
Re: @mention members
« Reply #426 on: September 19, 2015, 01:09:07 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!

Offline noobest

  • Newbie
  • *
  • Posts: 4
Re: @mention members
« Reply #427 on: September 21, 2015, 10:43:23 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:

Code: [Select]
function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings;

Add $menu_buttons, $user_settings:

Code: [Select]
function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings, $menu_buttons, $user_settings;

Then search:

Code: [Select]
<span>', $context['user']['name'], '</span> <span class="caret"></span>
And replace it with:

Code: [Select]
<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.  :)

Offline Jingaling

  • Semi-Newbie
  • *
  • Posts: 44
    • Motorbike Community
Re: @mention members
« Reply #428 on: September 21, 2015, 12:03:30 PM »
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!

Offline noobest

  • Newbie
  • *
  • Posts: 4
Re: @mention members
« Reply #429 on: September 23, 2015, 03:20:05 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:

Code: [Select]
<li class="divider"></li>
Add before:

Code: [Select]
<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.

Offline Jingaling

  • Semi-Newbie
  • *
  • Posts: 44
    • Motorbike Community
Re: @mention members
« Reply #430 on: September 23, 2015, 04:33:09 AM »
Hi kevq, lets modify index.template.php again.

Search this:

Code: [Select]
<li class="divider"></li>
Add before:

Code: [Select]
<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!


Offline FireDitto

  • Full Member
  • ***
  • Posts: 617
  • Gender: Female
  • Shadow In The Flame
    • @SPWeyr on Twitter
    • Second Pass Weyr RPG
Re: @mention members
« Reply #431 on: September 26, 2015, 12:12:58 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
An AU Pernse RPG

SMF 2.0.6 with SP 2.3.5

Offline Koda

  • Semi-Newbie
  • *
  • Posts: 25
Re: @mention members
« Reply #432 on: September 27, 2015, 07:09:56 PM »
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!

Offline zapiy

  • Jr. Member
  • **
  • Posts: 251
Re: @mention members
« Reply #433 on: October 05, 2015, 02:00:14 PM »
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?

Offline noobest

  • Newbie
  • *
  • Posts: 4
Re: @mention members
« Reply #434 on: October 06, 2015, 03:42:06 PM »
Hi kevq, lets modify index.template.php again.

Search this:

Code: [Select]
<li class="divider"></li>
Add before:

Code: [Select]
<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:

Code: [Select]
function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings, $menu_buttons, $user_settings;

Like this:

Code: [Select]
function template_body_above()
{
global $context, $settings, $options, $scripturl, $txt, $modSettings, $user_settings;


Find:

Code: [Select]
<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:

Code: [Select]
<span>', $context['user']['name'] , (!empty($user_settings['unread_mentions']) ? ' [' . $user_settings['unread_mentions'] . ']' : ''),'</span> <span class="caret"></span>
Same here:

Code: [Select]
<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:

Code: [Select]
<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!  ;)



Offline Yorel

  • Semi-Newbie
  • *
  • Posts: 79
Re: @mention members
« Reply #435 on: November 10, 2015, 01:35:02 PM »
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

Offline margarett

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 19,761
  • Gender: Male
Re: @mention members
« Reply #436 on: November 10, 2015, 05:34:30 PM »
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

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

Offline omen666

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

Offline omen666

  • Newbie
  • *
  • Posts: 9
Re: @mention members
« Reply #438 on: November 13, 2015, 07:53:47 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?

Offline Yorel

  • Semi-Newbie
  • *
  • Posts: 79
Re: @mention members
« Reply #439 on: November 14, 2015, 03:21:04 PM »
@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  :-\