add a map with zenpage

vincent3569 Member, Translator
hello

is it possible to have a map (taken from google map) in a news ?
in fact i wish to display a map of irland (my next hollidays ;-) in my next news.

google map gives me this code to put in my web page, but, if i paste it in news, it doesn't displays my map

<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.fr/maps?hl=fr&q=carte+irlande&ie=UTF8&ei=ATHnS5r1FYr6_Ab71fCYCA&ved=0CBQQ_AU&hq=&hnear=Irlande&t=h&ll=53.566414,-8.129883&spn=4.568282,6.61377&z=6&output=embed"></iframe>

how can I do ?

Comments

  • There are "codeblocks" that allow you to insert pretty much anything into a page or article. Of course, you will have to figure out the PHP needed to make a map appear.
  • acrylian Administrator, Developer
    Also your theme must support these codeblock. But they can easily be added.
  • vincent3569 Member, Translator
    yes, i do that
    but it's a little bit "static" :
    in my theme, i've added codeblocks, but it's always at the same place (at the end of the text for example).

    i wish add a map in my text as the same way as a photo with TinyEditor.
    it isn't possible ?
  • acrylian Administrator, Developer
    Sure, html is possible as our default editor TinyMCE has a html view, too. But remember you have to allow the iFrame tag on the allowed tags on the options, otherwise it would be cleared.
  • vincent3569 Member, Translator
    ok
    i've allowed iframe tags with the following code in the admin tabs

    iframe => (width=>() height=>() frameborder=>() scrolling=>() marginheight=>() marginwidth=> () src=>() )

    I added the following code in text of my news (with the html editor) :

    <iframe width="250" height="300" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.fr/maps?f=q&source=s_q&hl=fr&geocode=&q=irlande&sll=46.75984,1.738281&sspn=6.65431,13.623047&ie=UTF8&hq=&hnear=Irlande&ll=53.067627,-8.503418&spn=3.961432,5.471191&t=h&z=6&output=embed"></iframe>

    when i saved the news, the iframe tag is still filtred by zenphoto and the map is still not displayed in the news.
    where is the mistake ?
  • vincent3569 Member, Translator
    hello

    I'm sorry to up this msg
    Can you help me to configure iframe tag in the allowed tags ?
  • acrylian Administrator, Developer
    Look at the examples, they explain it.
  • vincent3569 Member, Translator
    I looked and folowed the exemples and i put this code in the admin tab

    `

    iframe => (width=>() height=>() frameborder=>() scrolling=>() marginheight=>() marginwidth=> () src=>() )

    `

    it doesnt' work and i still don't understand why.
    could you explain, please ?
  • acrylian Administrator, Developer
    It might be possible that TinyMCE clears iFrame code, but I don't know.
  • vincent3569 Member, Translator
    hello
    exact, it seems that TinyMCE clears iFrame code.

    I've changed the text editor (html editor) and i've writed the correct code and saved the news without changing text editor (i remain with html editor).

    by following this instructions, it's ok (but I can't modify the news otherwise the code is cleared by TinyMCE).

    it really is not very easy and convenient but it works
  • acrylian Administrator, Developer
    Of cousre the normal edit mode of TinyMCE does not allow html tags directly. You always need to switch to the html mode. I assumed you knew this, sorry.

    I suggest to look if there is maybe a TinyMCE plugin for Google maps maybe and change the config file accordingly to include that.
  • vincent3569 Member, Translator
    yes of course, I've understood that i must switch on html mode to insert iframe tag.

    i said that : if you save under html mode : it's ok, the iframe tag is correctly saved and displayed.
    but, if you switch on tinyMCE before saving, the iframe is displayed in the admin but during saving, the iframe tag is cleared.

    so,if you have to insert iframe tag in a news, you must follow the tip i've described
Sign In or Register to comment.