Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy installed plugins to clipboard #38

Closed
aljawaid opened this issue Mar 31, 2023 · 8 comments
Closed

Copy installed plugins to clipboard #38

aljawaid opened this issue Mar 31, 2023 · 8 comments
Assignees
Labels
enhancement New feature or request Installed Plugins About the installed plugins page

Comments

@aljawaid
Copy link
Owner

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,

@aljawaid aljawaid added enhancement New feature or request Installed Plugins About the installed plugins page labels Mar 31, 2023
@aljawaid aljawaid added this to the Revamp Plugin Interface milestone Mar 31, 2023
@aljawaid aljawaid self-assigned this Mar 31, 2023
@creecros
Copy link
Collaborator

Just want the name?

@aljawaid
Copy link
Owner Author

aljawaid commented Mar 31, 2023

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
Copy link
Owner Author

@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
Copy link
Owner Author

@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
Copy link
Owner Author

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

image

@aljawaid
Copy link
Owner Author

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

@aljawaid
Copy link
Owner Author

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
Copy link
Owner Author

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

aljawaid added a commit that referenced this issue Mar 31, 2023
aljawaid added a commit that referenced this issue Mar 31, 2023
aljawaid added a commit that referenced this issue Mar 31, 2023
aljawaid added a commit that referenced this issue Mar 31, 2023
aljawaid added a commit that referenced this issue Mar 31, 2023
aljawaid added a commit that referenced this issue Mar 31, 2023
aljawaid added a commit that referenced this issue Mar 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Installed Plugins About the installed plugins page
Projects
None yet
Development

No branches or pull requests

2 participants