WordPress.org

Ready to get started?Download WordPress

Forums

Dynamic Widgets
Dynamic Widget takes time to load (14 posts)

  1. evo252
    Member
    Posted 3 years ago #

    Hello,

    When I want to edit the parameters of a widget in the Dynamic Widget settings, the page is very very hard on loading: I presume that the problem comes from my number of users (up to 10 000 users on my database). Is there a way to display only authors and not all users on the "Article settings" ? Maybe we can hack the code of the plugin to not display all the users.

    Thanks !

  2. Qurl
    Member
    Plugin Author

    Posted 3 years ago #

    Wow! 10.000 users... yeah, I can imagine it takes a while to build up such a list. Excluding users from the subscribers group is I think the best solution to that. I'll have a look what I can do about that.

    Please note it will take a while. I'm traveling right now. I'm a bit limited in having internet access and no time to do some development work to Dynamic Widgets.

  3. evo252
    Member
    Posted 3 years ago #

    Hello Qurl!

    Thank you for your answer, I don't want to take about your time while your travel ;) Just want to know if you can give me some indications: do you know where I can find the function which displays the list of all users ? Maybe if I hack this function I'll succeed to display only users with a certain role (so only authors in fact).

    Thank you for your help and mainly for this awesome plugin which makes blogs more effective ;)

  4. Qurl
    Member
    Plugin Author

    Posted 3 years ago #

    The function to get the list of users is located in ./mods/single_module.php on line 25. The (now I just found out deprecated function) get_users_of_blog() needs to be replaced by get_users() with the appropriate arguments.

  5. evo252
    Member
    Posted 3 years ago #

    Thank you so much, it works like a charm !

    I've changed get_users_of_blog() by get_users('role=author'); for those who may have the same problem.

    Thousand thanks ;)

  6. Qurl
    Member
    Plugin Author

    Posted 3 years ago #

    The next (dev) version will have a limitation of user level > 0. This means subscribers will not be included in the list anymore.

  7. johnmasterlee
    Member
    Posted 2 years ago #

    Hi there!

    Wondering if this was solved? I have about 10K subscribers too!

    It would be great if it could be limited to admin/editors/authors/contributors.

  8. Qurl
    Member
    Plugin Author

    Posted 2 years ago #

    Yes, it is solved. Stable version 1.4.2 has this in.

  9. johnmasterlee
    Member
    Posted 2 years ago #

    Can you walk me through how this should work?

    I'm using the dynamic widget now, and when I view a widget, and expand the the drop down menu for something like SINGLE POSTS, it still shows all my users in the scrolling checklist. It does load relatively quickly, but I was assuming that you meant that it would only display a certain type of user.

  10. Qurl
    Member
    Plugin Author

    Posted 2 years ago #

    It shows every user with a higher level than subscriber (level > 0). Do you have more roles in the WP system than the standard WP roles? Cause in standard WP the next role has author capabilities.

  11. johnmasterlee
    Member
    Posted 2 years ago #

    I'm just using the default settings, it's listed as

    Administrator
    Editor
    Author
    Contributor
    Subscriber

    Only a few people are from Admin - Contributor. Most users are subscribers, but that's what is being pulled into the list it seems.

  12. Qurl
    Member
    Plugin Author

    Posted 2 years ago #

    Shoot! I think I made a typo in the code. The argument I need to use is 'authors', I used 'author'. Going to investigate and fix.

  13. johnmasterlee
    Member
    Posted 2 years ago #

    Thanks! Glad to help troubleshoot.

  14. Qurl
    Member
    Plugin Author

    Posted 2 years ago #

    OK, it was indeed the typo.
    Fixed now in development version 1.4.2.1.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic