splittingred / googlemapstv Goto Github PK
View Code? Open in Web Editor NEWA custom TV for MODx Revolution that integrates GoogleMaps.
Home Page: http://svn.modxcms.com/docs/display/ADDON/GoogleMapsTV
A custom TV for MODx Revolution that integrates GoogleMaps.
Home Page: http://svn.modxcms.com/docs/display/ADDON/GoogleMapsTV
I've got issues with the info label: http://screencast.com/t/ljSEcnwF
Hi,
for me setup doesn't work. Get error about failed xPDO validators(?). And installing manually doesn't work either - I have no new TV in/Outputs.
working on a fresh install of Revo 2.0.8pl
Javascript of Googlemaps parameter in frontend parses with German strings like »Ja« instead of »yes« and »Nein« instead of »no«. Not good to work with.
A »dirty solution« may help for now:
http://forums.modx.com/thread/?thread=53798&i=1&page=2
Change line #33:
core/model/modx/processors/element/tv/renders/web/output/googlemap.php
before:
/* fix boolean params (bug in Revo RC1) */
foreach ($params as $k => $v) {
if ($v == 'No' || empty($v)) $params[$k] = 0;
else if ($v == 'Yes') $params[$k] = 1;
}```
working solution:
/* fix boolean params (bug in Revo RC1) */
foreach ($params as $k => $v) {
if ($v == 'Non' || empty($v)) $params[$k] = 0;
else if ($v == 'Oui') $params[$k] = 1;
}```
Website throws:
Fatal error: Call to undefined method modTemplateVarOutputRenderDeprecated::parseInput() in
/var/www/web/html/core/model/modx/processors/element/tv/renders/web/output/googlemap.php on line 30````
Solution from here:
http://forums.modx.com/thread/38959/support-comments-for-googlemapstv-rc3-modx-revo?page=3#dis-post-418007
line 30 needs to look like this
$value= $this->tv->parseInput($value);
Look here: http://www.screencast.com/t/GnridvOo.
No idea what I'm doing wrong.
I played around with the google map tv and the tv setting doesn't work if manager language is german (Ja/Nein instead of Yes/No). I switched back to english and it works.
When a resource does not have a googlemapstv value set (empty string: ""), it outputs a blank (no address or point, so it appears as a gray box) google maps object anyway. Adding a simple statement fixes this issue, but I'm sure someone has a more elegant solution.
A simple solution could be implemented in subpackage processors.element.tv.renders.mgr.output after lines 29 and 30. See lines 32-34 below for an example:
29: $o= '';
30 :$value= $this->parseInput($value);
31:
32: if($value == "") {
33: return;
34: }
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.