picocms / Pico

Pico is a stupidly simple, blazing fast, flat file CMS.
http://picocms.org/
MIT License
3.84k stars 614 forks source link

Question / no issue #432

Closed nephilim75 closed 6 years ago

nephilim75 commented 6 years ago

Hello

I took over the handling of an existing site created by picocms. Looks great so far but I am not familar with this yet. But I am a bit under pressure to clearify some things and therefore I choose this way. As I didn't find a forum I will ask you.

I can see that the site creates a session (PHPSESSID) cookie. I need to know what is it for but have no clue where to start my investigation.

Would you please be so kind to assist me with this or you let me know whom to contact for some assistance with this?

Thank you in advance

Kind regards //neph

PhrozenByte commented 6 years ago

Pico itself doesn't use sessions, there's likely some 3rd-party plugin using PHP's session management. Search for the session_start function in Pico's plugins/ directory (or the phrase session in general). You could use command line tools like grep (with the -R option) to search for the strings.

Would you please be so kind to assist me with this or you let me know whom to contact for some assistance with this?

I'd say the best contact for questions like this is the developer that created the website.

nephilim75 commented 6 years ago

Hello

Thank you so much. Looks like it came from the contact plugin. It helped a lot. :-)

There is another question. Google offers a JS based Maps API which is explained here. But it is not working in an MD file just by copying and pasting it into the content page. Do you see a way in Pico to get this code implemented and working well?

Kind regards //neph

PhrozenByte commented 6 years ago

This should work just fine, there's likely rather something wrong with what you've copied. Anyway, if you just want a include a map, use Google Map's "Share" feature instead (https://support.google.com/maps/answer/144361, resulting in a simple <iframe>). If you really want to use the JavaScript API, you should rather create a appropiate Twig template and use appropiate meta variables to change the map's behavior.

nephilim75 commented 6 years ago

I have already a map embeded as advised. Unfortunately it is cookie based. But I want to get rid of all cookies and adding a JS based map will solve this.

I have added this to the page:

<div id="map" style="height: 300px width: 300px"></div>
<script>
  function initMap() {
    var uluru = {lat: -25.363, lng: 131.044};
    var map = new google.maps.Map(document.getElementById('map'), {
      zoom: 4,
      center: uluru
    });
    var marker = new google.maps.Marker({
      position: uluru,
      map: map
    });
  }
</script>
<script async defer
src="https://maps.googleapis.com/maps/api/js?key=***API_KEY***&callback=initMap">
</script>

And this is what I get displayed:

grafik

In case I made something wrong, I dont find the error.

Kind regards //neph

PhrozenByte commented 6 years ago

You musn't split HTML tags over multiple lines.

stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in two days if no further activity occurs. Thank you for your contributions! :+1: