Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

it would be interesting, to write the important infos in {...} #4

Open
jojo12 opened this issue Oct 15, 2017 · 1 comment
Open

it would be interesting, to write the important infos in {...} #4

jojo12 opened this issue Oct 15, 2017 · 1 comment

Comments

@jojo12
Copy link

jojo12 commented Oct 15, 2017

in a lot of plugins, you can overwrite the default plugin settings with informations in {...}
would be good: adding map-center, zoom-level and marker-points like that.
it's only an idea or a question

@jojo12
Copy link
Author

jojo12 commented Oct 22, 2017

There is a content plugin as example from Astrid Günther (astridx) coordstomap which changes Coordinates in Articles to a link for an openstreetmap.
I change there the pattern the plugin is looking for to
$pattern = "/{Openstreetmap ([0-9.]+) ([0-9.]+) ([0-9.]+) ([A-Z\-a-z]+) ([A-Z\-a-z]+)}/";
and the replacement to
$replacement = '<div class="osm-map" data-lat=$1 data-lon="$2" data-zoom="$3"><div class="osm-point" data-lat="$1" data-lon="$2"><h3>$4</h3><p>$5</p></div></div>';

Now I can enter in an article
{Openstreetmap $1 $2 $3 $4 $5}
in which $1 is latitude, $2 is longitude, $3 is zoomfactor, $4 is title and $5 text.

Like that I get directly your map inside of the article.

[I am not a dev. So I don't know how to do if title and text are more than one word]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant