Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter newsjunk

    (@newsjunk)

    Is it allowed to use just twice ([\d]+) or must I close the latest match with the (.+?) ?

    <?php
    function wp_embed_handler_zippyshare( $matches, $attr, $url, $rawattr ) {
    
    	$embed = sprintf(
    			'<script type="text/javascript">var zippywww="%1$s";var zippyfile="%2$s";var zippydown="ffffff";var zippyfront="000000";var zippyback="ffffff";var zippylight="000000";var zippywidth=365;var zippyauto=false;var zippyvol=80;</script><script type="text/javascript" src="http://api.zippyshare.com/api/embed.js"></script>',
    			esc_attr($matches[1]),
    			esc_attr($matches[2])
    			);
    
    	return apply_filters( 'embed_zippyshare', $embed, $matches, $attr, $url, $rawattr );
    }
    ?>
    
    <?php
    function register_embed_handlers() {
    	wp_embed_register_handler( 'zippyshare', '#http://([\d]+)\.zippyshare\.com/v/(.+?)/file\.html($|&)#i', 'wp_embed_handler_zippyshare' );
    }
    add_action('wp', 'register_embed_handlers');
    ?>
    Thread Starter newsjunk

    (@newsjunk)

    Ah, found some wrong things… This is my current code, but, still does nothing:

    <?php
    function wp_embed_handler_zippyshare( $matches, $attr, $url, $rawattr ) {
    
    	$embed = sprintf(
    			'<script type="text/javascript">var zippywww="%1$s";var zippyfile="%2$s";var zippydown="ffffff";var zippyfront="000000";var zippyback="ffffff";var zippylight="000000";var zippywidth=365;var zippyauto=false;var zippyvol=80;</script><script type="text/javascript" src="http://api.zippyshare.com/api/embed.js"></script>',
    			esc_attr($matches[1]),
    			esc_attr($matches[2])
    			);
    
    	return apply_filters( 'embed_zippyshare', $embed, $matches, $attr, $url, $rawattr );
    }
    ?>
    
    <?php
    function register_embed_handlers() {
    	wp_embed_register_handler( 'zippyshare', '#http://([\d]+)\.zippyshare\.com/v/([\d]+)/file\.html', 'wp_embed_handler_zippyshare' );
    }
    add_action('wp', 'register_embed_handlers');
    ?>

    Thread Starter newsjunk

    (@newsjunk)

    Tags with a space is also not working, it gives a error 404. More ideas?

    Thread Starter newsjunk

    (@newsjunk)

    Resolved. This plugin is the badass.

    Thread Starter newsjunk

    (@newsjunk)

    For sure you can upload to domain1, and ftp the file with a php script to domain2. That means you need to upload to machine1 first, before the script can move the file into machine2. This is the only comparable information I could find online.

    The plugin should upload like normally, than move the new file to machine2 with ftp_connect,_login,_alloc,_mk_dir and _nb_put, than change the wordpress domain name to domain2.

    I think I can write this plugin by my own, but maybe there are better ideas or there already might be a good solution.

    Maybe this topics could be better placed into the plugin forum section?

Viewing 5 replies - 1 through 5 (of 5 total)