vladstudio/vladstudio-kirby-comments — pull request #2 by DerZyklop (2014-05-07 14:58:01+00:00)
Title: Updated some vars to make it work wirh Kirby V2

I just made it work with Kirby V2, but unfortunately this will break the plugin for V1.

### My setup
I have some comments in dir: ``/foo/bar/html/content/01-blog/01-my-blogpost/comments.json``

### The Issue
There are some paths in the plugin that are defined like:
``c::get('root') . '/' . $page->diruri``

In V1 ``$page->diruri`` was ``content/01-blog/01-my-blogpost`` (as same as ``$page->diruri()``).

In V2 ``$page->diruri()`` is just ``01-blog/01-my-blogpost``.
So i changed ``c::get('root') . '/' . $page->diruri`` to ``c::get('root.content') . '/' . $page->diruri()``.
But this will give me ``/foo/bar/html/content/content/01-blog/01-my-blogpost/`` when i use it in V1.

I haven't found a way to get ``content/01-blog/01-my-blogpost/`` out of the ``$page`` vars in V2.

As i'm not sure if this is probably based on a bug in V2 is reported it in an issue here: https://github.com/getkirby/kirby/issues/17