Skip to content

Commit cc57f9b

Browse files
committed
First commit
0 parents  commit cc57f9b

11 files changed

Lines changed: 806 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
CHANGELOG
2+
=========
3+
4+
RELEASE 0.1
5+
-----------
6+
* First release

LICENSE

Lines changed: 674 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Cloud Button (Roundcube Webmail Plugin)
2+
==========
3+
4+
Plugin to add button to open cloud storage.
5+
6+
Configuration Options
7+
---------------------
8+
9+
Set the following options directly in Roundcube's config file (example):
10+
```php
11+
$config['cloud_button_title'] = 'Cloud'; // Button text
12+
$config['cloud_button_url'] = 'https://cloud.example.com'; // URL to cloud storage
13+
```

cloud_button.php

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
<?php
2+
/**
3+
* Cloud Button
4+
*
5+
* Plugin to add button to open cloud storage.
6+
*
7+
* @date 2017-03-14
8+
* @version 0.1
9+
* @author Alexander Pushkin
10+
* @url https://github.com/san4op/roundcube_cloud_button
11+
* @licence GNU GPLv3
12+
*/
13+
14+
class cloud_button extends rcube_plugin
15+
{
16+
private $title;
17+
private $url;
18+
19+
function init()
20+
{
21+
$rcmail = rcube::get_instance();
22+
23+
$this->title = $rcmail->config->get('cloud_button_title', 'cloud_button.cloud');
24+
$this->url = $rcmail->config->get('cloud_button_url', '');
25+
26+
if (!$this->url) {
27+
return;
28+
}
29+
30+
$this->add_texts('localization/', true);
31+
$this->include_stylesheet($this->local_skin_path() . '/cloud_button.css');
32+
33+
$this->add_button(array(
34+
'href' => $this->url,
35+
'class' => 'button-cloud',
36+
'classsel' => 'button-cloud button-selected',
37+
'innerclass' => 'button-inner',
38+
'label' => $this->title,
39+
), 'taskbar');
40+
}
41+
42+
}
43+
44+
?>

composer.json

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"name": "san4op/cloud_button",
3+
"type": "roundcube-plugin",
4+
"description": "Plugin to add button to open cloud storage.",
5+
"keywords": ["button","cloud"],
6+
"homepage": "https://github.com/san4op/roundcube_cloud_button",
7+
"license": "GPL-3.0+",
8+
"version": "0.1",
9+
"authors": [
10+
{
11+
"name": "Alexander Pushkin",
12+
"email": "san4op@icloud.com",
13+
"homepage": "https://github.com/san4op",
14+
"role": "Developer"
15+
}
16+
],
17+
"repositories": [
18+
{
19+
"type": "composer",
20+
"url": "http://plugins.roundcube.net"
21+
}
22+
],
23+
"require": {
24+
"php": ">=5.3.0",
25+
"roundcube/plugin-installer": ">=0.1.3"
26+
},
27+
"extra": {
28+
"roundcube": {
29+
"min-version": "1.0.0"
30+
}
31+
}
32+
}

config.inc.php.example

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
##
3+
## Cloud Button configuration file
4+
##
5+
6+
// Button text
7+
$config['cloud_button_title'] = 'Cloud';
8+
9+
// URL to cloud storage
10+
$config['cloud_button_url'] = 'https://cloud.example.com';
11+
12+
?>

localization/en_US.inc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
3+
$labels = array();
4+
$labels['cloud'] = 'Cloud';
5+
6+
?>

localization/ru_RU.inc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
3+
$labels = array();
4+
$labels['cloud'] = 'Облако';
5+
6+
?>

localization/uk_UA.inc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
3+
$labels = array();
4+
$labels['cloud'] = 'Хмара';
5+
6+
?>

skins/larry/cloud_button.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#taskbar a.button-cloud span.button-inner {
2+
background: url(images/cloud.png) 0 2px no-repeat;
3+
}
4+
#taskbar a.button-cloud:hover span.button-inner,
5+
#taskbar a.button-cloud.button-selected span.button-inner {
6+
background-position: 0 -20px;
7+
}

0 commit comments

Comments
 (0)