Installing A Wee Tiny Blog
Installing A Wee Tiny Blog on your server could hardly be any easier. Before you go and begin playing with it, be aware that it's only a PHP class. A class by itself can't do very much, so you're going to need to develop the rest of your website on your own. If you don't know what a PHP class is or how you'd use one to make a website, you'll probably want to use something else to run your blog.
For those of you are ready to do some programming, here are the steps you'll need to take to run A Wee Tiny Blog on your server.
Step 1: Prepare a MySQL database for your blog
Creating a MySQL database is a simple affair. However, every server is set up differently, so I can't explain exactly what you steps you'll need to take. Hosts that limit their users to one database often prepare one for each client, so you're might already have one waiting for you. If not, then you'll need to use the controls they've provided via cPanel, phpMyAdmin or MySQL itself.
While having a database just for A Wee Tiny Blog isn't strictly necessary, it's usually a good idea to have a separate database for each piece of software you're using. Sharing them can cause trouble if different scripts use tables with similar or identical names.
Once you have a database available, move on to the next step.
Step 2: Creating the table for your entries
A database by itself is just an empty container. In order to store anything, it'll need to know how to arrange the information. Creating the table can be done one of two ways. You can either run a query manually using your favorite MySQL editing tool (such as phpMyAdmin or MySQL itself) or you can use the script named
readydatabase.php that was provided with your copy of A Wee Tiny Blog.
Manually creating the table
To do this yourself, just run this query:
CREATE TABLE IF NOT EXISTS `entries` (
`postid` int(11) NOT NULL AUTO_INCREMENT,
`date` datetime NOT NULL,
`icon` varchar(255) NOT NULL,
`subject` varchar(255) NOT NULL,
`content` text NOT NULL,
PRIMARY KEY (`postid`)
)
Note: feel free to change the table's name. Just remember to
configure A Wee Tiny Blog to use this name and you're set.
Using readydatabase.php
Included in the zip file with A Wee Tiny Blog is a small file named readydatabase.php. This script is there to help make things easier and give the developer an way to fill their new blog with a bunch of dummy entries. This allows you to test your own code quickly and easily, without resorting to making your own post generating function or spamming your edit post forms.
To use this script, you'll need to do a few things before running it. First, open it in your favorite code editing program (Notepad works fine in a pinch). Scroll past the license information and look for the first few lines that aren't comments. These are variables that hold the login information for your database and the name of the table you want A Wee Tiny Blog to use. Fill them in with the appropriate values and save the document. Now you can upload the script to your website and run it by visiting the page in your web browser.
Click on the button marked "Generate Table" to just make an empty table (advised if you actually want to use A Wee Tiny Blog to run your site). Alternatively, click on the button marked "Generate and Seed Table" to create a table and then fill it with simple posts. Later on, you can use your favorite MySQL program to empty the table so you can begin using it for real.
Step 3: Place aweetinyblog.php on your server
In order for your site to actually use A Wee Tiny Blog, its script needs to be on the server somewhere. All you need to do is upload aweetinyblog.php somewhere that's convenient for you. Personally, I would suggest placing it just outside of your site's root directory (which is typically named public_html). This way you can use the script without needlessly exposing the code to the entire world.
In order to run the examples as they are provided, you'll need to place aweetinyblog.php in the same directory as the example scripts.
Step 4: Have a drink and get to work on your dream website
With the above steps completed, you're ready to use A Wee Tiny Blog on your website. Now you just need to create the rest of your site, and I'll leave that up to you.
Provided with A Wee Tiny Blog are several example scripts. Together, they form the basis of a fully working blogging website. These are there to show how A Wee Tiny Blog can be used, but feel free to experiment with these pages or even keep the bits you like in your own projects. With some elbow grease and imagination, they could become a framework of a great website.