Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added files and updated Readme

  • Loading branch information...
commit abeffa664faa1aa59aa130243b3a0066a0eca430 1 parent d968c38
@darcyclarke authored
View
23 README.md
@@ -1,4 +1,21 @@
-jQuery-Flickr-Gallery-Plugin
-============================
+#jQuery Flickr Gallery Plugin
-A plugin to generate a flickr gallery from a set url
+@author Darcy Clarke (http://darcyclarke.me)
+@version 1.0
+
+ ## Example Use
+
+ ```javascript
+ $('.gallery').flickrGallery(); // Default
+ $('.gallery').flickrGallery({ url : 'http://www.flickr.com/photos/aenimathirdeye/sets/72157603619715480/', height : 500, width : 500 }); // All options set
+```
+
+ ## License
+
+Copyright (c) 2012 Darcy Clarke <darcy@darcyclarke.me>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
25 jquery.flickrGallery-1.0.js
@@ -0,0 +1,25 @@
+/**
+ * Flickr Gallery Plugin
+ * @author Darcy Clarke
+ *
+ * Copyright (c) 2012 Darcy Clarke
+ * Dual licensed under the MIT and GPL licenses.
+ * http://darcyclarke.me/
+ */
+
+(function($){
+ $.fn.flickrGallery = function(options){
+ return this.each(function(){
+ var settings = $.extend({
+ url : 'http://www.flickr.com/photos/natecroft/sets/72157629865265552/show/',
+ height : 350,
+ width : 350
+ }, options),
+ id,
+ encoded;
+ id = settings.url.match(/\/sets\/(.*)/)[1].split('/')[0],
+ encoded = encodeURIComponent(settings.url.match(/\/photos\/(.*)/)[0]);
+ $(this).append('<embed src="http://widgets.vodpod.com/w/video_embed/Groupvideo.1493771" type="application/x-shockwave-flash" allowscriptaccess="sameDomain" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" flashvars="&amp;offsite=true&amp;intl_lang=en-us&amp;page_show_url='+encoded+'&amp;set_id='+id+'&amp;jump_to=" width="'+settings.width+'" height="'+settings.height+'">');
+ });
+ };
+})(jQuery);
View
10 jquery.flickrGallery-1.0.min.js
@@ -0,0 +1,10 @@
+/**
+ * Flickr Gallery Plugin
+ * @author Darcy Clarke
+ *
+ * Copyright (c) 2012 Darcy Clarke
+ * Dual licensed under the MIT and GPL licenses.
+ * http://darcyclarke.me/
+ */
+
+(function(a){a.fn.flickrGallery=function(b){return this.each(function(){var c=a.extend({url:"http://www.flickr.com/photos/natecroft/sets/72157629865265552/show/",height:350,width:350},b),d,e;d=c.url.match(/\/sets\/(.*)/)[1].split("/")[0],e=encodeURIComponent(c.url.match(/\/photos\/(.*)/)[0]);a(this).append('<embed src="http://widgets.vodpod.com/w/video_embed/Groupvideo.1493771" type="application/x-shockwave-flash" allowscriptaccess="sameDomain" pluginspage="http://www.macromedia.com/go/getflashplayer" wmode="transparent" flashvars="&offsite=true&intl_lang=en-us&page_show_url='+e+"&set_id="+d+'&jump_to=" width="'+c.width+'" height="'+c.height+'">')})}})(jQuery)
Please sign in to comment.
Something went wrong with that request. Please try again.