User Manual

Jump to a Section

Weblog Entries

Once your site is set up, you'll spend most of your time creating and managing weblog entries. To create a new entry click New Entry. You will be presented with a form where you'll enter the information to be published.

New Entry

The New Entry menu item allows the user to add a new entry to a weblog. Once on the New Entry page, the user will see a number of fields:

The Title field is required; the other fields are optional. If you do not put anything in the More field, pMachine will not create the link to your more page in that particular entry.

You will also have three "custom" fields in addition to the ones above. This gives you a total of six entry fields with which to manage your information.

To access the custom fields, click the Entry Form Prefs link in the Weblog menu. You'll see some buttons, which allow you to show/hide the various fields.

By default, pMachine is not set up to display information submitted in the custom fields or the Blurb field. The information submitted in any of these fields can be displayed on your pages in a number of ways. You can set up your various templates to include information from your custom fields (by adding the custom field variables), or you can display the information directly with some of the pMachine tags.

Date and Time:

You'll notice two sets of date/time fields at the top of the entry form. These allow you change the "post" date of your entry as well as assign an expiration date. If you leave the expiration fields blank your entry will not expire. If you make the "post" date sometime in the future, the entry will not appear on your site until that date. This can be useful if, for example, you go on vacation and you want new entries to appear while you're gone.

Please note: If your server is located in a different time zone than you are, your date will not appear correct. To fix this, go to the General Preferences page and set an "offset".

Custom Buttons:

The row of buttons along the top of the form lets you add frequently used HTML to your entries. You can store any HTML you use frequently in those buttons. To assign HTML to them, click the Entry Form Prefs link.

Entry Status:

At the time of creation, you can choose whether the entry is "open" or "closed". Open entries are displayed on your weblog page, while closed entries are not.

Authors:

If you have more than one author (admin) registered, you will see a list of names in the "author" menu.; Only SuperUsers and Semi-SuperUsers can change the author of an entry.

File Uploads:

Images and files and be uploaded and added to your entries by clicking the "Arrow" button (top right side of button bar). Upon clicking it, the link opens a small window, which enables you to upload and manage images and files. There are a number of preferences you can set through the upload page. You can also browse existing images and add them to your entries, or even delete them. If you have multiple authors accessing the control panel you can set access privileges so that they have limited ability to manage uploads.

Weblog Destination:

If you have multiple weblogs, you can choose the destination of your new entry with the "display in" pull-down menu. Each author can have a default weblog assigned to him or her (member profile page) and the menu will point to the correct weblog by default.

Categories:

If you use the "categories" feature, you'll also see a menu that lets you assign your weblog entry to a category. Categories are covered in detail next. Please note that categories can be either "global" or weblog-independent. Based on your category preference, the category menu will dynamically change each time you change the weblog assignment.

Auto <br />:

You'll find a set of checkboxes at the bottom of the form which allow you to turn "on" or "off" the "auto <br />" feature. When these boxes are checked, any line breaks (carriage returns) in your weblog entries will be automatically turned into <br /> tags. This is the most common use. If you prefer to do custom formatting of your entries, you can turn this off.

Auto XHTML:

You can optionally use a feature called "Auto XHTML" instead of the Auto <br /> feature. With Auto XHTML, line breaks in your entries are turned into pairs of <p></p> tags. In addition, some of the characters (like quotes) will be converted into typographically correct character entities.

To enable this feature, open your config.php file and change this:

$auto_xhtml = 0;

To this:

$auto_xhtml = 1;

Enable Comments:

The Enable Comments checkbox allows you to indicate on a per-entry basis whether comments are permitted or not. In your weblog preferences page you can set a master default for each weblog. The Enable Comments checkbox allows you to override the global setting a per-entry basis.

Once you've entered all the information, click "Submit" to add it to the database, or "preview" to preview the entry.

In your preferences you can also specify how HTML submitted in your entries should be handled. For example, pMachine will automatically turn URLs submitted in your entries into clickable links. There are a number of settings defined in your weblog preferences page.

Edit All Entries:

The Edit All Entries page lets you see a list of all the entries you've created listed by subject along with other relevant information about your entry like the date it was created, the author, whether the entry is open or closed, and how many comments have been submitted for each entry.

To view a weblog entry, click the title of that entry. To edit an entry, click the word Edit. To view the comments visitors have submitted, click the word Comments. To flip the status of an entry from open to closed, or vice versa, click the word Open or Closed.

Edit Your Entries:

This page is nearly identical to the previous Edit All Entries page. The only difference is that it only displays entries submitted by the current Admin user using the Control Panel.

Search for an Entry.

pMachine allows you to do keyword searches to quickly find old entries. You can submit a single word, or multiple words separated by spaces. You can choose whether to search for "Any" of the keywords or "All" of the keywords. Further, you can restrict the search to a specific field or leave it in the default to search all fields.

Top of Page

Categories

pMachine lets you create a list of categories (Rock, Jazz, Blues, Metal, etc.). Then, every time you create a weblog entry you can assign it to one of your categories. Visitors of your site can then view entries from a specific category.

Categories are defined in your control panel by clicking the Categories menu. You can "add", "edit", and "delete" categories from this page.

Categories can ether be global or weblog-independent depending on the preference you set in the category page. With global categories you can define one master list of categories and all of your weblogs will share it, while Independent categories allow each weblog to have an independent list.

For example, lets say you run two weblogs "cooking" and "music". Your cooking weblog might have categories like "pasta", "deserts", and "salads", while your music weblog might have "Jazz", "Rock" and "Blues". In this example, using global categories would not work. They would need to be independent for each weblog.

Once you've defined the categories, you can choose one from the list every time you create a new weblog entry.

In order for your visitors to browse your entries by category, they'll need to see a list of them - a "category menu". pMachine will generate two different types of menus:

  1. A list of text links. This is the default version.
  2. A "drop down" menu. If you choose the "drop down" menu, it can either have a submit button, or not. You'll have to put a couple lines of JavaScript in your page header if you choose to use the button-less version.

Text Version

To display the "text links" version of the menu, place the following tag on your page wherever you want the list to appear:

<?php weblog_categories($id,"weblog","text"); ?>

Note: If you have more than one weblog, you'll need to change the word "weblog" to match the name of the weblog being shown on that page.

Drop Down Version

To display the "drop down" version of the menu, place this tag on your page wherever you want the list to appear:

<?php weblog_categories($id,"weblog","drop"); ?>

As with the previous tag, change the word "weblog" if you are displaying the menu in something other than your main weblog.

By default, the "drop-down" version does not have a "submit" button since most people (we think) will prefer the cleaner look. Because of that, you'll have to put the following JavaScript function in the header of the page where the menu is being displayed (or you can place it in an external .js file).

<script language="JavaScript"> <!-- function gotoCategory(index) { document.categories.submit() } //--> </script>

Customizing The Menu

You can customize both the drop-down and the text version in several ways, described below. To do this, using a text editor like NotePad or SimpleText, open the file called category.fns.php, located in the lib directory. Near the top of the page you'll see a few configuration options that you can change.

The following items can be customized:

Notes: There is a template that defines the message that will appear if a visitor tries to view a category for which there are no entries assigned. It is in the same page as the "weblog multi-entry templates".

Category list variable: You will find the following variable in the "collective weblog form templates": %%categorylist%%. This variable allows the list of categories to appear in the form that people use to submit entries.

Top of Page

Member Registration

pMachine allows you to set independent membership requirements for comment posting, and collective weblog posting. Collective weblogs are covered later in the manual, so if you don't know what they are, you might want to skip to that section.

Membership preferences are set in the General Preferences page of the control panel.

Independent registration allows you, for example, to require membership for collective weblog entries, and not for comments. Or vice versa. Please note that if you make your weblog "collective", the membership preference you set will override the comment preference.

In the templates, you'll find two versions of the entry form for both comments, and collective weblogs — a simplified version that is shown if you require membership, and a "full" version of the form if you don't require membership. pMachine will automatically display the correct version of the entry form based on your preferences. The simplified version does not have fields for the person's name, email, URL, etc., since that information is stored in the database. When a member logs in, pMachine automatically keeps track of each member who posts.

Note that for weblogs that do not require membership, the simplified form will still be displayed if the member is logged in. The full version of the form will only appear for visitors who are not logged in.

Top of Page

Member Privileges

As far as pMachine is concerned, the only difference between a registered member who can post comments on your site, and you, as the "SuperUser", is access privilege; you have the highest level of privilege, normal members do not. Both are stored in the same database. If you choose to, you can "promote" members to higher access levels.

There are twelve levels of access privilege for members. The first six levels determine general access to your site, the last six grant varying levels of access to your control panel. The levels are as follows:

Top of Page

Special Purpose Pages

pMachine gives you the flexibility to create additional pages that serve "specialized" purposes. A good example of such a page is a "print this article" page, which displays your entries in a format that is easily printed.

Specialty pages can also be used to separate your content in more distinctive ways. Since pMachine gives you up to six fields per entry, these additional pages can be used to show the contents of any/all/some of these fields. For example, you could show the "blurb" field on your main weblog, the "body" field on one specialty page, the "more" field on another, and the custom fields on yet another. For online magazines, which typically have a greater need for separation of content, this type of formatting is useful.

Normally you will use one of your "weblog singe-entry templates" to format the presentation of one of these alternative pages. pMachine gives you a total of four "single-entry" templates. By default, one of those templates is used on your "comments" page, leaving three templates free for other purposes.

Specialty pages are no different that any other pMachine pages; thus, virtually all of the normal pMachine tags will work in them. The one restriction is that specialty pages have to be linked to — similarly to how your "comments" and "more" pages are linked to. When you click the link pointing to either the comments or more pages, the URL contains an ID number that tells pMachine what it is you want to display. Without this ID number, pMachine will show only a blank page.

To add the ID number to the link to your specialty page, use the %%entry_id%% variable in any of your weblog templates. This variable must be placed after the name of your specialty page in the link pointing to it.

For example: If your specialty page is called printerfriendly.php, you will construct the link to this page like this:

<a href="printerfriendly.php%%entry_id%%">Print This Page</a>

You can then use one of the alternate single-entry templates to format the content of your new page.

If you find that using one of the templates is too restrictive for a particular layout, you can also use the "form field" tag. As of version 2.1, pMachine has a tag which lets you show any individual field by itself.

<?php show_field($id,"which"); ?>

Just replace the word "which" with any of the entry fields (blurb, body, more, custom1, custom2, or custom3), and pMachine will show it.

Top of Page

Tell-A-Friend Page

The "Tell-A-Friend" page allows your visitors to email your weblog entries to their friends. They can either send the full text, or just a link, based on the preference they choose while sending the entry.

The "Tell-A-Friend" page is created in a similar fashion to the "specialty" pages described above. Setting up this page involves two steps:

  1. Creating the page.
  2. Creating the link to the page.

Creating The Page

Create a new file and call it something like tellafriend.php. Make sure it has the .php file suffix. Then, at the top of the page, before any HTML, put this tag:

<?php include("pm_inc.php"); ?>

And somewhere in the body of the page, put this tag:

<?php tell_a_friend_form($id); ?>

This tag displays the email form that people use to send weblog entries. The presentation of this form is defined in the "email templates" page.

By default, when someone receives a "tell-a-friend" email, the link in the email will point to the "comments" page. You can optionally have the link point to your weblog page, by adding the word "weblog" in the above link:

<?php tell_a_friend_form($id,"weblog"); ?>

Creating The Link

In your "weblog multi-entry templates" you will need to add the link to your new "tell-a-friend" page. This is done with a normal HTML link that contains this variable: %%entry_id%%

This is what the link will look like with the variable:

<a href="tellafriend.php%%entry_id%%">Email This Article</a>

Top of Page

File Browser/Editor

The purpose of the File Browser is to allow you to view your files and images, and make changes to you files using the control panel, rather than having to upload changes via FTP.

Note: When we use the term "file", we are talking about your web pages.

Important: Not every server configuration will permit you to write files. Try to edit and save a file using the File Browser. If it doesn't work, read the rest of this section.

pMachine will only be able to write changes to your files if at least one of the following three conditions exist.

  1. Permissions on your files are set to 766 (For obvious security reasons, be careful with file permissions, so as to not make your files "world-writable").
  2. Your server allows PHP scripts to change file permissions (or your server runs as "owner"). This feature is at the discretion of your hosting provider. It depends on the Apache and PHP configuration. If the server is run as "owner", or they do allow PHP scripts to change file permissions, there is nothing special you need to do to make the File Browser work. When you click "save", pMachine will momentarily change the file permissions to "write", save the file, and then change the permissions back to "read only". To find out whether this works on your server, go into the File Browser, choose a file and try to save it. If it works, there is nothing else you need to do.
  3. Your files need to be "owned" by the user the web server runs under. When you upload a file to your web server, you are the "owner" of that file. That means you can do what you want with your files, but scripts, like pMachine cannot. This is because web servers usually run as "nobody", with limited permissions. Since the web server — and by extension pMachine — did not create your web pages, it is not allowed to modify them. So, how do you get pMachine to create your files? You can do that with the File Browser by following the steps below.

Number 3 is a little involved, so please read these steps carefully, and don't attempt them until you are sure you understand them.

Note: In order to do this, you will probably need to close your site for a few minutes.

  1. Using an FTP program, rename all your web pages. You can call them anything you want, but we recommend putting the word "old" after the name. For example, change weblog.php, to weblog_old.php.
  2. Set the permissions on the directory containing those web pages to 777. If your pages are at the web root, you'll need to set it to 777.
  3. Open each one of your newly renamed pages with the File Browser. In the top form field, you'll see the path and name of the web page. Change the name of the page back to it's original name. If the new name is weblog_old.php, change it back to weblog.php. Click "Save File". Do this step with each one of your web pages.
  4. Set permissions back to 755 on the directory you changed to 777. You will also need to set the permissions to 777 on your image uploads directory, and 666 on your index.xml file.
  5. If you run other scripts that require special permissions, you will probably have to reset those permissions as well.
  6. Once you are done you can delete the "old" versions of your files.

Top of Page

Multiple Weblogs

This section has been moved

Top of Page

Multiple Template Sets

This section has been moved

Top of Page

Collective Weblogs

pMachine allows you to designate any weblog as "collective". A collective weblog is one in which your site visitors can submit entries (not to be confused with comments). Your visitors can submit entries, then other visitors can submit comments to those entries. The concept is very similar to that of a discussion forum, in that anyone can create topics of discussion, then others can comment on those topics.

Making a weblog "collective" is very simple. Just enable it as such in your weblog preferences and then put the submission form somewhere on your site.

For security reasons it is recommended that you do not allow HTML to be submitted in collective entries.

Submission Form

You can either place the submission form on the same page as your weblog, or on a separate page. If you are using your collective weblog like a forum (especially with multiple forums), you will normally place the submission form on its own separate page. If you prefer for reasons of convenience, or if you only have one weblog, you can put the submission form on the same page as your weblog — similar to how the comment form is on the same page as the comments.

Important: If you put the form on the same page as your weblog, you will have to make a small adjustment to the tag that displays your weblog entries so that the "preview" feature will work correctly.

When someone clicks the preview button to look at their weblog entry before submitting it, pMachine will show this preview on the very same page where the weblog entries are normally shown. pMachine will also automatically put the submission form, containing the entry, just below the preview. If you are "hard coding" the submission form on your weblog page, when someone clicks preview, they will get two submission forms — the one you've put on the page, and the one pMachine creates dynamically. Because of this, you will need to add one additional parameter to the weblog entry tag to disable this feature.

In your weblog entry tag, add the word "no", like this:

<?php weblog_entries($id,"weblog","no"); ?>

Submission Form Tag

The submission form is placed on your page using a pMachine tag. There are two ways to construct the tag depending on how you need to use it.

If you have multiple collective weblogs and you want them to all share the same entry form on a separate page, you'll use the linking method. If you only have one collective weblog, or you want the entry form on the same page as your entries, you'll use the reference method.

Linking Method

This is the tag you'll use:

<?php collective_entry_form($id,$which); ?>

This is a generic tag, which will display the submission form. You will normally put the tag on a separate "submission" page. On its own, this tag has no way of knowing which weblog you want the entry submitted into. The way you tell the tag is through the URL. You will add a code within the link that points to the page you've put this tag in. Your link will look like this:

name_of_your_entry_page.php?which=weblog

In the above tag, replace "name_of_your_entry_page" with the name of the page containing the submission form, and "weblog" with the name of the weblog you want the entry submitted into. For example. If your weblog is called "forum" and the submission page is called entryform.php, this is how the tag will look:

<a href="entryform.php?which=forum">Submit An Entry</a>

You'll make links like this for each weblog that is collective.

Reference Method

The reference method lets you specify within the tag itself which weblog you want to submit entries into. This is the tag you'll use:

<?php collective_entry_form($id,"name_of_your_weblog"); ?>

Replace "name_of_your_weblog" with the actual name. Make sure and leave the quotes. For example, if your weblog is called "news", the tag will look like this:

<?php collective_entry_form($id,"news"); ?>

Top of Page

Post office (pM Free)

The post office enables you to send individual email to anyone, as well as send personalized email en-mass to selected groups of members. The Post Office is where you'll also send email to everyone in your mailing list.

If you are sending email to members, you can place the following tag in title or the body of the message and it will be replaced with the name of the member:

<<name>>

At the bottom of the email forms you'll find a box which lets you select how many emails to send at once. You can either select "all", or specify a range, like 1 through 50. PHP scripts by default have a 30 second time limit for execution, therefore, if you have a very large number of emails to send, the execution time can easily exceed 30 seconds and you will be unsuccessful.

pMachine attempts to override this default setting.

This will only work if your version of PHP is not configured in "safe mode". Before sending more than 50 emails, find out whether you are running in "safe mode". If you are, send bulk email in chunks of roughly 50.

Much more feature-rich Post Office and Mailing List functionality is included in pMachine Pro.

Top of Page

The Discussion Forum

This section has been moved

Top of Page

pBlocks

A pBlock is a container that holds elements of your web site. You can put almost anything you want in a pBlock — text, images, HTML, MP3's, scripting elements — anything that can be placed on a web page can be stored in a pBlock. Note: You cannot currently put PHP code inside a pBlock. What makes a pBlock powerful is that you can assign a behavior to it. Behaviors automate the presentation of the elements contained in the pBlock.

Let's say you want to display a different image on your opening page each time someone visits. To do this you'll create a pBlock, fill it with the various images and assign it a random behavior. You'll then place the pBlock tag on your page where you want it to appear. Each time the page is loaded, one of the images is randomly shown.

pBlocks are very easy to set up and maintain, but give you a lot of interesting creative possibilities. You can make as many pBlocks as you need and each pBlock can hold an unlimited number of items.

Note: pBlocks can also hold static elements — things that don't change such as page headers, footers, etc. This allows you to manage those elements through the control panel with your browser. You can optionally use the "static" version of the pBlock tag, allowing you to choose an individual pBlock to display.

Creating a pBlock

  1. Click View-Edit pBocks in the control panel menu.
  2. Click Create a New pBlock. You will be presented with a form with these fields:
    • Name of your pBlock: A single word that will be used in the pMachine tag on your web page.
    • Behavior: You have four behavior choices:
      1. Random. Selects elements randomly.
      2. Cycle forward. Cycles forward in order.
      3. Cycle backward. Cycles backward in order.
      4. Static. Displays only the most recent element.

Once you've filled the form out, submit it. You have now created a pBlock!

Adding Members to Your pBlock

  1. Click View-Edit pBlocks in the control panel menu. You will see a list of all the pBlocks you have created.
  2. Click Add/Edit Members next to the pBlock to which you want to add a member. You will be presented with a form where you will fill in these fields:
    • Name of Member: The name of the individual item you are adding.
    • pBlock Data: This is where you'll place the element you are adding to your pBlock. You can click the "upload image" link to add an image, or place whatever else you'd like in the form.
    • Convert line-breaks into <br /> tags?: Check this box only if you are adding text, and only if you want your line breaks (carriage returns) automatically turned into <br /> tags. If you are placing any other kind of element (HTML, images, etc.) do not check the box.

Once you've filled the form out, submit it. You have now added a member to your pBlock. Repeat the preceding steps for each additional element you want to add to your pBlock.

Displaying Your pBlock

pBlocks are displayed the same way you display other pMachine elements; by placing a pMachine tag on your page wherever you want it to show up. In the case of pBlocks, the tag is as follows:

<?php pblock("name_of_your_pBlock"); ?>

Replace "name_of_your_pBlock" with the name of your pBlock in the tag. Leave the quotes. For example, if your pBlock is called "pictures", your pBlock tag will be:

<?php pblock("pictures"); ?>

There is an optional "static" version of the pBlock tag which lets you show a single, specific pBlock member. If you use this tag, the behavior you assigned to your pBlock is ignored.

This tag requires two parameters: The name of the pBlock and the name of the specific pBlock member. This is the tag:

<?php static_pblock("name_of_your_pBlock","name_of_member"); ?>

Replace "name_of_your_pBlock" and "name_of_member" with the actual information from your pBlock. For example, if your pBlock is called "pictures", and the member you want to show is "picture_one", your tag will look like this:

<?php static_pblock("pictures","picture_one"); ?>

pBlock Behavior Cookies

If you choose either "cycle forward", or "cycle backward" as the pBlock behavior, you will have to place a "cookie tag" on the second line (below the "include" tag) of the page containing your pBlock. The reason for the cookie is so that pMachine can keep track of what it is displaying for each visitor. Cycle forward and cycle backward are "sequential" behaviors, meaning they must increment or decrement in order. Without the cookie, pMachine has no way of knowing what each visitor saw last.

To set a behavior cookie:

On the second line of your page, place the following tag:

<?php pblock_cookie("name"); ?>

Replace "name" with the name of your pBlock. Note: It's very important that you place this tag below the include tag at the top of you page, and above any HTML.

This is what the top of your page should look like:

<?php include("pm_inc.php"); ?> <?php pblock_cookie("name"); ?> <html> <head> etc.....

If you have multiple pBlock cookies you can add them below the first one. If you are using the alternate (multiple instance) method of displaying pBlocks (see section below), place the master pBlock tag below the cookies, but above the HTML.

Multiple Instances of the Same pBlock

Although you can place the same pBlock in multiple places on the same page, each pBlock will normally operate independently.

For example, if you are doing a random photo display, you can place the same pBlock tag in several places on the same page and each pBlock will independently pull a random photo out of the database.

In some situations, however, you might need several pBlocks to work synchronously. That is, display the same information at the same time. Let's say you're changing the color scheme of your page and you want the same color placed in multiple places simultaneously. To do this you'll use slightly different pBlock tags as follows:

1. Place a "master" pBlock tag at the top of your page, just below the "include" tag. This master tag looks like this:

<?php $name_of_your_pBlock = pblock("name_of_your_pBlock","multi"); ?>

You'll replace "name_of_your_pBlock" with the name you gave your pblock. If your pBlock is called "pictures", the tag will look like this:

<?php $pictures = pblock("pictures","multi"); ?>

Notice the word "multi" in the tag. This is important. Here is what the top of your page will look like with the above tag:

<?php include("pm_include.php"); ?> <?php $pictures = pblock("pictures","multi"); ?> <html> <head>

2. You'll then place the following tag in as many places on your page as you want:

<?php echo $name_of_your_pBlock; ?>

Replacing, of course, "name_of_your_pBlock" with whatever you called it.

Note: If you're using a "behavior cookie" tag, place it below the include tag and above the master pBlock tags.

Top of Page

Blogger API

pMachine supports the Blogger API, which allows you to submit entries into your weblog using desktop applications, like w.Bloggar, BlogBuddy and BlogApp.

Because the Blogger API was designed for use with Blogger, there are some inherent limitations; most notably, the fact that Blogger does not support weblog entry titles, multiple fields (blurb, more, etc.) or categories. In order to compensate for this, you must use the various tags listed below so that pMachine will know what you want it to do with your information. If you do not use any tags, pMachine will automatically construct the title of your entry from the information contained on the first line of your entry. The rest of the info will go into the body field.

Note: pMachine will offer support for the MetaWeblog API in a future release. This API is more powerful and is beginning to be supported in applications (w.Bloggar 3.0, for example).

In order for your desktop app to connect to pMachine you must supply it with the correct path information. In your main script directory (pm directory) you will find a file called pmserver.php. This is the file to which the desktop application must point. The path will typically be something like this: http://www.yoursite.com/pm/pmserver.php

Tags

The following tags give you more control over your weblog entry submissions:

In addition, you can turn the auto <br /> feature off, by using the number "0" in the following tags:

Note: If you are using BlogApp 1.3, there is a great new feature. You can tell it to wrap the title field in the <title></title> tags, eliminating the need for you to do it manually with each submission. Then, you can leave out the <body></body> tags as well and pMachine will still know where to put the entry data. To specify the title tags, open the preferences page in BlogApp.

Top of Page

Trackback

pMachine now includes the capability of both sending and receiving trackbacks. There are two ways to send a trackback in pMachine.

  1. Using the pMachine bookmarklet: Use the bookmarklet normally and when the pMachine pop-up page appears there will be a list of Trackback-enabled entries from the page you have bookmarkleted. Simply choose one from the list and create your entry as usual. The Trackback will be sent to the appropriate URL for that entry automatically.
  2. Regular Entry Form: Using the regular entry form, if you have trackback enabled and have made the Trackback field visible, you can still send trackbacks by finding the Trackback Ping URL for the post to which you wish to send the trackback ping. Normally this URL will be located in a comments-esque link at the bottom of the entry and will label the URL as being solely for the use of sending a Trackback ping.
    Note: The Trackback ping URL is not the same as the Permanent Link, More Link, or Comments Link of an entry.

When you send a trackback ping, pMachine automatically creates a short excerpt of your entry which it sends along with your entry's title and permanent link to the other site's Trackback server. This information will be stored on the other site and should be displayed in their list of Trackbacks for the entry.

You'll find the preference enabling Trackbacks at the bottom of your weblog's preferences page in Weblog Management. To have the Trackback URL field visible when creating new entries or using the Bookmarklet, you must have your Entry Form Prefs specify the showing of the Trackback URL field.

Also, make sure that you have the variable $pingserver_path set in your config.php file. This file is by default located at the root of your pMachine site. For example: http://www.yoursite.com/pingserver.php

The formatting for your pingback pages is located in your control panel under Edit Templates > weblog > Trackback Templates.

To delete trackbacks, you must be an Admin Level 4 or above that is logged in to the site. View the trackbacks for a particular entry, and you should see a "Delete?" link under each Trackback entry. Click the link and that particular trackback for that specific entry will be deleted. Go back and hit reload to ensure that the entry's list of trackbacks is now updated.

Note: If you have multiple weblogs, each one will have separate trackback enabling preference that must be set.

Top of Page

Pingback

pMachine now includes the capability of both sending and receiving pingbacks. Each time you submit a new entry through the Control Panel, pMachine's XML-RPC server will parse your entire entry (all of the entry fields) searching for links to external sites. These sites will be sent a ping and if they are pingback capable, the permanent URL for your entry will be sent to the external server's pingback server page.

Once the external site receives this URL, it will go to your weblog's page and search for the link to its site and if it is found will select content around that link and create an excerpt. This excerpt along with a link to your weblog's page will be displayed on the pingbacks page for the entry to which your entry linked. Thus, weblog entries can automatically refer to each other and create an upward chain of reference for topics.

You'll find the pingback preferences at the bottom of your weblog's preferences page in Weblog Management. The first, Email notify: Pingbacks, will allow the email address specified under Notification Preferences to receive an email whenever a pingback is received for an entry. The second, Enable Pingbacks, enables Pingback for this weblog's entries.

Also, make sure that you have the variable $pingserver_path set in your config.php file. This file is by default located at the root of your pMachine site. For example: http://www.yoursite.com/pingserver.php

The formatting for your pingback pages is located in your control panel under Edit Templates > weblog > Pingback Templates.

To delete pingbacks, you must be an Admin Level 4 or above that is logged in to the site. View the pingbacks for a particular entry, and you should see a "Delete?" link under each Pingback entry. Click the link and that particular pingback for that specific entry will be deleted. Go back and hit reload to ensure that the list of pingbacks is now updated

.

Note: If you have multiple weblogs, each one will have separate pingback preferences that must be set.

Top of Page

RSS Syndication

pMachine will output your headlines in RSS version 0.91. This is the most widely used version of RSS. The RSS page will contain some general information about your site, the title of each weblog entry, the URL of the entry, and approximately the first 500 characters of the body of the entry. Under the RSS specification, you are limited to 500 characters of the body (description) of your entry. Since the 500th character of your entry might fall in the middle of a word, pMachine applies some logic so that your entry gets close to 500 characters without truncating a word.

In order to publish your RSS page, you must do two things:

  1. Create the RSS page
  2. Set your RSS preferences in the control panel

Creating An RSS Page

A pre-made RSS page has been included with pMachine. With some Windows computers, files with the .xml file extension disappear when you extract the pMachine archive. To create an RSS page, open a new file in a text editor and save it with the .xml file extension. For example: index.xml. You must then set the permissions to 666 on that file so that pMachine can write data to it every time you submit or update a weblog entry.

RSS Preferences

In your General Preferences page in the control panel you'll see the following RSS preferences:

Language Codes

List provided by UserLand.com.

Top of Page

Pinging Weblogs.com

Weblogs.com maintains a list of recently updated weblogs. In order to be added to their list, you must notify them. This notification is referred to as "pinging". Each time you submit an entry you can ping them. The only restriction is that you can not ping more than once every five minutes, therefore if you submit two entries less than five minutes apart, only the first one will be "pinged".

You'll find two "ping" preferences at the bottom of your weblog preferences page. The fist preference enables pinging. The second is that name of your weblog as you want it to appear in the list at weblogs.com.

Note: If you have multiple weblogs, each one will have separate "pinging" preferences.

Top of Page

XML Parser

This section has been moved

Top of Page

Event / Birthday Calendar

This section has been moved

Top of Page

Bookmarklet

A bookmarklet allows you to add entries to your weblog without being logged into the control panel. A bookmarklet gives you the convenience of "one click" publishing while surfing the internet. You can additionally highlight text on a web site, then when you launch your bookmarklet the text will be added to the form (highlighting only works on non-framed pages). Since the highlighted text is passed through the URL (URL encoded), you can't highlight a very large section of text. It works well with a couple paragraphs, or so.

To set up your bookmarklet, click on Bookmarklet in the control panel menu. You'll see a link, which you'll drag to your "favorites" or "bookmarks" menu.

Top of Page

IP Banning

pMachine allows you to ban IP addresses to prevent users from registering and logging-in. Banning IPs is not foolproof because many users, especially those using dial-up accounts are assigned a different IP address each time they access the internet. The good news is that the numbers assigned to those users usually fall within a range of numbers. Since pMachine allows you to ban partial IPs, you can prevent an entire range of numbers from having access. You must exercise caution when doing this since you could inadvertently ban someone you did not intend to.

To ban a partial IP, you'll need to look at all the IP addresses associated with a particular person to try to figure out the best approach. If you see that all the IPs are identical you can simply ban that one address. If you find the IPs are different, you'll need to find the point in the IP address where they start to become different.

Let's say a member has these three IP's:

176.45.37.9 176.45.34.5 176.45.44.6

Since the first five numbers are the same, you can ban 176.45 and be reasonably confident that the member will be totally banned. Unfortunately there is a chance that another member with the same provider could share the same first five numbers. Members with AOL accounts can be particularly difficult to ban since many members share similar IP addresses.

pMachine logs the IP address each time someone posts a comment, or weblog entry. If you require membership it's especially easy to find all the IP addresses for a particular person. Just find the person's profile in the control panel and click the "view all IPs" link at the bottom of the page. You'll be given the option of banning all IP addresses assigned to that member. If you are banning someone's IP addresses it is also recommended that you revoke all access privileges. You could, of course, delete the member as well.

If you do not require membership, it'll take a little more "leg work" to find all the IP addresses. You'll have to find all the entries posted by that person and copy their IP addresses manually to the ban list.

Top of Page

Members Only Pages

Most people have no need or desire to keep their weblog and/or other pages private. It is possible, however, to make any pMachine page (or even just part of the page) "members only". Once you do, only logged-in members will be able to access it.

You can additionally require that members be of a particular status. For example, if you want only "admins" to have access to the page, you can specify that only members with a status greater than "7" be allowed. For more information regarding member statuses, see the "Member Privileges" section.

There are three lines of PHP which you'll place on any page you want to be "members only". These three lines create an "if/else" statement. This if/else statement shows one thing to people who are not logged in, and another to people who are logged in. That's why it's called "if/else". If you are not logged in you see one thing, or else you see another.

Members Only Code

Here is the code:

<?php if (not_logged_in()) { ?> You must be logged in to access this page <?php } else { ?> Yes! You are logged-in! <?php } ?>

Just replace the text in the above code with the particular information from your page and it will become members only. You can put anything you want within the code: HTML, pMachine tags, etc. Make sure to use all three lines of code.

To optionally require members with a particular status, for example, "7", add the status number in this tag:

<?php if (not_logged_in(7)) { ?>

Final note: Make sure whatever page you use this code on contains the "include" tag at the top of the page:

<?php include("pm_inc.php"); ?>

Restrict to Specific Weblogs

In addition to making sure that non-members can't access your private data, you can also ensure that none of that unwanted data from another weblog can appear on a public page if someone tries to manipulate the URL ID string.

This is done with a new tag that you place on your page, which specifies the weblog content that can appear on that page.

<?php restrict_to_weblog("name_of_weblog"); ?>

Replace "name_of_weblog" with the name of the weblog whose entries you want to allow to appear on the page. So, if you had two weblogs — named "public" and "private" — and you had the standard "members only" code on the "private" weblog, you would want to make sure that your "public" weblog page would only show content from that weblog and wouldn't display content from the "private" weblog.

This tag needs to be placed at the very top of your weblog file, just below the standard "include". So, for our example, the top of the "public" weblog file would look like:

<?php include("pm_inc.php"); ?> <?php restrict_to_weblog("public"); ?>

Top of Page

Search Engine-Friendly URLs

Important:
This feature will only work on Apache web servers that have the "mod_mime" module. Both are very common on Unix servers. Check with your hosting provider if you are not sure of the type of server on which your site is run or which modules are installed.

This feature allows your pMachine site to display URLs that are easier for search engines to index. Normally, the URLs of a pMachine site look something like this:

http://www.yoursite.com/comments.php?id=1_0_1_0_C

With the URL rewriting feature enabled, URLs will instead look like this:

http://www.yoursite.com/comments/1_0_1_0_C/

This fools search engines into thinking that they are accessing a directory index rather than dynamic content, which greatly increasing the chance that your site will be thoroughly indexed.

Note: This feature only works with your weblog, comments, more, archives, and specialty pages — basically, the four pages that are defined in Weblog Management as well as "specialty pages". It does not work on the calendar, any pages in the members directory, or the forum.

There are six steps you will need to complete in order to add this feature to your site. These steps are described in detail below.

  1. Make a copy of your pMachine pages and rename them so that they do not have the .php file extension.
  2. Add some new PHP code to the top of these new pages.
  3. Change any relative paths in your pages to absolute paths.
  4. Create a .htaccess file and put it in the same directory as your pages.
  5. Enable a setting in the config.php file
  6. Change the path settings in your control panel.

Note: Because you'll be changing a number of your files, you are encouraged to create a backup of all your site files. This way, if something goes wrong for some unforeseen reason, you will be able to restore to a working version of your site.

Step 1: Copy and Rename Your Pages

All of your pMachine pages (weblog.php, comments.php, archives.php, etc.) must be duplicated and renamed so that they do not have the .php file extension. For example, the weblog.php page would become weblog.

After doing so you will end up with two copies of each page — one named normally (weblog.php), the other without the file extension (weblog).

For the search-engine friendly URLs to work you only need the version without the file extension. However, in order for your visitor's bookmarks (and links to your site from other web sites) to continue to work you will leave the original files in place as well. These files can be deleted at some point in the future.

Note: Do not rename any of the files in your members, calendar, or forum directories. Only rename the pages associated with your weblog: weblog.php, comments.php, archives.php, more.php, etc.

Step 2: Add New PHP Code

Normally at the top of your pages you will fine this tag:

<?php include("pm_inc.php"); ?>

Open your weblog, comments, more, archives, and any specialty pages you might have and replace the above tag with this code:

<?php $pathinfo = pathinfo(__FILE__); $p_base = $pathinfo['basename']; $u_base = strstr($_SERVER['REQUEST_URI'], $p_base); if ($u_base != $pathinfo['basename']) { $id = str_replace('/', '', substr($u_base, strlen($p_base))); $sef = 1; } include("pm_inc.php"); ?>

Step 3: Use Absolute Paths

In order for the URL rewriting to work, all paths in your pages must be absolute, not relative. A relative path looks like this:

./weblog.php

An absolute path looks like this:

http://www.yoursite.com/weblog.php

All instances of relative paths in your pages must be changed. The following are of particular note:

Look in all of the files you edited in Step 1 and make sure you change all of the paths to be absolute paths. You may also want to look in your various Templates, pBlocks, etc. in the control panel to make sure that you don't have any path information in them (for instance, category icon images or something similar).

Step 4: Create .htaccess Files

Make a list of every file you copied and renamed in step one. Each name in that list must be placed within this tag:

<Files NAME_OF_YOUR_FILE> ForceType application/x-httpd-php </Files>

For example, let's say you have these files in your list: weblog, comments and more. You will create three tags:

<Files weblog> ForceType application/x-httpd-php </Files> <Files comments> ForceType application/x-httpd-php </Files> <Files more> ForceType application/x-httpd-php </Files>

Place these tags in a blank text file and save it as htaccess. Then upload it to your server in the same directory containing files you altered in Step 1.

Once you've uploaded the htaccess files, rename them to ".htaccess" (without the quotes). Be sure to note the period in the name; this is very important.

Step 5: Change config.php File

Open your config.php file and look for this setting:

$url_rewriting = 0;

Change the setting to:

$url_rewriting = 1;

Step 6: Change Control Panel Settings

Go to your Weblog Preferences page in your control panel and rename the pages so that they do not have the .php file extension.

You're done. Your pMachine pages should now use URL rewriting to make them more search engine-friendly.

Top of Page