Git Product home page Git Product logo

googlemapstv's People

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

googlemapstv's Issues

package will not install / work

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

german parameters in googlemaps javascript

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;
}```

Fatal error method modTemplateVarOutputRender

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);

TV Settings Language Problem

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.

Outputting GoogleMap object from empty string.

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: }

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.