json icon indicating copy to clipboard operation
json copied to clipboard

Support for EE3

Open anthony-pinskey opened this issue 9 years ago • 3 comments

@rsanchez Can we get support for this with ExpressionEngine 3 with the new directory/core changes?

Thanks!

anthony-pinskey avatar May 27 '16 17:05 anthony-pinskey

Would be good to add support.

But converting this to EE3 was a 5 minute process.

Create a file addon.setup.php with the following:

<?php

return array(
    'author' => 'rsanchez',
    'author_url' => 'https://github.com/rsanchez/json',
    'description' => 'Output ExpressionEngine data in JSON format.',
    'docs_url' => 'https://github.com/rsanchez/json',
    'name' => 'Json',
    'settings_exist' => false,
    'version' => '1.0.0',
    'namespace'   => 'json/Json'
);

and modify line 55 in the pi.json.php file:

from require_once PATH_MOD.'channel/mod.channel' . EXT;

to require_once PATH_MOD.'channel/mod.channel.php';

I wasn't sure why Expression engine 3 isn't accepting EXT. But the fix just works.

@rsanchez I haven't checked this completely but I'm able to read channel entries as JSON data which is what I want for now.

giriprashaad avatar Jun 29 '16 01:06 giriprashaad

@giriprashaad ,

Thanks for how converting Json to EE3, I will test your tips soon.

Regards,

Stéphane

stefcab avatar Mar 01 '17 02:03 stefcab

It's working fine using EE 3.5.11

Thanks a lot !

stefcab avatar Sep 01 '17 01:09 stefcab