Skip to content

Commit

Permalink
First commit
Browse files Browse the repository at this point in the history
  • Loading branch information
san4op committed Mar 14, 2017
0 parents commit cc57f9b
Show file tree
Hide file tree
Showing 11 changed files with 806 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
CHANGELOG
=========

RELEASE 0.1
-----------
* First release
674 changes: 674 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Cloud Button (Roundcube Webmail Plugin)
==========

Plugin to add button to open cloud storage.

Configuration Options
---------------------

Set the following options directly in Roundcube's config file (example):
```php
$config['cloud_button_title'] = 'Cloud'; // Button text
$config['cloud_button_url'] = 'https://cloud.example.com'; // URL to cloud storage
```
44 changes: 44 additions & 0 deletions cloud_button.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?php
/**
* Cloud Button
*
* Plugin to add button to open cloud storage.
*
* @date 2017-03-14
* @version 0.1
* @author Alexander Pushkin
* @url https://github.com/san4op/roundcube_cloud_button
* @licence GNU GPLv3
*/

class cloud_button extends rcube_plugin
{
private $title;
private $url;

function init()
{
$rcmail = rcube::get_instance();

$this->title = $rcmail->config->get('cloud_button_title', 'cloud_button.cloud');
$this->url = $rcmail->config->get('cloud_button_url', '');

if (!$this->url) {
return;
}

$this->add_texts('localization/', true);
$this->include_stylesheet($this->local_skin_path() . '/cloud_button.css');

$this->add_button(array(
'href' => $this->url,
'class' => 'button-cloud',
'classsel' => 'button-cloud button-selected',
'innerclass' => 'button-inner',
'label' => $this->title,
), 'taskbar');
}

}

?>
32 changes: 32 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"name": "san4op/cloud_button",
"type": "roundcube-plugin",
"description": "Plugin to add button to open cloud storage.",
"keywords": ["button","cloud"],
"homepage": "https://github.com/san4op/roundcube_cloud_button",
"license": "GPL-3.0+",
"version": "0.1",
"authors": [
{
"name": "Alexander Pushkin",
"email": "[email protected]",
"homepage": "https://github.com/san4op",
"role": "Developer"
}
],
"repositories": [
{
"type": "composer",
"url": "http://plugins.roundcube.net"
}
],
"require": {
"php": ">=5.3.0",
"roundcube/plugin-installer": ">=0.1.3"
},
"extra": {
"roundcube": {
"min-version": "1.0.0"
}
}
}
12 changes: 12 additions & 0 deletions config.inc.php.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php
##
## Cloud Button configuration file
##

// Button text
$config['cloud_button_title'] = 'Cloud';

// URL to cloud storage
$config['cloud_button_url'] = 'https://cloud.example.com';

?>
6 changes: 6 additions & 0 deletions localization/en_US.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php

$labels = array();
$labels['cloud'] = 'Cloud';

?>
6 changes: 6 additions & 0 deletions localization/ru_RU.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php

$labels = array();
$labels['cloud'] = 'Облако';

?>
6 changes: 6 additions & 0 deletions localization/uk_UA.inc
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?php

$labels = array();
$labels['cloud'] = 'Хмара';

?>
7 changes: 7 additions & 0 deletions skins/larry/cloud_button.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#taskbar a.button-cloud span.button-inner {
background: url(images/cloud.png) 0 2px no-repeat;
}
#taskbar a.button-cloud:hover span.button-inner,
#taskbar a.button-cloud.button-selected span.button-inner {
background-position: 0 -20px;
}
Binary file added skins/larry/images/cloud.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cc57f9b

Please sign in to comment.