pMachine Pro Features
Jump to a Section
- Multiple Weblogs
- Multiple Template Sets
- Post Office / Mailing Lists
- The Discussion Forum
- RSS Factory
- RSS Syndication
- XML Parser
- Event/Birthday Calendar
Multiple Weblogs
pMachine allows the creation of multiple weblogs (pMachine Pro version only). pMachine, by default, installs with one sample weblog (called "weblog"), but as many as you require can be created.
Multiple weblogs can be used whenever you need to separate your information into more specific groupings. If, for example, you want separate weblogs for different authors, you could create a "Bob's weblog", "Jill's weblog, and "Fred's weblog, and have each appear on its own page with its own look and preferences.
You don't have to think of weblogs strictly as weblogs, either. You can use a weblog as a discussion forum, a guestbook, a shoutbox, a frequently asked questions page, and more. You can even put multiple weblogs on the same page, similar to how newspapers separate content.
When you create a new weblog, a new set of preferences for that weblog is created, allowing you to customize it independently of other weblogs. You can, for example, allow comments in one weblog, but disallow them in another. Or display one in ascending order and the other in descending.
You can additionally create separate templates for each weblog, or they can all share a single template set. Templates are covered later.
Creating A New Weblog
To create a new weblog, click on the Weblog Management menu in the control panel. You'll see a form where you can submit the name of your new weblog. The name of your weblog must be one word with no spaces.
You've created a new weblog, now what?
First, go to the preferences page. You'll see a set of preferences for your new weblog. The first four preferences are the names of your new pages.
You'll need to create four pages with these names (or with whatever names you'd like as long as you change the preferences accordingly). On the very first line of your new pages, just like all your other pages, you must place the following line of code:
<?php include("pm_inc.php"); ?>
You can then place any pMachine tags you want on your new pages. You might find it easier to duplicate your existing weblog pages and rename them. If you do this, make sure to change any tags, which are specific to the other weblog.
Note: pMachine does not create these files for you; you must create them yourself.
You can place your new pages in their own directory if you'd like. If you do, you must make a copy of the file called pm_inc.php and put it in the directory with the new pages. You might also have to open this page and change the path information if the path to the directory containing the pMachine scripts has changed.
Please note: Some pMachine tags require the name of the weblog in the tag. This one for example:
<?php weblog_entries($id,"weblog"); ?>
You'll have to change the word "weblog" to the name of your new weblog.
Adding Entries To Your New Weblog
Entries are added the way you currently add entries; by clicking the New Entry link. In the form you'll see a "pull-down" menu where you can select the weblog you want your entry to appear in. In your member profile you can also assign which weblog you'd like the New Entry form to default to.
Multiple Template Sets
Since pMachine allows you to create multiple weblogs, it also allows you to create multiple sets of the weblog templates (pMachine Pro version only). That way, each weblog can be made to look independently.
You should note that templates and weblogs operate independently of one another. You can have multiple weblogs all sharing a single template set. Before creating an additional template set, make sure you need it. If you've gone to a lot of trouble to customize the look of your existing templates, you can just assign the same set to your new weblog. Of course, if you need your new weblog to look completely different, you'll want to create a new template set.
Creating A New Template Set
To create a new set of templates, click on the Edit Templates menu in the control panel. At the top of the page you'll click a link called Create New. Once there, you'll see a form where you can submit the name of your new template set. The name of your template set must be one word with no spaces.
When creating a new set you are given the option of duplicating an existing set in its current state, or creating a copy of the set originally installed with pMachine. If you've spent a lot of time customizing your templates you don't need to start from scratch.
Assigning a Template Set
Once you've created your new set, you need to assign it to a specific weblog. You do this in the Weblog Management preferences page.
To modify your new templates, click to the Edit Templates menu in the control panel.
Post office / Mailing Lists (pM Pro)
Email Members
The post office enables you to send email en-mass to selected groups of 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>>
Email Mailing List
Similar to the Email Members ability, pMachine now allows you to send emails to a particular group of people who are subscribed to a mailing list, or you can send an email to every person who is currently subscribed to a mailing list (every email in the database). It includes the ability to send the emails via SMTP, Sendmail, or PHP's native mail function depending on what is set in your config.php file. There are the options for the mailing to be plain or HTML mail, word wrapped, and to have a level of priority assigned to it.
Manage Email Cache
Every email that is sent through the Email Mailing List is stored in an email cache database. If you use any of the mail archive functions, these emails can be viewable to your readers as a record of mailings. Think of it as a possible Newsletter or Announcements archive.
When you view the list of mailings, you can view the Message of the email by clicking on the title of the subject. To delete the mailing from the database, click delete. To make the email invisible to your users, changes its visibility by clicking on the "Visible" text in the visibility column. Switching it back requires clicking the updated text "Hidden".
Mailing List Manager
Here you can create, modify or delete mailing lists. A Mailing List's Nickname is simply the alternative name that a Mailing List will be known as in various functions. Public mailing lists are ones whose mailings are visible to the public by default (unless you specify otherwise in the Email Cache), and private mailing lists are ones that you as an admin use for your own usage.
Mailing List Subscribers allows you to see a list of the email addresses in your database. You can also view their current subscriptions to all of the current mailing lists. Updating subscriptions is done by changing the pull down menus to the right of the email address and below the name of the particular mailing list, and then clicking the Update Subscriptions button.
Importing email is meant to be a simple way of putting email addresses into the database and setting their mailing list subscriptions.
Supported Protocols
Email can now be sent using one of three protocols. The desired protocol is set in your config.php file.
- Mail This is PHP's native method of sending email. It is compatible with most servers. pMachine uses 'mail' by default. For most people, this is the best choice. It is not the most efficient way to send email, so if you are maintaining a large mailing list you might consider using one of the following two other methods.
- Sendmail This is more efficient than using "mail" since a direct socket connection is opened to the Sendmail server. However, not all hosting providers allow a socket connection to Sendmail. To determine if this protocol is allowed on your server, enable the setting in the config file and attempt to send an email.
- SMTP This protocol is recommended in cases where your host requires it, if your host runs a dedicated mail server, or if you want to use your normal POP3 email account. SMTP usually requires authentication, so you will need to put additional information in the config file. Find the 'Email Settings' section of the config file for more information.
Batch Mode.
The pMachine mail handler uses a 'batch mode' whenever it sends email to your mailing list or to your members. This mode splits up large numbers of emails into small batches which get sent at short intervals. This gives you the ability to send email to very large lists without being in danger of a server time out. By default, PHP limits any process to 30 seconds, which is not enough time to send a large amount of email. By sending email in small batches, and reloading a special handler page in between batches, server timeouts can be prevented. A secondary benefit is that it is less taxing on your mail server, and in the case of people on shared hosting accounts, less likely to cause problems with your server administrator.
The number of emails the batch mode is set by default is 75. If, for example, you have 225 email addresses in your mailing list, they will be sent in three batches of 75. The batch total is set in your config.php file. If you are using one of the more robust mail protocols, like Sendmail or SMTP, the batch total can be increased, possibly as high as several hundred, as these protocols are more efficient. However, the speed gain in doing so is not significant unless your mailing list numbers in the thousands.
Mailing List Usage
Initial Setup:
Go to General Preferences in the Control Panel. Set the Absolute path to your mailinglist folder.
Usage
Users' subscriptions to mailing lists can be done in two ways:
- As a master subscription page, in which your visitors can sign up to any one of your Lists.
- As individual sign-up forms that can be placed on any page your choose.
Depending on your goals for your Lists you may choose one way or the other. For example, if you want each mailing list to be associated with an individual weblog, you might prefer to place a sign-up form on each weblog page. If, rather, you prefer a master subscriptions page showing all available lists you may use is that way.
Master Subscriptions Page
In your mailinglist direcory you will find a file called subscribe.php. This page displays a menu of all publicly available mailing lists, and a form for users to enter their email address in order to subscribe to the list of their choice. The functions in this page can be included or duplicated elsewhere through your site by calling the same functions.
Individual Subscriptions
Place the following tag on any page in which your want a subscribe form to appear:
<?php mailinglist_subscribe_form("mailinglist"); ?>
In the tag, please add the name of the specific mailing list. For more information on this tag, see the Tag Library.
Public Viewing
If you choose to make you mailing lists available for viewing on the web you can link to: /mailinglists/archives.php
This file allows user to select and view your mailing lists. When a list is selected, the information is shown in the file called: /mailinglists/archive_detail.php
If the link in each message is clicked, the detail is shown on: /mailinglists/mailing.php
The Discussion Forum
pMachine Pro users can take advantage of a pre-built discussion forum module. This downloadable module will automatically install and configure a full-featured discussion forum. This forum can contain multiple forums (categories). The forum is based on the "collective" weblog concept.
The discussion forum contains the following pages:
- index.php This is the "home page" of the forum.
- forum.php This page shows the list of topics that your members have submitted.
- threads.php The individual forum posts are shown here.
- newentry.php Contains the submission page for new posts.
- preview.php Allows new posts to be previewed.
- forum_style.css The CSS stylesheet for the forum.
Most of the pMachine tags used in the forum pages are identical to the tags used in your weblog pages. There are a few tags that are designed specifically for forum use. They are described in the Tag Library.
Multiple Forums (categories)
pMachine allows you to set up multiple forums. The default installation creates only one forum, however you can run the installation script as many times as you need to in order to create additional forums. All additional forums must share the same set of templates, therefore when you run the installation script more than once, make sure you do not select the option that creates templates.
If you do set up multiple forums, you will have to open index.php, located in the forum directory. This is the home page for your forum. You will manually need to edit the HTML in this page in order for it to show all your forums. Instructions are contained in the page itself.
Previewing
When using a collective weblog as a forum, the normal way entries are previewed before submission is slightly different. Unlike a typical collective weblog that shows the preview on the same page as the entries, the forum requires its own "preview" page. The forum installation script will set this up for you automatically, so it does not require extra set up. However, the reason we mention this is because if you look at the page names in the forum preferences, you'll notice that the preview page (preview.php) is listed in the "more page" field. When using pMachine as a forum, all previews are shown on the page defined as the "more page" in your preferences.
RSS Factory
Note: This is a "Pro" only feature. pMachine Free offers basic RSS syndication.
RSS is an XML-based headline syndication format. By publishing your weblog titles to an XML page, your weblog will be available for syndication. Any site with "parsing software" can then publish your information on their site, or in any number of other formats and devices. pMachine manages your RSS feeds through the RSS Factory.
pMachine can output your headlines in one of four RSS versions: 0.91, 0.92, 1.0, 2.0. 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:
- Create the RSS file.
- Set up your RSS feed in the RSS Factory in the control panel.
Creating An RSS File
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.
Because you can create multiple RSS feeds with the RSS Factory, you will need to be sure that you create the RSS file to go along with each feed.
Set up the RSS Feed
In the RSS Factory page in the control panel, you can either edit an existing RSS feed or create a new feed. Create a new feed by typing a name for your feed into the field and pressing Create New. Edit a feed by clicking the Edit link next to an existing feed.
Once you are looking at a new or existing RSS feed, you'll see the following settings:
- Name of your Feed This name is for your reference only; it is used internally with pMachine.
- Enable this feed? When set to "on", the feed will be written to and updated whenever a new weblog entry is created or edited.
- RSS Version The version of the RSS feed. There are four options corresponding to the four most popular formats.
- Relative path to RSS page This path is from the perspective of the control panel. pMachine needs this path in order to locate the file. In most cases, this will be something like ../index.xml
- Language The language in which the RSS feed is written.
- Items per page The number of weblog entries you want shown in the feed. 10 is the recommended number according to the RSS specification.
- Title of RSS feed Generally this is the name of your site, or the name the specific weblog in the feed.
- URL of RSS page The absolute URL to your RSS feed file. For example: http://www.yoursite.com/index.xml
- Description of RSS feed The description of your weblog or site in 500 words or less.
- Image URL Specifies an image that can be shown with your RSS channel. The recommended image size is 88 X 31 pixels. The maximum allowed is 400 X 144 pixels.
- Image width Width of image in pixels.
- Image height Height of image in pixels.
- Copyright notice Copyright notice for the content of the RSS channel.
- Email address of editor Email address for person responsible for editorial content.
- Email address of webmaster Email address for person responsible for technical issues relating to channel.
- Skip hours The hours (in 24 hour format) that you prefer your RSS feed not to be read. To skip the hours of seven and eight PM you would use: 19-20
- Skip days The days of the week (separated by comma) you prefer your RSS feed not to be read. To skip Mondays and Fridays you would use: Monday, Friday.
- Number of minutes between caches The number of minutes indicating to aggregators how long a channel should be cached before refreshing.
- Custom elements You can add up to four custom elements to your feed.
At the bottom of the page, you will select which weblogs you wish to be included in the RSS feed. You can include or exclude any of your weblogs that you wish.
XML Parser
Note: This is a "Pro" only feature. It also requires that your version of PHP be compiled with XML support. While the majority of php installations have XML support, not all do. It's at the discretion of your hosting provider whether to offer it or not. If the XML parser does not work, please contact your hosting provider to verify that they have XML support compiled in their PHP installation.
The XML parser allows you to display RSS feeds from other sites on your own site. You can display as many feeds as you want, and the layout of each feed can be formatted independently via templates in the control panel.
Please note: Your pages will render slightly slower when they contain RSS feeds. This is due to the fact that pMachine must grab the RSS data from a different server than your own. This process is slower than accessing pages locally on your own server. pMachine currently does not have a caching mechanism to store feed locally.
The RSS parser supports RSS Version 0.91. This is the most commonly used version of RSS. The parser may not work well with other versions of RSS.
To show an RSS feed, you must first create a template for the feed. This is done in the "RSS Templates" page. As with other pMachine templates, you'll find variables in the RSS template so that you can define a layout for the RSS feed.
Showing The RSS Page
To show the RSS page you'll use the following tag:
<?php show_rss_page("template_name","url_to_rss_page","10"); ?>
The first parameter is the name of your template. The second is the full URL to the RSS page. The third parameter is an optional limit to the number of items shown.
For example: If your template is called "janeRSS", and the URL is: http://www.janesite.com/index.xml, and you want to only show the most recent 3 items, the tag will be as follows:
<?php show_rss_page("janeRSS","http://www.janesite.com/index.xml","3"); ?>
Event / Birthday Calendar
pMachine comes with a full-sized calendar that displays member birthdays and/or events. The event calendar is only available with pMachine Pro.
Birthday Calendar
If you run a "membership only" site, the calendar will display member birthdays. Each member birthday will appear as a link to that particular member's profile.
Birthday Greetings
The Post Office area of the control panel allows you to send birthday greetings to individual members, or an entire month's worth. If you view the calendar, you'll see links for each member birthday. Clicking a link will open a page with an email form ready for you to send that member a birthday greeting. You can also click on a link at the bottom of the calendar which lets you send greetings "en masse" to an entire month's worth of members.
Events Calendar
In addition to the birthday calendar, pMachine Pro users can submit events. When viewing the calendar, the day of the month will be a link if there is an event on that day. Clicking the link will open a "pop up" window, displaying the events for that day. A template determines the layout of the events. Click Edit Templates > Calendar.
Repeating Events
The event calendar allows you to submit an event once and have it repeat based on the criteria you can set. Events can repeat daily, weekly, monthly and yearly, as many times as you choose.
Editing Events
If you have previously submitted a repeating event and need to edit it, the edit will only affect events that are forward of the one you are editing. For example, if you have an event that happens once a week for seven weeks. If you edit the third event in the series (week 3 of 7), any changes will only affect weeks 3 - 7. Events for weeks 1 and 2 will be left intact.