About Dan

Been a programmer, primarily in the internet space, since late 1997. Google+ Profile

WP-United 0.9

For those who haven’t tried WP-United 0.9, know it is very rough around the edges. The install instructions are incomplete and the only way to get it is from a source code repository. That being said, there is some promise. The WordPress plugins install on WordPress 3.1 without issue and things seem like they will work. I say seem because I did not have success getting it all working correctly yet. I stumbled on my install a couple of times and ended up with a problem I couldn’t diagnose and so I dropped it and removed the install. I will try again soon.

Part of the problem with 0.9 is its use of Flash in the admin to do some of the updates. It’s not very transparent what is going on so in my case the error I was getting could not be diagnosed. If I have success with my next install, I will detail the steps here.

WP-United update

Not much to say just yet. I have tried the same solution others have mentioned and got the same results. I prefixed all the colliding function names with wpu_ and now the template integration works and the user integration doesn’t. I will continue to look into the problem, but so far all I can do is concur with others’ findings.

WordPress 3.1 and WP-United

It appears I am not the only one having problems with WP-United after updating to WordPress 3.1. There is a forum discussion on this issues and the same solution is proposed as I would have attempted. The proposed solution was to change the function definition in WP-United to a different name, as the error indicates a function naming collision. According to the forum, this allows template integration to work but user integration fails. I’m not sure that the comments integration would work in this case, so I don’t think this is a viable option. Time to look at other possibilities.

Here is another blog with the same problem and solution.

WP United and WordPress updates

The latest update to WordPress broke my WP-United installation. There is a function definition conflict. At this point, I haven’t done anything to look into the problem other than the “standard” fix attempt of clearing the PHPBB cache. That didn’t work. I will be doing a backup and attempting to correct the problem soon. Will keep you posted when I find an answer.

Another solution to WordPress Multisite on separate domains

In previous posts here, I went over the process of making WordPress Multisite work on separate domains. This was necessary because WordPress Multisite is designed to work on subdomains instead of domains. Well, over at SitePoint they have a blog post detailing a different approach. I haven’t tested this other approach yet, which uses the domain mapping plugin. It should be a better solution as it does not involve hacking the core like the solution I detailed before.

NextGEN Gallery and Simple Facebook Connect aren’t friends

For the past couple of weeks, I’ve been trying to figure out why NextGEN Gallery stopped working for us on model160.com and I finally have my answer. First I should note the reason it took so long to get to this conclusion. I am not the only one working on the site. There are two other people who are making changes and installing plugins. Because of this, I don’t know when some things are installed. Normally, if something is working, then a plugin is installed and that thing stops working, you blame the new plugin. My problem is, I didn’t know what was a new plugin.

Today I took the proper course of action and deactivated all the plugins and check. Indeed, NextGEN worked when only it was active. Obviously another plugin was causing the problem. In the end, there were two specific plugins that we were using that both cause problems for NextGEN. They were SFC – Like Button and SFC – Share Button. SFC here stands for Simple Facebook Connect. We were only using two other SFC plugins (beside SFC – Base) and they don’t have issues. SCF – Activity Feed Widget and SFC – Publish both work fine with NextGEN. I can’t say for the other SFC plugins, but be aware there are issues.

HTML5 Video

I haven’t been doing too much new development in WordPress lately. I’ve been reading a book to be more familiar with the internals so I attack my next project from a strong standing. In the mean time I have attempted to play a little with HTML5 video. I’m just trying to understand the styling possibilities with this technology. I’ve gotten a clip converted to the Ogg Theora format for use with Firefox. It plays fine and for now I’m using the built-in controls. So far, the only way I can get text to appear above the video is to make the text absolutely positioned. In my example, both the video and the text are set position absolute. I’m hoping that won’t be necessary but all examples I’ve seen so far use this. If I find another way, I will post about it.

Once I have my example looking something interesting, I’ll post it here.

Heads down reading

Haven’t posted much in a while for a couple of important reasons. The biggest reason is that I’ve been home on a personal matter. The second reason is I have been heads down reading to get myself up to speed on WordPress internals. I initially purchased two books on the subject:

My expectation was that Smashing WordPress would show me all the internals and the basics of extending WordPress with plugins and whatnot and that Wicked WordPress Themes would have all the detail I needed on theme development that was passed over by the first book. I started reading Smashing WordPress and am still reading it. For the most part, it does what I want it to do. It is still a bit light on some areas where I want more detail. I think it is meant to live between a design book and a programming book. In the future I hope to do a more thorough review of this book. I haven’t delved into the Wicked WordPress Themes book yet, though a friend of mine at tcassdesign has. He is more of a design guy and liked what he read. He quickly stopped reading when that book delved into code.

Feeling that Smashing WordPress is missing some of the detail I want, I decided to pick up Professional WordPress. This book arrived today and I have yet to even crack the spine. I plan to review this book too.

What I can say so far is that at least for me, having a book to guide my study is extremely helpful. I know most if not all of this material is available online somewhere. The problem is I don’t know what I don’t know. The books collect the ideas together and guide my further inquiry. So, for now my head is down and I am studying. Reviews to come in the future.


WordPress Multisite and Separate Domains

In some previous posts, I have talked about getting WordPress Multisite to work across separate domains instead of using subdomains as it was intended. It works with some manual wrangling, but the sites didn’t appear in the Super Admin section that multisite adds to the back end. I decided to try and fix that problem.

The main issue here comes from the table wp_blogs. In that table there are blog ids and site ids. This points to the intent to allow separate domains and separate subdomains in the same install. The problem is that functionality is intended more for a hosted site solution and the separate sites are protected from one another. To make separate domains works, the blogs need to have different site_ids. This is the crux of the problem as the admin takes the current site_id into account when making the blog list in the super admin. To fix the problem, I removed the reference to site_id from the queries.

in wp-admin/ms-sites.php there are several queries that populate the multisite admin and some code to protect sites from one another. Since my files are edited, I cannot give accurate line numbers, so please bare with me. Searching for site_id, you will find the following lines:

if ( $details->site_id != $wpdb->siteid )
  wp_die( __( 'You do not have permission to access this page.' ) );

These lines get commented out. Next, you should find:

$query = "SELECT * FROM {$wpdb->blogs} WHERE site_id = '{$wpdb->siteid}' ";

I replace this with:

$query = "SELECT * FROM {$wpdb->blogs}";

Then comes:

$query = "SELECT *
FROM {$wpdb->blogs}, {$wpdb->registration_log}
WHERE site_id = '{$wpdb->siteid}'
AND {$wpdb->blogs}.blog_id = {$wpdb->registration_log}.blog_id
AND {$wpdb->registration_log}.IP LIKE ('%{$like_s}%')";

replaced by:

$query = "SELECT *
FROM {$wpdb->blogs}, {$wpdb->registration_log}
WHERE {$wpdb->blogs}.blog_id = {$wpdb->registration_log}.blog_id
AND {$wpdb->registration_log}.IP LIKE ('%{$like_s}%')";

After making these edits, all my sites appeared on the super admin list and so far I have not found any other issues. Use these changes at your own risk. This has not been heavily tested. As time goes on, if I find more issues, I will pass on the information. These modifications will be used on some rather large sites once all my conversion is done, so the testing will happen. I will keep you informed.