myMiniCity WordPress Plugin

What is this?

This WordPress plugin displays statistics for your town. It also provides links to the various URLs associated with your MiniCity as they are needed. I spent a while looking for a plugin that would do this, and finally decided that this would be a good chance for me to learn how to write WordPress plugins. So this is my first plugin, and it could probably use some work. But it wouldn’t be working at all if not for the Ronald Huereca’s How to Write a WordPress Plugin article.

The plugin can be Downloaded Here.


  • Display Population, Unemployment, Transportation, Crime and Pollution for your city.
  • Only displays links that your city currently needs. (no Unemployment link with 0% unemployment)
  • Statistics can be set to display with positive descriptions (Employment vs. Unemployment)
  • Population link can be turned off based on other city statistics (i.e. Unemployment <= 3%)
  • City statistics links can be turned off until they fall below a specified level
  • City can be displayed within the plugin
  • Options page to customize the above features plus the following:
    1. URL of the city
    2. whether to include plugin stylesheet on your site
    3. additional HTML to attach before/after the city stats
    4. size of the city object to embed


It’s over there to the right.

MyMiniCity WordPress plugin screenshotMyMiniCity WordPress plugin administrator options screenshot

To Do:

  • Option to display city name, location and rank.
  • There are some myMiniCity options that are not displayed because I don’t know what they do.
  • Make the plugin work as a widget.
  • Internationalization
  • Allow multiple cities to be displayed from the same plugin installation


  1. Download the plugin and unzip it.
  2. Put the ‘ls_myminicity’ folder into your wp-content/plugins/ directory.
  3. Go to the Plugins page in your WordPress Administration area and click ‘Activate’ next to myMiniCity.
  4. Go to Options > myMiniCity to configure your settings and click ‘save’.
  5. Place the statistics where you want by placing <?php ls_myminicity(); ?> into your theme (most likely your sidebar).


Write me at or leave a comment below. I’m very interested in any suggestions for improving the plugin or the code.


  • v0.5: 01/06/2008 Version as it first appeared on my site.
  • v0.6: 01/07/2008 Added Positive Description feature and Population Link Criteria Feature
  • v0.7: 01/08/2008 Optionally display the city object and show commercial link for cities with population greater than 1000
  • v0.71: 01/12/2008 The plugin now works if you don’t have the Curl library installed on your server
  • v0.8: 01/30/2008 City statistics links can be turned off until they fall below a specified level

MyMiniCity Links

  • MyMiniCity Data: A site to create images with your city statistics.
  • Joomla Module that seems to do about the same thing this plugin does. (note: it doesn’t seem available anylonger)
  • Very nice myMiniCity widget with thumbnail. Written in Chinese, you can change the ouput to English with the parameter &lang=enUS; see comment below. (translation)
  • This site compares any two myMiniCity cities. This one is in Japanese.
  • Another nice Chinese myMiniCity widget, this one is also has a thumbnail. (translation)
  • My Minicity Toolbox: This site has many interesting tools for your city. Lots of good stuff here.
  • CreateMyMiniCity Forums: a group of message boards devoted to myMiniCity (multiple languages). It also contains the MyMiniCity Noobs FAQ with a lot of good information including formulas for city statistics.

22 Responses to “myMiniCity WordPress Plugin”

  1. Deanne Said on:

    Fabulous, Lloyd! Now I’ll remember every time I come to the site that I need to add a new person to Laurenburg. I’ve been doing it at work, on & off. But having the toolbar will surely help me to remember to do it regularly.

    Laurenburg is really looking good now!


  2. evenrain Said on:

    I’m the author of the “myMiniCity widget”,
    you can translate the widget to English by adding parmater “lang”.
    Like, <script src=”” type=”text/javascript” charset=”UTF-8″></script>

    BTW, the fourth and fifth link is Japanese site, not Chinese πŸ™‚


    • Lloyd Said on:

      Hi, very nice work on the widget. I didn’t think about including the flash application until I saw yours.

      I’m stuck on how to compute the final parameter for the flashVars variable. Did you scrape it from Or can you compute it?

      Dang, sorry about the Chinese/Japanese mixup. I clicked on a lot of google [translate this page] links.


  3. evenrain Said on:

    I scrape the last paeameter from, cause I don’t know how to compute it πŸ™‚


  4. zhooibaal Said on:

    Cool stuff, I think I’ll add this to my blog as well whenever I have the time to work on it. I have a complete makeover planned for the layout, but I lack the time like I lack the time to post anything…

    Anyways, thanks for the comment πŸ™‚


  5. TKLolicon Said on:

    Hi, i donwload th plugin but this not work in wordpress widget! and my template not support sidebar! Only widgets! Please helpme! sorry for my english I speak spanish! πŸ™


  6. blah Said on:

    The Nordmograph one is available for download on the Nordmograph site here:


  7. Edem Said on:

    Is there any chance to insert an option to invoke this not as a php code? I’d like to call it from a sidebar widget, but the textbox widget won’t interpret php…


    • Lloyd Said on:

      I don’t actually know anything about how sidebar widgets are written. I would think that it wouldn’t be too hard to compare a sidebar widget to a “normal” plugin and make changes. But I don’t think I’ll have the time to do that soon.

      But are you sure it won’t work? Sure, it won’t work as a widget, but if you just insert <?php ls_myminicity(); ?> into your sidebar.php file?


  8. Maxxon Said on:

    Thanks a lot for the plugin. =)
    I started to think about making one, but found yours and it was really simple to customize. =)


  9. Bozz277 Said on:

    i dont understand this`?


  10. Togdoorgo Said on:



  11. Sam Said on:

    Can you help my city have more people please its name is Billstone


  12. Sam Said on:

    I’m trying to download the plugin but it looks like it’s not there any longer. Can you please help? Anybody have it?


Leave a Reply