gsohoni / acts-as-slideshow Goto Github PK
View Code? Open in Web Editor NEWThis plugin lets you embed a photo gallery flex component and feeds user photo data to it.
License: MIT License
This plugin lets you embed a photo gallery flex component and feeds user photo data to it.
License: MIT License
ActsAsSlideshow =============== This plugin lets you easily embed the Flex Slideshow component into your rails application. All that is required to be done is to install it in the vendor/plugins directory and user and photo models in place. Also this plugin could be used as a reference for creating rails plugins. Usage: Plugin provides a helper method 'embed_slideshow_tag' which lets you embed the Flex component directly into your views. By default, the helper method would embed the supplied Flex_slideshow component. As an addition, an argument could be passed to the method for using any other flex file. On the controller level, one needs to render user photo data using 'get_photo_data_xml' method provided by the plugin. The Flex component uses a config xml file for setting the URI which is used for getting the user photo information in xml format. Example shown below would have the URI in config file set as http://localhost:3000/gallery/show_xml Plugin provides rake tasks for copying the default Flex slideshow and config files to the public/flash directory. Example ======= Run from Rails application root directory: 1) rake slideshow:copy_flash_file 2) rake slideshow:copy_config_file Both of the rake tasks could be run using the following task: 1) rake slideshow:copy_both Using the ruby/script generator, user photos migration (if not already present) can be generated and executed. 1) ruby script/generate acts_as_slideshow_migration 2) rake db:migrate View: (app/views/gallery/show_slideshow.html.erb) <%= embed_slideshow_tag %> Controller: (app/controllers/gallery/show_xml) def show_xml user = User.find(session[:current_user]) render :xml => user.get_photo_data_xml end Config.xml <root> <config> <flex-app-title>Smartsourcing Global Flex SlideShow</flex-app-title> <DataUrl><![CDATA[http://localhost:3000/gallery/show_xml]]></DataUrl> <thumb-width>100</thumb-width> <thumb-height>120</thumb-height> </config> </root> Credits ====== Gaurav Sohoni | [email protected] ------------------------------------------------------------------------------ Released under the MIT license. Copyright © 2010 Gaurav Sohoni | http://github.com/gaurav-sohoni
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.