Archive

Posts Tagged ‘Kiva.org’

Important Kiva Widget Upgrade

November 3rd, 2009 marilyn No comments

Well, I believe I am due a rather large piece of humble pie. I made a huge oversight in the last verion of the Kiva Wordpress Widget. It was actually a bit of an oversight, mixed with a mistake, and a little bit of forgetfulness. That’s neither here nor there though, so lets get to the point.

Version 2.8 doesn’t delete its own cache files. This causes the cache directory to grown indefinately, which is really quite a problem! Not to worry though, the new version not only deletes the last cache file as 2.8 should have in the first place, upgrading the plugin will delete all the unessesary files the plugin has created. This is so important that I decided it should get the version number 3.0!

I’m quite sorry if this mistake caused anyone any trouble on their servers! I strongly encourage every one to upgrade as soon as possible. Either upgrade via the handy Wordpress plugins center on your blog, or manually upgrade.

If  you have any questions, please do not hesitate to ask.

Categories: Doing Good Tags: ,

New release of the Kiva Widget

June 8th, 2009 marilyn No comments

Just a quick note to let you know that I just released an update to the Kiva Wordpress Widget. Some of you may have noticed missing images. JL, helped me figure out what was going on with his contribution of the line:

curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

Thank you very much JL!!

Kiva is moving their images around, and the widget wasn’t handling it. I have incorporated JL’s suggestion and released the update of the Wordpress Plugin. In addition, I added a cache check to fix up all of the missing images that may be out there right now.

Get the Kiva Wordpress Widget Version 2.1 here.

Kiva.org and my first Wordpress Plugin!

May 5th, 2009 marilyn 3 comments
Kiva

Kiva

I happened across Kiva.org quite some time ago, and immediately fell in love with the concept of micro-lending. Kiva has partnered up with many financing partners through the developing world. Through this network, regular folk, like you and I, can lend money to struggling entrepreneurs in third world countries, to help them get a leg up in their pursuits.

As an entrepreneur myself, I really value what Kiva is doing. Starting and running a business isn’t easy,  it takes a lot of guts to stand up and give it a go. After spending a month in Peru, it became clear that for many, scraping up a little bit of cash to start up a small sales business on the side of the road is one of the very few options available to many citizens in the developing world.

Times are tight for me right now, there is not much money in the chauffeurs, but there’s enough to lend a little to people who need it so much more. That’s the great thing about micro-lending, as a lender, you don’t have to invest a lot to make a difference. My humble loan of $25 combines with the loans of others to sum up to the relatively small amount the entrepreneur has requested.

Carmen Gabriela - Peruvian Clothing Saleswoman

Carmen Gabriela - Peruvian Clothing Saleswoman

Make no mistake about it, these are loans, not donations. The receiving entrepreneurs are expected to pay back the money they borrow on a pre-specified schedule. I lent $25 to Carmen Gabriela of Ayacucho, Peru who borrowed a total of $250 for her clothing sales business.  She has repaid half of that amount. Thus, half of the $25 I lent to her has been return to me. The money is waiting for me in my Kiva account. I can withdraw it, or lend it out to someone else. My plan is to lend it out again, and every time I get notification that $25 has been paid back to me, I will lend it out again, and lend out another $25. In this way I can help struggling entrepreneurs in the developing world in a growing perpetual cycle, which is pretty darn neat if you ask me!

On Febraury 3rd 2009, the  Kiva Developer API was released.  I was immediately informed through my various social networks, likely Twitter was the quickest, and a chord was struck within me… that wonderful feeling of inspiration took over. I knew had to write a Wordpress Plugin to help promote Kiva.org. I am a programmer, but I had never written a Wordpress Plugin before, and in the past had thought the idea of doing so was rather daunting. The funny thing about pure inspiration is that all of the nasty bits of a task, the hardness, the difficulties, the insecurities, all seem to fall away. The process of building the Kiva Loans Wordpress Widget was seamless, I was blessed with the zen of being in the zone, and I had a plugin I was happy to submit to Wordpress and Kiva within 2 days!

The widget I built goes on the sidebar of the blog. You can see it in action here on Urpi’s Dream, over there –> The widget is configurable via the ‘Widgets’ section in the Wordpress administration interface. The blogger can specify his/her Kiva username as well as the number of loans to show and the sizing of the images. The widget takes that information, asks the Kiva API for the user’s public loans, and randomly selects which loans to display on the sidebar. I am quite pleased with myself for successfully implementing random selection without replacement, which gives the widget a little pizazz by switching up the loans to display, and not show the same loan twice on the same page.

More recently, a representative from Kiva contacted me to inform me that my widget is doing well, and is hitting the Kiva API from many different blogs. This is great, but its also clear that the widget needs to be more efficient to help relieve some of the strain on the Kiva servers. Thus, version 2, available now, includes a cache in order to limit the amount of hits to the Kiva server to once per hour per blog using the widget. I was quite happy to accommodate Kiva’s request for help in making the widget more efficient, and am grateful for the opportunity to to help spread the word about Kiva.org.

If you are interested in using the Kiva.or Wordpress widget, you can download it from the Kiva.org Loans Widget page in the Wordpress Plugin space. You can sign up to be a micro-lender at Kiva.org.

I have written another, more technical, post about the Kiva.org Loans Widget that includes instructions, and other more detailed information about the widget. That post is here.

Kiva Loans Wordpress Widget

May 5th, 2009 admin 25 comments

This is the Kiva Loans Wordpress Widget page, which includes the technical details and instructions for the widget. Please direct any questions or comments to the comments of this post. If you would like to read about my experience in building the Kiva.org Loans Widget, please read this post.

Kiva.org Loans Widget Description

Kiva Loans sidebar widget allows the user to display their public loans from Kiva.or on their blog. The user specifies their Kiva lender name, the number of loans (N) to show, and the size of the images that will be displayed. The widget then randomly selects N of the user’s loans from the Kiva API, and displays brief information about each of them. Links to the Kiva.org website

If you have marked any of your Kiva loans as private, or have lent anonymously, your loans will not show up in the Kiva Loans Widget. Only public loans are available to the Kiva.org Loans Widget.

Important: This Kiva Widget requires your Kiva Lender Name. This is not your email that you use to login to Kiva.org! Your Kiva Lender Name is the name Kiva uses in the URL for your Kiva Lender Page. You can access and change your Kiva Lender Name via the last item on “My Lender Page” under “My Portfolio” on Kiva.org.

Installation and Configuration Instructions

1. Download the zip file from accessible from the Wordpress Plugins space
2. Upload and unzip into the plugins directory ( /wp-content/plugins/ ) on your server
3. Activate the plugin through the ‘Plugins’ menu in WordPress
3. Add the widget to a sidebar via the ‘Widgets’ page under the ‘Appearance’ menu
4. Set the options, and save your settings

Kiva.org Loans Widget Options

Kiva Lender Name: Your Kiva Lender Name, from “My Lender Page URL” on Kiva
Number of loans: The number you Kiva loans you would like to be displayed
Image Size: The maximum width, or height (which ever is larger) of the image in pixels

FAQ

What is Kiva.org?

A micro-lending site. http://kiva.org

Will it show private loans?

No, it will only show your public Kiva loans.

How do I change the look of the Kiva Loans Widget?

The style sheet is in the plugin folder at /wp-content/plugins/kiva-widget/style.css

What if I get the json_decode error?

Fatal error: Call to undefined function: json_decode() in wp-content/plugins/kivaorg-widget/kiva.php

This error means that you do not have PHP JSON’s support installed on your server. JSON support became a part of the PHP core in PHP 5.2.0. The best way to handle this error is to upgrade your PHP to the newest stable available version. Most Linux distributions will have packages for upgrading. On Windows, you can go to the PHP Downloads page. For more information, check out the PHP JSON Manual.

What if I get the Permission Denied error

Warning: fopen( wp-content/plugins/kivaorg-widget/cache/kiva_cache_1241553368.txt) [function.fopen]: failed to open stream: Permission denied

This error means that improper permissions are set within the Kiva widget directory on your server. The directory ‘cache’ within the widget must be writable by your server’s web users. You can fix this problem by changing the ownership of the directory ‘cache’ to the web user. Most likely one of the following command will work, if performed within the plugin directory ( wp-content/plugins ):

chown www-data:www-data kivaorg-widget/cache

or

chmod 777 /kivaord-widget/cache

Screenshots

The widget displayed on the side bar

The widget displayed on the side bar

The widget's admin control

The widget's admin control

I hope you enjoy the widget, and love Kiva as much as I do! Please do not hesitate to send questions and comments via the comments of this post. Happy micro-lending!

Categories: Doing Good Tags: ,