Giter Site home page Giter Site logo

proimage / mc_currencee Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 204 KB

Select currencies from the 176 active codes of the official ISO 4217 3 digit currency codes and names. Configurable to display either all or just common currencies.

PHP 18.46% CoffeeScript 29.91% CSS 8.35% JavaScript 43.28%

mc_currencee's Introduction

Plugin: MC CurrencEE

Select currencies from the 176 active codes of the official ISO 4217 3 digit currency codes and names. Configurable to display either all or just common currencies.


Changelog

  • 2.1.1 (2013-06-17):
    • Added check for dealing with old format (not serialized) data.
  • 2.1.0 (2013-04-29):
    • Switched to using Chosen jQuery plugin instead of EE/CI tables for selection of multiple currencies. Chosen also enhances single-currency selection and adds a search-as-you-type feature to the currency fields.
    • Add-on is now for sale at devot-ee.com. GitHub repo remains available for free trials.
  • 2.0.0 (2013-01-30):
    • Now EE2 compatible. All new features listed for this version and onwards are EE2-only. EE1 development has ended.
    • Added global and field settings for single/multiple currency selection and displaying common/all currencies
    • Added tag pair support
    • Added "markup" and "separator" parameters to single-tag mode
    • Added {total_results}, {count}, and {code} variables to tag pair
    • Added "backspace" parameter to tag pair
  • 1.0.0 (EE1-only)
    • Single currency selection
    • Matrix celltype support

Examples

Assume:

  • Field short name is "my_currency"
  • Selected single currency:
    • US Dollars
  • Selected multiple currencies:
    • US Dollars
    • Euros
    • Pounds Sterling

Single Tag

Single Currency

Code:

{my_currency}

Output:

USD

Multiple Currencies

No Parameters

Code:

{my_currency}

Output:

USD, EUR, GBP

"Separator" Parameter

Code:

{my_currency separator="|"}

Output:

USD|EUR|GBP

"Markup" Parameter

Code:

{my_currency markup="ol"}

Output:

<ol>
	<li>USD</li>
	<li>EUR</li>
	<li>GBP</li>
</ol>

Tag Pair

Single Currency

Code:

{my_currency}
	Selected Currency:
	{count}. {code}
{/my_currency}

Output:

Selected Currency:
1. USD

Multiple Currencies

Basic Example

Code:

{my_currency backspace="2"}{code}; {/my_currency}

Output:

USD; EUR; GBP

Note that whitespace is counted as a character for the "backspace" parameter.

Advanced Example

Code:

{my_currency}
{if count == 1}
	<dl>
{/if}
		<dt>{count}</dt>
		<dd>{code}</dd>
{if count == total_results}
	</dl>
	Total Selected Currencies: {total_results}
{/if}
{/my_currency}

Output:

<dl>
	<dt>1</dt>
	<dd>USD</dd>

	<dt>2</dt>
	<dd>EUR</dd>

	<dt>3</dt>
	<dd>GBP</dd>
</dl>
Total Selected Currencies: 3

mc_currencee's People

Contributors

proimage avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.