Per Søderlind
Forum Replies Created
-
Forum: Plugins
In reply to: [WP2Cloud] Wish: ClouSE Import pluginI wrote a hack and ran it in debug bar console (did a backup of my database first (!!)):
<?php $myposts = $wpdb->get_results("SELECT ID, post_content FROM $wpdb->posts WHERE post_status = 'publish' AND post_type='post'"); foreach ($myposts as $mypost) { if(preg_match_all('#(https?:\/\/[\d\w\-\.\/]+\.(?:jpe?g|gif|png)(?!\.))#', $mypost->post_content, $matches)) { $urls = $matches[0]; foreach($urls as $url) { $parts = parse_url($url); $filename = basename($parts['path']); $wsql = "SELECT id,name FROM " . $wpdb->prefix . "cloud_media_content WHERE name = '" . $filename . "'" $wblb = $wpdb->get_row($wsql); if (isset($wblb->id) && isset($wblb->name)) { $newurl = sprintf("/wp-content/plugins/wp2cloud-wordpress-to-cloud/wp2cloud.php?weblob_id=%s/%s",$wblb->id,$wblb->name); $sql = $wpdb->prepare( "UPDATE $wpdb->posts SET post_content = REPLACE (post_content, '%s','%s') WHERE ID = %s", $url,$newurl,$mypost->ID ); $wpdb->query($sql); } } } } $wpdb->flush();The code above (not supported, you run it on your own risk) will find all image urls and convert them to the correct wp2cloud format after a wordpress import (Tools->Import)
Forum: Plugins
In reply to: [WP2Cloud] $wpdb->cloud_media_contentNo, you right .. using
$wpdb->prefix . "cloud_media_content"is fine, sorry it’s a bit late 🙂Forum: Plugins
In reply to: [WP2Cloud] Wish2: Add Cache-Control max-ageHere’s the result from tools.pingdom.com: http://screencast.com/t/jG5MOhNAn1yH
Forum: Plugins
In reply to: [WP2Cloud] Wish2: Add Cache-Control max-ageHi Artem,
I’m planing to move my site to aws. I’ve have a test site at http://aws.soderlind.no/ built on your linux + mysql instance (not the yapixx instance) where I’ve added apc, php-fpm, nginx (with fastcgi cache and the purge cache module) and wordpress with the nginx, wp2cloud and w3 total cache plugins. I monitor the site using new relic.
Content is distributed using cloudfront (cdn01 = wblob, cdn02 = js, css + etc ) and cloudflare.
Tuning for speed, gtmatrix and pingdom complains that the wblob files should have a expiration time ( Cache-Control max-age: “one week or more”). w3 total cache sets the expiration time for the files on cdn02 but not for the image files in cdn01.
Br,
PerSForum: Plugins
In reply to: [WP Plugin Repo Stats] A wishThank you, override fixed it: http://soderlind.no/projects/
Forum: Plugins
In reply to: [WP Plugin Repo Stats] A wish.wpprs-top, .wpprs-body h3 { display: none; }Forum: Plugins
In reply to: [WP Plugin Repo Stats] A wishI tried to override the css by adding the style to my child theme css, but wp_plugin_repo_stats.css?ver=0.0.1 loads after my style.css
Forum: Plugins
In reply to: [SimpleModal Janrain Engage] Missing CSS fileThanks for pointing this out. I’ll remove the reference to loadmask in the next version
Love you plugin. In the next version, please add i18n 🙂
Thanks 🙂
Forum: Plugins
In reply to: [SimpleModal Login] [Plugin: SimpleModal Login] ErrorI’m the one you should bug 🙂
Problems with SimpleModal Janrain Engage usually occurs when the requirements are not met. Please see the requirements section at http://soderlind.no/archives/2010/12/03/simplemodal-janrain-engage/
If this doesn’t solve your problem, please post a comment at http://soderlind.no/archives/2010/12/03/simplemodal-janrain-engage/ and I’ll do my best to help you
Forum: Plugins
In reply to: [Janrain Social Login] [Plugin: Janrain Engage] 1.0.1b Fails to save api keyIt works now, and the second bullet above .. *blush* .. I entered the application id instead of the api key
Forum: Plugins
In reply to: [SimpleModal Login] [Plugin: SimpleModal Login] Connect with FacebookIt’s out now, you’ll find it at http://wordpress.org/extend/plugins/simplemodal-janrain-engage/
Forum: Fixing WordPress
In reply to: get_children in draft postAlmost there:
// from wp-admin/includes/media.php:get_media_items( $post_id, $errors ) if ( $post_id ) { $post = get_post($post_id); if ( $post && $post->post_type == 'attachment' ) $attachments = array($post->ID => $post); else $attachments = get_children( array( 'post_parent' => $post_id, 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => 'menu_order ASC, ID', 'order' => 'DESC') ); } else { if ( is_array($GLOBALS['wp_the_query']->posts) ) foreach ( $GLOBALS['wp_the_query']->posts as $attachment ) $attachments[$attachment->ID] = $attachment; } $link = array(); foreach ( (array) $attachments as $id => $attachment ) { if ( $attachment->post_status == 'trash' ) continue; $link[] = $id; }this works for draft post if I upload and add an image to the post, but it doesn’t work if I select an existing image from the image library and add it to the post.
Forum: Plugins
In reply to: WordPress Plugin Template CreatorThe plugin creator is done and the plugin template is explained at: http://soderlind.no/archives/2010/03/04/wordpress-plugin-template/
Forum: Plugins
In reply to: [Plugin] Delicious tagrollI’ve added the plugin to http://wordpress.org/extend/plugins/delicious-tagroll-shortcode/