This is made possible by a script found at www.alistapart.com called rotate.php.

Procedure:

  1. Create a directory under the web server's document root. I placed it under my theme's directory.
  2. Populate that directory with images.
  3. Download script and put it in a nice resting place.
  4. Edit script so it can find your image directory. To avoid editing you can just place the script in the same directory as the images.
  5. Under your theme's config, for custom logo, instead of a path to an image use the path to the script.
  6. You're done.

Comments

carole’s picture

I love this code, thank you. It worked quickly & easily. I also added this line to the php to enable rotating swfs:

$extList['swf'] = 'application/x-shockwave-flash';

I called it from my theme page.tpl.php as follows:

  <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="263" height="150" align="top" title="fluidit solutions videos">
		 <param name="movie" value="<?php print $front_page . $directory; ?>/videos/rotate.php">
    <param name="quality" value="high"><param name="LOOP" value="false">
    <embed src="<?php print $front_page . $directory; ?>/videos/rotate.php" width="263" height="150" loop="false" align="top" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>
  </object>
 
ericking’s picture

i tried to doing like this but it didnt work..

I am not an expert with the code, so do you think your code could work for me? of course changiung some paths...

peterulf’s picture

Do I have to enable something else?

I put images and script in same folder, but no images show up.

Just found the answer

http://drupal.org/node/641914

ajit_kumar’s picture

paste code to your page.tpl i sure your problem has solved


print $language->language " xml:lang=" print $language->language ">


print $head_title
print $head
print $styles

@import " print base_path() . path_to_theme() /master_reset.css";
print $scripts /* Needed to avoid Flash of Unstyle Content in IE */


print $body_classes; print ' mainbody'; print get_sidebar_state($sidebar_first, $sidebar_last, $right_dark); ">

Only local images are allowed. print base_path() . path_to_theme() /images/bg2.jpg" alt=""/>
Only local images are allowed. print base_path() . path_to_theme() /images/bg2.jpg" alt="" />
Only local images are allowed. print base_path() . path_to_theme() /images/primary.jpg" alt="" />
Only local images are allowed. print base_path() . path_to_theme() /images/search_box.jpg" alt="" />
Only local images are allowed. print base_path() . path_to_theme() /images/top_bar.jpg" alt="" />
Only local images are allowed. print base_path() . path_to_theme() /images/footer_wood.jpg" alt="" />
if (isset($secondary_links)) :
print theme('links', $secondary_links, array('class' => 'links secondary-links'))
endif;

if (isset($primary_links)) :

print menu_tree($menu_name = variable_get('menu_primary_links_source', 'primary-links'));

endif;

if($main_banner){

print $main_banner;

}

if($sidebar_first) {

Only local images are allowed. print base_path() . path_to_theme() /images/left_top.jpg" alt=""/>
print $sidebar_first ;
Only local images are allowed. print base_path() . path_to_theme() /images/left_bottom.png" alt=""/>

}

if($above_content_ad){

print $above_content_ad;

}

if($content_top) {

print $content_top;

}
if ($mission): print '<div id="mission">'. $mission .'</div>'; endif;

if($breadcrumb){ print $breadcrumb }
if($title){
print $title

}
if($tabs){

print $tabs

}
if ($show_messages) { print $messages; }
if($help){ print $help }
print $content;
print $feed_icons

if($content_bottom) {

print $content_bottom;

}

if($right_dark || $sidebar_last) {

if($right_dark){
print $right_dark ;

}

if($right_ad){

print $right_ad;

}

if($sidebar_last){

print $sidebar_last ;

}

}


Only local images are allowed. print base_path() . path_to_theme() /images/comment_form_mat.gif" alt="" />
Only local images are allowed. print base_path() . path_to_theme() /images/comment_hanger.gif" alt=""/>
Only local images are allowed. print base_path() . path_to_theme() /images/comment_paper.jpg" alt="" />
Only local images are allowed. print base_path() . path_to_theme() /images/comment_paper_bottom.jpg" alt="" />
Only local images are allowed. print base_path() . path_to_theme() /images/comment_paper_top.jpg" alt="" />
Only local images are allowed. print base_path() . path_to_theme() /images/content_block_bg.jpg" alt="" />
Only local images are allowed. print base_path() . path_to_theme() /images/content_block_top.jpg" alt="" />
Only local images are allowed. print base_path() . path_to_theme() /images/left.jpg" alt="" />
Only local images are allowed. print base_path() . path_to_theme() /images/right_top.jpg" alt="" />

print $closure