SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Member
    Join Date
    Nov 2008
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Difficulty with .swfs in Wordpress

    Hey everyone. I've searched high and low for an answer to my problem without any luck so I greatly appreciate any help provided.

    I have a flash ticker that displays final scores from sports games placed into the header of my Wordpress blog (finaltimeout.com).

    Everything works beautiful, until you try and visit a link on the second level (i.e. finaltimeout.com/category/postname). The code for the flash ticker simply just does not show up past the first level and throws off the position of my navigation links.

    I have tried placing the .swf file in different places such as in the root and in wp-content and changing the code to link to it there, but to no avail.

    I really wanted the sports scores on the site, so I switched back to the hideous default permalink structure, which has also killed my SEO (alexa rank has tanked nearly 5,000,000 spots haha).

    So once again any help on this is greatly appreciated. Thanks!

  2. #2
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,183
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    Hi Furious B, welcome to the forums.
    It looks like you have the code in your themes header file. But from the plugin's FAQ page http://mac-dev.net/blog/frequently-asked-questions/
    Q: Can I add the video player to my WordPress template file?

    A: No. Because of the nature of WordPress plugins, they have to be part of a blog post and won’t.

  3. #3
    SitePoint Member
    Join Date
    Nov 2008
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey Mittineague, thanks for the reply.

    That is interesting to know as I am trying to learn as much as possible about the quirks of using wordpress and flash together, but the thing is that I'm not using any plugin to display the score ticker. I just had dreamweaver generate the code for the embedded flash object and then placed that code into its own div in the header and styled it to position it where it is above the main navigation. It shows up on the domain root. It shows up on a first level link (i.e. finaltimeout.com/page1). But on a second level link (i.e. finaltimeout.com/page1/post1) it fails to appear thus throwing off the navigation's position in the bar.

    Does anyone know why it does this? If it helps, I'm running WP 2.5.

    Hmm, the more I think about it the more I probably should've posted this thread in like flash or something haha...my bad.

  4. #4
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,183
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    If you are not using the plugin, it looks like you're using it's swfobject.js file.
    HTML Code:
    <script type="text/javascript" 
    src="http://www.finaltimeout.com/wp-content/plugins/flash-video-player/swfobject.js">
    </script>
    It may be that the plugin's version of the file is customized to work as a plugin (uses hooks that correct for permalink differences).
    Maybe if you tried a more generic version of the swfobject.js file?

    http://wordpress.org/extend/plugins/flash-video-player/ As the plugin uses
    the leading open source software (Jeroen Wijering's FLV Player and Geoff Stearns' SWFObject Javascript Library).
    if you aren't using the plugin file as a plugin, why not try the original files it uses? Or maybe there's another plugin that can be used in the template that you could use as a plugin without needing to hack the header.php file or mess with the permalinks?
    Maybe the "Kimili Flash Embed" plugin. http://kimili.com/plugins/kml_flashembed
    I’d like to use KFE to put a Flash header in my Wordpress site. How do I do it?

    Unfortunately, the way Wordpress processes the plugin doesn’t allow you to use a kml_flashembed tag in your page templates. It only works in article posts. Not any more. Starting with KFE version 1.1, you can put a kml_flashembed tag anywhere on your site. Posts, page templates, in headers, on sidebars—anywhere.

  5. #5
    SitePoint Member
    Join Date
    Nov 2008
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks again for the help Mittineague,

    This could be a head scratcher though:

    I installed the Kimili plugin and put in the necessary code into the header. I then switched back to my %category%/%postname% structure and success! the .swf loaded on all pages.

    But as you can see, my swf ticker relies on loading an RSS feed cross-domain. The swf loads an xml, which loads a php, which finally loads the RSS feed from the other domain (necessary workaround for flash to load an RSS feed outside the domain). The feed loads just fine on the homepage. But if you click on a category or a post, the ticker fails to load the RSS feed. All the paths from swf to xml to php to feed are absolute so needless to say I am confounded.

    Cheers

  6. #6
    SitePoint Member
    Join Date
    Nov 2008
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nevermind Mittineague, it appears to be working now!

    Many thanks for the assistance.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •