The MU forums have moved to WordPress.org

New Plugin: WordPress Widgets (32 posts)

  1. ergate
    Member
    Posted 18 years ago #

    Plugins/WordPress_Widgets for more info.

    For me the widgets plugin did work out of the box in WPMU with no modifications to anything.
    Currently I am starting to modify existing themes and adding this to them.

    When I installed I treated this as a normal plugin, and put it in the plugins folder. I do want to put this in the mu-plugins so it is enabled sitewide, but I dont know how to modify the plugin. There were some instructions on the here on the board for converting a regular plugin to a mu plugin, but...

    I do know of one problem

    The problem is really weird - it won't drag & drop, and in Firefox, you can't even see the config button on each menu item.

    Any ideas?

  2. mrball
    Member
    Posted 18 years ago #

    Got this working as an mu-plugin at my site.

    1) Copy the widgets directory into your mu-plugins folder
    2) create a file in your mu-plugins folder called widgets.php and put this in:


    <?php

    $widgets = glob(dirname(__FILE__).'/widgets/*.php');
    if( is_array( $widgets ) ) {
    foreach ( $widgets as $widget ) {
    if( is_file( $widget ) )
    include_once( $widget );
    }
    }

    ?>

  3. ergate
    Member
    Posted 18 years ago #

    Beautiful!

    Many thanks!

  4. andrea_r
    Moderator
    Posted 18 years ago #

    That was me with the drag-n-drop problem. So odd.

    I'm going to try mrball's suggestion of using it as a global plugin and see what happens. Will report back.

  5. skot
    Member
    Posted 18 years ago #

    I usually just lurk around these forums, because my wpmu installation is still on a test server. But I thought I'd chime in here, because I had the same problem as andrea_r at first. But I found that if I moved the scriptaculous/ directory to /wp-includes/js/scriptaculous/ it worked just fine. Hope that helps.

  6. andrea_r
    Moderator
    Posted 18 years ago #

    Oh my gawd it worked. Thank you thank you thank you, skot. Can I hug you? :D

  7. voodooii
    Member
    Posted 18 years ago #

    i can't use this plugins in mu-plugins .
    help me!!!!

  8. mrball
    Member
    Posted 18 years ago #

    voodooii: did you follow instructions here? What doesn't work/what happens?

  9. voodooii
    Member
    Posted 18 years ago #

    helle mrball:
    i was doing anything just like the jason's web page that you told.
    it's doing nothing.

    not only widgets. all of plugins can be used.

    so i want to know what thing can tell me ,that my wpmu can use mu-plugins or plugins.

    thanks a lot .

  10. samchng
    Member
    Posted 18 years ago #

    I think voodooii means that he can't use any plugins and wants to know how to use plugins.

    Have you tried enabling your plugins in SiteAdmin > Options?

  11. voodooii
    Member
    Posted 18 years ago #

    samchng: yes i have select the options .
    the toolbat on top has add a plugins tab .the blow is the plugins tab list:

    ------------------------------------
    Plugin Management
    Plugins extend and expand the functionality of WordPress. Once a plugin is installed, you may activate it or deactivate it here.

    Couldn't open plugins directory or there are no plugins available.

    If something goes wrong with a plugin and you can’t use WordPress, delete or rename that file in the wp-content/plugins directory and it will be automatically deactivated.

    Get More Plugins
    You can find additional plugins for your site in the WordPress plugin directory. To install a plugin you generally just need to upload the plugin file into your wp-content/plugins directory. Once a plugin is uploaded, you may activate it here.

  12. mrball
    Member
    Posted 18 years ago #

    voodooii:

    plugins will ONLY appear on the list of plugins to activate/deactivate if you put it in the plugins directory, NOT in the mu-plugins one.

    also, the sidebar widgets tab will ONLY appear if your theme is widgets enabled. and it appears in the presentation submenu, not plugins/options/etcetc.

  13. ergate
    Member
    Posted 18 years ago #

    Unexpected benefit of Widgets (or maybe I am easily impressed)
    I have Widgetized (kinda like Crunchetized) the theme for the main / default / root blog. I have used the rss widget to bring in posts from one blog that I specified as domain news, and the unexpected benefit I found was, I also included the "Google Search" widget it does an entire Domain search, not just the search for that blog. The search does not include the most up to date posts and entries, but it does hit the entire domain.

  14. kaos
    Member
    Posted 17 years ago #

    I've followed all these instructions, including copying /scriptaculous/ to /wp-includes/js/scriptaculous/ and in the admin side, I'm getting:
    "Sortable not defined". What am I missing?

  15. MazZziKa
    Member
    Posted 17 years ago #

    it it possible to make Widgets .. example
    in related post plugin for wordpress 2.0 some template edits need to be done
    adding the following code to it ...
    ---------
    <?php
    if ( is_single() or is_page() ) {
    if( function_exists('get_the_post_keywords') and function_exists('related_posts_jerome_keywords') ) {
    $relatedposts = related_posts_jerome_keywords();
    if ($relatedposts === false) {
    // echo 'No related posts';
    } else {
    echo '<div class="related-posts">
    <h3>Related posts:</h3>

      ' . $relatedposts . '

    </div> <!-- [related-posts] -->';
    }
    }
    }
    ?>
    ---
    can we make it added by Widgets

  16. MazZziKa
    Member
    Posted 17 years ago #

    not working any more

  17. andrea_r
    Moderator
    Posted 17 years ago #

    Maz, what's not working anymore?

    And you can make your own widget by following the code in the Google Search Widget. It's well-commented with what to do.

  18. MazZziKa
    Member
    Posted 17 years ago #

    widget not work any more i do the steps up but nothing appear in the widget skin menu

  19. MazZziKa
    Member
    Posted 17 years ago #

    .. not only widget but all mu-plugin .. it work for old versions but the new one not work

  20. donncha
    Key Master
    Posted 17 years ago #

    I tried the widgets and they work fine: http://dashdotslash.org/test/ (that url will disappear shortly!)
    I copied widgets.php, rss.png, gsearch.php into mu-plugins and modified sidebar.php and functions.php in the theme.

    The "main" blog uses the "home" theme. So edit that theme if you want to widgetize it.

  21. andrea_r
    Moderator
    Posted 17 years ago #

    they all work for me too, and I just upgraded.

  22. unreachable
    Member
    Posted 17 years ago #

    drag n drop still not working for me, when i see the javascript error console, it outputed:

    Error: uncaught exception: dragdrop.js requires including script.aculo.us' effects.js library

    i use nightly wordpress mu with firefox 1.5.0.6

  23. drmike
    Member
    Posted 17 years ago #

    Um, do you have the (I forget the real name of it) scriptaculous directory at wp-includes/js/ ?

    If it's not there, you might want to reread the install instructions. You may have missed a step.

  24. unreachable
    Member
    Posted 17 years ago #

    ofcourse... it's installed by default right?

  25. drmike
    Member
    Posted 17 years ago #

    No. Please reread the installation instructions.

    Move the scriptaculous directory to wp-includes/js/.

    Copy over the functions.php and sidebar.php files

    move widget.php and the included plugins to the mu-plugins subdirectory.

  26. unreachable
    Member
    Posted 17 years ago #

    I've done that, step by step, but still the problem persist...

    please help...

  27. mysticwolfpress
    Member
    Posted 17 years ago #

    This didn't work for me either;

    "Got this working as an mu-plugin at my site.

    1) Copy the widgets directory into your mu-plugins folder
    2) create a file in your mu-plugins folder called widgets.php and put this in:

    <?php

    $widgets = glob(dirname(__FILE__).'/widgets/*.php');
    if( is_array( $widgets ) ) {
    foreach ( $widgets as $widget ) {
    if( is_file( $widget ) )
    include_once( $widget );
    }
    }

    ?>"

    When I do that I get this error message;

    Fatal error: Cannot redeclare widget_gsearch_init() (previously declared in /home/mysticwo/public_html/blog/wp-content/mu-plugins/gsearch.php:16) in /home/mysticwo/public_html/blog/wp-content/mu-plugins/widgets/gsearch.php on line 12

    If I delete the widgets.php file in mu-plugins I get my site back, but still no widgets.

    Any ideas?

    Thanks,
    Robert:)

  28. dsader
    Member
    Posted 17 years ago #

    You've got 2 copies of the gsearch widget. Keep the one in the widgets folder.

  29. mp26
    Member
    Posted 16 years ago #

    hello,
    i recently install the WPMU 1.2.5 in hebrew,
    i looked all over the folders & even in the 1.3 EN version & i didn't find any dolder that called WIDGETS.
    Where is this folder?
    do i need to create one?
    Thanks,
    Pinto.

  30. demonicume
    Member
    Posted 16 years ago #

    some people create a widgets folder to keep the directory tidy. i dont, i just drop mine in my plugins. though, since you brought it up...

About this Topic

  • Started 18 years ago by ergate
  • Latest reply from theapparatus