[themes] Timed image and text display

Kevin Davison kevin at quevin.com
Sat Jul 3 17:28:08 UTC 2010


Thanks, Malcolm. I've been looking for something like this for Quevin.com (instead of my Flash movie).

I recently used jCarousel (http://drupal.org/project/jcarousel) and themed my View's (block) style output:

<div id="oxygencarousel">
	<ul>
<?php foreach ($rows as $id => $row): ?>
		<li>
<?php print $row; ?>
		</li>
<?php endforeach; ?>
	</ul>
<div class="jcarousel-control"><a href="#">7</a> <a href="#">4</a> <a href="#" class="active">1</a></div>	
</div>

// Probably a better way to automate the controls here, but there are always going to be three sets of three (9 items).

<?php
	jcarousel_add('#oxygencarousel', array('horizontal' => TRUE));
	drupal_add_js('sites/all/themes/oxygencloud/js/jquery-script.js', 'theme');
?>

------ in jquery-script.js ------

//this function creates the control links and binds them
function mycarousel_initCallback(carousel) {
    // now bind the controls
    jQuery('.jcarousel-control a').bind('click', function() {
        carousel.scroll(jQuery.jcarousel.intval(jQuery(this).text()));
        $('.jcarousel-control a.active').removeClass('active');
        $(this).addClass('active');
        return false;
    });
};
//create the jCarousel on the #mycarousel element with the initCallback above
jQuery(document).ready(function() {
    jQuery("#oxygencarousel").jcarousel({
        initCallback: mycarousel_initCallback,
    });
});

Screenshot: http://dl.dropbox.com/u/78541/themed-jCarousel.png

Kevin

--- 

Quevin, LLC
 Quevin.com
 twitter.com/Quevin
 linkedin.com/in/quevin

Phone/SMS: (415) 742-1086

Personalized Web Design, Development &
Drupal CMS/Blog Specialization
In the San Francisco Bay Area

    __o
 _`\<,_
(*)/ (*)


On Jul 3, 2010, at 01:12 AM, malcolm van delst wrote:

> Here's a comparison of Drupal slideshows: http://drupal.org/node/418616.
> 
> I recently used this one: http://drupal.org/project/fpss, after 
> reviewing the offerings in the above list. The 22 euros seemed worth it, 
> considering the time I would have spent making the ones above look good.
> 
> Cheers!
> 
> malcolm
> 
> 
> 
> On 03/07/10 12:59 AM, Lee Rowlands wrote:
>> Hi, have a look at views_slideshow, you need a view to do the db stuff but
>> this module provides a plugin for the scrolling display
>> 
>> -----Original Message-----
>> From: themes-bounces at drupal.org [mailto:themes-bounces at drupal.org] On Behalf
>> Of Roger
>> Sent: Saturday, 3 July 2010 4:59 PM
>> To: themes at drupal.org
>> Subject: [themes] Timed image and text display
>> 
>> Hi all.
>> I really need to display a number of images of the same dimensions on the
>> main page, each image should remain for n seconds then be replaced by
>> another from the database.
>> 
>> I also need to display some text over the image and change that every n
>> seconds.
>> Is there a module that permits display of images sequentially or selected at
>> random from the database?
>> Is there a module that permits timed text quotes on a page?, once again
>> random or sequential.
>> 
>> Failing this can someone point me to some php code that I could modify for
>> the above.
>> It's years since I used php so the whole thing is a significant learning
>> curve.
>> 
>> Many thanks
>> Roger
>> 
>> 
>> _______________________________________________
>> themes mailing list
>> themes at drupal.org
>> http://lists.drupal.org/mailman/listinfo/themes
>> 
>> _______________________________________________
>> themes mailing list
>> themes at drupal.org
>> http://lists.drupal.org/mailman/listinfo/themes
>> 
> 
> -- 
> Malcolm van Delst
> 1-604-872-6267
> skype: malcolm.8
> twitter: weCutelab
> http://www.cutelab.com
> 
> _______________________________________________
> themes mailing list
> themes at drupal.org
> http://lists.drupal.org/mailman/listinfo/themes



More information about the themes mailing list