myMiniCity WordPress Plugin

What is this?

This WordPress plugin displays statistics for your www.myminicity.com 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.

Features:

  • 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

Demo/Screenshots

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

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).

Feedback:

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

History:

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

    Reply

  2. evenrain Said on:

    Hi,
    I’m the author of the “myMiniCity widget”,
    you can translate the widget to English by adding parmater “lang”.
    Like, <script src=”http://widgets.evenrain.net/myminicity.php?city=yourcityname&lang=enUS” type=”text/javascript” charset=”UTF-8″></script>
    FYI

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

    Reply

    • 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 myminicity.com? Or can you compute it?

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

      Reply

  3. evenrain Said on:

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

    Reply

  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 πŸ™‚

    Reply

  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! πŸ™

    Reply

  6. blah Said on:

    The Nordmograph one is available for download on the Nordmograph site here:
    http://www.nordmograph.com/index.php?option=com_docman&task=doc_details&gid=2&Itemid=28

    Reply

  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…

    Reply

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

      Reply

  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. =)

    Reply

  9. Bozz277 Said on:

    i dont understand this`?
    http://k-town277.myminicity.com

    Reply

  10. Togdoorgo Said on:

    Thanks!

    Reply

  11. Sam Said on:

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

    Reply

  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?

    Reply

Trackbacks/Pingbacks

  1. Rey’s A Point » Hack MyMiniCity: Instant Growth - January 29, 2008

    […] Show your stats on your wordpress blog (donÒ€ℒt you just want a WordPress Blog now, MCF?) […]

  2. WordPress Plugins Database » Plugin Details » LS myMiniCity - March 17, 2008

    […] Visit […]

  3. FEED.NIO.NAME » LS myMiniCity - March 17, 2008

    […] Visit […]

  4. Wp Wordpress » Blog Archive » LS myMiniCity - March 17, 2008

    […] Visit […]

  5. myMiniCity WordPress Plugin LloydAndLauren com | Cast Iron Cookware - May 26, 2009

    […] myMiniCity WordPress Plugin LloydAndLauren com Posted by root 16 hours ago (http://lloydandlauren.com) This wordpress plugin displays statistics for your www myminicity com town finally decided that this would be a good chance for me to learn how to write wordpress plugins write me at lloyd lloydandlauren com or leave a comment below grow cats cook things Discuss  |  Bury |  News | myminicity wordpress plugin lloydandlauren com […]

Leave a Reply