Jump to content
ryan

Map Marker Map

Recommended Posts

On 12/23/2018 at 9:54 PM, mel47 said:

Hi

I have a problem that I didn't have before (not sure when was "before" though...). However all last year' pages displayed a correct localization.

If I typed an address, it will not localized until I check/uncheck the geocode true/false. However, saving the page doesn't retain the "ok rooftop" result, and return to "request denied". After a couple of saving pages, I eventually get lat/long saved but the status is still "request denied".

Furthermore, I discovered I can't modify addresses on certain pages (those created by guest (form builder)). It may be related to my similar problem about image undeletable.

Under 3.0.123, both local and production. Google API is enabled for billing. Anyway, address with a previous correct localization are displayed fine.

Thanks!

I found a workaround, related to an other issue. I ended by moving the order of fields.
BTW, no error in console.

Thanks

Share this post


Link to post
Share on other sites

Maybe I'm missing something, but now, where once Google maps were working, I get a message saying that Google maps did not load correctly.  I believe it is because Google now requires an api key.  But I can't see where to put an api key into the markupgooglemaps module.  How do I make maps work again?

 

Share this post


Link to post
Share on other sites

My API key is configured correctly in FieldtypeMapMarker. I have the same problem than kbutler64 tough... Saying that Google maps did not load correctly on each map.

These are the error I get in Chrome inspector:

util.js:221 Google Maps JavaScript API warning: NoApiKeys https://developers.google.com/maps/documentation/javascript/error-messages#no-api-keys
lw.m @ util.js:221
util.js:221 Google Maps JavaScript API warning: SensorNotRequired https://developers.google.com/maps/documentation/javascript/error-messages#sensor-not-required
lw.m @ util.js:221

As requested by the module document, i added this line in the head: 

<script type='text/javascript' src='https://maps.googleapis.com/maps/api/js?sensor=false'></script>

Google now says it's not required.. I also notice this code,required by Google API, it not loaded in the page.  

<script async defer src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap"
  type="text/javascript"></script>

What should I do?

Share this post


Link to post
Share on other sites

Hello!

This field holds 3 pieces of data. The address, longitude and latitude. The latter two are numerical data which does not need translation. The address field is what is send to Google to get the coordinates. I do not think there is an easy way to make it multilingual (it is not now as far as I know). But there is always a way to store multilingual address information in other fields of the same page, and use this information to generate marker descriptions (for example) for each language needed.

Share this post


Link to post
Share on other sites

Hey everyone,

I did see, that other users were struggling with the problem, that there are no Markers displayed in the frontend, but I could not find any replies to that problem. 
If I render a map, the coordinates are correct, but the marker icon is not displayed. It displays in the backend, but not in the frontend, also if if but the path to a custom image in the map options. Nothing. 
Does anyone have the same problem?

Thanks for any hints

Share this post


Link to post
Share on other sites

Hi,

I have a recurrent problem of an error " 'MarkupGoogleMap' was used before it was defined. ". In some browser, the map display correctly but in some (IE) it just doesn't work.

I put the code in a JS validator, and I have the same error, but I don't know why and what I'm supposed to do, since I didn't play with this JS code. I also have " Expected 'mgmap1' at column 1, not column 37. "

Spoiler

<head>
    	<script async defer src="https://maps.googleapis.com/maps/api/js?key=MYKEY"  type="text/javascript"></script>
</head>

<div id='mgmap1' class='MarkupGoogleMap' style='width: 100%; height: 250px;'></div><script type='text/javascript'>

var mgmap1 = new MarkupGoogleMap(); mgmap1.setOption('zoom', 19); mgmap1.setOption('mapTypeId', google.maps.MapTypeId.ROADMAP); mgmap1.setHoverBox('<div data-top="-10" data-left="15" style="background: #000; color: #fff; padding: 0.25em 0.5em; border-radius: 3px;"></div>');mgmap1.init('mgmap1', 45.558225, -73.551839); mgmap1.addMarker(0.000000, 0.000000, '/programmation/facebook-live-avec-les-squelettes-de-baleines/', 'Facebook live avec les squelettes de baleines!', ''); mgmap1.addMarker(0.000000, 0.000000, '/programmation/concours-journalisme-scientifique-plume-de-science/', 'Concours journalisme scientifique - Plume de science', ''); mgmap1.addMarker(0.000000, 0.000000, '/programmation/grand-defi-quebecoiseaux-2019/', 'Grand Défi QuébecOiseaux 2019', ''); mgmap1.addMarker(0.000000, 0.000000, '/programmation/lodyssee-des-sciences-jeunesse/', 'L&#039;Odyssée des sciences jeunesse', ''); mgmap1.addMarker(47.837513, -69.536392, '/programmation/presentoir-science/', 'Présentoir science', ''); mgmap1.addMarker(46.020489, -73.044777, '/programmation/observation-des-oiseaux-de-proie-en-migration/', 'Observation des oiseaux de proie en migration', ''); mgmap1.addMarker(48.442829, -68.519707, '/programmation/rassemblement-scientifique-a-rimouski/', 'Rassemblement scientifique à Rimouski', ''); mgmap1.addMarker(48.451046, -68.525238, '/programmation/vitrine-exposition-livres-et-objets-thematiques/', 'Vitrine &amp; exposition: livres et objets thématiques', ''); mgmap1.addMarker(48.548431, -71.650375, '/programmation/des-avions-en-papier-inusites/', 'Des avions en papier inusités', ''); mgmap1.addMarker(48.684093, -72.487625, '/programmation/on-a-marche-sur-la-lune-50-ans-deja/', 'On a marche sur la Lune, 50 ans déjà', ''); mgmap1.addMarker(48.430279, -71.063011, '/programmation/soiree-dobservation-astronomique/', 'Soirée d&#039;observation astronomique', ''); mgmap1.addMarker(48.410259, -71.268867, '/programmation/pop-et-pigments/', 'Pop et pigments', ''); mgmap1.addMarker(46.836414, -71.214966, '/programmation/excursion-dobservation-des-oiseaux/', 'Excursion d&#039;observation des oiseaux', ''); mgmap1.addMarker(46.836414, -71.214966, '/programmation/connaitre-les-oiseaux-communs-qui-nous-entourent/', 'Connaître les oiseaux communs qui nous entourent', ''); mgmap1.addMarker(46.732670, -71.444519, '/programmation/excursion-ornithologique-guidee/', 'Excursion ornithologique guidée', ''); mgmap1.addMarker(46.768501, -71.371063, '/programmation/chasse-aux-bestioles-aux-floralies-jouvence/', 'Chasse aux bestioles aux Floralies Jouvence', ''); mgmap1.addMarker(46.733200, -71.443588, '/programmation/chasse-aux-bestioles-dans-le-parc-des-hauts-fonds/', 'Chasse aux bestioles dans le Parc des Hauts-Fonds', ''); mgmap1.addMarker(46.813988, -71.206612, '/programmation/a-vos-marques-prets-fouillez/', 'A vos marques... Prêts... Fouillez !', ''); mgmap1.addMarker(47.652554, -70.149353, '/programmation/decouverte-de-la-biodiversite-de-charlevoix/', 'Découverte de la Biodiversité de Charlevoix', ''); mgmap1.addMarker(46.792343, -71.264801, '/programmation/conference-demonstration-matiere-a-reflexion/', 'Conférence-démonstration MATIÈRE à réflexion', ''); mgmap1.addMarker(46.750938, -71.343697, '/programmation/festival-electrons-livres/', 'Festival Électrons Livres', ''); mgmap1.addMarker(47.064148, -70.796379, '/programmation/le-vent-dans-les-ailes/', 'Le vent dans les ailes', ''); mgmap1.addMarker(46.815228, -71.202332, '/programmation/erreur-watson-la-chimie-au-service-de-la-justice/', 'Erreur Watson : la chimie au service de la justice', ''); mgmap1.addMarker(47.064148, -70.796379, '/programmation/sur-la-piste-de-renard/', 'Sur la piste de Renard', ''); mgmap1.addMarker(47.064148, -70.796379, '/programmation/les-tresors-du-cap-tourmente/', 'Les trésors du Cap-Tourmente', ''); mgmap1.addMarker(47.064148, -70.796379, '/programmation/defi-grozoiseaux/', 'Défi Grozoiseaux', ''); mgmap1.addMarker(46.786736, -71.282288, '/programmation/les-abeilles-sentinelles-ecologiques/', 'Les abeilles, sentinelles écologiques', ''); mgmap1.addMarker(46.792343, -71.264801, '/programmation/construis-ton-spectroscope-et-decouvre-la-matiere/', 'Construis ton spectroscope et découvre la matière !', ''); mgmap1.addMarker(46.741184, -71.354439, '/programmation/mini-expo-astro-section-jeunesse-du-club-vega/', 'Mini expo astro section jeunesse du club véga', ''); mgmap1.addMarker(46.751629, -71.288765, '/programmation/du-changement-pour-une-terre-qui-nous-rend-fiers/', 'Du changement pour une Terre qui nous rend fiers !', ''); mgmap1.addMarker(46.792343, -71.264801, '/programmation/fabrique-ton-petit-chocolat-scientifique/', 'Fabrique ton petit chocolat scientifique', ''); mgmap1.addMarker(46.814323, -71.225792, '/programmation/livres-de-sciences-dans-les-bibliotheques-de-quebec/', 'Livres de sciences dans les bibliothèques de Québec', ''); mgmap1.addMarker(46.810051, -71.215881, '/programmation/les-mineraux-du-musee-canadien-de-la-nature-a-quebec/', 'Les minéraux du Musée canadien de la nature à Québec', ''); mgmap1.addMarker(46.770130, -71.294235, '/programmation/des-medicaments-en-trop/', 'Des médicaments en trop', ''); mgmap1.addMarker(46.342670, -72.542931, '/programmation/expo-biblio-la-terre-de-demain/', 'Expo biblio - La Terre de demain', ''); mgmap1.addMarker(46.358582, -72.567787, '/programmation/salon-des-sciences-de-la-mauricie/', 'Salon des sciences de la Mauricie', ''); mgmap1.addMarker(46.564102, -72.752571, '/programmation/symposium-des-sciences/', 'Symposium des sciences', ''); mgmap1.addMarker(45.402416, -71.828232, '/programmation/rassemblement-scientifique-de-lestrie-1/', 'Rassemblement scientifique de l&#039;Estrie', ''); mgmap1.addMarker(45.494408, -72.309959, '/programmation/repair-cafe/', 'Repair Café', ''); mgmap1.addMarker(45.380409, -71.928436, '/programmation/cercle-mathematique-de-sherbrooke/', 'Cercle Mathématique de Sherbrooke', ''); mgmap1.addMarker(45.403366, -71.895638, '/programmation/la-preuve-par-limage/', 'La preuve par l’image', ''); mgmap1.addMarker(45.403366, -71.895638, '/programmation/la-preuve-par-limage-1/', 'La preuve par l’image', ''); mgmap1.addMarker(45.397408, -71.896782, '/programmation/soiree-dastronomie-place-de-la-gare-de-sherbrooke/', 'Soirée d&#039;astronomie Place de la Gare de Sherbrooke', ''); mgmap1.addMarker(45.403366, -71.895638, '/programmation/delires-scientifiques-vis-ta-science-autrement-1/', 'Délires scientifiques! Vis ta science autrement.', ''); mgmap1.addMarker(45.394413, -71.928307, '/programmation/atelier-sur-les-mollusques-aquatiques-et-terrestres/', 'Atelier sur les mollusques aquatiques et terrestres', ''); mgmap1.addMarker(45.667953, -73.494850, '/programmation/le-soleil-et-les-changement-climatiques/', 'Le soleil et les changement climatiques', ''); mgmap1.addMarker(45.667953, -73.494850, '/programmation/fabrique-ta-propre-enseigne-neon/', 'Fabrique ta propre enseigne néon', ''); mgmap1.addMarker(45.483768, -73.808022, '/programmation/presentoirs-de-livres-24h-de-science/', 'Présentoirs 24h de science', ''); mgmap1.addMarker(45.517937, -73.608383, '/programmation/activite-stim-avec-des-briques-lego/', 'Activité STIM avec des briques LEGO', ''); mgmap1.addMarker(45.479172, -73.563400, '/programmation/exposition-de-documents-sur-le-theme-de-la-science/', 'Exposition de documents sur le thème de la science', ''); mgmap1.addMarker(45.449303, -73.816498, '/programmation/presentoirs-bibliographies-sur-le-theme-sous-la-terre/', 'Présentoirs/Bibliographies sur le thème &quot;Sous la terre&quot;', ''); mgmap1.addMarker(45.479172, -73.563400, '/programmation/les-circuits-electroniques/', 'Les circuits électroniques', ''); mgmap1.addMarker(45.448582, -73.577957, '/programmation/la-science-abracadabrante-avec-les-scientifines/', 'La science abracadabrante avec les scientifines', ''); mgmap1.addMarker(45.457073, -73.547440, '/programmation/la-science-abracadabrante-avec-les-scientifines-1/', 'La science abracadabrante avec les scientifines', ''); mgmap1.addMarker(45.524872, -73.582474, '/programmation/programmez-une-creature-par-ordinateur/', 'Programmez une créature par ordinateur', ''); mgmap1.addMarker(45.502773, -73.554718, '/programmation/sauvons-leau/', 'Sauvons l&#039;eau !', ''); mgmap1.addMarker(45.557461, -73.672546, '/programmation/partez-en-mission-pour-le-monarque/', 'Partez en mission pour le monarque!', ''); mgmap1.addMarker(45.557461, -73.672546, '/programmation/lindustrie-miniere-ici-la-et-un-peu-partout/', 'L’industrie minière : ici, là et un peu partout!', ''); mgmap1.addMarker(45.509209, -73.568535, '/programmation/les-mathematiques-de-la-magie/', 'Les mathématiques de la magie!', ''); mgmap1.addMarker(45.553364, -73.662636, '/programmation/science-abracadabrante-2/', 'Science abracadabrante', ''); mgmap1.addMarker(45.514069, -73.646317, '/programmation/une-breve-histoire-du-temps/', 'Une brève histoire du temps', ''); mgmap1.addMarker(45.557461, -73.672546, '/programmation/vie-aquatique-des-bouleversements-a-lhorizon/', 'Vie aquatique : des bouleversements à l’horizon?', ''); mgmap1.addMarker(45.505211, -73.550240, '/programmation/forum-sur-le-cancer-du-sein/', 'Forum sur le cancer du sein', ''); mgmap1.addMarker(45.562149, -73.595634, '/programmation/fabrication-de-jouets-ecologiques/', 'Fabrication de jouets écologiques', ''); mgmap1.addMarker(45.441399, -73.758514, '/programmation/journee-internationale-de-lastronomie-24h-de-science/', 'Journée Internationale de l&#039;Astronomie + 24h de science', ''); mgmap1.addMarker(45.505211, -73.550240, '/programmation/les-araignees-de-la-peur-a-la-fascination/', 'Les araignées – De la peur à la fascination', ''); mgmap1.addMarker(45.681114, -73.500977, '/programmation/marais-sans-dessus-dessous/', 'Marais sans dessus dessous', ''); mgmap1.addMarker(45.514450, -73.895958, '/programmation/les-oiseaux-de-retour-chez-eux/', 'Les oiseaux, de retour chez eux', ''); mgmap1.addMarker(45.499691, -73.768173, '/programmation/du-champ-a-la-foret/', 'Du champ à la forêt', ''); mgmap1.addMarker(45.557461, -73.672546, '/programmation/laboratoire-judiciaire/', 'Laboratoire Judiciaire', ''); mgmap1.addMarker(45.501011, -73.615776, '/programmation/la-terre-de-demain-les-maths-peuvent-elles-aider/', 'La Terre de demain : les maths peuvent-elles aider?', ''); mgmap1.addMarker(45.504959, -73.574036, '/programmation/decouvrir-la-chimie-discover-chemistry/', 'Découvrir la chimie! / Discover Chemistry', ''); mgmap1.addMarker(45.557461, -73.672546, '/programmation/sadapter-piece-par-piece/', 'S’adapter pièce par pièce', ''); mgmap1.addMarker(45.557461, -73.672546, '/programmation/visite-guidee-du-pavillon-daccueil-du-parcours-gouin/', 'Visite guidée du pavillon d&#039;accueil du Parcours Gouin', ''); mgmap1.addMarker(45.424202, -73.866859, '/programmation/cinema-en-famille-du-vendredi-big-hero-6/', 'Cinéma en famille du vendredi: Big Hero 6', ''); mgmap1.addMarker(45.581715, -73.544067, '/programmation/deuxieme-vie/', 'Deuxième vie', ''); mgmap1.addMarker(45.440098, -73.691795, '/programmation/apres-midi-technologique/', 'Après-midi technologique', ''); mgmap1.addMarker(45.424202, -73.866859, '/programmation/brico-scientifique-pour-maman/', 'Brico scientifique pour maman!', ''); mgmap1.addMarker(45.445770, -73.651527, '/programmation/activite-scientifique-la-glace-carbonique/', 'Activité scientifique : la glace carbonique!', ''); mgmap1.addMarker(45.547428, -73.598038, '/programmation/decouvertes-litteraires-autour-de-la-science-bricolage/', 'Découvertes littéraires autour de la science', ''); mgmap1.addMarker(45.557617, -73.556946, '/programmation/capturez-des-donnees-pour-lherbier-marie-victorin/', 'Capturez des données pour l&#039;herbier Marie-Victorin', ''); mgmap1.addMarker(45.504467, -73.577385, '/programmation/les-arbres-une-chronique-vivante-de-notre-climat/', 'Les Arbres: Une Chronique Vivante de notre Climat', ''); mgmap1.addMarker(45.595375, -73.523880, '/programmation/deuxieme-vie-1/', 'Deuxième vie !', ''); mgmap1.addMarker(45.557461, -73.672546, '/programmation/quiz-sur-la-biodiversite-urbaine/', 'Quiz sur la biodiversité urbaine', ''); mgmap1.addMarker(45.509354, -73.566826, '/programmation/visite-acoustique-de-la-maison-symphonique-complet/', 'Visite acoustique de la Maison symphonique - COMPLET', ''); mgmap1.addMarker(45.509434, -73.569481, '/programmation/la-vie-serait-elle-dorigine-intraterrestre/', 'La vie serait-elle d&#039;origine intraterrestre ?', ''); mgmap1.addMarker(45.552509, -73.576202, '/programmation/portes-ouvertes-sur-les-sciences-de-la-terre/', 'Portes ouvertes sur les sciences de la terre', ''); mgmap1.addMarker(45.477280, -73.592667, '/programmation/visites-guidees-du-musee-des-ondes-emile-berliner/', 'Visites guidées du Musée des ondes Emile Berliner', ''); mgmap1.addMarker(45.578171, -73.657722, '/programmation/conference-et-observation-astronomique/', 'Conférence et Observation astronomique', ''); mgmap1.addMarker(45.587234, -73.575577, '/programmation/rassemblement-scientifique-de-montreal-2019/', 'Rassemblement scientifique de Montréal 2019', ''); mgmap1.addMarker(45.427792, -75.710930, '/programmation/protegeons-lenvironnement-mais-comment/', 'Protégeons l&#039;environnement... Mais comment ?', ''); mgmap1.addMarker(45.421844, -75.738441, '/programmation/la-realite-virtuelle-au-secours-des-phobies/', 'La réalité virtuelle au secours des phobies', ''); mgmap1.addMarker(45.459194, -75.769730, '/programmation/demonstration-grand-public-dune-cyberattaque/', 'Démonstration grand public d’une cyberattaque', ''); mgmap1.addMarker(45.507301, -75.791344, '/programmation/excursion-mycologique-printaniere/', 'Excursion mycologique printanière', ''); mgmap1.addMarker(45.459835, -75.767059, '/programmation/ma-these-en-180-secondes/', 'Ma Thèse en 180 secondes', ''); mgmap1.addMarker(45.506279, -75.812080, '/programmation/balade-promenons-nous-dans-les-bois/', 'Balade - Promenons-nous dans les bois!', ''); mgmap1.addMarker(45.790928, -75.207451, '/programmation/conference-participative-declic-reinventer-la-foret/', 'Conférence participative Déclic - Réinventer la forêt', ''); mgmap1.addMarker(45.429043, -75.709213, '/programmation/1e-plateforme-wikimedia-autochtone-en-amerique-du-nord/', '1e plateforme Wikimédia autochtone en Amérique du Nord', ''); mgmap1.addMarker(45.421844, -75.738441, '/programmation/les-embouteillages-une-veritable-plaie/', 'Les embouteillages, une véritable plaie !', ''); mgmap1.addMarker(48.571243, -78.109261, '/programmation/rallye-scientifique-avec-les-debrouillards/', 'Rallye scientifique avec les Débrouillards', ''); mgmap1.addMarker(48.141258, -78.120872, '/programmation/rassemblement-scientifique-de-labitibi-temiscamingue/', 'Rassemblement scientifique de l&#039;Abitibi-Témiscamingue', ''); mgmap1.addMarker(48.230759, -79.007927, '/programmation/lastronomie-dhier-daujourdhui-et-de-demain/', 'L&#039;astronomie d&#039;hier, d&#039;aujourd&#039;hui et de demain', ''); mgmap1.addMarker(50.212269, -66.378090, '/programmation/table-de-livres-inventions-et-inventeurs/', 'Table de livres : Inventions et inventeurs!', ''); mgmap1.addMarker(50.212269, -66.378090, '/programmation/club-de-jeux-de-societe-inventions-et-inventeurs/', 'Club de jeux de société : Inventions et inventeurs !', ''); mgmap1.addMarker(50.218819, -66.381821, '/programmation/samedi-debrouillard/', 'Samedi Débrouillard', ''); mgmap1.addMarker(49.913937, -74.366531, '/programmation/observation-du-soleil/', 'Observation du Soleil', ''); mgmap1.addMarker(49.913937, -74.366531, '/programmation/decouvrez-le-planetarium-quasar/', 'Découvrez le planétarium Quasar', ''); mgmap1.addMarker(49.913937, -74.366531, '/programmation/observation-des-crateres-lunaires/', 'Observation des cratères lunaires', ''); mgmap1.addMarker(49.913937, -74.366531, '/programmation/exposition-soleil/', 'Exposition Soleil', ''); mgmap1.addMarker(47.372330, -61.916153, '/programmation/presentation-des-projets-de-recherche-des-finissants/', 'Présentation des projets de recherche des finissants', ''); mgmap1.addMarker(48.042034, -65.465553, '/programmation/festi-oiseaux/', 'Festi-oiseaux', ''); mgmap1.addMarker(46.654709, -71.312904, '/programmation/programme-ton-robot-abeille/', 'Butine ta programmation', ''); mgmap1.addMarker(45.566998, -73.744308, '/programmation/50e-anniversaire-du-premier-pas-sur-la-lune/', '50e anniversaire du premier pas sur la Lune', ''); mgmap1.addMarker(45.603191, -73.659592, '/programmation/soiree-dobservation-du-ciel/', 'Soirée d&#039;observation du ciel', ''); mgmap1.addMarker(45.616543, -73.786652, '/programmation/chasse-aux-bebittes-aquatiques/', 'Chasse aux bébittes aquatiques', ''); mgmap1.addMarker(45.607986, -73.796394, '/programmation/creatures-de-la-nuit-les-chauves-souris/', 'Créatures de la nuit : les chauves-souris', ''); mgmap1.addMarker(45.607986, -73.796394, '/programmation/les-especes-meconnues-et-mal-aimees/', 'Les espèces méconnues et mal-aimées', ''); mgmap1.addMarker(45.540962, -73.718147, '/programmation/bien-differents-genetiquement-dun-continent-a-lautre/', 'Bien différents génétiquement d’un continent à l’autre?', ''); mgmap1.addMarker(45.548340, -73.729912, '/programmation/decouverte-au-bois-chomedey/', 'Découverte au bois Chomedey', ''); mgmap1.addMarker(45.593838, -73.664345, '/programmation/les-roboticiens-de-demain/', 'Les roboticiens de demain', ''); mgmap1.addMarker(45.825657, -73.423653, '/programmation/heure-du-conte-scientifique-avec-gertrud/', 'Heure du conte scientifique avec Gertrüd', ''); mgmap1.addMarker(45.825657, -73.423653, '/programmation/atelier-robotique-pedagogique/', 'Atelier robotique pédagogique', ''); mgmap1.addMarker(45.887955, -73.284454, '/programmation/les-fossiles/', 'Les fossiles', ''); mgmap1.addMarker(45.745262, -73.602577, '/programmation/jeu-dadresse-electrique/', 'Jeu d’adresse électrique', ''); mgmap1.addMarker(46.019421, -73.447014, '/programmation/2050-quand-nous-serons-9-8-milliards-sur-terre/', '2050 : quand nous serons 9,8 milliards sur Terre', ''); mgmap1.addMarker(45.741043, -73.451935, '/programmation/contes-scientifiques/', 'Contes scientifiques', ''); mgmap1.addMarker(45.884178, -73.275085, '/programmation/soiree-dobservation-de-la-lune/', 'Soirée d&#039;observation de la lune', ''); mgmap1.addMarker(45.945377, -73.572586, '/programmation/atelier-jeux-dadresse-electrique/', 'Atelier jeux d’adresse électrique', ''); mgmap1.addMarker(46.118229, -74.600571, '/programmation/storytime-with-tina-special-science/', 'Storytime with Tina, spécial Science !', ''); mgmap1.addMarker(46.118229, -74.600571, '/programmation/livres-de-sciences-a-la-bibliotheque-samuel-ouimet/', 'Livres de sciences à la Bibliothèque Samuel-Ouimet', ''); mgmap1.addMarker(46.193897, -74.630730, '/programmation/livres-de-sciences-a-la-bibliotheque-du-couvent/', 'Livres de sciences à la Bibliothèque du Couvent', ''); mgmap1.addMarker(45.678699, -73.923706, '/programmation/les-merveilles-de-la-nature-en-realite-virtuelle/', 'Les merveilles de la nature en réalité virtuelle', ''); mgmap1.addMarker(45.623287, -74.074249, '/programmation/si-le-ciel-metait-raconte-mythologie-et-astronomie/', 'Si le ciel m&#039;était raconté : mythologie et astronomie', ''); mgmap1.addMarker(45.491627, -73.487740, '/programmation/les-decouvertes-de-melvil-electricite-statique/', 'Les découvertes de Melvil : Électricité statique', ''); mgmap1.addMarker(45.587238, -73.326057, '/programmation/science-abracadabrante/', 'Science abracadabrante', ''); mgmap1.addMarker(45.503334, -73.510292, '/programmation/les-reactions-chimiques/', 'Les réactions chimiques', ''); mgmap1.addMarker(45.503334, -73.510292, '/programmation/exposition-de-livres-thematiques/', 'Exposition de livres thématiques', ''); mgmap1.addMarker(45.775040, -73.359169, '/programmation/mini-spectacle-animaux-magie-et-sciences/', 'Mini-spectacle Animaux, magie et sciences', ''); mgmap1.addMarker(45.415398, -73.498466, '/programmation/brixologie-carnaval/', 'Brixologie : carnaval', ''); mgmap1.addMarker(45.398502, -73.572647, '/programmation/la-vie-sous-leau/', 'La vie sous l&#039;eau', ''); mgmap1.addMarker(45.388672, -73.517868, '/programmation/autour-de-labeille/', 'Autour de l&#039;abeille', ''); mgmap1.addMarker(45.398502, -73.572647, '/programmation/suggestions-du-moment-pour-le-24-heures-de-science/', 'Suggestions du moment - 24 heures de science', ''); mgmap1.addMarker(45.491089, -73.402702, '/programmation/livres-de-sciences-dans-les-bibliotheques-de-longueuil/', 'Livres de sciences dans les bibliothèques de Longueuil', ''); mgmap1.addMarker(45.620934, -72.920532, '/programmation/ca-grouille-dans-le-boise/', 'Ça grouille dans le boisé', ''); mgmap1.addMarker(45.620934, -72.920532, '/programmation/le-retour-des-insectivores-ailes/', 'Le retour des insectivores ailés', ''); mgmap1.addMarker(45.565681, -73.190346, '/programmation/le-monde-de-demain/', 'Le monde de demain', ''); mgmap1.addMarker(45.536758, -73.157784, '/programmation/la-science-a-la-montagne2/', 'La science à la montagne', ''); mgmap1.addMarker(45.361080, -73.479858, '/programmation/roches-et-mineraux/', 'Roches et minéraux', ''); mgmap1.addMarker(45.503254, -73.383682, '/programmation/les-merveilles-de-la-nature-en-realite-virtuelle-1/', 'Les merveilles de la nature en réalité virtuelle', ''); mgmap1.addMarker(45.604462, -73.448830, '/programmation/cap-sur-la-nature/', 'Cap sur la nature', ''); mgmap1.addMarker(45.549053, -73.189178, '/programmation/circuit-exterieur-les-plantes-et-leurs-usages/', 'Circuit extérieur – Les plantes et leurs usages', ''); mgmap1.addMarker(45.549053, -73.189178, '/programmation/conference-horticole/', 'Conférence horticole', ''); mgmap1.addMarker(45.359375, -73.300606, '/programmation/air-et-atmosphere-avec-les-neurones-atomiques/', 'Air et atmosphère avec les Neurones atomiques', ''); mgmap1.addMarker(46.058456, -71.957657, '/programmation/codage-souque-a-la-corde/', 'Codage : Souque à la corde', ''); mgmap1.addMarker(45.881287, -72.484634, '/programmation/la-conquete-de-la-lune/', 'La conquête de la lune', ''); mgmap1.addMarker(45.881287, -72.484634, '/programmation/lumiere-et-laser/', 'Lumière et laser', ''); mgmap1.addMarker(46.327763, -72.503265, '/programmation/la-terre-de-demain/', 'La Terre de demain', ''); mgmap1.addMarker(46.506069, -72.203606, '/programmation/exposition-de-livres-de-jeux-et-de-dvd/', 'Exposition de livres, de jeux et de DVD', ''); mgmap1.addMarker(45.943672, -71.988548, '/programmation/jobserve-les-racines-de-mes-haricots-grimpants/', 'J&#039;observe les racines de mes haricots grimpants !', ''); mgmap1.fitToMarkers(); 
</script>

 

Thanks,

Mel

 

Share this post


Link to post
Share on other sites

Are there any plans to officially make this compatible with 3.x? At the moment there's quite a few issues. When editing the field itself, it constantly says error geocoding address. In a page containing the field in the CMS it says the same on save, and it also says "REQUEST DENIED" under the map on load. To actually place a pin requires searching and then focusing off the box, pressing return will save the page but not update the marker.

  • Like 1

Share this post


Link to post
Share on other sites

Based on the available methods in this module, it seems like the best approach is actually now:

$map = $modules->get('MarkupGoogleMap');
echo $map->getGMapScript();

You can see here: https://github.com/ryancramerdesign/FieldtypeMapMarker/blob/917edef8efe92bf8bdbdff62b66f6eca581ca57e/MarkupGoogleMap.module#L154-L165 that this will return the entore script tag you need, along with your API included.

Of course it would be nice if the module docs mentioned this 🙂

Share this post


Link to post
Share on other sites

Hi,

Our problem is that we're making the map marker template from another template via page reference. We've tried to add our own checkbox "show map" but it has proven quite difficult to follow the geotag ON/OFF logic.

I would love to see if someone has figured this out.

TLDR

is there anyway for checking if the map is enabled, or do I have to make my own checkbox logic for it

 

Share this post


Link to post
Share on other sites

Hi after upgrading to ProcessWire 3.0.140 and trying to edit the field "mapmarker" from admin i got:

Fatal Error: Uncaught Error: Call to a member function prepend() on null in /var/www/www.designupgrade-test.com/wire/core/Fields.php:1066
Stack trace:
#0 /var/www/www.designupgrade-test.com/wire/modules/Process/ProcessField/ProcessField.module(1412): ProcessWire\Fields->getCompatibleFieldtypes(Object(ProcessWire\Field))
#1 /var/www/www.designupgrade-test.com/wire/core/Wire.php(380): ProcessWire\ProcessField->___buildEditFormBasics()
#2 /var/www/www.designupgrade-test.com/wire/core/WireHooks.php(813): ProcessWire\Wire->_callMethod('___buildEditFor...', Array)
#3 /var/www/www.designupgrade-test.com/wire/core/Wire.php(442): ProcessWire\WireHooks->runHooks(Object(ProcessWire\ProcessField), 'buildEditFormBa...', Array)
#4 /var/www/www.designupgrade-test.com/wire/modules/Process/ProcessField/ProcessField.module(1020): ProcessWire\Wire->__call('buildEditFormBa...', Array)
#5 /var/www/www.designupgrade-test.com/wire/core/Wire.php(380): ProcessWire\ProcessField->___buildEditForm()
#6 /var/www/www.designupgrade-test.com/wire/core/WireHooks.php(813): ProcessWire\Wire->_ca (line 1066 of /var/www/www.designupgrade.com/wire/core/Fields.php)

I also noticed that Compatibility is till 2.7 any chanche to upgrade to 3.0 ?
Does anybody solved in some way that issue?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Gadgetto
      Status update links (inside this thread) for SnipWire development will be always posted here:
      2019-11-15 2019-10-18 2019-08-08 2019-06-15 2019-06-02 2019-05-25 If you are interested, you can test the current state of development:
      https://github.com/gadgetto/SnipWire
      Please note that the software is not yet intended for use in a production system (alpha version).
      If you like, you can also submit feature requests and suggestions for improvement. I also accept pull requests.
      ---- INITIAL POST FROM 2019-05-25 ----
      I wanted to let you know that I am currently working on a new ProcessWire module that fully integrates the Snipcart Shopping Cart System into ProcessWire. (this is a customer project, so I had to postpone the development of my other module GroupMailer).
      The new module SnipWire offers full integration of the Snipcart Shopping Cart System into ProcessWire.
      Here are some highlights:
      simple setup with (optional) pre-installed templates, product fields, sample products (quasi a complete shop system to get started immediately) store dashboard with all data from the snipcart system (no change to the snipcart dashboard itself required) Integrated REST API for controlling and querying snipcart data webhooks to trigger events from Snipcart (new order, new customer, etc.) multi currency support self-defined/configurable tax rates etc. Development is already well advanced and I plan to release the module in the next 2-3 months.
      I'm not sure yet if this will be a "Pro" module or if it will be made available for free.
      I would be grateful for suggestions and hints!
      (please have a look at the screenshots to get an idea what I'm talking about)
       




    • By Robin S
      I have had this module sitting in a 95% complete state for a while now and have finally made the push to get it out there. Thanks to @teppo for his Hanna Code Helper module which I referred to and borrowed from during development.
      http://modules.processwire.com/modules/hanna-code-dialog/
      https://github.com/Toutouwai/HannaCodeDialog
      HannaCodeDialog
      Provides a number of enhancements for working with Hanna Code tags in CKEditor. The main enhancement is that Hanna tags in a CKEditor field may be double-clicked to edit their attributes using core ProcessWire inputfields in a modal dialog.
      Requires the Hanna Code module and >= ProcessWire v3.0.0.
      Installation
      Install the HannaCodeDialog module using any of the normal methods.
      For any CKEditor field where you want the "Insert Hanna tag" dropdown menu to appear in the CKEditor toolbar, visit the field settings and add "HannaDropdown" to the "CKEditor Toolbar" settings field.
      Module configuration
      Visit the module configuration screen to set any of the following:
      Exclude prefix: Hanna tags named with this prefix will not appear in the CKEditor toolbar dropdown menu for Hanna tag insertion. Exclude Hanna tags: Hanna tags selected here will not appear in the CKEditor toolbar dropdown menu for Hanna tag insertion. Background colour of tag widgets: you can customise the background colour used for Hanna tags in CKEditor if you like. Dialog width: in pixels Dialog height: in pixels Features
      Insert tag from toolbar dropdown menu
      Place the cursor in the CKEditor window where you want to insert your Hanna tag, then select the tag from the "Insert Hanna tag" dropdown.

      Advanced: if you want to control which tags appear in the dropdown on particular pages or templates you can hook HannaCodeDialog::getDropdownTags. See the forum support thread for examples .
      Edit tag attributes in modal dialog
      Insert a tag using the dropdown or double-click an existing tag in the CKEditor window to edit the tag attributes in a modal dialog.

      Tags are widgets
      Hanna tags that have been inserted in a CKEditor window are "widgets" - they have a background colour for easy identification, are protected from accidental editing, and can be moved within the text by drag-and-drop.

      Options for tag attributes may be defined
      You can define options for a tag attribute so that editors must choose an option rather than type text. This is useful for when only certain strings are valid for an attribute and also has the benefit of avoiding typos.
      Add a new attribute for the Hanna tag, named the same as the existing attribute you want to add options for, followed by "__options". The options themselves are defined as a string, using a pipe character as a delimiter between options. Example for an existing attribute named "vegetables":
      vegetables__options=Spinach|Pumpkin|Celery|Tomato|Brussels Sprout|Potato You can define a default for an attribute as normal. Use a pipe delimiter if defining multiple options as the default, for example:
      vegetables=Tomato|Potato Dynamic options
      Besides defining static options as above, you can use one Hanna tag to dynamically generate options for another. For instance, you could create a Hanna tag that generates options based on images that have been uploaded to the page, or the titles of children of the page.
      Your Hanna tag that generates the options should echo a string of options delimited by pipe characters (i.e. the same format as a static options string).
      You will probably want to name the Hanna tag that generates the options so that it starts with an underscore (or whatever prefix you have configured as the "exclude" prefix in the module config), to avoid it appearing as an insertable tag in the HannaCodeDialog dropdown menu.
      Example for an existing attribute named "image":
      image__options=[[_images_on_page]] And the code for the _images_on_page tag:
      <?php $image_names = array(); $image_fields = $page->fields->find('type=FieldtypeImage')->explode('name'); foreach($image_fields as $image_field) { $image_names = array_unique( array_merge($image_names, $page->$image_field->explode('name') ) ); } echo implode('|', $image_names); Choice of inputfield for attribute
      You can choose the inputfield that is used for an attribute in the dialog.
      For text attributes the supported inputfields are text (this is the default inputfield for text attributes so it isn't necessary to specify it if you want it) and textarea. Note: any manual line breaks inside a textarea are removed because these will break the CKEditor tag widget.
      Inputfields that support the selection of a single option are select (this is the default inputfield for attributes with options so it isn't necessary to specify it if you want it) and radios.
      Inputfields that support the selection of multiple options are selectmultiple, asmselect and checkboxes.
      You can also specify a checkbox inputfield - this is not for attributes with defined options but will limit an attribute to an integer value of 1 or 0.
      The names of the inputfield types are case-insensitive.
      Example for an existing attribute named "vegetables":
      vegetables__type=asmselect Descriptions and notes for inputfields
      You can add a description or notes to an attribute and these will be displayed in the dialog.
      Example for an existing attribute named "vegetables":
      vegetables__description=Please select vegetables for your soup. vegetables__notes=Pumpkin and celery is a delicious combination. Notes
      When creating or editing a Hanna tag you can view a basic cheatsheet outlining the HannaCodeDialog features relating to attributes below the "Attributes" config inputfield.
      Advanced
      Define or manipulate options in a hook
      You can hook HannaCodeDialog::prepareOptions to define or manipulate options for a Hanna tag attribute. Your Hanna tag must include a someattribute__options attribute in order for the hook to fire. The prepareOptions method receives the following arguments that can be used in your hook:
      options_string Any existing string of options you have set for the attribute attribute_name The name of the attribute the options are for tag_name The name of the Hanna tag page The page being edited If you hook after HannaCodeDialog::prepareOptions then your hook should set $event->return to an array of option values, or an associative array in the form of $value => $label.
      Build entire dialog form in a hook
      You can hook after HannaCodeDialog::buildForm to add inputfields to the dialog form. You can define options for the inputfields when you add them. Using a hook like this can be useful if you prefer to configure inputfield type/options/descriptions/notes in your IDE rather than as extra attributes in the Hanna tag settings. It's also useful if you want to use inputfield settings such as showIf.
      When you add the inputfields you must set both the name and the id of the inputfield to match the attribute name.
      You only need to set an inputfield value in the hook if you want to force the value - otherwise the current values from the tag are automatically applied.
      To use this hook you only have to define the essential attributes (the "fields" for the tag) in the Hanna Code settings and then all the other inputfield settings can be set in the hook.
      Example buildForm() hook
      The Hanna Code attributes defined for tag "meal" (a default value is defined for "vegetables"):
      vegetables=Carrot meat cooking_style comments The hook code in /site/ready.php:
      $wire->addHookAfter('HannaCodeDialog::buildForm', function(HookEvent $event) { // The Hanna tag that is being opened in the dialog $tag_name = $event->arguments(0); // Other arguments if you need them /* @var Page $edited_page */ $edited_page = $event->arguments(1); // The page open in Page Edit $current_attributes = $event->arguments(2); // The current attribute values $default_attributes = $event->arguments(3); // The default attribute values // The form rendered in the dialog /* @var InputfieldForm $form */ $form = $event->return; if($tag_name === 'meal') { $modules = $event->wire('modules'); /* @var InputfieldCheckboxes $f */ $f = $modules->InputfieldCheckboxes; $f->name = 'vegetables'; // Set name to match attribute $f->id = 'vegetables'; // Set id to match attribute $f->label = 'Vegetables'; $f->description = 'Please select some vegetables.'; $f->notes = "If you don't eat your vegetables you can't have any pudding."; $f->addOptions(['Carrot', 'Cabbage', 'Celery'], false); $form->add($f); /* @var InputfieldRadios $f */ $f = $modules->InputfieldRadios; $f->name = 'meat'; $f->id = 'meat'; $f->label = 'Meat'; $f->addOptions(['Pork', 'Beef', 'Chicken', 'Lamb'], false); $form->add($f); /* @var InputfieldSelect $f */ $f = $modules->InputfieldSelect; $f->name = 'cooking_style'; $f->id = 'cooking_style'; $f->label = 'How would you like it cooked?'; $f->addOptions(['Fried', 'Boiled', 'Baked'], false); $form->add($f); /* @var InputfieldText $f */ $f = $modules->InputfieldText; $f->name = 'comments'; $f->id = 'comments'; $f->label = 'Comments for the chef'; $f->showIf = 'cooking_style=Fried'; $form->add($f); } }); Troubleshooting
      HannaCodeDialog includes and automatically loads the third-party CKEditor plugins Line Utilities and Widget. If you have added these plugins to your CKEditor field already for some purpose and experience problems with HannaCodeDialog try deactivating those plugins from the CKEditor field settings.
    • By horst
      Wire Mail SMTP

      An extension to the (new) WireMail base class that uses SMTP-transport

      This module integrates EmailMessage, SMTP and SASL php-libraries from Manuel Lemos into ProcessWire. I use this continously evolved libraries for about 10 years now and there was never a reason or occasion not to do so. I use it nearly every day in my office for automated composing and sending personalized messages with attachments, requests for Disposition Notifications, etc. Also I have used it for sending personalized Bulkmails many times.

      The WireMailSmtp module extends the new email-related WireMail base class introduced in ProcessWire 2.4.1 (while this writing, the dev-branch only).
       
      Here are Ryans announcement.



      Current Version 0.4.2
      Changelog: https://github.com/horst-n/WireMailSmtp/blob/master/CHANGELOG.md
      get it from the Modules Directory Install and Configure

      Download the module into your site/modules/ directory and install it.

      In the config page you fill in settings for the SMTP server and optionaly the (default) sender, like email address, name and signature.
      You can test the smtp settings directly there. If it says "SUCCESS! SMTP settings appear to work correctly." you are ready to start using it in templates, modules or bootstrap scripts.


      Usage Examples
      The simplest way to use it:
      $numSent = wireMail($to, $from, $subject, $textBody); $numSent = wireMail($to, '', $subject, $textBody); // or with a default sender emailaddress on config page This will send a plain text message to each recipient.
       
      You may also use the object oriented style:
      $mail = wireMail(); // calling an empty wireMail() returns a wireMail object $mail->to($toEmail, $toName); $mail->from = $yourEmailaddress; // if you don't have set a default sender in config // or if you want to override that $mail->subject($subject); $mail->body($textBody); $numSent = $mail->send(); Or chained, like everywhere in ProcessWire:
      $mail = wireMail(); $numSent = $mail->to($toEmail)->subject($subject)->body($textBody)->send(); Additionaly to the basics there are more options available with WireMailSmtp. The main difference compared to the WireMail BaseClass is the sendSingle option. With it you can set only one To-Recipient but additional CC-Recipients.
      $mail = wireMail(); $mail->sendSingle(true)->to($toEmail, $toName)->cc(array('person1@example.com', 'person2@example.com', 'person3@example.com')); $numSent = $mail->subject($subject)->body($textBody)->send(); The same as function call with options array:
      $options = array( 'sendSingle' => true, 'cc' => array('person1@example.com', 'person2@example.com', 'person3@example.com') ); $numSent = wireMail($to, '', $subject, $textBody, $options); There are methods to your disposal to check if you have the right WireMail-Class and if the SMTP-settings are working:
      $mail = wireMail(); if($mail->className != 'WireMailSmtp') { // Uups, wrong WireMail-Class: do something to inform the user and quit echo "<p>Couldn't get the right WireMail-Module (WireMailSmtp). found: {$mail->className}</p>"; return; } if(!$mail->testConnection()) { // Connection not working: echo "<p>Couldn't connect to the SMTP server. Please check the {$mail->className} modules config settings!</p>"; return; }  
      A MORE ADVANCED DEBUG METHOD!
      You can add some debug code into a template file and call a page with it:
      $to = array('me@example.com'); $subject = 'Wiremail-SMTP Test ' . date('H:i:s') . ' äöü ÄÖÜ ß'; $mail = wireMail(); if($mail->className != 'WireMailSmtp') { echo "<p>Couldn't get the right WireMail-Module (WireMailSmtp). found: {$mail->className}</p>"; } else { $mail->from = '--INSERT YOUR SENDER ADDRESS HERE --'; // <--- !!!! $mail->to($to); $mail->subject($subject); $mail->sendSingle(true); $mail->body("Titel\n\ntext text TEXT text text\n"); $mail->bodyHTML("<h1>Titel</h1><p>text text <strong>TEXT</strong> text text</p>"); $dump = $mail->debugSend(1); } So, in short, instead of using $mail->send(), use $mail->debugSend(1) to get output on a frontend testpage.
      The output is PRE formatted and contains the areas: SETTINGS, RESULT, ERRORS and a complete debuglog of the server connection, like this one:
       
      Following are a ...


      List of all options and features


      testConnection () - returns true on success, false on failures


      sendSingle ( true | false ) - default is false

      sendBulk ( true | false ) - default is false, Set this to true if you have lots of recipients (50+)


      to ($recipients) - one emailaddress or array with multiple emailaddresses

      cc ($recipients) - only available with mode sendSingle, one emailaddress or array with multiple emailaddresses

      bcc ($recipients) - one emailaddress or array with multiple emailaddresses

       
      from = 'person@example.com' - emailaddress, can be set in module config (called Sender Emailaddress) but it can be overwritten here

      fromName = 'Name Surname' - optional, can be set in module config (called Sender Name) but it can be overwritten here


      priority (3) - 1 = Highest | 2 = High | 3 = Normal | 4 = Low | 5 = Lowest

      dispositionNotification () or notification () - request a Disposition Notification


      subject ($subject) - subject of the message

      body ($textBody) - use this one alone to create and send plainText emailmessages

      bodyHTML ($htmlBody) - use this to create a Multipart Alternative Emailmessage (containing a HTML-Part and a Plaintext-Part as fallback)

      addSignature ( true | false ) - the default-behave is selectable in config screen, this can be overridden here
      (only available if a signature is defined in the config screen)

      attachment ($filename, $alternativeBasename = "") - add attachment file, optionally alternative basename


      send () - send the message(s) and return number of successful sent messages


      debugSend(1) - returns and / or outputs a (pre formatted) dump that contains the areas: SETTINGS, RESULT, ERRORS and a complete debuglog of the server connection. (See above the example code under ADVANCED DEBUG METHOD for further instructions!)


      getResult () - returns a dump (array) with all recipients (to, cc, bcc) and settings you have selected with the message, the message subject and body, and lists of successfull addresses and failed addresses,


      logActivity ($logmessage) - you may log success if you want

      logError ($logmessage) - you may log warnings, too. - Errors are logged automaticaly
       
       
      useSentLog (true | false) - intended for usage with e.g. third party newsletter modules - tells the send() method to make usage of the sentLog-methods - the following three sentLog methods are hookable, e.g. if you don't want log into files you may provide your own storage, or add additional functionality here

      sentLogReset ()  - starts a new LogSession - Best usage would be interactively once when setting up a new Newsletter

      sentLogGet ()  - is called automaticly within the send() method - returns an array containing all previously used emailaddresses

      sentLogAdd ($emailaddress)  - is called automaticly within the send() method
      Changelog: https://github.com/horst-n/WireMailSmtp/blob/master/CHANGELOG.md
       
       
    • By Robin S
      Sanitizer EasySlugger
      Allows the use of the EasySlugger library as Sanitizer methods.
      Installation
      Install the Sanitizer EasySlugger module.
      Usage
      The module adds four new sanitizer methods.
      slugger($string, $options)
      Similar to $sanitizer->pageName() - I'm not sure if there are any advantages over that method. Included because it is one of the methods offered by EasySlugger.
      $slug = $sanitizer->slugger('Lorem Ipsum'); // Result: lorem-ipsum utf8Slugger($string, $options)
      Creates slugs from non-latin alphabets.
      $slug = $sanitizer->utf8Slugger('这个用汉语怎么说'); // Result: zhe-ge-yong-han-yu-zen-me-shuo seoSlugger($string, $options)
      Augments the string before turning it into a slug. The conversions are related to numbers, currencies, email addresses and other common symbols.
      $slug = $sanitizer->seoSlugger('The price is $5.99'); // Result: the-price-is-5-dollars-99-cents See the EasySlugger readme for some more examples.
      seoUtf8Slugger($string, $options)
      A combination of utf8Slugger() and seoSlugger().
      $slug = $sanitizer->seoUtf8Slugger('价钱是 $5.99'); // Result: jia-qian-shi-5-dollars-99-cents $options argument
      Each of the methods can take an $options array as a second argument.
      separator (string): the character that separates words in the slug. Default: - unique (bool): Determines whether a random suffix is added at the end of the slug. Default: false $slug = $sanitizer->utf8Slugger('这个用汉语怎么说', ['separator' => '_', 'unique' => true]); // Result: zhe_ge_yong_han_yu_zen_me_shuo_3ad66c4  
      https://github.com/Toutouwai/SanitizerEasySlugger
      https://modules.processwire.com/modules/sanitizer-easy-slugger/
    • By Robin S
      If you've ever needed to insert links to a large number of files within CKEditor you may have found that the standard PW link modal is a somewhat slow way to do it.
      This module provides a quicker way to insert links to files on the page being edited. You can insert a link to an individual file, or insert an unordered list of links to all files on the page with a single click.
      CKEditor Link Files
      Adds a menu to CKEditor to allow the quick insertion of links to files on the page being edited.

      Features
      Hover a menu item to see the "Description" of the corresponding file (if present). Click a menu item to insert a link to the corresponding file at the current cursor position. The filename is used as the link text. If you Alt-click a menu item the file description is used as the link text (with fallback to filename if no description entered). If text is currently selected in the editor then the selected text is used as the link text. Click "* Insert links to all files *" to insert an unordered list of links to all files on the page. Also works with the Alt-click option. Menu is built via AJAX so newly uploaded files are included in the menu without the page needing to be saved. However, descriptions are not available for newly uploaded files until the page is saved. There is an option in the module config to include files from Repeater fields in the edited page. Nested Repeater fields (files inside a Repeater inside another Repeater) are not supported. Installation
      Install the CKEditor Link Files module.
      For any CKEditor field where you want the "Insert link to file" dropdown menu to appear in the CKEditor toolbar, visit the field settings and add "LinkFilesMenu" to the "CKEditor Toolbar" settings field.
       
      http://modules.processwire.com/modules/cke-link-files/
      https://github.com/Toutouwai/CkeLinkFiles
×
×
  • Create New...