Plugin Directory

Changeset 611186


Ignore:
Timestamp:
10/11/2012 11:15:37 PM (13 years ago)
Author:
CodeAndReload
Message:
 
Location:
swfobject-reloaded
Files:
10 added
1 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • swfobject-reloaded/trunk/readme.txt

    r412851 r611186  
    33Donate link: http://www.codeandreload.com/wp-plugins/swfobjectreloaded#donate 
    44Tags: media, swf, animation, flash, flex, javascript, embed, insert, media-button, shortcode, upload 
    5 Requires at least: 2.9 
    6 Tested up to: 3.0.1 
    7 Stable tag: 1.5 
     5Requires at least: 2.9
     6Tested up to: 3.4.2
     7License: GPLv2 or later
     8License URI: http://www.gnu.org/licenses/gpl-2.0.html
     9Stable tag: 1.6 
    810
    911
     
    6971>>Another simple example using an external URL.  Note that the width and height parameters *should* be specified.
    7072
    71 >    `[swfobject]http://www.example.com/test2.swf,250,120,foo:"bar",http://www.example.com/[/swfobject]`
    72 >>    This example uses an external URL, and includes the width, height, flashvar (foo:"bar") and base
     73>    `[swfobject]http://www.example.com/test2.swf,250,120,foo:"bar"|bar:"baz",http://www.example.com/[/swfobject]`
     74>>    This example uses an external URL, and includes the width, height, flashvar (foo:"bar" and bar:"baz") and base
    7375(http://www.example.com/) parameters.
     76
     77    Flashvars are separated by a delimiter that cannot be a comma. You can change the delimiter by passing a delimiter attribute.
     78    `[swfobject delimiter='&']12,,,foo:"bar"&bar:"baz"[/swfobject]`
     79
     80
     81= What if I only want to display a link to the attachment page? =
     82
     83Use the `swflink` shortcode in the form of `[swflink]ID[/swflink]`.
     84For example `[swflink]573[/swflink]`
    7485
    7586
     
    1191301. This is the media upload screen showing the new fields added by **swfObject Reloaded** for Width, Height and
    120131SWF Version.
    121 2. This is the swfobjects settings added to the Settings->Media menu.
     1322. This is the swfObject's settings added to the Settings->Media menu.
    122133
    123134
     
    147158= 1.5 = 
    148159* Fixed an error that occurred in certain version of IE. Fixed the way the shortcode appears in the feed, it now appears at the top of the article in the feed. Removed break tags from being displayed before the swf.
     160= 1.6 = 
     161* Added better support for flashvars with the ability to set your own delimiter, added the [swflink] shortcode for linking to an attachment page instead of embedding flash content. Fixed and error that was causing flashvars to not be used.
    149162
    150163
  • swfobject-reloaded/trunk/wp_swf_object.php

    r412851 r611186  
    66Description: This plugin allows easy embedding of swf files and better media management for swf files, allowing swf files to have a height, width, and their own minimum flash version.  This plugin adds a swfobject shortcode that can be inserted via the "Add media" button while editing a post.  SWF files are now also automatically embedded on their respective attachment pages.
    77Author: Robert Wise
    8 Version: 1.5
     8Version: 1.6
    99Author URI: http://www.codeandreload.com
    1010*/
  • swfobject-reloaded/trunk/wp_swf_shortcode.php

    r412851 r611186  
    22
    33    // attach our function to the correct hook
    4     add_shortcode('swfobject', 'mc_swf_shortcode');     
     4    add_shortcode('swfobject', 'mc_swf_shortcode');
     5    add_shortcode('swflink', 'mc_swf_link');   
    56    add_filter("attachment_fields_to_edit", "mc_image_attachment_fields_to_edit", null, 2);
    67    add_filter("attachment_fields_to_save", "mc_image_attachment_fields_to_save", null, 2);
    78    add_filter('media_send_to_editor', 'send_swf_to_editor', 10, 3);   
    8 //  add_filter( "the_content_feed", "mc_feed_content" );
    9 //  add_filter('the_excerpt_rss', 'mc_feed_content');
     9    //  add_filter('the_excerpt_rss', 'mc_feed_content');
    1010    add_filter( "the_content", "mc_content", -9999999999999999999 );
    1111
     
    120120    global $post;
    121121    $swf_instance++;
     122   
     123    if (trim($atts["delimiter"])){
     124        $delim = trim($atts["delimiter"]);
     125    } else {
     126        $delim = "|";
     127    }
    122128
    123129    // strings to use the option API.
     
    267273        $sw .= ', "' . trim($flash_ver ) . '"';
    268274        /// flashvars
    269         $sw .= ', {' . trim($content[3] ) . '}';
     275        $sw .= ', "" ';     
     276        $sw .= ', {' . str_replace($delim, ", ", trim($content[3] )) . '}';
    270277        /// base
    271278        $mc_are_global_params = get_option('mc_params_setting_name');
     
    285292}
    286293
     294function mc_swf_link($atts,$content = null ){
     295    if (is_int($content) || ctype_digit($content) && trim(get_post_mime_type($content))){
     296        return "<a href='".get_permalink( $content )."' rel='attachment wp-att-$content'>".apply_filters( 'the_title',get_the_title($content), $content)."</a>";
     297    }
     298}
     299
    287300function mc_strip_swf_basetag($inp) {   
    288301
Note: See TracChangeset for help on using the changeset viewer.