Closed (fixed)
Project:
Rotor Banner
Version:
6.x-1.3
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
24 Jul 2008 at 11:51 UTC
Updated:
1 Dec 2008 at 09:21 UTC
I would like to be able to select nodes at random rather than only displaying the first x nodes. The attached patch adds this functionality. This is the first time I have written a patch for the Drupal community - I hope the format is ok.
| Comment | File | Size | Author |
|---|---|---|---|
| rotor_random.patch | 2.33 KB | mrfelton |
Comments
Comment #1
mrfelton commentedchanging status to patch attached
Comment #2
SeanBannister commentedHey, haven't tried this patch yet but I read it to check if you were doing this with jQuery Cycle, I just realised that Cycle has a randomizer built in :)
Read number 4 on http://malsup.com/jquery/cycle/begin.html
Would this work? Seems like a nicer way to do it seeing as we've got the jQuery Cycle in as a patch.
Comment #3
SeanBannister commentedAlso if you're going to do it with jQuery Cycle we could close this issue and roll it into the jQuery Cycle patch at http://drupal.org/node/278722
Comment #4
mrfelton commentedI think the best thing might actually be to use a combination of this patch (which does it at the database level - selecting items from the database at random, up to the item limit that was defined in the admin page), AND using cycles built in randomisation. This way we will get a random selection of images from all the images available AND they will be rotated through in a random order. Perhaps 2 admin options too - random selection, and random rotation.
Comment #5
SeanBannister commentedOk I see, I forgot about the limit.
What reminds me of http://drupal.org/node/256512 what talks about having the ability to have multiple rotor blocks created. If that feature is created we'd have to make sure it was possible to select what was displayed in a rotor block and then this could do it's random thing. Probally not relevant at the moment but it just passed my mind.
Comment #6
mrfelton commented