How Can I Target JSON Parent Property?

Hello all, hope somebody can help:

From the plugins.json file, below is one plugin:

    "AgileIndicators": {
        "author": "aljawaid",
        "compatible_version": ">=1.2.20",
        "description": "Agile Indicators display the measurements for Task Priorities and Task Complexities in an easy to use general format. Task Priorities are scaled between P1 and P5 whilst Task Complexities are scored as 0-50.",
        "download": "",
        "has_hooks": true,
        "has_overrides": false,
        "has_schema": false,
        "homepage": "",
        "is_type": "plugin",
        "last_updated": "2022-10-25",
        "license": "Unlicense",
        "readme": "",
        "remote_install": true,
        "title": "AgileIndicators",
        "version": "1.0.0"

I want to target "AgileIndicators": which I think is the parent or namespace. How can I do it in php? I’m trying to call it to display on the Plugins Directory page within Kanboard.

shouldnt need to. title property.

That’s what I want to compare it to eventually

try key($plugin), i think that will work

<?= key($plugin) ?> in directory.php

that results in author which just confuses things more…edit… the author is the first property of the plugin… but i need the parent property (the plugin name, not title) before that

update… I tried all sorts but can’t get it to show… task abandoned i think… call me stupid but i just cant get it to work

<?= key($plugin) ?> /11
<?= key($plugin[0]) ?> /22
<?= key($plugin)[0] ?> /22

                <?php if ($is_configured): ?>
                    <?php if (! isset($installed_plugins[$plugin['title']])): ?>
                        <?= $this->url->icon('cloud-download', t('Install'), 'PluginController', 'install', array('archive_url' => urlencode($plugin['download'])), true, 'install-plugin', t('Install this plugin')) ?>
                    <?php elseif ($installed_plugins[$plugin['title']] < $plugin['version']): ?>
                        <div class="currently-installed-v pp-grey" title="<?= t('Currently Installed') ?>">
                            <?= ($installed_plugins[$plugin['title']]) ?>
                        <?= $this->url->icon('refresh', t('Update'), 'PluginController', 'update', array('archive_url' => urlencode($plugin['download'])), true, 'update-plugin', t('Update this plugin')) ?>
                    <?php else: ?>

<?= $available_plugins ?> /1
<?= key($available_plugins[$plugin]) ?> /2
<?= key($available_plugins)[$plugin] ?> /3
<?= key($installed_plugins)[$plugin] ?> /4
<?= key($installed_plugins[$plugin]) ?> /5
<?= var_export($plugin) ?>
<?= var_export($available_plugins[$plugin]) ?>
...test 2...
<?php $obj = key($plugin) ?>
<?= $obj[1] ?>
<?= json_decode(key($plugin)) ?>

ill play with it when i get a chance

1 Like