• I created a little plugin in order to display a flash animation (book.swf) in pages.
    It is based on a filter on “the_content”.

    Everything works in a page. Here is an exemple: http://blog.artwo.fr/wp/books

    When I create a subpage, all is freezed (IE or firefox). Here is an example: http://blog.artwo.fr/books/san-francisco

    The source code is exactly the same. If I take the same page but without parent page, it displays well.

    If I take the source code and put it in a html file, it displays well.

    Here is the filter:

    function wp_books_filter($content) {
    	global $wpdb;
    	$plugin_path = get_settings('siteurl') ."/wp-content/plugins/wp_books/";
    	$wp_books_flash_script = $plugin_path . 'swf/book.swf';
    
    	if (eregi ("<!--WP_Books (:alnum:+) -->",$content,$reg)){
    	$wp_books_xml_album = $plugin_path.'xml/'.$reg[1].'.xml';
    	$wp_books_html='<div id="book" style="height:600px;">
    
    	<object id="album" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="100%" height="100%">
    				<param name="movie" value="' . $wp_books_flash_script . '" />
    				<param name="menu" value="false" />
                    <param name="quality" value="high" />
    				<param name="wmode" value="transparent" />
    				<param name="flashvars" value="xmlFile=' . $wp_books_xml_album . '" />
            			<!--[if !IE]>-->
    				<object type="application/x-shockwave-flash" data="' . $wp_books_flash_script . '" width="100%" height="100%">
    				<param name="menu" value="false" />
                    <param name="quality" value="high" />
    				<param name="wmode" value="transparent" />
    				<param name="flashvars" value="xmlFile=' . $wp_books_xml_album . '" />
    				<!--<![endif]-->
    		<h4>Books</h4>
    		<p>Get <a href="http://adobe.com/go/getflashplayer">Flash player</a>.</p>
    				<!--[if !IE]>-->
    				</object>
    				<!--<![endif]-->
    			</object>
    		</div>
    	';
    	$content = eregi_replace("<!--WP_Books (:alnum:+) -->", $wp_books_html, $content );
    
    	}
    	return $content;
    	}

Viewing 1 replies (of 1 total)
  • Thread Starter jcm

    (@jcm)

    I think it was a function whoch in conflct. I’m not sure, but now it works

Viewing 1 replies (of 1 total)

The topic ‘[WP2.3.3] flash doesn’t display in subpages’ is closed to new replies.