WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How to embed FLV or SWF without a plugin for CMS site (8 posts)

  1. jupiter76
    Member
    Posted 4 years ago #

    Hello. Is it possible to embed a flash flv or swf file into wordpress without the use of a plugin? I am building a CMS website for a client that will feature flv or swf files of animation clips. Since the majority of plugins are not for commercial use, I need a solution that will not use a plugin. I am able to do this on a non-wordpress site just fine, so I'm sure I could handle learning to do this on wordpress site without plugins. A google search and search of these forums has turned up nothing though. Can anyone tell me or point me to some online documentation regarding how to embed flash into wordpress without plugins?

    Thanks, I appreciate any help!

  2. Jonas Grumby
    Member
    Posted 4 years ago #

    Are you sure that they all specify non-commercial use?

    http://wordpress.org/extend/plugins/search.php?q=flv+player

    I have used the ZD YouTube FLV Player which despite its name plays self-hosted FLV files and not just files on YouTube. Works well and I don't see anything about it being for non-commercial use.

  3. jupiter76
    Member
    Posted 4 years ago #

    Well, a lot of them did specify it. I suppose I could use one that doesn't and hope it doesn't have support issues in the future, but since this is for a client, I would love to know if I can do without a plugin. I'm really curious if including flvs or swfs into wordpress is possible without a plugin. I'm up for the challenge of programming it, but I just need to pointed in the right direction, or to some online tutorial or documentation.

  4. Jonas Grumby
    Member
    Posted 4 years ago #

    Pretty much any script that can be used on a static page can be called in on a WordPress template. You can also often use a WP plugin on a static page by inserting the calls to the script(s) in your <head> section.

  5. jupiter76
    Member
    Posted 4 years ago #

    Unfortunately, this hasn't been working for me. I have a feeling I am doing something wrong with the coding - because there must be a different way of calling the scripts (for php in WordPress, rather than html code), and making them load so that the flv or swf shows up on the page. I am working on the site locally through MAMP, and I'm unsure if my paths to the files have to be altered from the html paths so that WordPress will find them. I was just hoping there would be some documentation or a tutorial online that would give a how to do it without using a plugin. I have to imagine I'm not the only one to ever try this before.

  6. Jonas Grumby
    Member
    Posted 4 years ago #

    You can either put your script directly in the <head> section of your theme's header.php or you can use a php include or javascript include. Sometimes the include method is preferable, especially if you only need the script to be used on specific pages. You can use Conditional Tags to include the script on only those pages.

    There is no tutorial because there is no way to come up with a standard method that will work for every script in the world.

  7. jupiter76
    Member
    Posted 4 years ago #

    Hey thanks, SS Minnow. I think I finally got this working, by using absolute paths instead of local paths in the object tags. I also used

    <script type="text/javascript" src="<?php bloginfo("template_url"); ?>/scripts/swfobject_modified.js"></script>
    to include the javascript in the header.php. I may try to do it your way though with php include and conditional tags, because I won't want this script called on every page.

    I've got this annoying white space above and below the flv though, which I've got to figure out how to get rid of.

  8. cynthusia
    Member
    Posted 4 years ago #

    I am having a 3 pixel issue. It only happens in FF, and only when using a flash embed plugin.

    when i test with a same-sized placeholder image, it doesn't produce the 3 pixel gap at the bottom.

    i had the problem in my initial plain html dev site too with a typical swf embed chunk of code, and i solved the problem by wrapping the embed tag in an un-styled div tag. But since i'm having to use a plugin for WP, wrapping a div around the code isn't doing anything.

    this is the plugin i'm using, but i don't really think it's the culprit:

    http://kimili.com/plugins/kml_flashembed

Topic Closed

This topic has been closed to new replies.

About this Topic