aljawaid / PluginManager

Replace the Installed Plugins section with a whole new interface. Plugin Manager provides both users and developers with an improved layout displaying a new section for troubleshooting plugins with a new plugin structure breakdown for each plugin. Install plugins directly or explore new upcoming or untested features from manual plugins.
MIT License
17 stars 3 forks source link

Copy installed plugins to clipboard #38

Closed aljawaid closed 1 year ago

aljawaid commented 1 year ago

There seems to be no real practical way to copy the installed list of plugins to the clipboard so they can be shared across forum posts etc,

creecros commented 1 year ago

Just want the name?

aljawaid commented 1 year ago

hello, I was thinking of the plugin name and the version, to copy the list to the clipboard.

<div>
            Copy List
            <?php sortPlugins($plugins); ?>
                <?php foreach ($plugins as $pluginFolder => $plugin): ?>
                    <?= $this->text->e($plugin->getPluginName()) ?> <?= $this->text->e($plugin->getPluginVersion()) ?><br>
                <?php endforeach ?>
        </div>

Started on this first to see if it will show properly

aljawaid commented 1 year ago

@creecros I will be using clipboardjs, from Glancer plugin as thats the only way I know how. I'm working on it as we speak

aljawaid commented 1 year ago

@creecros

<span class="copy-installed-list-format bar-btn-format btn" title="<?= t('Copy formatted version') ?>" data-clipboard-text="
                <?php foreach ($plugins as $pluginFolder => $plugin): ?>
                    <?= trim('- '. $this->text->e($plugin->getPluginName()) .' v'. $this->text->e($plugin->getPluginVersion())) ?>
                <?php endforeach ?>
                ">

Any idea how to improve this so it creates a list? one plugin name per line? For the clipboard function to work, it must be inside data-clipboard-text

aljawaid commented 1 year ago

this is what I currently get... so much whitespace and not one plugin per line

image

aljawaid commented 1 year ago

ok so i found PHP_EOL so I just need to get rid of the whitespace before each line

aljawaid commented 1 year ago

Im struggling with the whitespace at the start of the line...

image

I tried trim and ltrim but it didnt work.... any tips? @creecros

aljawaid commented 1 year ago

keeping all the code together seemed to have worked

data-clipboard-text="<?php foreach ($plugins as $pluginFolder => $plugin): ?><?= ltrim('- '. $this->text->e($plugin->getPluginName()) .' v'. $this->text->e($plugin->getPluginVersion())) . PHP_EOL ?><?php endforeach ?>"
- AgileIndicators v1.2.0
- ApplicationBranding v3.0.0
- Attach Documents for Project Viewers v0.0.1
- Auto Email Extended Actions v1.2.3
- Auto Subtask Creation v2.1.0
- AutomaticActionUX v2.5.0
- Bak2topbotm v0.0.3
- Bigboard v1.5.1
- Calendar v1.2.0
- ColorManager v3.6.0
- Comment Only Restrictions for Project Viewers v0.0.2
- ContentCleaner v1.0.0
- Coverimage v1.2.14.1
- Creecros_Filter_Pack v1.3.1
- ExtendedMail v0.8.0
- Github Webhook v1.0.6
- GitLab Webhook v1.0.6
- Glancer v2.5.0
- Group_assign v1.7.13
- KanboardCommentActions v1.0.1
- KanboardCSS v3.0.0
- KanboardEmailHistory v2.6.0
- KanboardPermalink v1.1.0
- KanboardSupport v2.6.0
- KBCustomPlugin v1.0.0
- MatomoConnector v2.4.0
- metaMagik v1.5.1
- Milestone v1.1.2
- PluginManager v1.8.0
- SubtaskDueDate v1.1.2
- TagManager v1.5.0
- Task2pdf v1.5.0
- TaskAssignCategory v1.0.0
- TaskAssignDateToUndated v1.0.0
- TaskAssignPriorityToCategory v0.8.1
- TemplateManager v2.5.0
- URLCleaner v1.5.0
- Wiki v0.3.0