Posted by tim in SkuddBlog on November 29, 2006

Apparently some people have been having a bit of trouble adding additional pages to the blog. Alas, there's hope!

Step 1: Create the TPL Simple enough. Let's say you're working with the "twans_x" template. Drop a file, something like the following, in templates/twans_x/about_me.tpl {include file="header.tpl"}

My name is Tim. I am the creator of SkuddBlog.

{include file="footer.tpl"}

Step 2: Edit the switch() In system/page_functions.php, there is a function called MakePage(). Here, you will be making some changes to the switch() structure.

If you notice, each condition begins with "case" and ends with "break;". Simple programming concepts apply here, so I won't go into detail.

What you need to do is create a condition for the case "about_me", and display the about_me.tpl file. It should look something like this:

// ... there's more code before this

case 'about_me': $page->display('about_me.tpl'); break;

// ... and there's more code after this

Step 3: Edit the Navbar Using your MySQL management software, issue the following query:

INSERT INTO blog_navbar VALUES(0, '?page=about_me', '-- About Me', 99, 'y');

The '99' in the query is to specify the position in the navbar list where this link will appear. A higher number will ensure that the link will remain at the bottom of the list, while a lower number will ensure that it remains at the top.

All done! That should be all it takes to accomplish this task. You can actually apply it to adding any sort of a static content page.

On a somewhat related note, more progress has been made on the newest version of SkuddBlog, version f0.0. I'm really trying to focus on getting the basic blog functionality done, but I do have plans to integrate user-to-user messaging, dynamic page management, and a completely web-based configuration scheme.

I'll probably be ditching the "Blog Ticker" and Last.fm feed, but there will eventually be support to add "blocks" to the right bar, all through the web browser.

I've yet to decide how I'm going to release the new blog. I would love to be able to keep it available to everyone, but at the same time I don't want all the other sites to look like mine. What I may end up doing is release the code under the LGPL, and include a template other than the one I'll use for my own site. We'll see though. That's a ways down the road.

  • Add a comment!
Copyright © 2024 SkuddBlog