WordPress.org

Support

Support » Plugins and Hacks » Dynamic Widget takes time to load

Dynamic Widget takes time to load

  • 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 !

Viewing 13 replies - 1 through 13 (of 13 total)
  • Plugin Author Qurl

    @qurl

    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.

    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 😉

    Plugin Author Qurl

    @qurl

    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.

    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 😉

    Plugin Author Qurl

    @qurl

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

    johnmasterlee

    @johnmasterlee

    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.

    Plugin Author Qurl

    @qurl

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

    johnmasterlee

    @johnmasterlee

    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.

    Plugin Author Qurl

    @qurl

    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.

    johnmasterlee

    @johnmasterlee

    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.

    Plugin Author Qurl

    @qurl

    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.

    johnmasterlee

    @johnmasterlee

    Thanks! Glad to help troubleshoot.

    Plugin Author Qurl

    @qurl

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

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Dynamic Widget takes time to load’ is closed to new replies.