The MU forums have moved to WordPress.org

Sitemeter widget for Wordpress MU (9 posts)

  1. selad
    Member
    Posted 15 years ago #

    I have written a Sitemeter.com widget that works out of the plugins-mu directory. This widget will allow the users to add a Sitemeter counter to their blog that will unable them to use all the features that were blocked when they used the non Java-Script version of Sitemeter.

    Get it here.

  2. badlagar
    Member
    Posted 15 years ago #

    Dont work for me:
    Warning: array_merge() [function.array-merge]: Argument #2 is not an array in /XXX/wp-content/mu-plugins/widgets/sitemeter.php on line 62

    Warning: Invalid argument supplied for foreach() in /XXX/wp-content/mu-plugins/widgets/sitemeter.php on line 80

  3. selad
    Member
    Posted 15 years ago #

    Put the widget in plugin-mu not plugin-mu/widgets and let me know if it works?

  4. badlagar
    Member
    Posted 15 years ago #

    The same error :S

  5. selad
    Member
    Posted 15 years ago #

    I meen the mu-plugins directory. I have tested the plugin on 3 Wordpress MU 1.0 installations with no errors.

    Anyone else with the same errors?

  6. badlagar
    Member
    Posted 15 years ago #

    I use php5 and wpmu 1.0... its very strange...

  7. selad
    Member
    Posted 15 years ago #

    I have php 4.4.4

  8. badlagar
    Member
    Posted 15 years ago #

    Hello, i have the solution fot ehr problem http://mu.wordpress.org/forums/topic.php?id=2580&replies=4 and when i do i havent the error but the counter dont work.

    The widget only put this
    <li id="sitemeter-counter" class="widget widget_sitemeter"><h2 class="widgettitle"></h2>
    <!-- Site Meter XHTML Strict 1.0 -->
    <script type="text/javascript" src="http://.sitemeter.com/js/counter.js?site=">
    </script>
    <!-- Copyright (c)2006 Site Meter -->

    And doesnt put the name of the widget or the Id of the user. :S

  9. basilsblog
    Member
    Posted 15 years ago #

    For PHP 5, the change badlagar spoke of, modified for this plugin, is...

    Replace this line:
    $options = array_merge(widget_sitemeter_options(), get_option('widget_sitemeter'));

    With these lines:
    $wsitemeter = get_option('widget_sitemeter');
    $options = array_merge(widget_sitemeter_options(), array($wsitemeter));

    And the counter seems to work for me.

About this Topic

  • Started 15 years ago by selad
  • Latest reply from basilsblog