February 11 2012
Blog Updates
I added URL arguments! Add ?page=x after page numbers (hint: they start and default at 0). ?postsPerPage= also works. There are just a few things I'm worried about with these, though. I'm working on making a ?post= for specific, individual posts, but unfortunately you can go back/up directories. I'm going to have to make sure it only displays files within the /posts directory, $dir. Now I should work on getting a working RSS Feed.
February 10 2012
Blog.txt
I spent a lot of time last night working on my new blog project, "Blog.txt". I am just learning PHP and am learning a lot of cool functions that will help with my project. I discovered that it's probably possible to run this entire thing without MySQL, which would be ideal. For the average user (one who would be looking at a simple blogging system such as this), I think it's important not to use a database. I do realise there are benefits of using a database, but I've chosen not to. I have also put this project on GitHub. I should have put it up sooner, but this is the first usable version accomplishing the most basic of my goals. This project is also great because it is introducing me to PHP, which I'm going to be using in my Cloud project, which will also most-likely need a database (mostly for URL-Shortening).
Also, a note on Syntax Highlighting, I am currently using a jQuery/Javascript syntax highlighter that doesn't work all that well, so I'll probably make the switch to Google's option or to Colin's solution that he presented for today.
This weekend's goals: working RSS feeds, password protection, pagination.
Next week's goals: wysiwyg editing, configuration options.
February 8 2012
Syntax Highlighting
I've been working on getting some nice syntax highlighting with custom a custom colour scheme, as I will probably need this in this type of blog. Below, I've made use of this new feature.
I encountered a problem today in PHP while coding my ClouDB project. I made a config.php file containing variables important to establishing a connection to a database to store users' login information. However, I wanted to make sure that if someone were to try and view 'config.php' on the server, it would redirect them to the log in page. However, since I included 'config.php' in 'index.php', there would be an infinite redirect loop. Luckily, PHP caught on quick and stopped itself from loaded the page. So to overcome this problem, I just used a redirect in HTML in the 'config.php' file. But, even that wouldn't work, as it would actually send the user into an infinite loop of page redirects that isn't stopped by PHP. Does anyone know how I could fix this? I don't want to edit anything that would require modification of files outside of the ones I've made. I want this to be able to work on other servers easily.
File: index.php
include "config.php";
File: config.php
<?php
// Configuration options
?>
<html>
<head>
<meta http-equiv="refresh" content="0;url=index.php">
</head>
</html>
February 6 2012
Initial Commit
I thought today would be a great day to make a blog and "commit" my first post by talking about my RCOS project(s). Did you like my Git joke? Peter taught me a lot about Git and I can already tell it'll make a huge impact on me as a developer, especially with my RCOS projects. You can check out his talk here.
I have never tried to make a blog like this before, so of course to find out about blogging systems, I checked online. The task was so overwhelming. So what did I do being a developer? I make my own blogging platform. I didn't want a blogging system with loads of unncessary extra features, and confusing installation. So I sat down and thought what I needed in a blog. First, I needed it to be super easy to install and maintain. I also wanted a very clean design, as you can see. Today I set up very basic functionality of it, but will be adding to it so that other people could eventually install it and use it. This blog will soon be on GitHub, too.
This is my first semester in RCOS and am really excited. From just the beginning of this semester, I've learned so much about Computer Science and hope to continue learning throughout the semester. Thanks for checking out my blog and check back for updates on my progress.