Appendix

Jump to a Section

Timestamp Overview

Every weblog entry and comment is timestamped. This timestamp can be displayed in many different ways using the codes below. Each letter of the code applies a particular format.

For example, if we use this code:

M d, Y

Our timestamp will be formatted like this:

Jan 21, 2001

The letter "M" formats the month in "textual short format". The letter "d" formats the day. The letter "Y" is the year in "four digit" format. The comma is just a comma.

We could also add the time to the above example by doing this:

M d, Y - g:i a

Our timestamp would then be formatted like this:

Jan 21, 2001 - 5:22 pm

Notice we used a comma between the day and the year, a dash between the year and the time, and a colon to separate the hour from the minutes. You are allowed to add alpha-numeric and punctuation characters between the formatting codes.

Here's a more complex example to illustrate this:

j\t\h o\f\ F Y | g:i a

This would return:

15th of December | 5:22 am

What are all the backslashes ("\") for?

If you want characters to be treated as text, rather than timestamp codes, you'll have to "escape" them (add the backslash). Otherwise pMachine has no way of knowing whether you intended the letter to be a formatting code or just a letter.

Note: Make sure to use a backslash "\", not a forward slash "/". Also, be sure to escape single quotes (') and double quotes (") if you use them.

Timestamp Codes

Please note:
Each individual timestamp code letter can now be used directly in your templates. Just wrap percentage signs around each code letter: %%d%%

Top of Page

pMcode

pMcode is our own adaptation of the now famous UBB code. pMcode lets members add "style" or "formatting" to their entries which would normally require HTML. It's a good security practice not to allow your visitors to submit HTML into your database. pMcode allows some formatting options without the security risk.

pMachine goes one step further by looking for allowed HTML tags and automatically replacing them with pMcode. pMachine will also automatically turn URLs and email addresses into "clickable" links, and even image tags if you allow them. You'll have to enable these features in your preferences. There are, in fact, four different preferences, which determine how HTML and pMcode is handled in weblog entries and comments. A description of those preferences is found in the "[i]" next to each preference in the control panel.

Top of Page

Using pMcode

URL's

You can set pMachine's preferences to automatically format any URL, like http://www.somesite.com/ in to a click-able link. Or you can use pMcode as follows:

[url]http://www.somesite.com/[/url]

or

[url=http://www.somesite.com/]my site[/url]

Email

As with URLs, pMachine will also format email addresses automatically, or you can use pMcode:

[email]you@yoursite.com[/email]

Or

[email=you@yoursite.com]click here to email[/email]

Images

In your preferences you can specify whether image tags (<img src="pic.jpg">) are allowed in member entries. If so, they will be formatted into the pMcode equivalent:

[img]pic.jpg[/img]

Font Sizes And Colors

You can specify font sizes and colors like so:

[size=4]Hey look at this![/size]

and

[color=green]Some green text[/color]

You can nest font tags as well lik this:

[size=4][color=green]some larger green text[/color][/size]

Bold, Strong, Em And Italic

Bold, strong, em and italic tags are automatically formatted by pMachine (if enabled), or you can do this:

[b]some bold text[/b] [strong]some strong text[/strong] [em]some em text[/em] [i]some italic text[/i]

Quoting

You can surround text written by someone else which you'd like to "quote" like this:

[quote]Some text. blah, blah, blah...[/quote]

Those tags will be replaced with <blockquote> tags.

Pre-Formatted Text

If you want to submit pre-formatted text such as like script examples, you can use:

[pre]Some pre-formatted text...[/pre]

pMachine will replace these with <pre> </pre>. If you prefer, you can instead use actual <pre> </pre> tags and pMachine will replace these with [pre] [/pre].

Top of Page

Security Issues

Passwords

Passwords are one of the weakest links in any secure system. The best passwords are those which contain a combination of uppercase letters, lowercase letters and numbers — and which cannot be found in the dictionary. Since these types of passwords are not easy to remember, we recommend using the "phrase" method to select and remember your password. Do this as follows:

Create a phrase that has uppercase letters, lowercase letters and numbers. For example:

"My dog Charlie ate 23 hotdogs then barfed 3 times."

Then, use the first letter of each word as your password:

MdCa23htb3t

Passwords such as these are extremely difficult to crack. It's also considered a good practice to change your password regularly. This advice applies to your FTP/site passwords as well.

General Security

There is always a security risk associated with allowing people to submit information through forms on your site. A malicious individual, for example, instead of submitting a harmless comment, could use the comment form to submit a script designed to damage your files.

pMachine takes security issues seriously and has many built-in features to prevent security problems. pMachine "filters" all information submitted through forms, allowing only "clean" information to get to the database.

However, because pMachine allows flexibility in its configuration, security issues can be greater or lesser. As the administrator of your site, there are a number of things you can do to increase security.

  1. Unless absolutely necessary, HTML should not be allowed in any publicly accessible forms such as comment form, collective weblog entry form, etc. These options are defined in the preferences page.
  2. All directories — even image directories — should contain a blank index.html page so that a user can not get a raw directory listing.
  3. All form fields should include a "maxlength" value set no higher than needed to prevent users from submitting more information than they should, or information they shouldn't.
  4. In your preferences, set a "maximum allowed number of characters" value to prevent someone spamming your comment pages or your collective weblogs.

Top of Page

Displaying Your Home Page

The home page for most sites is named index.html. Web servers are set up show this page when they get a domain request (www.somesite.com), or a directory request (www.somesite.com/somedirectory/).

Since pMachine pages require a .php suffix, if you decide to make any of your pMachine pages into your home page, your web server might not automatically treat it as the default page. Some servers are configured to look for index.php in addition to the standard index.html, but not all. If you server does show index.php by default, simply rename your home page to this.

If your server does not show index.php by default, you have a couple options.

  1. You can use a "meta tag" redirect page.
  2. If you are hosted on an Apache server, you can use an .htaccess file. This method is recommended over the first method, since there is no time lag when someone visits your site. They are shown the correct page instantly.

Meta Tag Redirect

Create a page called index.html and copy the following code to that page:

<html> <head> <meta http-equiv="refresh" content="1; url=index.php"> </head> <body> </body> </html>

Note: Change index.php in the above code to whatever page you want your visitors directed to.

.htaccess file

Create a file called: .htaccess

The period in the name is very important. Note: If you are a Mac user, you will not be able to put the period in the name. Call the file something else and rename it after you've uploaded it.

On the first line of the page, place the following code:

DirectoryIndex index.php

Note: Change index.php to the name of your page.

Upload the file, placing it in the same directory as the page you want shown.

Top of Page

Language Files

All of the text in the pMachine control panel, as well as the text displayed in the "member messages" page, is contained in master language files. These files can be translated into other languages. If you need a language other than English, please visit pMachine.com to see if it's available. If you are interested in translating pMachine into a language that is not available, please contact pMachine.com.

All of the language files are located in the language directory. By default, pMachine contains only the "english" language files. To add another language, download the language pack from pMachine.com and add put it in the language directory. Then, open your config.php file and change the language variable to match the name of the language pack you added.

Language Files:

The following is a description of the files contained in the language pack:

Top of Page

Add-Ons

pMachine comes with several small "add-on" scripts that can optionally be used to expand the functionality of pMachine. These add-ons are all contained in the pm/add_ons directory.

Specific information about each add-on may be found in the instructions.txt file that accompanies each add-on.

Top of Page