Plugin Directory

Changeset 445163


Ignore:
Timestamp:
09/29/2011 10:38:39 AM (15 years ago)
Author:
f4ber
Message:

Updated code and added russian comments in code

Location:
cbrcurrency/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cbrcurrency/trunk/README.txt

    r445159 r445163  
    1 === CbrCurrency ===
     1=== Cbr Currency ===
    22Contributors: f4ber
    33Donate link: http://www.f4ber.net/
     
    55Requires at least: 2.6
    66Tested up to: 3.2.1
    7 Stable tag: 1.2.1
     7Stable tag: 1.2.2
    88
    99Show the exchange rate of USD, RUR, EUR of The Central Bank of the Russian Federation.
     10Виджет курса валют ЦБ РФ на текущий день c динамикой изменения курса.
    1011
    1112== Description ==
    1213
    1314Show the exchange rate of The Central Bank of the Russian Federation.
     15Отображает текущий курс валют Евро и Доллар по отношению с Рублю, а также динамику изменения курса.
    1416
    1517**Supported Languages:**
     
    23253. To add the CbrCurrency widget to the sidebar go to 'Appearance->Widgets', and add the CbrCurrency to your blog.
    2426
     27Для включения виджета, после активации плагина переходим в:
     28Внешний вид - Виджеты - Перетаскиваем виджет Cbr Currency на панель справа.
    2529
    2630== Frequently Asked Questions ==
    27 Nothing
     31Please, send your questions about this widget to my e-mail: f4ber@yandex.ru
     32Пожалуйста, все ваши вопросы по работе виджета направляйте на мой ящик: f4ber@yandex.ru
    2833
    2934== Screenshots ==
     
    3439
    3540== Changelog ==
     41
     42= 1.2.2 =
     43
     44* 29/09/2011
     45* Updated code and added russian comments in code
    3646
    3747= 1.2.1 =
  • cbrcurrency/trunk/cbrcurrency.php

    r445159 r445163  
    11<?php
    22/*
    3 Plugin Name: CbrCurrency
    4 Plugin URI: http://f4ber.net/
     3Plugin Name: Cbr Currency
     4Plugin URI: http://www.f4ber.net/
    55Description: Виджет курса валют ЦБ РФ на текущий день c динамикой.
    6 Version: 1.2.1
     6Version: 1.2.2
    77Author: f4ber
    8 Author URI: http://f4ber.net/
     8Author URI: http://www.f4ber.net/
    99License: GPL2
    1010*/
     
    1414# (c) 2001, Mikhail Turenko, http://www.turenko.net, <mikhail@turenko.net>
    1515
    16 
    1716function CbrCurrencyWidget($args){
    1817extract($args);
    1918$title = 'Курс ЦБ ';
    20 echo
    2119
    2220function getcurrency($code){
     
    2523$scripturl = 'http://www.cbr.ru/scripts/XML_dynamic.asp';
    2624
    27 # Начальная дата для запроса  (сегодня - 2 дня 172800)
    28 $date_1=date('d/m/Y', time()-259200);
     25# Начальная дата для запроса  (сегодня - 2 дня 259200)
     26$date_1=date('d/m/Y', time()-172800);
    2927
    3028# Конечная дата (чтобы учитывать завтра добавьте параметр time()+86400)
     
    3533
    3634# Код валюты в архиве данных cbr.ru
     35//$currency_code='R01235';
    3736$currency_code=$code;
    38 //$currency_code='R01235';
    3937
    4038# URL для запроса данных
     
    6866$last = array_pop($d);                  # последний известный день
    6967$prev = array_pop($d);                  # предпосл. известный день
    70 $date = $last[0];                       # отображаемая дата
     68$date = $last[2];                       # отображаемая дата
    7169$rate = sprintf("%.2f",$last[2]);       # отображаемый курс
    7270# отображаемое изменение курса, например, "+0.02"
Note: See TracChangeset for help on using the changeset viewer.