Code Monkey home page Code Monkey logo

mentionme's People

Contributors

1d3s avatar burnacid avatar chack1172 avatar eldenroot avatar svepu avatar wildcardsearch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

mentionme's Issues

Quoted Mentions Still Producing Alerts Erratically

It certainly doesn't always happen but now two board owners have confirmed that from time to time (at least) quoted mentions may produce alerts.

Looking into it but haven't found a problem in the code yet.

Installation routine with alerts on by default?

I've just realized the new version of MentionMe doesn't come with its setting enabled by default. As discussed here it should be quite easy to edit existing functions.

I know @euantor is going to update again the settings system with a reverse logic you've suggested but in the meantime it would be nice to have a working solution. You can see how I've built it up in all my MyAlerts-related plugins (and also in the force_enable_alerts.php script :D).

If you agree with me I'll pop a new Pull Request as fast as possible.

mention_try_name function unuseful

function mention_try_name($username = '')
{
    global $db;

    static $name_list = array();

    if($username)
    {
        $user_query = $db->simple_select("users", "uid, username, usergroup, displaygroup", "LOWER(username)='" . $db->escape_string(strtolower($username)) . "'", array('limit' => 1));

        if($db->num_rows($user_query) === 1)
        {
            return $db->fetch_array($user_query);
        }
    }
    return false;
}

I don't know why you are using this instead of the core get_user($username) function. I know you're aiming to retrieve a small amount of data limited to uid, username, usergroup and displaygroup, but get_user function tries to get data from cache if possible, saving potential queries and server load.

Need To Upgrade Installer

When looking at #30 I realized that MentionMe can benefit from the new installer that I use on ASB because it adds templates that can be customized per theme.

Incorrect Language For Force Enable Flash Message

Currently after force enabling mention alerts the following flash message is show:

Alerts enabled for all users

That is inaccurate and leads the user to believe that all alerts have been force-enabled.

Mention not working / problems

All in all, the mentions do work but for some members it doesn't seem to be working correctly. I think this may be since one of my mods was changing peoples names. This could include him changing their name since they wanted a space or a special character in their name. Example includes, EternalBlaze renamed to Eternal Blaze.

I think this might have affected how some people are not getting mentions anymore and even quote alerts which I also posted about at Euan's github.

Is there anyway I can fix this problem? If there's a "proper" way to have a clean wipe and clean install of it to fix all of these problems, I do not mind doing it but I already tried deactivating, uninstalling, reinstalling, deleting all files off of the FTP and even reuploading but no dice. Any help would be appreciated. Not getting alerts is getting some members a bit rowdy.

Even better performances?

Hi @WildcardSearch,
what's up? While digging into MentionMe - I will install it someday on my board ๐Ÿ˜„ - I've found some parts that may be optimized.

Right now you're hooking into parse_message which is fired for every message when building the postbit. This causes your code to be executed X times per thread where X stands for the number of posts.

You're using a static variable to cache users in multiple lookups and that's really nice. Also, you've built a caching method for commonly mentioned users and this boosts even more the plugin's performances. But here stands the problem: what if there are plenty of mentions in a single thread's page? The scenario:

  • A page contains 20 posts by default;
  • Every post contains 1 mention, each to a different user. MentionMe has been just installed, so no usernames are stored in cache at the moment;
  • The page is presented to someone. The plugin loops through all the posts, one by one: the mention_try_name() function is fired 20 times. Unfortunately, there are 20 different usernames, so the function triggers 20 database queries in total.

Although it may seems a rare situation, we can optimize this by changing things a little bit:

  • Instead of firing Mention__filter() for every post, we should build an array of posts using a static property in a class and using the parse_message hook;
  • Then hooking into showthread_end we should grab the entire $posts and run Mention__filter() only once: the function should build an array of uids;
  • The array would be passed to mention_try_name() which would query the database only once and build an array of users' data;

Result: one query against 20.

Facebook registration and mentionme

Hi
Issue with Facebook registration plugin MyFacebook Connect - when people register via it, their username is like their real name 'firstname lastname'
so mentionme is not able to take the space while tagging them

Help

Auto Complete Behavior Issue

When the popup is still loading the name cache and the user presses the enter key, it dismisses the popup. This seems unintuitive to me.

No subject when mention added during post edit

Thanks for the great plugin.

I recently installed it and found a bug: When a user edits a post and adds a mention (during the edit), the subject line is blank and the alert does not appear properly.

I traced it to mention_alerts.php, line 61. $post is a local variable (and is blank.)

To fix this, I just added $post to the global declaration on line 43 and it seems to have fixed it:
global $db, $mybb, $Alerts, $post;

Hope this helps...

Fine-Tune Of Plugin Needed

While reviewing the code in preparation for the next feature release and the improvements to be made I noticed a few things that could be better and a few things that could be implemented to save a little processing power and perhaps a query here and there.

I will try to get this done for the feature release of 1.6 (soon, I hope)

Implement Versioning

Thanks to some practical application of plugin version control using the cache (Advanced Sidebox) I feel that adding the same seamless upgrade module to MentionMe would be beneficial and relatively simple as well.

This should also help to facilitate the update to MyAlerts new settings design ( Issue #4 ) . . .

Will try to get this done soon.

Cannot acess any post

Fatal error: Call to undefined function get_called_class() in /home/bf4br419/public_html/forum/inc/plugins/MentionMe/classes/WildcardPluginCache.php on line 28

Autocomplete: Duplicates In Prediction List

In some cases, two or more instances of the same user name may be shown in the auto completion prediction/suggestion list. I specifically remember checking the cache for duplicates but there is obviously some flaw in my logic.

Special characters causing no mentions

I have a person on the forum with a $ in his name and he doesn't get alerts when he is mentioned. An example being @cat$

His name is cat$ but he doesn't get an alert since he has a special character in his name. I think he gets a mention as "@cat$" but what happens is that when you see the mention in the post this time, it says @cat$ and some other special gibberish letters afterwards.

Any help will be appreciated. Thanks.

Repeated mentions when post is edited

I'm not sure if you've fixed this issue. I've haven't seen it around so perhaps you have. ๐Ÿ˜„

If you were to gather the user IDs of the mentions in the post when inserted and add to a sterilized array in the posts row and check new mentions against that list then mentions shouldn't get repeated. This will be easier if bundled in along with #62.

Installation Problems / Misc Problems

Hi, great job with the mod and all, but I'm having some serious problem that have been causing me to rip out my hair. -_-

I've gotten the MyAlerts to work properly beforehand and this is without me knowing about mentionme first. I mean as in MyAlerts working properly but since I've updated it to 1.04, I think? The update where it fixes the default avatar images or whatever. I have some minor problems there too, but I'll save them for a bit later.

Anyways, after I installed the new updated one, I finally uploaded and installed MentionMe. I'll just list some problems that have occurred for me.

The mentionme settings do not appear in the User CP and this is a problem I've been having in general too with MyAlert settings. I've installed other mods that work with Myalerts as well and those settings don't appear in the User CP.

What I mean is that like how MyAlerts allows you to change settings in the user cp, other mods/plugins that I've installed that work with MyAlerts does not have their settings there and same with MentionMe. I don't have any option of enabling/disabling alerts except normal 5 options that comes with MyAlerts. They are also not enabled at the start anymore either like they used to in the older versions of MyAlerts which is a bit strange as well.

If I do set the settings on though, they do work properly, it's just weird how the other settings aren't there such as mentionme and the like. I also get this error a ton too:

"MyBB has experienced an internal SQL error and cannot continue.

SQL Error:
1054 - Unknown column 'myalerts_settings' in 'field list'
Query:
SELECT uid, myalerts_settings FROM mybb_users "

This happens a lot when I'm uninstalling or just trying to enable/disable it in the ACP. I think this could be a huge factor in why a lot of my plugins with MyAlerts isn't working right but I don't know too much about this stuff so I'm not sure.

I've downloaded your MentionMe from here and the one off of myBB and no luck and same with the updated 1.04 MyAlerts from euantor. Is it possible if you could just make a copy of the files that you have that's working for your forum and just see if it makes a difference if we try them to see if it makes difference as well?

Some Spacing Issues With Mention Replacements

I already put this branch into use on my forum and immediately noticed that when using un-quoted mentions there is a spacing issue.

Hi @mark how are you

is rendered as

Hi @Markhow are you

Haven't found the problem yet, will update.

MyAlerts Will Soon Change Settings System

To stay up to date MentionMe will have to change as well.

Luckily @euantor is helping me with the details so this should go pretty smoothly I hope ๐Ÿ˜„

This isn't something users will notice, but it has to be done to maintain functionality and compatiblity with MyAlerts.

Alerts not created for edits.

Tecca from TESOF reported that editing a post to add a mention (quick edit or full edit) doesn't alert the user mentioned.

Alternative method for storing mentions

At the moment this plugin stores mentions as @JordanMussi (or @"JordanMussi" or @'JordanMussi' etc.). However this leads to querying the DB for a user matching this username. In the first instance this is more costly as usernames with multiple words cause multiple queries, for example @Jordan Mussi (discounting the mention cache).
Also @Jordan Mussi would match a user called Jordan before myself (annoying ๐Ÿ˜‰).

My proposal is to store mentions with the user id but only show the username to users.
For example on the MyBB Community Forums my user id is 51459 so typing @JordanMussi in a message would be replaced with <mentionme:51459> in the DB.
Furthermore, if I was to change my name previous mentions would not be lost as it is my user id that they are referring to (although the user posting has no idea).

However past mentions would still have to be parsed as before and merging users could create a problem (but the latter is a problem with the current method).

To summarise:
@JordanMussi, @"JordanMussi", @'JordanMussi' etc. are converted to <mentionme:51459> when inserted into the database (in newreply, editpost etc.).

I hope I have made this easy to understand. ๐Ÿ˜‰

It is not working

Hi,
this plugin is not working on my site. I type @ but no autocomplete shown, nothing

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.