GithubHelp home page GithubHelp logo

dreamseeker / craft-jpaddress Goto Github PK

View Code? Open in Web Editor NEW
3.0 4.0 0.0 244 KB

This plugin is Address FieldType of the Japanese format for Craft CMS.

License: MIT License

PHP 36.54% CSS 3.90% JavaScript 36.56% HTML 23.00%

craft-jpaddress's Introduction

JP Address plugin for Craft CMS

This plugin is Address FieldType of the Japanese format for Craft CMS.

Screenshot

Installation

To install JP Address, follow these steps:

  1. Download & unzip the file and place the jpaddress directory into your craft/plugins directory
  2. -OR- do a git clone https://github.com/dreamseeker/craft-jpaddress.git directly into your craft/plugins folder. You can then update it with git pull
  3. Install plugin in the Craft Control Panel under Settings > Plugins
  4. The plugin folder should be named jpaddress for Craft to see it. GitHub recently started appending -master (the branch name) to the name of the folder for zip file downloads.

JP Address works on Craft 2.6.x.

JP Address Overview

JP Address adds a 'JP Address' FieldType for Craft CMS that you can add to any of your Sections.

Configuring JP Address

Create a JP Address field via Settings->Fields.

Using JP Address

Once you have created the JP Address field, add it to your Section Entry Types, and fill in address information. Each address can contain Google Maps Coordinates.

[hint] You can change it in Settings->Plugins, if Google Maps Coordinates is unnecessary. Google Maps API Key can input in the same screen, too.

Using JP Address in your Templates

To display information about a jpaddress in your templates, you just use familiar Twig code. If the field handle for your JP Address field is "sampleAddress", this is what you'd use to output information about it.

Basic Info

  • {{ entry.sampleAddress.postalCode }} - Postal code
  • {{ entry.sampleAddress.prefecture }} - Name of prefectures
  • {{ entry.sampleAddress.cityStreet }} - City name, Street Address (when Use City Field? setting is invalid.)
  • {{ entry.sampleAddress.city }} - City name (when Use City Field? setting is valid.)
  • {{ entry.sampleAddress.street }} - Street name (when Use City Field? setting is valid.)
  • {{ entry.sampleAddress.building }} - Building name, etc.
  • {{ entry.sampleAddress.latitude }} - Latitude for Google Maps
  • {{ entry.sampleAddress.longitude }} - Longitude for Google Maps
  • {{ entry.sampleAddress.zoomLevel }} - Zoom Level for Google Maps

JP Address Roadmap

Some things to do, and ideas for potential features:

  • For a list of Prefecture

JP Address Changelog

1.0.4 -- 2017.03.18

  • Add Use City Field in Settings->Plugins. If choose it, you can input city and street address at independent field.
  • Fixed a bug that can't view Google Maps when edit entry.

1.0.3 -- 2017.03.11

  • Fixed a bug that can't set Google Maps Coordinates when create new entry in relatedTo modal window.

1.0.2 -- 2017.03.11

  • Fixed a JavaScript error to occur when create new entry in relatedTo modal window.

1.0.1 -- 2017.03.11

  • Fixed a JavaScript error to occur when you did not use Google Maps Coordinates.
  • Update explanations of README.md

1.0.0 -- 2016.05.08

  • Initial release

Brought to you by Toru Kokubun

Special Thanks

To automatically insert the address according to the input of the postal code, we use the Ninton G.K.'s library.
https://github.com/ninton/jquery.jpostal.js/

craft-jpaddress's People

Contributors

dreamseeker avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  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.