├── .gitignore
├── gitplugins
├── widgets
│ └── GitPlugins_GitWidget.php
├── controllers
│ └── GitPlugins_GetController.php
├── resources
│ └── icon.svg
├── templates
│ └── GitPluginsWidget.html
├── GitPluginsPlugin.php
└── services
│ └── GitPlugins_GetService.php
├── LICENSE.md
└── README.md
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 |
--------------------------------------------------------------------------------
/gitplugins/widgets/GitPlugins_GitWidget.php:
--------------------------------------------------------------------------------
1 | templates->render('gitplugins/GitPluginsWidget');
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/gitplugins/controllers/GitPlugins_GetController.php:
--------------------------------------------------------------------------------
1 | request->getPost('url');
9 |
10 | $error = craft()->gitPlugins_get->getPlugin($url);
11 |
12 | if ($error) {
13 | craft()->userSession->setNotice(Craft::t($error));
14 | } else {
15 | craft()->userSession->setNotice(Craft::t('Plugin downloaded'));
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/gitplugins/resources/icon.svg:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/LICENSE.md:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2016 Anata Creative
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # gitPlugins
2 |
3 | Get your plugins from Github straight into your Craft CMS.
4 |
5 |
6 | ## Installation
7 |
8 | 1. Download and extract the contents of the zip. Put the `gitplugins` folder to your Craft plugin folder.
9 | 2. Enable the gitPlugins plugin in Craft (Settings > Plugins).
10 | 3. Add the widget to your dashboard (Dashboard > New widget > Download Github Plugins).
11 |
12 |
13 | ## Usage
14 | 1. Get the base-url (for example: https://github.com/AnataCreative/gitPlugins) or zip-url (for example: https://github.com/AnataCreative/gitPlugins/archive/master.zip) for your plugin on Github.
15 | 2. Paste it in the input-field and click get.
16 | 3. The plugin will be downloaded and put into your plugins-folder.
17 | 4. Go to the plugins page (Settings > Plugins) and install your downloaded plugin.
18 | 5. Be awesome! :fire:
19 |
20 |
21 | ## Credits
22 | This plugin has started from the plugin uploader (https://github.com/yatryan/craft-plugin-uploader), and still has some parts of it in it. So big thanks to Taylor Ryan for that!
23 |
24 |
25 | ## Contribution
26 | Want to contribute or fix a bug? Awesome! :heart_eyes_cat:
27 | Just make a pull request to the develop branch and provide some explanation.
28 |
29 | If you are fixing a bug or adding an enhancement, please assign the issue to yourself, so people will know you're working on it.
30 |
31 |
32 | ## Roadmap
33 | Look for the issues with the tag 'enhancement'. Help is always welcome! :blush:
34 |
--------------------------------------------------------------------------------
/gitplugins/templates/GitPluginsWidget.html:
--------------------------------------------------------------------------------
1 | {% if not craft.users or craft.users.can('accessPlugin-gitplugin') %}
2 |
3 | {% import "_includes/forms" as forms %}
4 |
5 |
30 |
31 |