I have a drupal requirement as follows.

Home page main image
The CMS controlled Home page image can either be a single image that is always shown, or a series of different images generated from a bank of images, with a maximum of 6 images allowed in the bank.
This sequential display of multiple images is optional and can be activated or stopped as appropriate by adding and removing the additional images to and from the page.
A different image will only be displayed if the site user either refreshes the Home page or returns to the Home page from another site page.
The display of the images is time controlled based on the number of images in the bank and their equal display in 60 seconds. If for example, there are two images, the first will display for 0 – 30 seconds and the second for 31 – 60 seconds, and then repeat. If there are five images in the bank, the first will display for 0 – 12 seconds, the second from 13 – 24 seconds, etc. before repeating.
The site administrator will have total control over which images are associated with each page and the order in which they are displayed.

How can I implement this functionality?
Anybody please help me. I have got a deadline.
Thanks and Regards,
AK

Comments

pobster’s picture

You could use logotool to a certain extent. It allows time lapsed logo rotation, you could easily write an automatic value for this based on the amount of images in a folder - it's only set via a variable;

  $form['logo1']['logotool_frequency'] = array(
    '#type' => 'select',
    '#title' => t('Random Frequency'),
    '#description' => t('Select how often your logo is rotated (if you\'ve set it to be random).'),
    '#options' => array(0 => t('Every page refresh'), 60 => t('Every minute'), 3600 => t('Every hour'), 86400 => t('Daily')),
    '#default_value' => variable_get('logotool_frequency', 0),
  );

I think what I'd do if it were me would be to use separate folders as the 'banks' of images and alter logotool to select the images randomly from these folders rather than the actual image files themselves.

Pobster