Adding pages
Posted by tim in SkuddBlog on November 28, 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 "twansx" template. Drop a file, something like the following, in templates/twansx/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 "aboutme", and display the aboutme.tpl file. It should look something like this:

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

case 'aboutme': $page->display('aboutme.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 blognavbar VALUES(0, '?page=aboutme', '-- 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 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.

There aren't any comments here yet. Maybe you should add one!
Add a comment