├── assets ├── address.css ├── address.js └── jquery.googleMapsForm.js ├── boot.php ├── package.yml ├── lang ├── it_it.lang ├── sv_se.lang ├── en_gb.lang ├── pt_br.lang ├── de_de.lang └── es_es.lang ├── pages ├── index.php ├── miscellaneous.php └── address.php ├── LICENSE ├── lib └── class.address.php ├── README.md └── help.php /assets/address.css: -------------------------------------------------------------------------------- 1 | #address_map { 2 | height:500px; 3 | } -------------------------------------------------------------------------------- /boot.php: -------------------------------------------------------------------------------- 1 | getAssetsUrl('address.css')); 4 | rex_view::addJsFile('http://maps.google.com/maps/api/js?language='.rex_i18n::getLocale()); 5 | rex_view::addJsFile($this->getAssetsUrl('jquery.googleMapsForm.js')); 6 | rex_view::addJsFile($this->getAssetsUrl('address.js')); 7 | } 8 | ?> -------------------------------------------------------------------------------- /assets/address.js: -------------------------------------------------------------------------------- 1 | $(document).on('ready pjax:success',function() { 2 | $('#address_map').googleMapsForm({ 3 | streetInput: '#address-address-street', 4 | zipInput: '#address-address-zipcode', 5 | cityInput: '#address-address-city', 6 | countryInput: '#address-address-country', 7 | latInput: '#address-address-latitude', 8 | lngInput: '#address-address-longitude', 9 | latLngLookupButton: '#address-address-getcoords' 10 | }); 11 | }); -------------------------------------------------------------------------------- /package.yml: -------------------------------------------------------------------------------- 1 | package: address 2 | version: '2.0.0' 3 | author: Friends Of REDAXO 4 | supportpage: github.com/FriendsOfREDAXO/address 5 | 6 | page: 7 | title: 'translate:title' 8 | perm: address[] 9 | pjax: true 10 | icon: rex-icon fa-map-o 11 | subpages: 12 | address: { title: 'translate:address', perm: address[address] } 13 | miscellaneous: { title: 'translate:miscellaneous', perm: address[miscellaneous] } 14 | 15 | requires: 16 | redaxo: '>=5.1.0' 17 | -------------------------------------------------------------------------------- /lang/it_it.lang: -------------------------------------------------------------------------------- 1 | address_title = indirizzo 2 | 3 | address_address = indirizzo 4 | address_address_street = via 5 | address_address_zipcode = cap 6 | address_address_city = luogo 7 | address_address_country = paese 8 | address_address_latitude = latitudine 9 | address_address_longitude = longitudine 10 | address_address_action_getcoords = rilevare le coordinate 11 | 12 | address_miscellaneous = altro 13 | address_miscellaneous_telephone = telefono 14 | address_miscellaneous_fax = fax 15 | address_miscellaneous_email = email 16 | address_miscellaneous_info = informazioni 17 | 18 | address_action_save = salva impostazioni 19 | address_saved = impostazioni salvate 20 | 21 | address_help_intro = 22 | 23 | perm_general_address[] = 24 | perm_general_address[config] = -------------------------------------------------------------------------------- /pages/index.php: -------------------------------------------------------------------------------- 1 | i18n('title')); // $this->i18n('title') ist eine Kurzform für rex_i18n::msg('dummy_title') 9 | 10 | // Die Subpages werden nicht mehr über den "subpage"-Parameter gesteuert, sondern mit über "page" (getrennt mit einem Slash, z. B. page=dummy/config) 11 | // Die einzelnen Teile des page-Pfades können mit der folgenden Funktion ausgelesen werden. 12 | $subpage = rex_be_controller::getCurrentPagePart(2); 13 | 14 | // Subpages können über diese Methode eingebunden werden. So ist sichergestellt, dass auch Subpages funktionieren, 15 | // die von anderen Addons/Plugins hinzugefügt wurden 16 | rex_be_controller::includeCurrentPageSubPath(); 17 | -------------------------------------------------------------------------------- /lang/sv_se.lang: -------------------------------------------------------------------------------- 1 | address_title = Adress 2 | 3 | address_address = Adress 4 | address_address_street = Gata 5 | address_address_zipcode = Postnr. 6 | address_address_city = Ort 7 | address_address_country = Land 8 | address_address_latitude = Breddgrad 9 | address_address_longitude = Längdgrad 10 | address_address_action_getcoords = Bestämma koordinaterna 11 | 12 | address_miscellaneous = Övrigt 13 | address_miscellaneous_telephone = Telefon 14 | address_miscellaneous_fax = Fax 15 | address_miscellaneous_email = E-post 16 | address_miscellaneous_info = Info 17 | 18 | address_action_save = Spara inställningarna 19 | address_saved = Inställningarna har sparats! 20 | 21 | address_help_intro = Med denna tillägg kan du hantera en adress inklusive koordinater (via Google Maps) via backend. I frontenden kan du få de sparade värdena via en av de följande metoder. 22 | 23 | perm_general_address[] = Permissions for the Address-Addon 24 | perm_general_address[config] = Permissions for the Configurationpage of the Address-Addon -------------------------------------------------------------------------------- /lang/en_gb.lang: -------------------------------------------------------------------------------- 1 | address_title = Address 2 | 3 | address_address = Address 4 | address_address_street = Street 5 | address_address_zipcode = Zip code 6 | address_address_city = City 7 | address_address_country = Country 8 | address_address_latitude = Latitude 9 | address_address_longitude = Longitude 10 | address_address_action_getcoords = Evaluate coordinates 11 | 12 | address_miscellaneous = Miscellaneous 13 | address_miscellaneous_telephone = Telephone 14 | address_miscellaneous_fax = Fax 15 | address_miscellaneous_email = E-mail 16 | address_miscellaneous_info = Info 17 | 18 | address_action_save = Save settings 19 | address_saved = Settings saved successfully! 20 | 21 | address_help_intro = This addon allows managing an address including coordinates (via Google Maps) through the backend. In the frontend you can get the saved values via one of the following methods. 22 | 23 | perm_general_address[] = Permissions for the Address-Addon 24 | perm_general_address[config] = Permissions for the Configurationpage of the Address-Addon -------------------------------------------------------------------------------- /lang/pt_br.lang: -------------------------------------------------------------------------------- 1 | address_title = Endereço 2 | 3 | address_address = Endereço 4 | address_address_street = Rua 5 | address_address_zipcode = Código postal 6 | address_address_city = Cidade 7 | address_address_country = Páis 8 | address_address_latitude = Latitude 9 | address_address_longitude = Longitude 10 | address_address_action_getcoords = Determinar coordenadas 11 | 12 | address_miscellaneous = Outros 13 | address_miscellaneous_telephone = Telefone 14 | address_miscellaneous_fax = Fax 15 | address_miscellaneous_email = E-mail 16 | address_miscellaneous_info = Info 17 | 18 | address_action_save = Salvas configurações 19 | address_saved = Configurações salvas com sucesso 20 | 21 | address_help_intro = Este Addon permite editar um endereço incluindo coordenadas (Via Google Maps) através do backend. No frontedn, você pode acessar aos valores salvos através dos métodos a seguir: 22 | 23 | perm_general_address[] = Permissões para o Addon de endereço 24 | perm_general_address[config] = Permissões para a página de configuração do Addon de endereço -------------------------------------------------------------------------------- /lang/de_de.lang: -------------------------------------------------------------------------------- 1 | address_title = Adresse 2 | 3 | address_address = Adresse 4 | address_address_street = Strasse 5 | address_address_zipcode = PLZ 6 | address_address_city = Ort 7 | address_address_country = Land 8 | address_address_latitude = Breitengrad 9 | address_address_longitude = Längengrad 10 | address_address_action_getcoords = Koordinaten ermitteln 11 | 12 | address_miscellaneous = Sonstiges 13 | address_miscellaneous_telephone = Telefon 14 | address_miscellaneous_fax = Fax 15 | address_miscellaneous_email = Email 16 | address_miscellaneous_info = Info 17 | 18 | address_action_save = Einstellungen speichern 19 | address_saved = Einstellungen wurden gespeichert! 20 | 21 | address_help_intro = Das Addon bietet die Möglichkeit eine Adresse inkl. Koordinaten (via Googlemaps) im Backend zu verwalten. Im Frontend kann man die gespeicherten Werte anschliessend über die nachfolgenden Methoden auslesen und verwenden. 22 | 23 | perm_general_address[] = Rechte für das Adresse-Addon 24 | perm_general_address[config] = Rechte für die Konfiguratonsseite des Adresse-Addons -------------------------------------------------------------------------------- /lang/es_es.lang: -------------------------------------------------------------------------------- 1 | address_title = Dirección 2 | 3 | address_address = Dirección 4 | address_address_street = Calle 5 | address_address_zipcode = Código postal 6 | address_address_city = Ciudad 7 | address_address_country = País 8 | address_address_latitude = Latitud 9 | address_address_longitude = Longitud 10 | address_address_action_getcoords = Determinar coordenadas 11 | 12 | address_miscellaneous = Otro 13 | address_miscellaneous_telephone = Teléfono 14 | address_miscellaneous_fax = Fax 15 | address_miscellaneous_email = E-mail 16 | address_miscellaneous_info = Info 17 | 18 | address_action_save = Guardar configuraciones 19 | address_saved = Los ajustes han sido guardados! 20 | 21 | address_help_intro = El complemento ofrece la posibilidad de administrar una dirección incluyendo coordenadas (a través de Google Maps) en el back-end. En la interfaz, los valores almacenados pueden leerse y utilizarse a través de los siguientes métodos. 22 | 23 | perm_general_address[] = Permisos para el complemento de dirección 24 | perm_general_address[config] = Permisos para la página de configuración del complemento de dirección -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2016 Friends Of REDAXO 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /lib/class.address.php: -------------------------------------------------------------------------------- 1 | getConfig('telephone'); 5 | } 6 | 7 | public static function getFax() { 8 | return rex_addon::get('address')->getConfig('fax'); 9 | } 10 | 11 | public static function getEmail() { 12 | return rex_addon::get('address')->getConfig('email'); 13 | } 14 | 15 | public static function getInfo() { 16 | return rex_addon::get('address')->getConfig('info'); 17 | } 18 | 19 | public static function getStreet() { 20 | return rex_addon::get('address')->getConfig('street'); 21 | } 22 | 23 | public static function getZipcode() { 24 | return rex_addon::get('address')->getConfig('zipcode'); 25 | } 26 | 27 | public static function getCity() { 28 | return rex_addon::get('address')->getConfig('city'); 29 | } 30 | 31 | public static function getCountry() { 32 | return rex_addon::get('address')->getConfig('country'); 33 | } 34 | 35 | public static function getLatitude() { 36 | return rex_addon::get('address')->getConfig('latitude'); 37 | } 38 | 39 | public static function getLongitude() { 40 | return rex_addon::get('address')->getConfig('longitude'); 41 | } 42 | } 43 | ?> -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Redaxo 5 Addon - Adressverwaltung 2 | ================================= 3 | 4 | Das Addon bietet die Möglichkeit eine Adresse inkl. Koordinaten (via Googlemaps) im Backend zu verwalten. Im Frontend kann man die gespeicherten Werte anschliessend über die nachfolgenden Methoden auslesen und verwenden. 5 | 6 | ### Telefon 7 | 8 | ```php 9 | 12 | ``` 13 | 14 | ### Fax 15 | 16 | ```php 17 | 20 | ``` 21 | 22 | ### Email 23 | 24 | ```php 25 | 28 | ``` 29 | 30 | ### Info 31 | 32 | ```php 33 | 36 | ``` 37 | 38 | ### Strasse 39 | 40 | ```php 41 | 44 | ``` 45 | 46 | ### PLZ 47 | 48 | ```php 49 | 52 | ``` 53 | 54 | ### Ort 55 | 56 | ```php 57 | 60 | ``` 61 | 62 | ### Land 63 | 64 | ```php 65 | 68 | ``` 69 | 70 | ### Breitengrad 71 | 72 | ```php 73 | 76 | ``` 77 | 78 | ### Längengrad 79 | 80 | ```php 81 | 84 | ``` 85 | -------------------------------------------------------------------------------- /pages/miscellaneous.php: -------------------------------------------------------------------------------- 1 | setConfig(rex_post('miscellaneous', [ 6 | ['telephone', 'string'], 7 | ['fax', 'string'], 8 | ['email', 'string'], 9 | ['info', 'string'], 10 | ])); 11 | 12 | $content .= rex_view::info($this->i18n('saved')); 13 | } 14 | 15 | $content .= '