newsjunk
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Adding embed rules for non-oEmbed ZippyshareIs 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'); ?>Forum: Fixing WordPress
In reply to: Adding embed rules for non-oEmbed ZippyshareAh, 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'); ?>Forum: Fixing WordPress
In reply to: Read more tag bug causes loading error single.phpTags with a space is also not working, it gives a error 404. More ideas?
Forum: Fixing WordPress
In reply to: Comment meta code displays above comment columnResolved. This plugin is the badass.
Forum: Fixing WordPress
In reply to: WordPress upload folder outside the domainFor 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?