@ -0,0 +1,100 @@ |
||||
<?php |
||||
|
||||
/** |
||||
* VCF Exporter |
||||
* |
||||
* This plugin adds the ability to export entire address books as .vcf files. |
||||
* This is useful for clients that don't support CardDAV yet. They often do |
||||
* support vcf files. |
||||
* |
||||
* @package Sabre |
||||
* @subpackage CardDAV |
||||
* @copyright Copyright (C) 2007-2012 Rooftop Solutions. All rights reserved. |
||||
* @author Evert Pot (http://www.rooftopsolutions.nl/) |
||||
* @license http://code.google.com/p/sabredav/wiki/License Modified BSD License |
||||
*/ |
||||
class Sabre_CardDAV_VCFExportPlugin extends Sabre_DAV_ServerPlugin { |
||||
|
||||
/** |
||||
* Reference to Server class |
||||
* |
||||
* @var Sabre_DAV_Server |
||||
*/ |
||||
private $server; |
||||
|
||||
/** |
||||
* Initializes the plugin and registers event handlers |
||||
* |
||||
* @param Sabre_DAV_Server $server |
||||
* @return void |
||||
*/ |
||||
public function initialize(Sabre_DAV_Server $server) { |
||||
|
||||
$this->server = $server; |
||||
$this->server->subscribeEvent('beforeMethod',array($this,'beforeMethod'), 90); |
||||
|
||||
} |
||||
|
||||
/** |
||||
* 'beforeMethod' event handles. This event handles intercepts GET requests ending |
||||
* with ?export |
||||
* |
||||
* @param string $method |
||||
* @param string $uri |
||||
* @return bool |
||||
*/ |
||||
public function beforeMethod($method, $uri) { |
||||
|
||||
if ($method!='GET') return; |
||||
if ($this->server->httpRequest->getQueryString()!='export') return; |
||||
|
||||
// splitting uri |
||||
list($uri) = explode('?',$uri,2); |
||||
|
||||
$node = $this->server->tree->getNodeForPath($uri); |
||||
|
||||
if (!($node instanceof Sabre_CardDAV_IAddressBook)) return; |
||||
|
||||
// Checking ACL, if available. |
||||
if ($aclPlugin = $this->server->getPlugin('acl')) { |
||||
$aclPlugin->checkPrivileges($uri, '{DAV:}read'); |
||||
} |
||||
|
||||
$this->server->httpResponse->setHeader('Content-Type','text/directory'); |
||||
$this->server->httpResponse->sendStatus(200); |
||||
|
||||
$nodes = $this->server->getPropertiesForPath($uri, array( |
||||
'{' . Sabre_CardDAV_Plugin::NS_CARDDAV . '}address-data', |
||||
),1); |
||||
|
||||
$this->server->httpResponse->sendBody($this->generateVCF($nodes)); |
||||
|
||||
// Returning false to break the event chain |
||||
return false; |
||||
|
||||
} |
||||
|
||||
/** |
||||
* Merges all vcard objects, and builds one big vcf export |
||||
* |
||||
* @param array $nodes |
||||
* @return string |
||||
*/ |
||||
public function generateVCF(array $nodes) { |
||||
$objects = array(); |
||||
|
||||
foreach($nodes as $node) { |
||||
|
||||
if (!isset($node[200]['{' . Sabre_CardDAV_Plugin::NS_CARDDAV . '}address-data'])) { |
||||
continue; |
||||
} |
||||
$nodeData = $node[200]['{' . Sabre_CardDAV_Plugin::NS_CARDDAV . '}address-data']; |
||||
$objects[] = $nodeData; |
||||
|
||||
} |
||||
|
||||
return implode("\r\n", $objects); |
||||
|
||||
} |
||||
|
||||
} |
@ -0,0 +1,32 @@ |
||||
<?php |
||||
|
||||
/** |
||||
* ownCloud - gallery application |
||||
* |
||||
* @author Ike Devolder |
||||
* @copyright 2012 Ike Devolder |
||||
* |
||||
* This library is free software; you can redistribute it and/or |
||||
* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE |
||||
* License as published by the Free Software Foundation; either |
||||
* version 3 of the License, or any later version. |
||||
* |
||||
* This library is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU AFFERO GENERAL PUBLIC LICENSE for more details. |
||||
* |
||||
* You should have received a copy of the GNU Lesser General Public |
||||
* License along with this library. If not, see <http://www.gnu.org/licenses/>. |
||||
* |
||||
*/ |
||||
OCP\JSON::checkLoggedIn(); |
||||
OCP\JSON::checkAppEnabled('gallery'); |
||||
|
||||
$img = $_GET['img']; |
||||
|
||||
$image = OC_Gallery_Photo::getViewImage($img); |
||||
if ($image) { |
||||
OCP\Response::enableCaching(3600 * 24); // 24 hour |
||||
$image->show(); |
||||
} |
@ -0,0 +1,25 @@ |
||||
/* |
||||
|
||||
Supersized - Fullscreen Slideshow jQuery Plugin |
||||
Version : 3.2.7 |
||||
Site : www.buildinternet.com/project/supersized |
||||
|
||||
Author : Sam Dunn |
||||
Company : One Mighty Roar (www.onemightyroar.com) |
||||
License : MIT License / GPL License |
||||
|
||||
*/ |
||||
#supersized-holder #supersized-loader { display:none; position:absolute; top:50%; left:50%; z-index:0; width:60px; height:60px; margin:-30px 0 0 -30px; text-indent:-999em; background:url('%appswebroot%/gallery/img/supersized/progress.gif') no-repeat center center;} |
||||
|
||||
#supersized-holder #supersized { visibility:hidden; display:block; position:fixed; left:0; top:0; overflow:hidden; z-index:200; height:100%; width:100%; } |
||||
#supersized-holder #supersized img { width:auto; height:auto; position:relative; display:none; outline:none; border:none; } |
||||
#supersized-holder #supersized.speed img { -ms-interpolation-mode:nearest-neighbor; image-rendering: -moz-crisp-edges; } /*Speed*/ |
||||
#supersized-holder #supersized.quality img { -ms-interpolation-mode:bicubic; image-rendering: optimizeQuality; } /*Quality*/ |
||||
|
||||
#supersized-holder #supersized li { display:block; list-style:none; z-index:150; position:fixed; overflow:hidden; top:0; left:0; width:100%; height:100%; background:#111; } |
||||
#supersized-holder #supersized a { width:100%; height:100%; display:block; } |
||||
#supersized-holder #supersized li.prevslide { z-index:160; } |
||||
#supersized-holder #supersized li.activeslide { z-index:170; } |
||||
#supersized-holder #supersized li.image-loading { background:#111 url('%appswebroot%/gallery/img/supersized/progress.gif') no-repeat center center; width:100%; height:100%; } |
||||
#supersized-holder #supersized li.image-loading img{ visibility:hidden; } |
||||
#supersized-holder #supersized li.prevslide img, #supersized-holder #supersized li.activeslide img{ display:inline; } |
@ -0,0 +1,74 @@ |
||||
/* |
||||
|
||||
Supersized - Fullscreen Slideshow jQuery Plugin |
||||
Version : 3.2.7 |
||||
Site : www.buildinternet.com/project/supersized |
||||
|
||||
Theme : Shutter 1.2 |
||||
Author : Sam Dunn |
||||
Company : One Mighty Roar (www.onemightyroar.com) |
||||
License : MIT License / GPL License |
||||
|
||||
*/ |
||||
|
||||
/* Controls Bar |
||||
----------------------------*/ |
||||
#slideshow-content #slideshow-controls-wrapper { margin:0 auto; height:42px; width:100%; bottom:0px; left:0; z-index:204; background:url('%appswebroot%/gallery/img/supersized/nav-bg.png') repeat-x; position:fixed; } |
||||
#slideshow-content #slideshow-controls { overflow:hidden; height:100%; position:relative; text-align:left; z-index:205; } |
||||
#slideshow-content #slidecounter { float:left; color:#999; font:14px "Helvetica Neue", Helvetica, Arial, sans-serif; text-shadow:#000 0 -1px 0; margin:0px 10px 0 15px; line-height:42px; } |
||||
#slideshow-content #slidecaption { overflow:hidden; float:left; color:#FFF; font:400 14px "Helvetica Neue", Helvetica, Arial, sans-serif; text-shadow:#000 1px 1px 2px; margin:0 20px 0 0; line-height:42px; } |
||||
|
||||
/*#navigation { float:right; margin:0px 20px 0 0; }*/ |
||||
#slideshow-content #play-button{ float:left; margin-top:1px;border-right:1px solid #333; background:url('%appswebroot%/gallery/img/supersized/bg-hover.png') repeat-x 0 44px; } |
||||
#slideshow-content #play-button:hover{ background-position:0 1px; cursor:pointer; } |
||||
|
||||
#slideshow-content #prevslide, #nextslide{ position:fixed; height:43px; width:43px; top:50%; margin-top:-21px; opacity:0.6; z-index:204; } |
||||
#slideshow-content #prevslide{ left:10px; background:url('%appswebroot%/gallery/img/supersized/back.png'); } |
||||
#slideshow-content #nextslide{ right:10px; background:url('%appswebroot%/gallery/img/supersized/forward.png'); } |
||||
#slideshow-content #prevslide:active, #nextslide:active{ margin-top:-19px; } |
||||
#slideshow-content #prevslide:hover, #nextslide:hover{ cursor:pointer; } |
||||
|
||||
#slideshow-content ul#slide-list{ padding:15px 0; float:left; position:absolute; left:50%; } |
||||
#slideshow-content ul#slide-list li{ list-style:none; width:12px; height:12px; float:left; margin:0 5px 0 0; } |
||||
#slideshow-content ul#slide-list li.current-slide a, ul#slide-list li.current-slide a:hover{ background-position:0 0px; } |
||||
#slideshow-content ul#slide-list li a{ display:block; width:12px; height:12px; background:url('%appswebroot%/gallery/img/supersized/nav-dot.png') no-repeat 0 -24px; } |
||||
#slideshow-content ul#slide-list li a:hover{ background-position:0 -12px; cursor:pointer; } |
||||
|
||||
#slideshow-content #tray-button{ float:right; margin-top:1px; border-left:1px solid #333; background:url('%appswebroot%/gallery/img/supersized/bg-hover.png') repeat-x 0 44px; } |
||||
#slideshow-content #tray-button:hover{ background-position:0 1px; cursor:pointer; } |
||||
|
||||
|
||||
/* Progress Bar |
||||
----------------------------*/ |
||||
#slideshow-content #progress-back{ z-index:205; position:fixed; bottom:42px; left:0; height:8px; width:100%; background:url('%appswebroot%/gallery/img/supersized/progress-back.png') repeat-x; } |
||||
#slideshow-content #progress-bar{ position:relative; height:8px; width:100%; background:url('%appswebroot%/gallery/img/supersized/progress-bar.png') repeat-x; } |
||||
|
||||
|
||||
/* Thumbnail Navigation |
||||
----------------------------*/ |
||||
#slideshow-content #nextthumb, #slideshow-content #prevthumb { z-index:202; display:none; position:fixed; bottom:61px; height:75px; width:100px; overflow:hidden; background:#ddd; border:1px solid #fff; -webkit-box-shadow:0 0 5px #000; } |
||||
#slideshow-content #nextthumb { right:12px; } |
||||
#slideshow-content #prevthumb { left:12px; } |
||||
#slideshow-content #nextthumb img, #slideshow-content #prevthumb img { width:150px; height:auto; } |
||||
#slideshow-content #nextthumb:active, #slideshow-content #prevthumb:active { bottom:59px; } |
||||
#slideshow-content #nextthumb:hover, #slideshow-content #prevthumb:hover { cursor:pointer; } |
||||
|
||||
|
||||
/* Thumbnail Tray |
||||
----------------------------*/ |
||||
#slideshow-content #thumb-tray{ position:fixed; z-index:203; bottom:0; left:0; background:url('%appswebroot%/gallery/img/supersized/bg-black.png'); height:150px; width:100%; overflow:hidden; text-align:center; -moz-box-shadow: 0px 0px 4px #000; -webkit-box-shadow: 0px 0px 4px #000; box-shadow: 0px 0px 4px #000; } |
||||
|
||||
#slideshow-content #thumb-back, #slideshow-content #thumb-forward{ position:absolute; z-index:5; bottom:42px; height:108px; width:40px; } |
||||
#slideshow-content #thumb-back{ left:0; background: url('%appswebroot%/gallery/img/supersized/thumb-back.png') no-repeat center center;} |
||||
#slideshow-content #thumb-forward{ right:0; background:url('%appswebroot%/gallery/img/supersized/thumb-forward.png') no-repeat center center;} |
||||
#slideshow-content #thumb-back:hover, #slideshow-content #thumb-forward:hover{ cursor:pointer; background-color:rgba(256,256,256, 0.1); } |
||||
#slideshow-content #thumb-back:hover{ border-right:1px solid rgba(256,256,256, 0.2); } |
||||
#slideshow-content #thumb-forward:hover{ border-left:1px solid rgba(256,256,256, 0.2); } |
||||
|
||||
|
||||
#slideshow-content ul#thumb-list{ display:inline-block; list-style:none; position:relative; left:0px; padding:0 0px; } |
||||
#slideshow-content ul#thumb-list li{ background:#111; list-style:none; display:inline; width:150px; height:108px; overflow:hidden; float:left; margin:0; } |
||||
#slideshow-content ul#thumb-list li img { width:200px; height:auto; opacity:0.5; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=60)"; filter:alpha(opacity=60); -webkit-transition: all 100ms ease-in-out; -moz-transition: all 100ms ease-in-out; -o-transition: all 100ms ease-in-out; -ms-transition: all 100ms ease-in-out; transition: all 100ms ease-in-out; } |
||||
#slideshow-content ul#thumb-list li.current-thumb img, #slideshow-content ul#thumb-list li:hover img{ opacity:1; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; filter:alpha(opacity=100); } |
||||
#slideshow-content ul#thumb-list li:hover{ cursor:pointer; } |
||||
|
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 960 B |
After Width: | Height: | Size: 1.5 KiB |
After Width: | Height: | Size: 1.4 KiB |
After Width: | Height: | Size: 2.6 KiB |
After Width: | Height: | Size: 995 B |