Integrating WordPress into dynamic templates

I installed a WordPress blog on my development server the other day and began playing with it. The first real challenge I faced was how to pull my WordPress installation into my Web site’s template.

My issue is, I’m using a content management system (CMS) to manage the bulk of my Web site’s content. However, I wanted to use WordPress to manage my various blogs. I obviously wanted my blogs to look like the rest of my Web site, so I needed to come up with a plan to integrate my WordPress installation into my CMS, somehow.

Basically, what it came down to was that I needed to find a way to store all of my WordPress output into PHP variables. Once I had done that, I could plug those variables into my template. The main problem I ran across, however, was the fact that 99% of the functions WordPress uses to build its output utilize echo commands rather than simply returning the output.

That was no good for me, obviously, as it started printing content onto my page before the template had been processed.

PHP came to my rescue, and with very little headache. PHP’s output buffer was the simple answer to my problem.

fileNice – a PHP-based file browser

fileNice - a free PHP-based file browserWhile working on one of my Web sites the other day, I had the need to install some sort of file browsing script that would allow the user to choose a particular file, then insert a link using TinyMCE.

I realize that MCEFileManager is available, but it is commercial software, and I was really looking for something free.

I happened across a script called fileNice. It’s a pretty nice file browser and is extremely simple to use. There are quite a few things I probably would have done differently had I written the script, but it works pretty well, and it took me about five minutes to install and configure rather than five weeks (or months) writing my own full-featured file browser.

Rewrite and Redirect for IIS – Sort of

Last week at work, we unveiled one of the new Web sites I’ve been working on for a while.  In doing so, we removed the old Web site completely from the server and replaced it with the new site.

Of course, when we did so, a lot of our old links became obsolete, so I had to find an effective solution to keep our regular visitors from going bananas when they tried to access some of their favorite pages.  That’s when I began to look into some options for redirecting without having to create placeholder pages just for those redirects.  After quite a few fruitless searches, I was able to piece together a fairly good solution, and also discovered an easy way to achieve URL rewriting on an IIS server (similar to the way you would with htaccess on an apache server).

First, you need to set up your “404” so that it points to a VBScript page.  That’s the most important part.  Once you’ve got that done, navigate to a page that you know does not exist on your server, just so you can test the behavior of your 404 page.

Pages: