OJS 2.4.8 - Google Maps under abstract

Hi everybody,
i need help for understand if exist a way for show google map in abstract.
Because coping code by Google custom map and pasted into HTML source editor, it show, but after save it, when go online view do not show nothing. Is it a bug?

Thanks in advance for any support.

Bye
Tiziano

In your config.inc.php there is a setting that lists the allowed html tags. By default, script is not one of them so it is removed when you save a form. I believe that allowing it would be a security issue.

The way to do it would probably be a plugin that would hook to the article abstract page. Depending what you want to do, it should not be that difficult to pass for example the geographical metadata you have in the article to google maps. Not a bad idea for a Geographical journal.

Hi! thanks for advice!
I tried follow what your suggested me, but do not works, it continues to show nothing.
I don’t know any plugin that you can insert geographical metadata, sorry :frowning:

Another any suggestion?

Thanks in advance for any support.

Bye
Tiziano

I do not think that there is any plugin ready. But making a basic plugin that adds a google map to the page is not too difficult. The harder part is presenting the data you want in the map and figuring out how and where to store that data. OJS has a Coverage metadata field, which could be used for geographical place names and probably with gmaps geocoding you could show those placenames on map. But as I said, I do not know any plugin that does this at the moment.

I would not advice allowing the script tag, because it is probably a security issue. Having said that, it could be that you did not allow all the needed parameters for that tag.

:confused: for that i wanted to do is more simple that the google maps link works.
The line where i added the new tag is this:

allowed_html = "<a href|target> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <b> <i> <u> <img src|alt> <sup> <sub> <br> <p> <iframe>"

i forgot to add it in another place?

Thanks in advance for any supported.

Bye
Tiziano

Yes, HTML Purifier will remove <script> tags even if specified in allowed_html. See:

Ok, did not know that.

@ctgraham, do you think that allowing script tag is a security issue? I guess I presumed it is, because it is usually not allowed in content management systems.

Hi at all!
Thanks at all for the help.

I solved this problem by using a metadata box that were not used, specifically “Academic disciplines and sub-disciplines”. I copied the Google Maps code and then edited the article.tpl file:

<div id="articleSubject">  <!-- Visualizza la mappa di Google Maps -->
<div id="content_keywordAbstract">{foreach from=$article->getLocalizedDiscipline() item=map}{if $map == ""}
{'Map not present.'}{else}{$map}{/if}{/foreach}</div>
</div>

Now i view the map below the abstract on online view. Exemple:

http://www.acquesotterranee.online/index.php/acque/article/view/002-12-0002

Bye
Tiziano

@ajnyga, it is a risk because it allows a privileged user the ability to modify how the application behaves for the end user.

The htmlpurifier workaround is to allow scripts only from trusted URLs.