I've recently started to contribute to the field_slideshow module. While looking at the source it rapidly became apparent that views_slideshow and field_slideshow have large redundant code or logic. There are certainly other modules that could benefit from the following, maybe theme(r)s too.

The idea I have in mind would be something like a "slideshow_api" module:

  • function to add the required js, css and libraries
  • reusable theme elements (like the one provided by views_slideshow but a little more generic)
  • it would be responsible for the javascript logic (linking pager events with slideshow, ...)
  • a function to get a slideshow settings form (+save, ...)

I'm confident that this would work well with field_slideshow but haven't enough experience with views to even tell if it's doable or not. What do you think?

Comments

idflood’s picture

Issue summary: View changes

add missing point

idflood’s picture

Issue summary: View changes

grammar

redndahead’s picture

I have had this planned for quite a while, but just haven't gotten to it. It's exactly like you say it's almost like you were reading my mind ;) Views Slideshow currently has an api that wouldn't be hard to move it back one level to make it extra generic. But with all things it's harder than on first look.

The way I envision it is

slideshow_api:

  • Provides a way to hook a slideshow into it.
  • Provides a way to hook widgets into it.
  • Manages function calls to the chosen slideshows and widgets
  • Manages the javascript between the slideshows and widgets
  • Manages incoming rows of data to route them to the slideshows/widgets

Views Slideshow:

  • Provides an interface for the settings pulled from slideshow api
  • Passes the rows to slideshow api

field_slideshow:

  • Uses a display formatter.
  • It passes the rows to slideshow api
  • It renders the output from slideshow api.

Or something like that. Their are some differences between views and a display formatter that need to be worked out, but I think it can be done.

You think you want to collaborate on a new project?

idflood’s picture

I think that we are on the same page, so yes, I'm really interested in collaborating on a new project : )
Let me know if you start something. I will try to play with some code but first I need to familiarize myself with the way views_slideshow currently handle this. It's a little bit more advanced than field_slideshow so I have a few things to learn.

idflood’s picture

To get things started I've created a new sandbox project: http://drupal.org/sandbox/idflood/1509394
I've given you all the permissions, so don't hesitate to commit things :)

I've added the views templates and functions and started modifying them without trying to implement them. Not sure it's a good move, but I will try to do that little by little.

idflood’s picture

Issue summary: View changes

...

NickDickinsonWilde’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

No recent movement on this idea, closing, re-open if anyone has solid plans/or intends to look into it further.