MyBB Community Forums

Full Version: MentionMe 3.2.12 (for MyAlerts 2.x)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
@Wildcard - we had a short discussion about that - what about adding a support with user ID - it could bring possibilities to make mentions working even for users whose had changed their username.
@Eldenroot

I've been asked about that a couple times in the past so, why don't we just take a poll and see what the popular opinion is?

https://community.mybb.com/thread-215417.html
@Wildcard - great Smile

Anyway we need more info how to integrate this feature properly... put username between tags with username id, or use same way how dvz mentions? Quite tricky :-(

EDIT: What about the backward compatibility with mentioned users in the old way @"Wildcard", will they work?
Does this plugin run the check queries on every single post? So let's say I view 20 posts on each page and 5 posts use Mention Me. Is the function loop run 5 times? That's a huge waste of resources if true and looking at the code that does appear to be how it works.
(2018-01-17, 07:29 PM)labrocca Wrote: [ -> ]Does this plugin run the check queries on every single post?

If by "check queries" you mean does it query the database for user info for every post? Well, it depends.

I utilize a cache that is updated by a task to include active users (adjustable in ACP) so that frequent visitors/active members won't require a query when their mentions are viewed. This same cache is updated when new members are mentioned. In this case, the first time new users are mentioned, a query will be needed, but subsequent mentions on the same page or for subsequent page views will not need a query.
(2018-01-17, 07:41 PM)Wildcard Wrote: [ -> ]
(2018-01-17, 07:29 PM)labrocca Wrote: [ -> ]Does this plugin run the check queries on every single post?

If by "check queries" you mean does it query the database for user info for every post? Well, it depends.

I utilize a cache that is updated by a task to include active users (adjustable in ACP) so that frequent visitors/active members won't require a query when their mentions are viewed. This same cache is updated when new members are mentioned. In this case, the first time new users are mentioned, a query will be needed, but subsequent mentions on the same page or for subsequent page views will not need a query.

Advice:  Run one query for each page view and skip the cache.  Overhead will be small and the plugin efficient.
(2018-01-17, 08:07 PM)labrocca Wrote: [ -> ]Advice:  Run one query for each page view and skip the cache.  Overhead will be small and the plugin efficient.

Thanks for your suggestion. I will look into it.

I don't want to sound defensive, but I feel that this plugin is pretty efficient as it stands. On the average page view on my forum, I don't have any queries for user info. The cache size is minimal, and I forgot to mention it, but recent thread participants are included in the cached users set sent to autocomplete, so nine times out of ten even autocomplete doesn't require a query.
Quote:On the average page view on my forum, I don't have any queries for user info.


You have a small forum.  Look at My Awards plugin if you need an example of how I do one query for all the posts in a showthread page.

And my suggestion is meant to help increase the efficiency of your plugin but if you're comfortable with the method you used that's fine too.  Has it been tested well on a large forum?
(2018-01-17, 09:25 PM)labrocca Wrote: [ -> ]You have a small forum.

Size isn't everything.

(2018-01-17, 09:25 PM)labrocca Wrote: [ -> ]Look at My Awards plugin if you need an example of how I do one query for all the posts in a showthread page.

I understand the process of grabbing all the pids in the thread page, but how would that help me when I don't know which users are mentioned until I parse the message?

(2018-01-17, 09:25 PM)labrocca Wrote: [ -> ]And my suggestion is meant to help increase the efficiency of your plugin but if you're comfortable with the method you used that's fine too.  Has it been tested well on a large forum?

I don't get a lot of feedback in terms of how many people are using my plugins and what size forums it is being used on (though I would love that). It is fair to say that this is a fairly popular plugin so if it was killing people on efficiency I am sure I would have heard about it by now.

As to making it more efficient, I am always up for that. The only thing to keep in mind is that I am a hobbyist developer and I don't know everything so sometimes it takes me a minute to grasp how to go about accomplishing suggested features or different ways to code things.
Quote:I understand the process of grabbing all the pids in the thread page, but how would that help me when I don't know which users are mentioned until I parse the message?

Darn it. Good point. Sad

Umm....grr...ughh...

I have to think about that a minute.