Giovanni

Results 21 comments of Giovanni

Sure, but I prefer something customizable according to my needs. Otherwise, does everything seem okay to you?

Thank you for the suggestion! How would you proceed with managing the data structure in the stats.md file? Something like `pageid: visits`? ``` --- index.md: 101 mypage.md: 33 mypage2.md: 58...

This is my `twig`: ``` {% for key, stat in pages["_stats"].meta|sort|reverse %} {{ key }} - {{ stat }} {% endfor %} ``` and this is my `_stat.md`: ``` ---...

Perfect, now the goal is to read the MD file with Symfony YAML, convert the text into an array, manipulate it, and save the changes. I already have a working...

I found a strange behavior in the generation of the id.. this is my code (WIP): ``` class PicoVisits extends AbstractPicoPlugin { const API_VERSION = 3; protected $enabled = true;...

I'm a noob... :cold_sweat: Thanks for the code, now I'm on the right way. PS: The bug I was telling you about earlier also occurs with the new code... In...

Basically it works... just some issues with wrong links (404) ``` ``` Hints? Maybe I will add an option to save only the last 7 days stats.

> What are the issues? Solved, thanks. The issue occurs specifically when the `getCurrentPage()` returns `null`. > * You might read & write the stats file in one go In...

> * Any particular reason you dropped `Yaml::dump()`? No, just some Frankenstein code... > * You do `$this->accessStats[$currentPageId] = 0;` twice in your code Yes... but in two different circumstances...

I didn't fully understand this step: > You might hook into `onPagesLoading` (or earlier) to read & write the stats file - this way you can hook into `onSinglePageLoading` and...