Cross-posting post from one WordPress Site to another

I set up another WordPress site and I wanted to transfer what I had written there to this site, so that all my writings would be together. This would include comments, links and attached media, and metadata about the post.

What I want a transfer plugin to do.

What I want a transfer plugin to do.

So I looked for a WordPress Plugin to do that. I found two (and as it is when I find more than one I have to test it out and write-up the results.):

  1. Xpost: Cross-post was the first plugin I found and it seemed to have a lot of really nice features.
  2. Transfer: the main difference between the two based on author description is that this one said that it also transferred images attached with the post.

So I tried Transfer first.

Transfer

However, when I installed Transfer, it said that it could not find the Zend Framework… Warning: require_once(Zend/XmlRpc/Client.php) [function.require-once]: failed to open stream: No such file or directory in /home1/public_html/username/wordpress/wp-content/plugins/transfer/library/Aperto/XmlRpc.php on line 3Path values changed to protect the innocent.
The plugin requires that one download Zend Framework Minimal (http://framework.zend.com/download/latest) and put the Zend folder under /wp-content/plugins/transfer/library/

I did this and I would get the WordPress white screen of death. I was told that this white screen of death was because my provider terminated a process (I had maxed out my user’s memory allocation) This white screen happens on one of my installs but not on another under a different user… so, not sure what is going on – Neither WP install would transfer the post. To get around the white screen of death I had to de-activate the plugin by editing the database.

I had initially failed to read the install requirement for Zend, so I found another solution for adding Zend to wordpress.
So I knew I needed to install the Zend Framework, I am sorta surprised that Dreamhost, my hosting provider did not have Zend set up on my server in a way that WordPress was automatically going to detect it. Oh, well is there a plugin for that? – Uh, yes there are like a gilzillion! So I went with the first one: Zend Framework [or also in WP-Extend]. I loaded it and then added the helpful code found in the online WordPress forums.

Go to your wp-config and paste this right after * @package WordPress part and before // ** MySQL settings – You can get this info from your web host ** //

/** Zend Framework **/

function add_include_path ($path)
{
foreach (func_get_args() AS $path)
{
if (!file_exists($path) OR (file_exists($path) && filetype($path) !== 'dir'))
{
trigger_error("Include path '{$path}' not exists", E_USER_WARNING);
continue;
}

$paths = explode(PATH_SEPARATOR, get_include_path());

if (array_search($path, $paths) === false)
array_push($paths, $path);

set_include_path(implode(PATH_SEPARATOR, $paths));
}
}

add_include_path(dirname(__FILE__).'/wp-content/plugins/zend-framework');

After I did both of these things all of my errors went away.

I did try a second plugin, WP-ZFF Zend Framework Full for installing the Zend Framework, this one said that the plugin would modify the include path so I thought that could use this without modifying wp-config.php but the plugin failed on import so I deleted it.
So in the sad case I that I was not able to get Transfer to work I moved on and decided to try Xpost.

Xpost

Xpost [on WP-Extend] was a breeze to set up and I actually got it working for a simple post. However, I was not able to select the target category in the master WP install, from the writer’s WP install (The test post I used just when to the default category).

Xpost not getting categories

Xpost not getting categories available on the master WP install.

The box just says categories loading. This seems to be a problem reported by Nigel and by gulliver.

The test image was not transferred to the media library of the master WP install from the writer’s WP install. Additionally, if the category of the post is changed in the Master WP install, then the writer’s WP install loses track of the post. This is only temporary… If the writer tries to cross-post the post again, then the This results in the writer not being able to update the post. (Red error message is shown.) But if the writer tries a second time then the original post in the Master WP install is found, and updated. Including the “removed” category. However, this “removed” category was intentionally moved by the editor on the Master WP install. So this creates a bit of a conflict. BTW: It would be nice to be able to select a special custom post type for imports.

It seems that Xpost was designed to broadcast out rather that to ingest.

What xpost seems to do

What Xpost seems to do

MAMP Helps

I use MAMP for my local test environment. But I have recently moved beyond just PHP apps. I am also looking at using Tomcat. I would like to mess around with DSpace locally and use Solr also. But I have found a couple of helps for adding things to MAMP.

One of the problems I am facing is that I really like apps like MacPorts. But I do not want to tinker with the CORE and default setting of my OS X machine. So I find that MAMP is a good alternative, but I can not type a command in the command line and have all the dependencies download automatically. I recently found that I could do something like this with Homebrew…. Never used it before but it looks to be the tool for the job. So I have collected a few tutorials like: installing php5.3, Using an gmail as a smtp server, and setting up solr.

Working on a Dynamic Left Menu Bar

It seems to be that the logical place to have a context based and role based menu would be on the left side. That being the assumption, the question is how to go about it, what does it contain, why does it need to change, when should it change.

I have been looking at several widgets and custom field plugins. Some of these deserve a deeper look. We might even should take a deeper look at how we are implementing custom fields and our plugin so that we have an abstraction layer.

Layering for custom fields in plugin

Here are some plugin in options which seemed to be able to handle some of this complexity.

There are really three places that custom field need to be used: so this post is not just about a dynamic left side bar. It is about a dynamic left sidebar that is run off of values in custom fields in the main post. So this post is talking about approaching custom fields with the best strategy.

  • Just Custom Fields for WordPress plugin: This plugin adds custom fields for standard and custom post types in WordPress. After installation you will see simple settings page which is self-explanatory to use.

    I found two Posts about this plugin to be really helpful: http://justcoded.com/just-labs/just-custom-fields-for-wordpress-plugin, and http://justcoded.com/implementation/wordpress-3-vs-drupal-cck/.

  • One of the ideas for the left side bar is to have a listing of related content. Related content could be all the files which belong in a single audio package, or all the digital files belonging to a physical item.
    This is where Related Widgets Plugin For WordPress comes in. The Related Widgets plugin for WordPress introduces multi-use widgets that allow you to list related posts or pages. To use the plugin, browse Appearance / Widgets, insert a Related Widget where you want it to be, and configure it as appropriate. You can optionally filter the results by category or section.
  • List Related Attachments: List Related Attachments is a sidebar widget that will display a list of filtered attachments related to the current post. This might be useful in one of two ways: listing associated content, depending on how we implement it. Or listing the photos on the right-hand sidebar.
  • Custom Field Template: This plugin adds the default custom fields on the Write Post/Page.
  • Custom Field List Widget: This plugin creates sidebar widgets with lists of the values of custom fields. The listed values can be (hyper-)linked in different ways. One possibility is to create a list of all values of a custom field, which will be groupped by their post (or page) and (hyper-)linked automatically to this post (or page). Another possibility is that you can create a list of all unique values of a custom field and specify links as you like (or not).
  • Get Custom Field Values:
    Get Custom Field Values allows the admin to use widgets, shortcodes, and/or template tags to easily retrieve and display custom field values for posts or pages.
  • Advanced Custom Fields:
    Advanced Custom Fields is the perfect solution for any wordpress website which needs more flexible data like other Content Management Systems.
  • Easy Custom Fields:This is a set of extendable classes to allow easy handling of custom post fields. https://wordpress.org/extend/plugins/easy-custom-fields/
  • Advanced Custom Field Widget: The Advanced Custom Field Widget is an extension of the Custom Field Widget by Scott Wallick, and displays values of custom field keys, allowing post- and page-specific meta sidebar content.
  • Custom Post Template: Provides a drop-down to select different templates for posts from the post edit screen. The templates replace single.php for the specified post.https://wordpress.org/extend/plugins/custom-post-template/

WordPress Custom Fields, Part I: The Basics : http://perishablepress.com/press/2008/12/17/wordpress-custom-fields-tutorial/

Custom Post Type UI: Admin UI for creating custom post types and custom taxonomies in WordPress.
https://wordpress.org/extend/plugins/custom-post-type-ui/

Plugins Awry

On Oct 24th I updated some plugins and then I could not access the back end of my WordPress install. Some sort of plugin in conflict. I posted a request for help to the forums. Some one pointed me where to go and I was able find my way into fixing my site. (Server 500 Error and blank pages when I tried to load the back end. But the font end loaded just fine.) I wanted to grab the code that I deleted from the database before I deleted it forever. So I thought I would post it here as a record of what I had running when I encountered the problem. (Something like 76 plugins running…) This was really the most detailed work I have done with PHPMyAdmin… I am shocked how comfortable I have become with the app.

a:76:{i:0;s:37:"wp-system-health/wp-system-health.php";i:1;s:25:"activelink/activelink.php";i:2;s:45:"add-link-to-facebook/add-link-to-facebook.php";i:3;s:37:"admin-ip-watcher/admin-ip-watcher.php";i:4;s:19:"akismet/akismet.php";i:5;s:57:"better-extended-live-archive/af-extended-live-archive.php";i:6;s:29:"better_links/better_links.php";i:7;s:31:"blogcopyright/BlogCopyright.php";i:8;s:17:"cforms/cforms.php";i:9;s:41:"comment-connection/comment-connection.php";i:10;s:39:"custom-taxonomies/custom-taxonomies.php";i:11;s:40:"download-monitor/wp-download_monitor.php";i:12;s:23:"email-log/email-log.php";i:13;s:21:"exec-php/exec-php.php";i:14;s:35:"exploit-scanner/exploit-scanner.php";i:15;s:37:"extended-profile/extended-profile.php";i:16;s:49:"facebook-status-for-wordpress/facebook_status.php";i:17;s:35:"fancybox-for-wordpress/fancybox.php";i:18;s:25:"find-me-on/find-me-on.php";i:19;s:33:"flickr-gallery/flickr-gallery.php";i:20;s:23:"footnotes/footnotes.php";i:21;s:21:"fotobook/fotobook.php";i:22;s:49:"genki-youtube-comments/genki_youtube_comments.php";i:23;s:50:"google-analytics-for-wordpress/googleanalytics.php";i:24;s:36:"google-sitemap-generator/sitemap.php";i:25;s:37:"hcard-commenting/hcard-commenting.php";i:26;s:19:"hrecipe/hrecipe.php";i:27;s:38:"hreview-support-for-editor/hreview.php";i:28;s:27:"in-the-loop/in-the-loop.php";i:29;s:22:"infolinks/infolink.php";i:30;s:35:"inline-tag-thing/InlineTagThing.php";i:31;s:19:"jetpack/jetpack.php";i:32;s:44:"jquery-collapse-o-matic/collapse-o-matic.php";i:33;s:25:"k2-hook-up/k2-hook-up.php";i:34;s:47:"mappress-google-maps-for-wordpress/mappress.php";i:35;s:30:"mendeleyplugin/wp-mendeley.php";i:36;s:32:"micro-anywhere/microAnywhere.php";i:37;s:15:"mycss/mycss.php";i:38;s:23:"net_bible/net_bible.php";i:39;s:30:"no-self-ping/no-self-pings.php";i:40;s:27:"php-code-widget/execphp.php";i:41;s:29:"plugin-notes/plugin-notes.php";i:42;s:55:"query-multiple-taxonomies/query-multiple-taxonomies.php";i:43;s:21:"raw-html/raw_html.php";i:44;s:27:"redirection/redirection.php";i:45;s:27:"role-scoper/role-scoper.php";i:46;s:27:"root-cookie/root-cookie.php";i:47;s:27:"simple-tags/simple-tags.php";i:48;s:38:"simplemodal-contact-form-smcf/smcf.php";i:49;s:30:"smart-youtube/smartyoutube.php";i:50;s:29:"stp-importer/stp-importer.php";i:51;s:47:"subscribe-to-comments/subscribe-to-comments.php";i:52;s:25:"subscribe2/subscribe2.php";i:53;s:61:"syntax-highlighter-and-code-prettifier/syntax-highlighter.php";i:54;s:39:"syntaxhighlighter/syntaxhighlighter.php";i:55;s:33:"tabbed-widgets/tabbed-widgets.php";i:56;s:38:"tags-2-meta-generator/em-tags2meta.php";i:57;s:47:"term-management-tools/term-management-tools.php";i:58;s:27:"theme-check/theme-check.php";i:59;s:35:"tinymcecomments/tinyMCEComments.php";i:60;s:23:"tpc-vcard/tpc-vcard.php";i:61;s:37:"twitter-importer/twitter-importer.php";i:62;s:37:"twitter-mentions-as-comments/tmac.php";i:63;s:31:"twitter-tools/twitter-tools.php";i:64;s:47:"wikindx-macro-plug-in-for-wordpress/wikindx.php";i:65;s:35:"wikipedia-autolink/cf_wikipedia.php";i:66;s:38:"wordpress-mobile-edition/wp-mobile.php";i:67;s:26:"wp-footnotes/footnotes.php";i:68;s:21:"wp-hresume/wphres.php";i:69;s:27:"wp-paginate/wp-paginate.php";i:70;s:25:"wp-recipes/wp-recipes.php";i:71;s:23:"wp-resume/wp_resume.php";i:72;s:33:"wp-security-scan/securityscan.php";i:73;s:35:"wp-social-links/wp-social-links.php";i:74;s:39:"wp-table-reloaded/wp-table-reloaded.php";i:75;s:42:"yet-another-related-posts-plugin/yarpp.php";}

This tutorial show how to use a SQL statement to access the needed table.

Admin Panel of the Plugin

Needs to be able to:

  1. Define the Metadata Values
    • Do they have controlled vocabularies?
    • What kind of input will they use?
  2. Define the work Stages
    • Including sub-work stages
  3. What are the Metadata Values in each Stage
  4. What are the help texts for each Metadata question
  5. What is the Part shown for the Keys?
  6. Does the Plugin create a special Browse Page?

Wire Frame of plugin in admin panel

Pulling Interactions back to WordPress

Interactions on FaceBook vs. WordPress

For a while I have been importing my blog posts to FaceBook as Notes. FaceBook as a method of doing this via RSS. I was encountering more interaction on my posts inside of FaceBook than I was outside of FaceBook. (In addition to leaving large quantities of text, as notes, in my FaceBook profile.) This is not the kind of interaction I wanted. While I do not mind having interactions or discussions inside of FaceBook I want the discussion to be portable and to move with the content. That is, If I move my blog I want the content and the discussion both to be carried to the new hosting URL or location.

This means that I needed to make the comments which are in FaceBook integrate with the comments on my self-hosted WordPress site.

I also want to encourage more traffic to my website rather than just interacting with the content as it appears on Facebook. My first step was to stop importing my Blog posts via RSS and to find a WordPress Plugin to facilitate the integration.

A Plugin to do the Job

I found Add Link to FaceBook, a plugin which will post a link to my article to my FaceBook news feed and also sync comments and likes between my FaceBook feed and my post on WordPress. I installed this app followed the instructions and voila it works. I now have a “like” button on my pages and hopefully am increasing traffic to my blog or minimally recording a the comments made on FaceBook on my self-hosted web-site.

Privacy

Considering comments from a privacy perspective, some users inside of the FaceBook ecosystem could comment on content in my feed and think that only I had access to view that comment and this plugin would then pull that comment into a publicly accessible space. There is no way I currently know of to tell potential commenters inside of FaceBook that their comments will be made public. If it is so important that things should be kept private then perhaps making a comment on FaceBook was not the right medium to make the comment in, perhaps the commenter should have used an email. But this is not the pretense that FaceBook sets up its users to expect. (Though there are plenty of examples in the news about how FaceBook is not the most secure place to make remarks or comments which could have impact outside of FaceBook.)

Plugins Removed from WordPress Extend search after two Years

I watched the State of the Word address by Matt. There are some very exciting things happening with WordPress. It is always interesting to think that WordPress and FaceBook are almost the same age, they have both had a significant effect on the internet landscape.

In his State of the Word Speech, Matt mentioned that plugins which have not been updated in two years will be removed from the search results on WordPress.org/extend. My question is:

Why choose two years? Why not choose votes of “it doesn’t work” for the past two full points on the development cycle?

So if WordPress 3.2 is the newest release of WordPress, then all plugins which are not voted to have worked on at leasts 3.0 and above would get removed from the search results. With just 2 points on the development cycle it would probably be less time than two years. So, what Matt is proposing is probably a more lenient strategy. By my question is not about what time depth but rather why time depth. Why choose time depth rather than the dynamic that an audience says something is working with the current version of WordPress?

Merging and Revitalizing

Today I started the process of trying to merge my two WordPress blogs. The older one, from 2005 through 2008, and this one, running from 2010-2011. I have the SQL dump from of the original blog. I think I have the original blog setup: WordPress version and all the plugins. So I loaded the SQL dump and started playing with that. I also had hosted version of the data on a hidden URL. I was able to export the blog data as a WXR file. But I am not sure that this really exports all the data that was in the SQL dump. So I am going to have to try revitalizing the old blog with the old plugins. And then replace the main domain location with localhost or something.

I decided to use MAMP and pull all development to my local machine. I have run into a few challenges.

  1. I have some sort of SQL error in the syntax of my Gallery 2 install (it was a parallel install to the WP install where I posted all of my photos linked to in my posts.) I think I can get by without fixing this error. So this is not really a big deal.
  2. All of my links in my posts have my old domain name in the links. I need to either:
    • Change the old domain to my new domain
    • Change the old domain to new shortcode looking like /?=123 so that the interconnectedness of the posts remains on may new blog where ever I host it.

    Obviously I would prefer the later. But I have two questions:

    1. How would I do that technically? It would require a massive search and replace through the whole SQL database.
    2. What will happen to the new items which come into the altered blog. By this I mean if both blogs have post IDs which start at 1 and go to some higher number. How do I perserve the interconnectedness of the second blog? because the second blog will be connected with short links like /?=123.