ThemeShaper Forums » Thematic

[closed]

Insert a Flash SlideShow on the Front Page: the most efficient way?

(3 posts)
  • Started 4 years ago by Baudesign
  • Latest reply from Baudesign
  • This topic is not resolved
  1. Baudesign
    Member

    Hi everyone,

    I am building a child theme that needs to have a large slideshow on the front page. Based on kimili's plugin, I embedded a flash movie (.swf) like so, in my function.php file:

    // Ça y est, on place le diaporama en page d'accueil, basé sur le plugin Kimili
    function my_slideshow() {
    	if (is_front_page()) {
    	$content = '<div id="slideshow">';
    	$content .= '[kml_flashembed publishmethod="static" fversion="8.0.0" movie="http://www.mulibwanji.com/ma/wp-content/themes/ma/media/test.swf" width="940" height="528" targetclass="flashmovie"]
    					<a href="http://adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a>
    					[/kml_flashembed]';
    	$content .= '</div>';
    	echo do_shortcode($content);
    		}
    	}
    	add_action('thematic_belowheader', 'my_slideshow');

    It actually works fine.

    But the response time seems to be a bit long, probably du to PHP parsing. Would there be another and more efficient way to do so?

    Thanks

    Pat

    By the way, if you want to have an idea, look here temporally: http://www.mulibwanji.com/ma/

    Posted 4 years ago #
  2. Hi Pat,

    open the sourceview of your browser and copy the code created by the plugin. Paste this code into your function. This should work faster.

    Chris

    Posted 4 years ago #
  3. Baudesign
    Member

    @ Chris,

    Yea, this makes sense. You save a couple of milliseconds of PHP parsing that way. I should have thought about this one. ;-)

    Posted 4 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.