miniblog

version 1.0.0

Live demo

Live demo here

Installation

Required file edits

Open includes/config.php
Make sure to read the comments


Variables that need be edited

db host
$sqlconfig['host'] = 'localhost';

The hostname of your MySQL server, most likely localhost.



db user
$sqlconfig['username'] = 'user';

Username of the user for your MySQL database



db pass
$sqlconfig['password'] = 'pass';

Password of the user for your MySQL database



db name
$sqlconfig['dbname'] = 'database';

Name of your MySQL database

Uploads

Upload the whole miniblog folder to the root of your website



Install

Point your browser to the install.php file on your website. This will most likly be: www.yourdomain.com/miniblog/install.php

This will check your database settings in config.php and then attempt to create the required tables and insert some information

Once this process is complete, delete install.php from your server

miniblog is now installed on your server! Point your browser to the index.php file in the miniblog folder to view your miniblog.

To access the admin panel point your browser to the adm directory inside the miniblog directory, for example: www.yourdomain.com/miniblog/adm/. The default password is password

Styling/customisation

The index.php file in the miniblog folder gives an example of how you can use the miniblog script. To edit your miniblog you can just edit this page as you would any other PHP/HTML page.

Change post HTML

The file template.html in the includes folder sets out how each post is outputted. You can change this if you would like but be sure to keep the variables in there.

In post changes changing this isn't needed as you will probably only need to change the styles applied to the elements.

Including miniblog

To include the miniblog script into a page use the following PHP code:

<?php
define('IN_BLOG', true);
define('PATH', '../miniblog');
include('includes/miniblog.php');
?>

The PATH variable (../miniblog in this case) needs to point to the location of the miniblog folder from the PHP file you are including miniblog.php into.

Template variables

Once miniblog has been included there are 4 template variables that you can now use:

  • $miniblog_posts - string - list of posts or post (if single) outputted using template.html
  • $single - boolean - if in a single post this is TRUE else it's FALSE
  • $miniblog_previous - string - html link to previous page of posts
  • $miniblog_next - string - html link to next page of posts

You can use these variables like any other PHP variables. To output any of them just use code like so in the PHP file:

<?=$miniblog_posts?>

This will output the posts for the current page.

See the index.php file for examples of using these variables

Help and support

You can get help, support for this script plus other web design and development tips from our webmaster forums: http://community.spyka.co.uk/forumdisplay.php?f=9


advertisement

Support

Need help, support or advice using or install our scripts? Take a look at our webmaster forums

Donate

Like our scripts? Consider a donation