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.
This is made possible by a script found at www.alistapart.com called rotate.php.
Procedure:
- Create a directory under the web server's document root. I placed it under my theme's directory.
- Populate that directory with images.
- Download script and put it in a nice resting place.
- 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.
- Under your theme's config, for custom logo, instead of a path to an image use the path to the script.
- You're done.
Comments
Added swfs and called from theme code
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:
is not enough to add the line in rotate.php?
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...
doesnt work
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
answer
paste code to your page.tpl i sure your problem has solved
@import "print $language->language " xml:lang="
print $language->language
">print $head_title
print $head
print $styles
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); ">
print base_path() . path_to_theme() /images/bg2.jpg" alt="" />
print base_path() . path_to_theme() /images/primary.jpg" alt="" />
print base_path() . path_to_theme() /images/search_box.jpg" alt="" />
print base_path() . path_to_theme() /images/top_bar.jpg" alt="" />
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 (!($user->uid)) { print login_register_links(); } else { echo admire_grunge_welcome_user(); }
if ($logo) {
print t('Home')
"> print $logo " alt="print t('Home')
" />}
if($site_name || $site_slogan) {
if ($site_name) {
print $base_path " title="
print t('Home')
">print $site_name
}
if ($site_slogan) {
print $site_slogan
}
}
if ($search_box){
print $search_box;
}
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) {
print $sidebar_first ;
}
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 ;
}
}
print $footer_message
All Rights reserved Logimindz Technologies, Disclaimer.
print $footer
print base_path() . path_to_theme() /images/comment_hanger.gif" alt=""/>
print base_path() . path_to_theme() /images/comment_paper.jpg" alt="" />
print base_path() . path_to_theme() /images/comment_paper_bottom.jpg" alt="" />
print base_path() . path_to_theme() /images/comment_paper_top.jpg" alt="" />
print base_path() . path_to_theme() /images/content_block_bg.jpg" alt="" />
print base_path() . path_to_theme() /images/content_block_top.jpg" alt="" />
print base_path() . path_to_theme() /images/left.jpg" alt="" />
print base_path() . path_to_theme() /images/right_top.jpg" alt="" />
print $closure