• Resolved nosferatuscoffin

    (@nosferatuscoffin)


    Hello,

    I have another issue, this time with the plugin using external templates.

    On another site, I am using version 2.5.1, and the Home page is an external template. The template queries the database and outputs the thumbnails and link to the FLV file based on what the playlist id is.

    Unfortunately, whenever an external template is used to call the plugin tag via the [flash medium=FLASHVARS] call, it will just output that text (e.g. [flash medium=15]) on the page and not call the plugin correctly.

    It seems that the plugin call can only be used within the admin page/post editor, otherwise the call to the plugin is ignored and jsut the plugin call text is displayed.

    Do you know of a way around this, such as having the plugin be called using carrots “<>” instead of brackets “[]” or does the plugin not support external templates?

    Thanks!

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter nosferatuscoffin

    (@nosferatuscoffin)

    I should probably amend the above.

    Using a plugin like Include-It allows you to import the PHP portion of the code would call the plugin. And it works when using the theme’s default template. However, if you use an external page template as this site needs to (since the page that the flash content is to play uses a different layout then the theme’s default), it will ignore the [flash] code and treat it as straight text.

    I don’t really know what you mean by “external template”.

    If you try to embed a flash file by writing “[flash …]” directly into the template files: It won’t work because pb-embedFlash “hacks” into the WordPress filters like “the_content” and “the_excerpt”. It is not designed to consider template files as of WordPress does. (The WordPress “engine” outputs “the_content” etc.).

    But there is a slightly similar way: <?php echo pb_embedFlash_plugin('[flash ...]'); ?>. This code should work in templates and anywhere else if the function is available yet (‘plugins_loaded’).

    Thread Starter nosferatuscoffin

    (@nosferatuscoffin)

    Hi Pasber,

    Thanks for the tip. That worked and the video is playing fine in the external template file now.

    Funny thing, I had tried every trick, including using the Include-it and EXEC-PHP plugins to have the template run the PHP code, but to no avail.

    The key was using the “embedFlash_plugin(” call before the “[flash]” call.

    Thanks so much for getting back to me on this issue so quickly. It is very much appreciated.

    As always: np.

    p.s.: There is a “This topic is” -> “resolved / not resolved” dropdown list in the right sidebar. Would be helpful if this topic would be marked as a solved one. But: only doable by the topic starter… :/

    p.p.s.: This is a safer way of including the function, because the code above gives an php error if the plugin was deactivated.

    <?php
    if(function_exists('pb_embedFlash_plugin'))
    {
    	echo pb_embedFlash_plugin('[flash ...]');
    }
    ?>
    Thread Starter nosferatuscoffin

    (@nosferatuscoffin)

    Right. I was originally going use that, as I do with the WP-Print and WP-Email plugins. I just wanted to be sure that the raw function call worked properly.

    Thanks. again.

    Hi, I am hoping someone can give me some guidance! I am running WP 2.6.3 and I just downloaded pb-embedflash. I have a flash banner that’s going to be running on my home page and I stupidly thought that I could just embed the object like I do with regular html! Whoops!

    So now that I have the plug-in installed, I didn’t change any of the default settings for the plug-in (want to insert as an object still).

    In the pb-embedflash toolbar, I added the url of my flash piece to my medium – not sure if I had to do that but thought it couldn’t hurt. Now I am pasting the following code into my index.php:

    <?php
    if(function_exists('pb_embedFlash_plugin'))
    {
    	echo pb_embedFlash_plugin('[flash https://www.scarlettpromotions.com/ILR/wp-content/themes/delight/img/flash/HomePageBanner3.swf]');
    }
    ?>

    And nothing happens, just a blank box.

    I tried inserting this code directly into the header but it didn’t work at all. Any help would be so appreciated!!

    Thanks, Kari

    Well… what about the width w= and the height h=?

    hey scarlettpromotions did you solve your problem??

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: pb-embedFlash] Extermal Template Problem’ is closed to new replies.