Plugin Directory

Changeset 574116


Ignore:
Timestamp:
07/18/2012 02:12:34 PM (14 years ago)
Author:
oshingler
Message:
 
Location:
olimometer
Files:
64 added
4 edited

Legend:

Unmodified
Added
Removed
  • olimometer/trunk/olimometer-class.php

    r572987 r574116  
    176176       
    177177       
    178         $the_olimometer_text = "<img src='".$image_location."?olimometer_id=".$this->olimometer_id."'";
     178        $the_olimometer_text = "<a href='http://www.olivershingler.co.uk/oliblog/olimometer/' target=_blank><img src='".$image_location."?olimometer_id=".$this->olimometer_id."' border=0";
    179179        if(strlen($css_class) > 0) {
    180180            $the_olimometer_text = $the_olimometer_text." class='".$css_class."'";
    181181        }
    182         $the_olimometer_text = $the_olimometer_text." alt='Olimometer 2.33'>";
     182        $the_olimometer_text = $the_olimometer_text." alt='Olimometer 2.34'></a>";
    183183       
    184184        return $the_olimometer_text;
  • olimometer/trunk/olimometer.php

    r572987 r574116  
    66Author: Oliver Shingler
    77Author URI: http://www.olivershingler.co.uk
    8 Version: 2.33
     8Version: 2.34
    99*/
    1010
     
    511511            <option value="8356" <?php if($current_olimometer->olimometer_currency=="8356") { echo "SELECTED"; } ?>>&#8356;</option>
    512512            <option value="176" <?php if($current_olimometer->olimometer_currency=="176") { echo "SELECTED"; } ?>>&#176;</option>
     513            <option value="10000" <?php if($current_olimometer->olimometer_currency=="10000") { echo "SELECTED"; } ?>>kr</option>
    513514            <option value="" <?php if($current_olimometer->olimometer_currency=="") { echo "SELECTED"; } ?>>No Prefix</option>
    514515            </select>
     
    530531            <option value="8356" <?php if($current_olimometer->olimometer_suffix=="8356") { echo "SELECTED"; } ?>>&#8356;</option>
    531532            <option value="176" <?php if($current_olimometer->olimometer_suffix=="176") { echo "SELECTED"; } ?>>&#176;</option>
     533            <option value="10000" <?php if($current_olimometer->olimometer_suffix=="10000") { echo "SELECTED"; } ?>>kr</option>
    532534            <option value="" <?php if($current_olimometer->olimometer_suffix=="") { echo "SELECTED"; } ?>>No Suffix</option>
    533535            </select>
  • olimometer/trunk/readme.txt

    r572987 r574116  
    105105== Changelog ==
    106106
     107= 2.34 =
     108* Fixed GD image output issue on some web servers (header and flush requirements)
     109* Added kr as prefix/suffix option
     110
    107111= 2.33 =
    108112* Added some more number format options.
     
    211215== Upgrade Notice ==
    212216
     217= 2.34 =
     218* Fixed GD image output issue on some web servers (header and flush requirements)
     219* Added kr as prefix/suffix option
     220
    213221= 2.33 =
    214222* Added some more number format options.
  • olimometer/trunk/thermometer.php

    r572987 r574116  
    116116    $display_zero = number_format(0,$olimometer_display_dp,$olimometer_display_decimal,$olimometer_display_thousands);
    117117   
     118    // Figure out prefix and suffix values
     119    switch($currency) {
     120        case 128:
     121            $currency_symbol = "&#8364;";
     122            break;
     123        case '':
     124            $currency_symbol = "";
     125            break;
     126        case 'x':
     127            $currency_symbol = "";
     128            break;
     129        case '10000':
     130            $currency_symbol = "kr ";
     131            break;
     132        default:
     133            $currency_symbol = "&#$currency;";
     134    }
     135   
     136    switch($suffix) {
     137        case 128:
     138            $suffix_symbol = "&#8364;";
     139            break;
     140        case '':
     141            $suffix_symbol = "";
     142            break;
     143        case 'x':
     144            $suffix_symbol = "";
     145            break;
     146        case '10000':
     147            $suffix_symbol = " kr";
     148            break;
     149        default:
     150            $suffix_symbol = "&#$suffix;";
     151    }
    118152
    119153
     
    183217        $text_color_array = rgb2array($text_colour);
    184218        $text_colour_rgb = imagecolorallocate($temp_new_image, $text_color_array[0], $text_color_array[1], $text_color_array[2]);
    185         if ($currency == 128)
     219/*       
     220        switch($currency) {
     221            case 128:
     222                $currency_symbol = "&#8364;";
     223                break;
     224            case '':
     225                $currency_symbol = "";
     226                break;
     227            case 'x':
     228                $currency_symbol = "";
     229                break;
     230            case '10000':
     231                $currency_symbol = "";
     232                break;
     233            default:
     234                $currency_symbol = "kr";
     235        }*/
     236       
     237        /*if ($currency == 128) {
    186238            $currency_symbol = "&#8364;";
    187         else if (($currency == '') || ($currency == 'x'))
     239        }
     240        elseif (($currency == '') || ($currency == 'x')) {
    188241                $currency_symbol = "";
    189         else
     242        }
     243        elseif($currency == 10000) {
     244            // Krone
     245            $currency_symbol = "kr ";
     246        }
     247        else {
    190248            $currency_symbol = "&#$currency;";
    191        
    192         if (($suffix == '') || ($suffix == 'x')) {
     249        }*/
     250       
     251        /*if (($suffix == '') || ($suffix == 'x')) {
    193252            $suffix_symbol = "";
    194253        }
     254        elseif($suffix == 10000) {
     255            // Krone
     256            $suffix_symbol = " kr";
     257        }
    195258        else {
    196259                $suffix_symbol = "&#$suffix;";
    197         }
    198        
    199        
     260        }*/
     261        //$currency_symbol = "YYY";
     262        //$suffix_symbol = "XXX";
    200263       
    201264        // What is the width of the top label?
     
    350413        $text_color_array = rgb2array($text_colour);
    351414        $text_colour_rgb = imagecolorallocate($temp_new_image, $text_color_array[0], $text_color_array[1], $text_color_array[2]);
    352         if ($currency == 128)
     415       
     416        /*if ($currency == 128)
    353417            $currency_symbol = "&#8364;";
    354418        else if (($currency == '') || ($currency == 'x'))
     
    362426        else {
    363427                $suffix_symbol = "&#$suffix;";
    364         }
     428        }*/
    365429       
    366430       
     
    433497   
    434498    //output the image to the browser
    435 
     499    header('Content-type: image/png');
    436500    imagepng($new_image, NULL);
     501    ob_end_flush();
     502
    437503
    438504
Note: See TracChangeset for help on using the changeset viewer.