A New Back End For This Journal
June 16th, 2008 by ComputerBob
I’m trying something new today. This is my first Journal entry that’s using my new SMF Survivors Forum to store its data. Then it uses SMF’s built-in SSI.php script and its ssi_boardNews function to display the newest post — currently this one — that it finds in the forum board (ComputerBob’s Journal/Newest Journal Entries) that I designated to be my “News” board.
The reason I’m doing all of that is to allow people who have registered for my Survivors Forums to leave comments at the end of my Journal entries. If you haven’t signed up for my Survivors Forums, it’s fast and easy to do!
Of course, I had to edit SMF’s SSI.php script to delete a few things from the ssi_boardNews function’s default output, as well as to get other things to display the way I wanted. For example, the ssi_boardNews function automatically gets all of the forum posts from wherever I specify and displays them in order from newest to oldest — but I don’t want it to display all of the posts in that forum — I only want it to display the 1 newest forum post from the current day. Unfortunately, when I told ssi_boardNews to display only 1 forum post, it displayed only the first (oldest) forum post, not the last (newest) one. So in SSI.php, I found the database queries that got id_first_msg and changed them all to get id_last_msg.
And just as a reminder to myself, in case I ever have to do it again, I also edited SMF’s Sources/Subs.php to remove target=”_blank” and add class=”external” title=”external link” to the two lines that create the ‘URL’ BBCode. (Hey, Bob - The BBCodes are in Sources/Subs.php!)
I’m going to try this setup and see if I like it. Now that I’ve set it all up, it will be really easy to add new Journal entries by simply adding new posts to my chosen “news” board in my Survivors Forum. Registered users will be able to leave comments. To me, there are three main advantages to this setup, compared to the way I’ve created my Journal entries in the past:
* Instead of having to create each Journal entry as a separate XHTML document, I can quickly and easily create new forum posts, and the newest one will be automatically displayed on my home page each day. As each Journal entry gets replaced by a newer one, I don’t have to manually move it into one of the “Previous Journal Entries” folders because it will stay right where I posted it in the forum. where anyone can read it.
* Members of my Survivors Forums can leave comments at the end of my Journal entries.
* As much work as it was to get it working and looking the way I wanted, it was relatively easy compared to installing and configuring a separate blogging tool to “fit into” the rest of this web site.
Compared to a dedicated blogging tool like WordPress, the main downsides to this setup that I can see right now are that:
* It doesn’t provide tagging, tag cloud and tag-searching features.
* It doesn’t allow guests to post comments that are automatically spam-filtered and/or require my approval before they display.
* It doesn’t have any of the WordPress site-promotion tools, like automatically notifying Google and other update services each time I post a new Journal entry.
* If I manually add my older Journal entries to this SMF-based setup, they’ll all be dated now, instead of when I first created them. But if I add my Journal entries to WordPress, WordPress will let me easily change their posting dates back to the dates that I originally wrote them.
It might be possible to find SMF modifications that add some of those features to this setup, but since SMF was designed to be a forum, not a blogging tool, I’d rather not bolt a bunch of extra, possibly incompatible features onto it.
So, if I decide that I really want those features, I’ll probably try to install and configure WordPress to fit into this site, instead of continuing to use my SMF forum as a blogging tool.
Fun stuff, huh? Stay tuned!
Permalink:
http://www.computerbob.com/wp/8.php
Tags:
Personal, Web Development

