Changeset 152086
- Timestamp:
- 09/04/2009 08:50:21 PM (17 years ago)
- File:
-
- 1 edited
-
kivaorg-widget/trunk/kiva.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
kivaorg-widget/trunk/kiva.php
r134843 r152086 4 4 Plugin URI: http://urpisdream.com/2009/05/kiva-loans-wordpress-widget/ 5 5 Description: Kiva widget, display my investments 6 Version: 2. 56 Version: 2.6 7 7 Author: Marilyn Burgess 8 8 Author URI: http://urpisdream.com … … 34 34 $kiva_cache_path = ( defined('WP_CONTENT_URL') ) ? WP_CONTENT_URL : ABSPATH . 'wp-content';; 35 35 $kiva_cache_path = $kiva_cache_path . "/plugins/kivaorg-widget/cache"; 36 37 global $kiva_api_app_id; 38 $kiva_api_app_id = "com.urpidream.wpwidget"; 36 39 37 40 function widget_kiva_loan_init() { … … 56 59 57 60 function get_kiva_loans(){ 58 61 global $kiva_api_app_id; 59 62 $options = get_option('widget_kiva_loan'); 60 63 $limit = $options['number_of_loans']; … … 78 81 79 82 if($results == ""){ 80 $url = "http://api.kivaws.org/v1/lenders/$username/loans.json ";83 $url = "http://api.kivaws.org/v1/lenders/$username/loans.json?app_id=$kiva_api_app_id"; 81 84 82 85 $ch = curl_init(); … … 120 123 $html = "<div id='kiva_loans'>"; 121 124 $html .= $content; 122 $html .= "<center><a href='http://kiva.org/ '><img src='" . get_option('siteurl') . "/wp-content/plugins/kivaorg-widget/kiva.gif' alt='Kiva.org' class='kiva_logo' /></a></center>";125 $html .= "<center><a href='http://kiva.org/?app_id=$kiva_api_app_id'><img src='" . get_option('siteurl') . "/wp-content/plugins/kivaorg-widget/kiva.gif' alt='Kiva.org' class='kiva_logo' /></a></center>"; 123 126 $html .= "</div>"; 124 127 return $html; … … 247 250 248 251 249 252 global $kiva_api_app_id; 250 253 $style = "max-height:".$size."px;max-width:".$size."px;width:expression(this.width > ".$size." ? \"".$size."px\" : this.width); height:expression(this.height > ".$size." ? \"".$size."px\" : this.height);"; 251 $html .= "<a href='http://www.kiva.org/app.php?page=businesses&action=about& id=" . $loan->{id} . "' target='_new'><img src='$image_src' alt='". $loan->{name} . "' style='".$style."' /></a><br />";254 $html .= "<a href='http://www.kiva.org/app.php?page=businesses&action=about&app_id=$kiva_api_app_id&id=" . $loan->{id} . "' target='_new'><img src='$image_src' alt='". $loan->{name} . "' style='".$style."' /></a><br />"; 252 255 $html .= "<table>"; 253 256 $html .= "<tr><td style='vertical-align:top'><b>Location:</b></td><td>". $loan->{location}->{country} . ", " . $loan->{location}->{town} . "</td></tr>";
Note: See TracChangeset
for help on using the changeset viewer.