Skip to content
Snippets Groups Projects
Unverified Commit b6a79549 authored by Lukas Ruge's avatar Lukas Ruge
Browse files

links without html

parent 2efe87bf
No related branches found
No related tags found
No related merge requests found
Pipeline #
Showing
with 13 additions and 7456 deletions
<ul>
<li><a href="{{site.baseurl}}/verein">Verein</a></li>
<li><a href="{{site.baseurl}}/verein/membership.html">Mitglied werden</a></li>
<li><a href="{{site.baseurl}}/verein/mitgliedschaft/">Mitglied werden</a></li>
<li><a href="{{site.baseurl}}/verein/spenden/">Spenden</a></li>
<li><a href="{{site.baseurl}}/nobreakspace">Hackerspace</a></li>
<li><a href="{{site.baseurl}}/verein/press">Presse</a></li>
<li><a href="{{site.baseurl}}/verein/satzung.html">Satzung</a>
<li><a href="{{site.baseurl}}/verein/satzung/">Satzung</a>
<ul>
<li><a href="{{site.baseurl}}/verein/beitrag.html">Beitragsordnung</a></li>
<li><a href="{{site.baseurl}}/verein/nutzung.html">Nutzungsordnung</a></li>
<li><a href="{{site.baseurl}}/verein/schluessel.html">Schlüsselordnung</a></li>
<li><a href="{{site.baseurl}}/verein/geschaftsordnung.html">Geschäftsordnung des Vorstands</a></li>
<li><a href="{{site.baseurl}}/verein/beitragsordnung/">Beitragsordnung</a></li>
<li><a href="{{site.baseurl}}/verein/nutzung/">Nutzungsordnung</a></li>
<li><a href="{{site.baseurl}}/verein/schluesselordnung/">Schlüsselordnung</a></li>
<li><a href="{{site.baseurl}}/verein/geschaftsordnung/">Geschäftsordnung des Vorstands</a></li>
</ul>
</li>
</ul>
---
layout: post
title: "Vortrag am 09.02. entfällt"
date: 2015-02-08 21:20:00 +0200
categories:
- blog
tags:
- vortrag
---
Leider muss der Vortrag [RPM-Pakete mit YUM verwalten](https://chaotikum.org/projekte:vortraege:2015-02-09) aus technischen Gründen entfallen.
---
layout: post
title: "MetaNook 2016: Schedule veröffentlicht"
date: 2016-10-12 10:03:00 +0200
image: audimax.png
comments: true
categories:
- blog
tags:
- metanook
---
Auf [metameute.de/nook/](http://metameute.de/nook2016/) ist inzwischen auch der Schedule zur MetaNook 2016 veröffentlicht. Neben den LaTeX-Vorträgen, die aus den Vorjahren bekannt sind, gibt es diesmal auch einen Einstiegsvortrag zu git sowie zwei andere git-Vorträge.
<!--more-->
In weiteren Vorträgen geht es um das Lübecker [FabLab](http://forum.fablab-luebeck.de/), die formale Schreibweise in der Mathematik, Komplexitätsklassen, Unternehmenskultur, Docker (Die Containersoftware, nicht der Hafenarbeiter), Smalltalk (Die Programmiersprache, nicht die Unterhaltungsform) und Essen (Die Nahrungsaufnahme, nicht die Stadt).
Um sich ein genaues Bild zu verschaffen kann man den Plan unter [metameute.de/nook2016/](http://metameute.de/nook2016/) ansehen.
---
layout: post
title: "1. Smalltalker Treff Lübeck"
date: 2017-12-01 10:00:00 +0200
comments: true
categories:
- blog
tags:
- smaltalk
frontpage: true
---
Bereits auf der [MetaNook 2017](https://metanook.de/2017) angekündigt findet am Montag dem 4 Dezember 2017 in der Fleischhauerstraße 81 der erste **Smalltalker Treff Lübeck** statt.
Wer also an der Programmiersprache [Smalltalk](https://de.wikipedia.org/wiki/Smalltalk_(Programmiersprache)) Interesse hat oder rausfinden will, ob er daran ein Interesse entwickeln möchte sollte ab **20:00 Uhr in der Fleischhauerstraße 81** erscheinen.
---
layout: verein
title: Verein
permalink: /verein/beitrag.html
permalink: /verein/beitragsordnung/
aside: true
feature_image: "https://chaotikum.org/_media/hackerspace:nbsp:nbspvonoben.jpg"
---
......
---
layout: verein
title: Verein
permalink: /verein/geschaftsordnung.html
permalink: /verein/geschaftsordnung/
aside: true
feature_image: "https://chaotikum.org/_media/hackerspace:nbsp:nbspvonoben.jpg"
---
......
---
layout: verein
title: Verein
permalink: /verein/membership.html
permalink: /verein/mitgliedschaft/
aside: true
feature_image: "https://chaotikum.org/_media/hackerspace:nbsp:nbspvonoben.jpg"
---
......
---
layout: verein
title: Verein
permalink: /verein/nutzung.html
permalink: /verein/nutzung/
aside: true
feature_image: "https://chaotikum.org/_media/hackerspace:nbsp:nbspvonoben.jpg"
---
......
---
layout: verein
title: Verein
permalink: /verein/satzung.html
permalink: /verein/satzung/
aside: true
feature_image: "https://chaotikum.org/_media/hackerspace:nbsp:nbspvonoben.jpg"
---
......
---
layout: verein
title: Verein
permalink: /verein/schluessel.html
permalink: /verein/schluesselordnung/
aside: true
feature_image: "https://chaotikum.org/_media/hackerspace:nbsp:nbspvonoben.jpg"
---
......
File deleted
File deleted
This diff is collapsed.
This diff is collapsed.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Galleria Flickr Plugin</title>
<style>
/* Demo styles */
html,body{background:#222;margin:0;}
body{border-top:4px solid #000;}
.content{color:#777;font:12px/1.4 "helvetica neue",arial,sans-serif;width:620px;margin:20px auto;}
h1{font-size:12px;font-weight:normal;color:#ddd;margin:0;}
p{margin:0 0 20px}
a {color:#22BCB9;text-decoration:none;}
.cred{margin-top:20px;font-size:11px;}
/* This rule is read by Galleria to define the gallery height: */
#galleria{height:320px;}
</style>
<!-- load jQuery -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script>
<!-- load Galleria -->
<script src="../../galleria-1.5.7.min.js"></script>
<!-- load flickr plugin -->
<script src="galleria.flickr.min.js"></script>
</head>
<body>
<div class="content">
<h1>Galleria Flickr Plugin Demo</h1>
<p>Demonstrating a basic gallery example with a Flickr search.</p>
<!-- Adding gallery images. This is just a container for the dynamic flickr images -->
<div id="galleria"></div>
<p class="cred">Made by <a href="http://galleria.io">Galleria</a>.</p>
<a href="#" id="close">cloase</a>
</div>
<script>
$(function() {
// Load the classic theme
Galleria.loadTheme('../../themes/classic/galleria.classic.min.js');
// Initialize Galleria
Galleria.run('#galleria', {
// search flickr for "galleria"
flickr: 'search:galleria',
flickrOptions: {
// sort by interestingness
sort: 'interestingness-desc'
}
});
});
</script>
</body>
</html>
\ No newline at end of file
script/galleria/plugins/flickr/flickr-loader.gif

2.08 KiB

/**
* Galleria Flickr Plugin 2016-09-03
* http://galleria.io
*
* Copyright (c) 2010 - 2017 worse is better UG
* Licensed under the MIT license
* https://raw.github.com/worseisbetter/galleria/master/LICENSE
*
*/
(function($) {
/*global jQuery, Galleria, window */
Galleria.requires(1.25, 'The Flickr Plugin requires Galleria version 1.2.5 or later.');
// The script path
var PATH = Galleria.utils.getScriptPath();
/**
@class
@constructor
@example var flickr = new Galleria.Flickr();
@author http://galleria.io
@requires jQuery
@requires Galleria
@param {String} [api_key] Flickr API key to be used, defaults to the Galleria key
@returns Instance
*/
Galleria.Flickr = function( api_key ) {
this.api_key = api_key || '2a2ce06c15780ebeb0b706650fc890b2';
this.options = {
max: 30, // photos to return
imageSize: 'medium', // photo size ( thumb,small,medium,big,original )
thumbSize: 'thumb', // thumbnail size ( thumb,small,medium,big,original )
sort: 'interestingness-desc', // sort option ( date-posted-asc, date-posted-desc, date-taken-asc, date-taken-desc, interestingness-desc, interestingness-asc, relevance )
description: false, // set this to true to get description as caption
complete: function(){}, // callback to be called inside the Galleria.prototype.load
backlink: false // set this to true if you want to pass a link back to the original image
};
};
Galleria.Flickr.prototype = {
// bring back the constructor reference
constructor: Galleria.Flickr,
/**
Search for anything at Flickr
@param {String} phrase The string to search for
@param {Function} [callback] The callback to be called when the data is ready
@returns Instance
*/
search: function( phrase, callback ) {
return this._find({
text: phrase
}, callback );
},
/**
Search for anything at Flickr by tag
@param {String} tag The tag(s) to search for
@param {Function} [callback] The callback to be called when the data is ready
@returns Instance
*/
tags: function( tag, callback ) {
return this._find({
tags: tag
}, callback);
},
/**
Get a user's public photos
@param {String} username The username as shown in the URL to fetch
@param {Function} [callback] The callback to be called when the data is ready
@returns Instance
*/
user: function( username, callback ) {
return this._call({
method: 'flickr.urls.lookupUser',
url: 'flickr.com/photos/' + username
}, function( data ) {
this._find({
user_id: data.user.id,
method: 'flickr.people.getPublicPhotos'
}, callback);
});
},
/**
Get photos from a photoset by ID
@param {String|Number} photoset_id The photoset id to fetch
@param {Function} [callback] The callback to be called when the data is ready
@returns Instance
*/
set: function( photoset_id, callback ) {
return this._find({
photoset_id: photoset_id,
method: 'flickr.photosets.getPhotos'
}, callback);
},
/**
Get photos from a gallery by ID
@param {String|Number} gallery_id The gallery id to fetch
@param {Function} [callback] The callback to be called when the data is ready
@returns Instance
*/
gallery: function( gallery_id, callback ) {
return this._find({
gallery_id: gallery_id,
method: 'flickr.galleries.getPhotos'
}, callback);
},
/**
Search groups and fetch photos from the first group found
Useful if you know the exact name of a group and want to show the groups photos.
@param {String} group The group name to search for
@param {Function} [callback] The callback to be called when the data is ready
@returns Instance
*/
groupsearch: function( group, callback ) {
return this._call({
text: group,
method: 'flickr.groups.search'
}, function( data ) {
this.group( data.groups.group[0].nsid, callback );
});
},
/**
Get photos from a group by ID
@param {String} group_id The group id to fetch
@param {Function} [callback] The callback to be called when the data is ready
@returns Instance
*/
group: function ( group_id, callback ) {
return this._find({
group_id: group_id,
method: 'flickr.groups.pools.getPhotos'
}, callback );
},
/**
Set flickr options
@param {Object} options The options object to blend
@returns Instance
*/
setOptions: function( options ) {
$.extend(this.options, options);
return this;
},
// call Flickr and raise errors
_call: function( params, callback ) {
var url = 'https://api.flickr.com/services/rest/?';
var scope = this;
params = $.extend({
format : 'json',
jsoncallback : '?',
api_key: this.api_key
}, params );
$.each(params, function( key, value ) {
url += '&' + key + '=' + value;
});
$.getJSON(url, function(data) {
if ( data.stat === 'ok' ) {
callback.call(scope, data);
} else {
Galleria.raise( data.code.toString() + ' ' + data.stat + ': ' + data.message, true );
}
});
return scope;
},
// "hidden" way of getting a big image (~1024) from flickr
_getBig: function( photo ) {
if ( photo.url_l ) {
return photo.url_l;
} else if ( parseInt( photo.width_o, 10 ) > 1280 ) {
return 'https://farm'+photo.farm + '.static.flickr.com/'+photo.server +
'/' + photo.id + '_' + photo.secret + '_b.jpg';
}
return photo.url_o || photo.url_z || photo.url_m;
},
// get image size by option name
_getSize: function( photo, size ) {
var img;
switch(size) {
case 'thumb':
img = photo.url_t;
break;
case 'small':
img = photo.url_s;
break;
case 'big':
img = this._getBig( photo );
break;
case 'original':
img = photo.url_o ? photo.url_o : this._getBig( photo );
break;
default:
img = photo.url_z || photo.url_m;
break;
}
return img;
},
// ask flickr for photos, parse the result and call the callback with the galleria-ready data array
_find: function( params, callback ) {
params = $.extend({
method: 'flickr.photos.search',
extras: 'url_t,url_m,url_o,url_s,url_l,url_z,description',
sort: this.options.sort,
per_page: Math.min( this.options.max, 500 )
}, params );
return this._call( params, function(data) {
var gallery = [],
photos = data.photos ? data.photos.photo : data.photoset.photo,
len = photos.length,
photo,
i;
for ( i=0; i<len; i++ ) {
photo = photos[i];
gallery.push({
thumb: this._getSize( photo, this.options.thumbSize ),
image: this._getSize( photo, this.options.imageSize ),
big: this._getBig( photo ),
title: photos[i].title,
description: this.options.description && photos[i].description ? photos[i].description._content : '',
link: this.options.backlink ? 'https://flickr.com/photos/' + photo.owner + '/' + photo.id : ''
});
}
callback.call( this, gallery );
});
}
};
/**
Galleria modifications
We fake-extend the load prototype to make Flickr integration as simple as possible
*/
// save the old prototype in a local variable
var load = Galleria.prototype.load;
// fake-extend the load prototype using the flickr data
Galleria.prototype.load = function() {
// pass if no data is provided or flickr option not found
if ( arguments.length || typeof this._options.flickr !== 'string' ) {
load.apply( this, Galleria.utils.array( arguments ) );
return;
}
// define some local vars
var self = this,
args = Galleria.utils.array( arguments ),
flickr = this._options.flickr.split(':'),
f,
opts = $.extend({}, self._options.flickrOptions),
loader = typeof opts.loader !== 'undefined' ?
opts.loader : $('<div>').css({
width: 48,
height: 48,
opacity: 0.7,
background:'#000 url('+PATH+'loader.gif) no-repeat 50% 50%'
});
if ( flickr.length ) {
// validate the method
if ( typeof Galleria.Flickr.prototype[ flickr[0] ] !== 'function' ) {
Galleria.raise( flickr[0] + ' method not found in Flickr plugin' );
return load.apply( this, args );
}
// validate the argument
if ( !flickr[1] ) {
Galleria.raise( 'No flickr argument found' );
return load.apply( this, args );
}
// apply the preloader
window.setTimeout(function() {
self.$( 'target' ).append( loader );
},100);
// create the instance
f = new Galleria.Flickr();
// apply Flickr options
if ( typeof self._options.flickrOptions === 'object' ) {
f.setOptions( self._options.flickrOptions );
}
// call the flickr method and trigger the DATA event
f[ flickr[0] ]( flickr[1], function( data ) {
self._data = data;
loader.remove();
self.trigger( Galleria.DATA );
f.options.complete.call(f, data);
});
} else {
// if flickr array not found, pass
load.apply( this, args );
}
};
}( jQuery ) );
\ No newline at end of file
/**
* Galleria - v1.5.3 2017-02-13
* https://galleria.io
*
* Copyright (c) 2010 - 2017 worse is better UG
* Licensed under the MIT License.
* https://raw.github.com/worseisbetter/galleria/master/LICENSE
*
*/
!function(a){Galleria.requires(1.25,"The Flickr Plugin requires Galleria version 1.2.5 or later.");var b=Galleria.utils.getScriptPath();Galleria.Flickr=function(a){this.api_key=a||"2a2ce06c15780ebeb0b706650fc890b2",this.options={max:30,imageSize:"medium",thumbSize:"thumb",sort:"interestingness-desc",description:!1,complete:function(){},backlink:!1}},Galleria.Flickr.prototype={constructor:Galleria.Flickr,search:function(a,b){return this._find({text:a},b)},tags:function(a,b){return this._find({tags:a},b)},user:function(a,b){return this._call({method:"flickr.urls.lookupUser",url:"flickr.com/photos/"+a},function(a){this._find({user_id:a.user.id,method:"flickr.people.getPublicPhotos"},b)})},set:function(a,b){return this._find({photoset_id:a,method:"flickr.photosets.getPhotos"},b)},gallery:function(a,b){return this._find({gallery_id:a,method:"flickr.galleries.getPhotos"},b)},groupsearch:function(a,b){return this._call({text:a,method:"flickr.groups.search"},function(a){this.group(a.groups.group[0].nsid,b)})},group:function(a,b){return this._find({group_id:a,method:"flickr.groups.pools.getPhotos"},b)},setOptions:function(b){return a.extend(this.options,b),this},_call:function(b,c){var d="https://api.flickr.com/services/rest/?",e=this;return b=a.extend({format:"json",jsoncallback:"?",api_key:this.api_key},b),a.each(b,function(a,b){d+="&"+a+"="+b}),a.getJSON(d,function(a){"ok"===a.stat?c.call(e,a):Galleria.raise(a.code.toString()+" "+a.stat+": "+a.message,!0)}),e},_getBig:function(a){return a.url_l?a.url_l:parseInt(a.width_o,10)>1280?"https://farm"+a.farm+".static.flickr.com/"+a.server+"/"+a.id+"_"+a.secret+"_b.jpg":a.url_o||a.url_z||a.url_m},_getSize:function(a,b){var c;switch(b){case"thumb":c=a.url_t;break;case"small":c=a.url_s;break;case"big":c=this._getBig(a);break;case"original":c=a.url_o?a.url_o:this._getBig(a);break;default:c=a.url_z||a.url_m}return c},_find:function(b,c){return b=a.extend({method:"flickr.photos.search",extras:"url_t,url_m,url_o,url_s,url_l,url_z,description",sort:this.options.sort,per_page:Math.min(this.options.max,500)},b),this._call(b,function(a){var b,d,e=[],f=a.photos?a.photos.photo:a.photoset.photo,g=f.length;for(d=0;d<g;d++)b=f[d],e.push({thumb:this._getSize(b,this.options.thumbSize),image:this._getSize(b,this.options.imageSize),big:this._getBig(b),title:f[d].title,description:this.options.description&&f[d].description?f[d].description._content:"",link:this.options.backlink?"https://flickr.com/photos/"+b.owner+"/"+b.id:""});c.call(this,e)})}};var c=Galleria.prototype.load;Galleria.prototype.load=function(){if(arguments.length||"string"!=typeof this._options.flickr)return void c.apply(this,Galleria.utils.array(arguments));var d,e=this,f=Galleria.utils.array(arguments),g=this._options.flickr.split(":"),h=a.extend({},e._options.flickrOptions),i="undefined"!=typeof h.loader?h.loader:a("<div>").css({width:48,height:48,opacity:.7,background:"#000 url("+b+"loader.gif) no-repeat 50% 50%"});if(g.length){if("function"!=typeof Galleria.Flickr.prototype[g[0]])return Galleria.raise(g[0]+" method not found in Flickr plugin"),c.apply(this,f);if(!g[1])return Galleria.raise("No flickr argument found"),c.apply(this,f);window.setTimeout(function(){e.$("target").append(i)},100),d=new Galleria.Flickr,"object"==typeof e._options.flickrOptions&&d.setOptions(e._options.flickrOptions),d[g[0]](g[1],function(a){e._data=a,i.remove(),e.trigger(Galleria.DATA),d.options.complete.call(d,a)})}else c.apply(this,f)}}(jQuery);
\ No newline at end of file
!function(a){Galleria.requires(1.25,"The Flickr Plugin requires Galleria version 1.2.5 or later.");var b=Galleria.utils.getScriptPath();Galleria.Flickr=function(a){this.api_key=a||"2a2ce06c15780ebeb0b706650fc890b2",this.options={max:30,imageSize:"medium",thumbSize:"thumb",sort:"interestingness-desc",description:!1,complete:function(){},backlink:!1}},Galleria.Flickr.prototype={constructor:Galleria.Flickr,search:function(a,b){return this._find({text:a},b)},tags:function(a,b){return this._find({tags:a},b)},user:function(a,b){return this._call({method:"flickr.urls.lookupUser",url:"flickr.com/photos/"+a},function(a){this._find({user_id:a.user.id,method:"flickr.people.getPublicPhotos"},b)})},set:function(a,b){return this._find({photoset_id:a,method:"flickr.photosets.getPhotos"},b)},gallery:function(a,b){return this._find({gallery_id:a,method:"flickr.galleries.getPhotos"},b)},groupsearch:function(a,b){return this._call({text:a,method:"flickr.groups.search"},function(a){this.group(a.groups.group[0].nsid,b)})},group:function(a,b){return this._find({group_id:a,method:"flickr.groups.pools.getPhotos"},b)},setOptions:function(b){return a.extend(this.options,b),this},_call:function(b,c){var d="https://api.flickr.com/services/rest/?",e=this;return b=a.extend({format:"json",jsoncallback:"?",api_key:this.api_key},b),a.each(b,function(a,b){d+="&"+a+"="+b}),a.getJSON(d,function(a){"ok"===a.stat?c.call(e,a):Galleria.raise(a.code.toString()+" "+a.stat+": "+a.message,!0)}),e},_getBig:function(a){return a.url_l?a.url_l:parseInt(a.width_o,10)>1280?"https://farm"+a.farm+".static.flickr.com/"+a.server+"/"+a.id+"_"+a.secret+"_b.jpg":a.url_o||a.url_z||a.url_m},_getSize:function(a,b){var c;switch(b){case"thumb":c=a.url_t;break;case"small":c=a.url_s;break;case"big":c=this._getBig(a);break;case"original":c=a.url_o?a.url_o:this._getBig(a);break;default:c=a.url_z||a.url_m}return c},_find:function(b,c){return b=a.extend({method:"flickr.photos.search",extras:"url_t,url_m,url_o,url_s,url_l,url_z,description",sort:this.options.sort,per_page:Math.min(this.options.max,500)},b),this._call(b,function(a){var b,d,e=[],f=a.photos?a.photos.photo:a.photoset.photo,g=f.length;for(d=0;d<g;d++)b=f[d],e.push({thumb:this._getSize(b,this.options.thumbSize),image:this._getSize(b,this.options.imageSize),big:this._getBig(b),title:f[d].title,description:this.options.description&&f[d].description?f[d].description._content:"",link:this.options.backlink?"https://flickr.com/photos/"+b.owner+"/"+b.id:""});c.call(this,e)})}};var c=Galleria.prototype.load;Galleria.prototype.load=function(){if(arguments.length||"string"!=typeof this._options.flickr)return void c.apply(this,Galleria.utils.array(arguments));var d,e=this,f=Galleria.utils.array(arguments),g=this._options.flickr.split(":"),h=a.extend({},e._options.flickrOptions),i="undefined"!=typeof h.loader?h.loader:a("<div>").css({width:48,height:48,opacity:.7,background:"#000 url("+b+"loader.gif) no-repeat 50% 50%"});if(g.length){if("function"!=typeof Galleria.Flickr.prototype[g[0]])return Galleria.raise(g[0]+" method not found in Flickr plugin"),c.apply(this,f);if(!g[1])return Galleria.raise("No flickr argument found"),c.apply(this,f);window.setTimeout(function(){e.$("target").append(i)},100),d=new Galleria.Flickr,"object"==typeof e._options.flickrOptions&&d.setOptions(e._options.flickrOptions),d[g[0]](g[1],function(a){e._data=a,i.remove(),e.trigger(Galleria.DATA),d.options.complete.call(d,a)})}else c.apply(this,f)}}(jQuery);
\ No newline at end of file
(function($){Galleria.requires(1.25,"The Flickr Plugin requires Galleria version 1.2.5 or later.");var PATH=Galleria.utils.getScriptPath();Galleria.Flickr=function(api_key){this.api_key=api_key||"2a2ce06c15780ebeb0b706650fc890b2";this.options={max:30,imageSize:"medium",thumbSize:"thumb",sort:"interestingness-desc",description:false,complete:function(){},backlink:false}};Galleria.Flickr.prototype={constructor:Galleria.Flickr,search:function(phrase,callback){return this._find({text:phrase},callback)},tags:function(tag,callback){return this._find({tags:tag},callback)},user:function(username,callback){return this._call({method:"flickr.urls.lookupUser",url:"flickr.com/photos/"+username},function(data){this._find({user_id:data.user.id,method:"flickr.people.getPublicPhotos"},callback)})},set:function(photoset_id,callback){return this._find({photoset_id:photoset_id,method:"flickr.photosets.getPhotos"},callback)},gallery:function(gallery_id,callback){return this._find({gallery_id:gallery_id,method:"flickr.galleries.getPhotos"},callback)},groupsearch:function(group,callback){return this._call({text:group,method:"flickr.groups.search"},function(data){this.group(data.groups.group[0].nsid,callback)})},group:function(group_id,callback){return this._find({group_id:group_id,method:"flickr.groups.pools.getPhotos"},callback)},setOptions:function(options){$.extend(this.options,options);return this},_call:function(params,callback){var url="https://api.flickr.com/services/rest/?";var scope=this;params=$.extend({format:"json",jsoncallback:"?",api_key:this.api_key},params);$.each(params,function(key,value){url+="&"+key+"="+value});$.getJSON(url,function(data){if(data.stat==="ok"){callback.call(scope,data)}else{Galleria.raise(data.code.toString()+" "+data.stat+": "+data.message,true)}});return scope},_getBig:function(photo){if(photo.url_l){return photo.url_l}else if(parseInt(photo.width_o,10)>1280){return"https://farm"+photo.farm+".static.flickr.com/"+photo.server+"/"+photo.id+"_"+photo.secret+"_b.jpg"}return photo.url_o||photo.url_z||photo.url_m},_getSize:function(photo,size){var img;switch(size){case"thumb":img=photo.url_t;break;case"small":img=photo.url_s;break;case"big":img=this._getBig(photo);break;case"original":img=photo.url_o?photo.url_o:this._getBig(photo);break;default:img=photo.url_z||photo.url_m;break}return img},_find:function(params,callback){params=$.extend({method:"flickr.photos.search",extras:"url_t,url_m,url_o,url_s,url_l,url_z,description",sort:this.options.sort,per_page:Math.min(this.options.max,500)},params);return this._call(params,function(data){var gallery=[],photos=data.photos?data.photos.photo:data.photoset.photo,len=photos.length,photo,i;for(i=0;i<len;i++){photo=photos[i];gallery.push({thumb:this._getSize(photo,this.options.thumbSize),image:this._getSize(photo,this.options.imageSize),big:this._getBig(photo),title:photos[i].title,description:this.options.description&&photos[i].description?photos[i].description._content:"",link:this.options.backlink?"https://flickr.com/photos/"+photo.owner+"/"+photo.id:""})}callback.call(this,gallery)})}};var load=Galleria.prototype.load;Galleria.prototype.load=function(){if(arguments.length||typeof this._options.flickr!=="string"){load.apply(this,Galleria.utils.array(arguments));return}var self=this,args=Galleria.utils.array(arguments),flickr=this._options.flickr.split(":"),f,opts=$.extend({},self._options.flickrOptions),loader=typeof opts.loader!=="undefined"?opts.loader:$("<div>").css({width:48,height:48,opacity:.7,background:"#000 url("+PATH+"loader.gif) no-repeat 50% 50%"});if(flickr.length){if(typeof Galleria.Flickr.prototype[flickr[0]]!=="function"){Galleria.raise(flickr[0]+" method not found in Flickr plugin");return load.apply(this,args)}if(!flickr[1]){Galleria.raise("No flickr argument found");return load.apply(this,args)}window.setTimeout(function(){self.$("target").append(loader)},100);f=new Galleria.Flickr;if(typeof self._options.flickrOptions==="object"){f.setOptions(self._options.flickrOptions)}f[flickr[0]](flickr[1],function(data){self._data=data;loader.remove();self.trigger(Galleria.DATA);f.options.complete.call(f,data)})}else{load.apply(this,args)}}})(jQuery);
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment