Get Some
General => Technology & Hardware => Topic started by: Bell on April 04, 2013, 07:30:53 am
-
Hey smart people I have a random question.
So i'm doing a small side project for a friend that involves allowing people to SMS to a certain number that feeds messages into a database and then displays the messages on a website at the certain time.
There will also some be pictures that will be displayed at the same time as the messages in sort of a slide show fashion.
My mate would like to be able to deal with the slide show stuff on his side without me having to do it so he can control the feel.
So this all smells like flash to me but he has no skills in this and wanted something 'simple' that allows him to create picture transitions are there any other options?
Personally i'd like to just do this myself using abit of javascript there is probably some library that has already deal with this.
Any thoughts would be much appreciated.
-
Design a library of JQuery transitions he can use. You set up all the parameters and make it pretty, maybe expose the transition time as a setting.
He'll get to choose from.
- Blinds - [ms]
- Slide Left - [ms]
- Spin - [ms]
etc..
EDIT: You could skip this^ step and try integrate with something like NivoSlider
Then create a simplistic slideshow creator page, can be as simple as a grid. Eg. Add photo, select transition for photo. Save slideshow to database, with transitions. (If no transition set maybe choose a random one)
Load slideshow into HTML
Success?
EDIT 2: Fuck Nivo Slider, https://github.com/joelambert/Flux-Slider, that looks boss. With a timer, transition attribute in html, and some other bits n pieces you should be able to boss a solution.
-
If you use flux, then here are 2 code snippets that I tested. These add support for adding data-transition attributes to specify the transition in the DOM.
//xeno: added support to copy for data- attributes
var img_attributes = $(found_img).prop("attributes");
$.each(img_attributes, function() {
if(this.name.indexOf('data-') > 0)
$(imgClone).attr(this.name, this.value);
});
if(transition == undefined || !flux.transitions[transition])
{
//xeno: Added support to check a data-transition attribute
//if it exists then use that as the transition
var trans = $(this.getImage(this.currentImageIndex)).attr('data-transition');
if(trans === undefined){
// Pick a transition at random from the (possibly reduced set of) transitions
var index = Math.floor(Math.random()*(this.options.transitions.length));
transition = this.options.transitions[index];
}else{
transition = trans;
}
}
Usage:
/Thread
-
Like a boss.
-
:afro:
-
Cycle. Best slider. Now in the flavour of 2.
http://jquery.malsup.com/cycle2
Nivo can be a cunt to set up, Flux I have not played with, but cycle is the most flexible thing I've ever used. Almost never go past it. Now also has plugin for 'tiles' (nivo-like behaviour). Even if you don't use it for images, can use it for messages, or anything (it's not just an image slider, it cycles any element).
http://www.joelambert.co.uk/flux/
Flux does look extremely sexy, but looks like it needs CSS3 features (so bascially no IE < 10).
Thanks for protip tho xeno.
-
Awesome replies, i'll give this a crack this weekend and tell yas how I get on.
Thanks heaps bros
-
Awesome replies, i'll give this a crack this weekend and tell yas how I get on.
Thanks heaps bros
-
Cycle. Best slider. Now in the flavour of 2.
[url]http://jquery.malsup.com/cycle2[/url]
Nivo can be a cunt to set up, Flux I have not played with, but cycle is the most flexible thing I've ever used. Almost never go past it. Now also has plugin for 'tiles' (nivo-like behaviour). Even if you don't use it for images, can use it for messages, or anything (it's not just an image slider, it cycles any element).
[url]http://www.joelambert.co.uk/flux/[/url]
Flux does look extremely sexy, but looks like it needs CSS3 features (so bascially no IE < 10).
Thanks for protip tho xeno.
Wow, I also like Cycle, shit legit. Giving and receiving that's what programming is about...
Yeah pitty about flux using CSS3. But DAYMN those 3D effects.
-
Yeh, I love cycle for making 0 assumptions on anything. No required HTML structure or anything. You just give it a collection of shit to cycle through and it does it. All the control in my hands.
And if you find some builtin component doesn't have the flexibility you want, it has all the right hooks in all the right places to get around it. Like building your own 'pager' system, etc.
-
So I used cycle and it went fucking swimmingly cheers for the tip.
-
So I used cycle and it went fucking swimmingly cheers for the tip.
BAM AND THE DIRT IS GONE.
Son, I am Appoint.
-
:D
-
Guys.. please never delete my questions on cleanup. I need them PAQ'd for some statistical reasons. Probably some day I will get all them deleted but just now Ineed them Paq'd. Thanks
-
^WTF
-
Spambot. Duh.