Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #0.0
idflood CreditAttribution: idflood commentedadd missing point
Comment #0.1
idflood CreditAttribution: idflood commentedgrammar
Comment #1
redndahead CreditAttribution: redndahead commentedI 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:
Views Slideshow:
field_slideshow:
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?
Comment #2
idflood CreditAttribution: idflood commentedI 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.
Comment #3
idflood CreditAttribution: idflood commentedTo 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.
Comment #3.0
idflood CreditAttribution: idflood commented...
Comment #4
NickDickinsonWildeNo recent movement on this idea, closing, re-open if anyone has solid plans/or intends to look into it further.