The MU forums have moved to WordPress.org

Quick Silly dumb question about widgets (14 posts)

  1. drmike
    Member
    Posted 17 years ago #

    Do they all go into the plugin subdirectories? I would have thought that they would go into the widget subdirectory.

    Thanks,
    -drmike

  2. stutley
    Member
    Posted 17 years ago #

    I think it's pretty random. I installed a Google AdSense plugin which went into the widget subdirectory. And I just recently installed the PMetrics plugin, which comes with a widget - and it went to the plugins directory ;)

  3. drmike
    Member
    Posted 17 years ago #

    Thanks.

    Which method do you think would be acceptable or does it really matter?

  4. stutley
    Member
    Posted 17 years ago #

    I don't think I'm really qualified to answer that one :D

    But I'd make widgets go in the widgets-folder. I'm not all that familiar with the PMetrics-plugin that I mentioned. But you have to activate that one in order to have the included widget show up on the widget page. So I guess, that widgets should only go in the plugins folder if there's a need to activate/deactivate them.

  5. andrea_r
    Moderator
    Posted 17 years ago #

    If it's a widget, I put it in the widgets directory.

  6. drmike
    Member
    Posted 17 years ago #

    That's what I would have thought but most of the one's I have added it have said the plugin directory.

    Then we also have the issue with MU not wanting to go down any further than that directory. (ie we had to move SK2 and the widget plugins in a directory instead of leaving them in their own subdirectories.)

  7. drmike
    Member
    Posted 17 years ago #

    By the way, I noticed that widgets places within the widget subdirectory do not work. I've had to move all ofthe ones I've installed up to the mu-plugins subdirectory.

  8. nexia
    Member
    Posted 17 years ago #

    the widgets directory is just used to activate the system itself... the system will detect widgets if they are NOT located in that directory, as it is not meant to store the widgets...

    the widget structure is goaled to be related to each addon you put in the system... you can enter widgets inside any addon file that is not built to be a simple widget but a complete different feature...

    the best example is the UTW, where you can read the addon file and see that the widget to create a tags cloud is actually inside the addon file itself, without being a widget itself... it would be inapropriate to put the UTW inside the widgets directory.

    i would prefer myself to have a seperate directory for widgets, but as it would require that you split the unique widgets from the addons, it would be irrelevent... the actual structure is then fine.. :)

  9. drmike
    Member
    Posted 17 years ago #

    the widgets directory is just used to activate the system itself

    Actually it doesn't even do that. WPMU can't see the main files of any plugin if they're located within a subdirectory of my-plugins. It only see the top level there while it will go into subdirectories of the plugin subdirectory.

    I agree though that my mu-plugin directory is getting rather cluttered lately with all of the widgets. I would like to see WPMU use the widget subdirectory as well.

  10. andrea_r
    Moderator
    Posted 17 years ago #

    Really? I'll go double-chekc mine, because i'm sure i have a few levels of subdirectories in the mu-plugins folder.

  11. drmike
    Member
    Posted 17 years ago #

    I've had to move at the main plugin file into the mu-plugin subdirectory on all of them so far. Like in Spam Karma, you just go through and repoint everything to leave the individual plugin's subdirectory in place.

    The actual plugin subdirectory will search it's own subdirectory though.

  12. andrea_r
    Moderator
    Posted 17 years ago #

    huh.
    / public_html / wp-content / mu-plugins / widgets / is working fine for me. I have applied this though:
    http://jason.lah.cc/2006/04/07/widgets-as-an-mu-plugin-on-wordpress-mu/

  13. drmike
    Member
    Posted 17 years ago #

    That's because you're putting that widgets.php from that page within mu-plugins. You have to have something in there to redirect to the subdirectory. Same story with Spam Karma and WP-Polls.

  14. andrea_r
    Moderator
    Posted 17 years ago #

    Need more caffiene. :)

About this Topic