• Resolved .sarah.

    (@sarah-1)


    Blogs with many (normally spam) users fall over on the mentionData line in js.php.

    It would be great to have a setting to make mentionData an option. In the meantime I’ve hardcoded it out with PHP comments.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thanks for the idea. I will suggest this enhancement to our developers to see if it’s something they’d consider for a future version of the theme.

    Have you tried looking into a plugin to prevent all the spam registrations? Could be another way to tackle the issue.

    You can try a filter to return only the relevant users — the ones on latest posts and comments. I tried it and at least i could solve the mentionData size.

    https://github.com/wpbrasil/wpbr-participe/commit/c25871ad77ae6637c7e2ee801d8722fff344a845#diff-78cd5aa3783a74555c9938a2a81d01c6R18

    Sarah – I just wanted to let you know that our developers said that making mentionData an option isn’t a feature that’s going to be added at this stage, since development efforts are currently going into the next generation of p2.

    If you’d like to be notified when it’s available or are interested in beta testing, feel free to sign up here:

    https://geto2.com/

    Thanks again for the feedback.

    Thread Starter .sarah.

    (@sarah-1)

    Thanks Kathryn

    There’s always a cutoff when a new version gets started and I appreciate your comment.

    .Sarah could you show me (I am no coder) the way to filter off the mentiondata : ” In the meantime I’ve hardcoded it out with PHP comments.”
    Thanks.

    Thread Starter .sarah.

    (@sarah-1)

    Sure thing joeymalek, it’s not where you’d think it might be!

    open up wp-content/themes/p2/inc/js.php

    find line 250

    there are a whole stack of javascript variables being created and line 250 should read

    var mentionData = <?php echo json_encode($mentions->user_suggestion());

    I changed that to

    /* var mentionData = <?php echo json_encode($mentions->user_suggestion()); */
    var mentionData = false;

    The variable needs to be declared otherwise other scripts break, but false means there is no longer an overhead and your site will work. Visible if you view source over at itamer.com

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Need a setting to turn off mentionData’ is closed to new replies.