Integrate Blogger Into your PHP Website using Includes

Blogger Banner

PHP includes for Blogger

Before writing this post, I looked online to see if others have written about this same topic. This might as well be Michael Gray’s “Integrating Blogger Into Your Website: Part II”, which he never wrote — though he did write Part I.

Step 1: Switch Blogger files to PHP

First, you need to update your publishing settings so that Blogger publishes your posts in PHP, not HTML (thanks to DevDoctor):

  1. Set up your blog to publish via FTP (on Publishing tab)
  2. Change the ‘Blog Filename’ to index.php
  3. Change ‘Archive Filename’ to archive.php (on Archiving tab)
  4. Finally, delete the old index.html file from the blog directory (otherwise it will probably take precedence over the new index.php)

Once you’ve got Blogger pushing out PHP, you’re able to do PHP stuff with the site:

  • Update the entire site at once – When I create a website, I always want to create the structure using PHP includes, so that I can set global site variables, and if I change it in one place, it changes across the whole website.
  • Set active navigation – Using SSI includes, I used to have to include a different file for each blog section on the site so that I could up. Here, I just send a variable to the navigation.php file, which tells it what page is active.

Next, I will show how to include these files. Continue reading “Integrate Blogger Into your PHP Website using Includes”

WordPress.com finally updates to 2.5 — A review

A picture [of my cat] is worth a thousand words.

She's a jungle-catI’ve been waiting for WordPress.com to update the administration panel so that I can have galleries.  That is the main feature that I’ve been waiting for.  Now it’s here, I can finally upload pictures of my cat (and my wife 🙂 )  

This will also allow simpler embedding of video, audio, et al.  I’m glad it’s finally live.

EDIT: There seem to be a few kinks still with this feature — instead of having thumbnails, the site was loading the full images. This is obviously an issue. Until then, you get a thumbnail of my cat in the grass.

Auto-tagging is good too

2.5 also recommends what tags to use based on tags you’ve used in the past. Unfortunately, that part is less responsive than I would like.  It’s still neat to have available.

Much better text editor

The previous text editor for WordPress.com was so terrible, every time I tried to make a word bold, it added some round-about Safari-specific hack ( or something like that).  Now it uses the proper code (strong), and I’m quite grateful. Now, I can actually write posts online, instead of writing them in Dreamweaver and then pasting the code in to WordPress. Very much improved.

The text editor still does not create paragraphs when you view the HTML code; it displays paragraphs as line breaks.  This is frustrating, because in the past it often lost all formatting.  At least in this iteration, switching views between Visual and HTML keeps the formatting intact.

Very pleased with this update

The editor is a LOT more functional, the gallery is great, and well, what can I say?  It’s a great success.

Just wondering: who would want to use Blogger.com?

Before this update, WordPress was just VERY superior to Blogger.  Now it’s outright in a league of it’s own.  I used blogger when it came out because, well, it was the originator of simple blogging.  But man, it’s really outdated.

Blogger is owned by Google, so you think it would be cutting edge, but every time I try to work with it, I end up hitting myself over the head.  What advantages does Blogger have, if any?