Tag Library

Jump to a Section

Member Nav Bar

<?php member_login_navbar(); ?>

Template: Membership > Member Login Nav Links

Displays the member navigation bar (login, logout, members, profile, and register).

In the control panel, you'll find two templates that define the look of these links: pMachine displays one template if a member is logged-in, the other if a member is logged-out.

You don't have to use the "nav bar" look if you don't want to. You can even loose the concept completely and just put "static" links to the various pages on your site. You can also get creative and put a lot more than just the nav bar in the two templates: perhaps two versions of the entire header to your site, which changes depending on whether someone is logged in or not.

Top of Page

Weblog Tags

weblog_entries()

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

Template: Weblog > Weblog Multi-entry Templates

This is a multi-function tag, which will display a number of different things depending on how the page containing the tag is accessed.


weblog_entries_limit()

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

Template: Weblog > Weblog Multi-entry Templates

Displays a limited number of your most recent entries. This tag is almost identical to the one above, only it lets you "hard code" a specific number of entries to display. You'll notice the word "weblog" in the tag. This tag requires you to tell it which weblog to display. If you only have one weblog, leave the default word "weblog". If you have other weblogs, you'll need to change that word to the name of the weblog you want to display. The third parameter is the number of entries to show.


weblog_entry_ind()

<?php weblog_entry_ind($id); ?>

Template: Weblog > Weblog Single-entry Templates

Displays an individual weblog entry. You can use this tag on either your "comments" page, your "more" page (or both), or on specialty purpose pages. The formatting for this tag is done in the "Weblog Single-Entry" template.

<?php weblog_entry_alt1($id); ?> <?php weblog_entry_alt2($id); ?> <?php weblog_entry_alt3($id); ?> <?php weblog_entry_alt4($id); ?>

Since pMachine gives you 6 entry fields, these "alternative" templates, give you additional ways to format your information. You can use these templates on any "secondary" pages, such as the "comments", "more", or specialty purpose pages, which can be created as well.


weblog_categories()

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

Template: None

Displays a list your categories as either a "drop-down" menu, or a list of text links, depending on the syntax used in the tag. By default, the tag will show the "text" version - a list of normal text links. If you replace the word "text" with "drop", you'll instead see a "drop-down" menu. There is an entire section in the manual devoted to the subject of categories. Please read that section, since there are additional options for this tag.


weblog_title_list()

<?php weblog_title_list(); ?>

Template: None

This tag will create a list of titles of your weblog entries. Each title will be formatted as a link, which can be clicked to see any particular entry. By default, the list is formatted with your newest entry at the top of the list. It also includes the date the entry was created.

Note: There are eight optional parameters for this tag, which determine how and what is shown. The parameters are handled differently in this tag than in most of the other tags. Rather than putting the individual parameters in the tag itself, you'll use an array as shown in the example below.

Important: If you choose to use the parameter array, place $wtl in the tag:

<?php weblog_title_list($wtl); ?>

These are the optional parameters for this tag:

In order to add parameters to the tag, you'll use an array. Place this array immediately preceding the tag. Add the options between the double quotes as shown in this example:

<?php $wtl['show_date'] = "yes"; $wtl['date_fmt'] = "M d, Y"; $wtl['limit'] = "10"; $wtl['offset'] = "1"; $wtl['orderby'] = "alpha"; $wtl['weblog'] = "news"; $wtl['category'] = "personal"; $wtl['page'] = "comments"; ?> <?php weblog_title_list($wtl); ?>

weblog_headlines()

<?php weblog_headlines(); ?> <?php weblog_headlines_alt(); ?>

Template: Weblog > Weblog Headlines Templates

Weblog headlines are short excerpts from your most recent entries. Headlines can appear on a different page than your weblog. If, for example, the main page of your site is not your weblog, you can place the most recent "headlines" on the page as a teaser to your weblog.

Each headline can display any or all of the following information:

You'll find a "headlines" template in the control panel, which allows you to customize the look of your headlines. As with most templates, there are parameters, which let you customize what gets displayed.

Optional Parameters:

There are four optional parameters, which can be added to the tag:

This is how the tag will look using parameters:

<?php weblog_headlines("all","3","30","personal"); ?>

Note: If you need to use some of the parameters, but not all of them, you can put a set of empty quotes in place of the parameter. For example:

<?php weblog_headlines("","","","personal"); ?>

offset_headlines

<?php offset_headlines(); ?> <?php offset_headlines_alt(); ?>

Template: Weblog > Weblog Headlines Templates

This tag is absolutely identical to the "weblog_headlines" tag above — with one exception: You can add an offset. An offset lets you omit a certain number of headlines from being shown from the beginning of the list. For example, if you put the number "3" as the offset, the tag will display the list starting at the fourth entry. This can be handy if you are displaying headlines on a page that also includes your normal weblog entries. It will prevent entries being duplicated.

The offset is added to the first parameter of the tag:

<?php offset_headlines("3"); ?>

All of the parameters from the "weblog_headlines" tag above can be used as well, however, they must be added after the offset, which must stay in the first position.


related_entries()

<?php related_entries($id); ?>

Template: None

If you use categories, you can use this tag on any of your "individual" entry pages (like your "comments", "more" or any specialty pages) to display a list of entry titles from the same category as the entry being viewed. This tag allows your visitors to navigate to other entries from the same category. There are two optional parameters:

Tag example:

<?php related_entries($id,"10","stuff"); ?>

show_field()

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

Template: None

Lets you show an individual field (blurb, body, more, etc.) from any entry. This can be used to create more unique page layouts by letting you put single fields wherever you need them on your page.

Note: This tag cannot be used on your main "index" page. It will only work on secondary pages, like the "comments", "more", or other "specialty" pages that contain an ID number in the URL.

Replace the word "which" with a word from this list, indicating the field you want to show:


most_recent_field()

<?php most_recent_field("which"); ?>

Template: None

Lets you show an individual field (blurb, body, more, etc.) from your most recent entry. This tag is virtually identical to the "show_field()" tag above, only it can be used on any page.

You can optionally add a second parameter if you have more than one weblog and you want to show the most recent entry from a specific weblog.

<?php most_recent_field("which","weblog"); ?>

Replace the word "which" with a word from this list, indicating the field you want to show:


random_field()

<?php random_field($gen,"which"); ?>

Template: None

Lets you show an individual field (blurb, body, more, etc.) from an entry selected at random. Note: You can optionally "link" multiple instances of this tag together if you need to show several fields from the same entry. Linking is described below.

There are two optional parameters:

This is what the tag looks like with the optional parameters:

<?php random_field($gen, "which","weblog","15"); ?>

Replace the word "which" with a word from this list, indicating the field you want to show:


random_field_id()

<?php $gen = random_field_id(); ?>

Template: None

This tag lets you link multiple instances of the random_field() tag when you need to show several fields from the same entry.

Although you'll notice the syntax is slightly different than other tags, using it is easy — just put it on the same page that contains multiple instances of the random_field() tag. As long as this tag is on the page above the other tags it will communicate with them. There are two optional parameters:

This is what the tag looks like with the optional parameters:

<?php $gen = random_field_id("weblog","15"); ?>

get_weblog_name()

<?php get_weblog_name($id); ?>

Template: None

This tag will display the name of your weblog based on the ID number in the URL. This tag will only work on your secondary pages, like "comments", "more", and specialty pages. If you put a zero in the second parameter the tag will "return", rather than "echo", which can be handy if you need to dynamically pass the name of the weblog to any of the previous tags.


get_id()

<?php get_id($id); ?>

Template: None

This tag lets you extract the individual ID number from the longer ID string (www.yoursite.com?id=153_0_2_1_C), which can be useful in some situations. If you put a one in the second parameter the tag will "return", rather than "echo":

<?php get_id($id, 1); ?>

Top of Page

Archives Tags

archive_entries()

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

Template: Weblog > Archives Multi-entry Templates

Displays your archived entries, grouped by individual month. In order for your visitors to access each month's worth of entries is by clicking the monthly links on your main page.

You can optionally specify the sorting order of the entries, by adding a third parameter:

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

If you prefer to format your archives identically to your main weblog, you can instead use <?php weblog_entries($id,"weblog"); ?> on your archives page.

Note: If you create an additional weblog, you'll need to change the word "weblog" in the tag to match the name of your new weblog.


archive_month_names()

<?php archive_month_names("weblog"); ?>

Template: Weblog > Archive Misc. Templates

Creates the links (month name and year) to your archive page. If you want to limit the number of months in the list, you can add a number in the second parameter:

<?php archive_month_names("weblog","10"); ?>

pMachine lets you specify whether your monthly archives are displayed on your main weblog page, or on a separate "archive" page. You'll specify this in the weblog preferences page.


archive_heading()

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

Template: Weblog > Archive Misc. Templates

You can place this tag on your archives page. It will display the name of the month and year of the archives currently being viewed. There is a template to format the output of this tag. Note: If you create an additional weblog, you'll need to change the word "weblog" in the tag to match the name of your new weblog.


archive_summary()

<?php archive_summary(); ?>

Template: Weblog > Archive Summary Templates

This tag will display a summary of all the entries you've ever written (or from a specific weblog), organized by year and month. Typically you'll see the name of each month, followed by a list of entry titles. Each title is a link to the actual entry.

If you don't use any parameters in the tag, it will show a summary of all of your weblogs combined (if you have more than one), or you can use the word "all", to indicate all weblogs. You also put the name of a specific weblog in the tag:

<?php archive_summary("weblog"); ?>

Please note that if you are displaying all of your weblogs, the formatting for the summary will be done with your primary weblog templates.

You can also limit the number of months shown by putting a number in the second position:

<?php archive_summary("all","12"); ?>

category_summary()

<?php category_summary(); ?>

Template: Weblog > Category Summary Templates

This tag will display a summary of all the entries you've ever written (or from a specific weblog), organized by category. Each title is a link to the actual entry.

If you don't use any parameters in the tag, it will show a summary of all of the categories for all of your weblogs (if you have more than one). You also put the name of a specific weblog in the tag:

<?php category_summary("weblog"); ?>

You can also limit the number of titles in each category shown by putting a number in the second position:

<?php category_summary("all","12"); ?>

Please note that if you are displaying all of your weblogs, the formatting for the summary will be done with your primary weblog templates.


combined_summary()

<?php combined_summary($view,"weblog"); ?>

Template: Weblog > Category Summary Templates and Archive Summary Templates

With this tag, you can show either the category summary or the archives summary on the same page. This tag will not show both lists together, but rather one or the other, depending on how people access the page. When people click the link to the summary page, depending on how the URL is set up, the tag will know to show one or the other.

Note the variable $view in the tag. Leave this exactly as shown. The work "weblog" can be replaced with the name of a specific weblog, or you can omit it to show all weblogs combined (if you have more than one), like this:

<?php combined_summary($view); ?>

In order for the tag to work, you will need to put the following code at the end of the URL to the summary page:

?view=date

Or

?view=category

For example: If your summary page is called archivelist.php, you will make two links:

<a href="archivelist.php?view=date">View by date</a> <a href="archivelist.php?view=category">View by category</a>

Please note that if you are displaying all of your weblogs, the formatting for the summary will be done with your primary weblog templates.

Top of Page

Comment Tags

weblog_comments()

<?php weblog_comments($id); ?>

Template: Weblog > Comment Display Templates

Displays the comments for a particular weblog entry.


weblog_comment_form()

<?php weblog_comment_form($id); ?>

Displays the form that visitors use to submit a comment. There are two versions of the form depending of whether your require membership to post or not. pMachine will automatically display the correct version based on your preference settings. The difference between the two forms is this:

The non-registration version has fields for the person's name, email and location as well as checkboxes to choose whether to display their email, and whether to set a cookie to remember them.

The registration version has only the textarea box, since all of the member information is stored in the database.


if (comments_exist($id)) {

<?php if (comments_exist($id)) { ?>

Template: None

This is a "wrapper" tag that lets you show and/or hide content depending on whether the comments page contains user comments.

For example, let's say you want to show a heading on the comments page that says "look at all the comments on this page!". If no one had submitted any comments yet this heading wouldn't work very well.

Since this tag has you two possible "states" (comments exist/do not exist), you can tailor the page content for each "condition".

You can do more with this tag than just show messages. Any kind of content can be shown/hidden. You can even put other pMachine tags within the "wrapper".

Important:
There is an opening and a closing tag that must be used. You must use the tags as shown in the examples below or you will get parse errors.

There are two ways to use the tag, depending on whether you only want to show content if comments exist (first method), or whether you want to show separate content if there are/aren't comments (second method).

First method:

<?php if (comments_exist($id)){ ?> Here are the comments: <?php } ?>

Second method: This method contains an "else" conditional in order to show two distinct sets of content depending on the existence of comments:

<?php if (comments_exist($id)){ ?> Here are the comments <?php } else { ?> There are no comments yet!  Be the first to leave one! <?php } ?>

Notice the "else" clause in the tag.

Top of Page

Linking Tags

previous_weblog_entry() and next_weblog_entry()

<?php previous_weblog_entry($id); ?> <?php next_weblog_entry($id); ?>

Template: None

Both of these tags are designed to go on your comments page. They dynamically show the title of your next and previous weblog entries as links. These links allows your visitors to cycle forward or backward one entry at a time.

If you want the links to display something other than the title of each entry you can put a word or phrase in the second parameter. For example:

<?php previous_weblog_entry($id,"Previous Entry"); ?> <?php next_weblog_entry($id,"Next Entry"); ?>

return_to_weblog_or_archives_link()

<?php return_to_weblog_or_archives_link($id); ?>

Template: Weblog > Nav Link Templates

This tag can be used on either the "comments" page, or the "more" page. It dynamically creates a link that takes visitors back to the page they were viewing just before they accessed the "comments" or "more" page. This link is totally dynamic, in that it remembers where the visitor came from, whether it's from your archives page, your weblog page, a nested weblog page (by clicking through the "next/previous" links), or any number of other weblog "views", like categories, single day views, or an entire month's worth.

There are two templates, which allows you to define what the link says. There is one template for the link back to the archives page and one to the link back to the weblog page. pMachine automatically knows which one to use.


if_field_link()

<?php if_field_link($id,"fieldname","page","label"); ?>

Template: None

This tag is particularly useful with "eZine" style sites that need to link to portions of articles spanning multiple pages — especially if each article might span a varying number of pages.

This tag will look "ahead" for the existence of data in the specified field (blurb, body, more, etc.) and create a link to that page if so. If there is no data the link will not appear.

There are three mandatory parameters in this tag:

Example: You are using four custom fields (more, custom1, custom2, custom3) to display your articles. Each one of those fields is on its own page (pageone.php, pagetwo.php, pagethree.php and pagefour.php).

This is how the links will appear on each page:

more.php

<?php if_field_link($id,"custom1","pagetwo.php","Page Two"); ?>

pagetwo.php

<?php if_field_link($id,"custom2","pagethree.php","Page Three"); ?>

pagethree.php

<?php if_field_link($id,"custom3","pagefour.php","Page Four"); ?>

pagefour.php No link needed — the last page.

Note: You can use the tags as "previous" page links as well.


homepage_link()

<?php homepage_link(); ?>

Template: None

Displays a link to your main weblog page. It uses the name and url from your preferences to create the link.


weblog_link()

<?php weblog_link("weblog","name"); ?>

Template: None

Displays a link to a specific weblog. The first parameter is the name of the weblog. The second is the name you want the link called.

For example: If your weblog is called "news" and you want the link to say "News Home", you tag will look like this:

<?php weblog_link("news","News Home"); ?>

encoded_email()

<?php encoded_email("support@pmachine.com"); ?>

Template: None

Creates an email link that will not be harvested up by "Spambots" visiting your site (hopefully). The email address placed in this tag is converted to HTML numeric entities and then is dynamically written using a JavaScript function. The combination of these two should make your email address invisible to Spambots. The first parameter is your email address. The second parameter is optional if you prefer the link to show something different than your email address. There is an optional third parameter which lets you disable the JavaScript by putting a "0" digit in the third position:

<?php encoded_email("support@pmachine.com","Click here to email me","0"); ?>

Top of Page

Search Tags

simple_search_form()

<?php simple_search_form(); ?>

Template: Search > Search Form Templates

Displays the simple version of the search form that people use to do keyword searches of your weblog with. If you have multiple weblogs and you use the tag as shown, the search script will search through all weblogs.

You can optionally add parameters to this tag to specify which weblog(s) the search should be conducted in, or which weblog(s) not to search in.

To choose which weblogs to search in, use the tag as follows:

<?php simple_search_form("weblog1 weblog2 weblog3"); ?>

Where "weblog1, weblog2 and weblog3" are the names of the weblogs you want searched. Make sure and leave a single space between each weblog name.

To choose which weblogs not to search in, use this syntax:

<?php simple_search_form("not weblog1 weblog2 weblog3"); ?>

Notice the word "not". You only need to use this word once at the beginning of the tag. This will tell the search script to ignore all of the weblogs in the tag. Make sure and leave a single space between each weblog name, and one space after the word "not".


advanced_search_form()

<?php advanced_search_form(); ?>

Template: Search > Search Results Templates

Displays the advanced version of the search form, which visitors can use to do more refined searches. You might not need to use this tag since the tag below generates the advanced search form automatically.

You can optionally add parameters to this tag to specify which weblog(s) the search should be conducted in, or which weblog(s) not to search in.

To choose which weblogs to search in, use the tag as follows:

<?php advanced_search_form("weblog1 weblog2 weblog3"); ?>

Where "weblog1, weblog2 and weblog3" are the names of the weblogs you want searched. Make sure and leave a single space between each weblog name.

To choose which weblogs not to search in, use this syntax:

<?php advanced_search_form("not weblog1 weblog2 weblog3"); ?>

Notice the word "not". You only need to use this word once at the beginning of the tag. This will tell the search script to ignore all of the weblogs in the tag. Make sure and leave a single space between each weblog name, and one space after the word "not".


show_search_result()

<?php show_search_results($weblog,$keywords,$criteria,$where); ?>

Template: Search > Search Form Templates

This tag goes on the search page specified in your search preferences. This tag serves a dual purpose:

  1. It generates the search results, which are displayed on the search page.
  2. If the search page is accessed by itself, not as a result of a search, it displays the advanced search form.

Just like the simple search form, you can optionally add parameters to this tag to specify which weblog(s) the search should be conducted in, or which weblog(s) not to search in.

Important:
If you add the weblog names directly in this tag, you will not be able to use a different set of names in the simple and advanced search forms. The settings in this tag will override the local tag settings.

To choose which weblogs to search in, use the tag as follows:

<?php show_search_results("weblog1 weblog2 weblog3",$keywords,$criteria,$where); ?>

Where "weblog1, weblog2 and weblog3" are the names of the weblogs you want searched. Make sure and leave a single space between each weblog name.

To choose which weblogs NOT to search in, use this syntax:

<?php show_search_results("not weblog1 weblog2",$keywords,$criteria,$where); ?>

Notice the word "not". You only need to use this word once at the beginning of the tag. This will tell the search script to ignore all of the weblogs in the tag. Make sure and leave a single space between each weblog name, and one space after the word "not".

Top of Page

Collective Entry Form Tag

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

Template: Weblog > Collective Entry Form Templates

The purpose of this tag is to display the form used to submit collective weblog entries.

Please read the "collective entry" section of the manual for detailed information regarding this tag.

There are two distinct ways to use this tag:

Linking Method:

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

Reference Method:

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

Top of Page

Tell-A-Friend Tag

<?php tell_a_friend_form($id); ?>

Template: Email > Tell-A-Friend Templates

The purpose of this tag is to display the form used to email a weblog entries to someone. The look of the form is defined in the "email" templates.

<?php tell_a_friend_form($id); ?>

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 link:

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

Top of Page

Calendar Tags

Full-Sized Calendar

There are four different tags, which you can use to display the full-sized calendar. Depending on which tag you use, the calendar will show different content.

Note: You can override the control panel preference settings in order to create multiple instances of the calendar, each with independent display preferences.  See the section below.

<?php mixed_calendar($year,$month); ?>

Template: None

The mixed calendar will show member birthdays and events. Member birthdays will show up in the body of the calendar, events will be accessible by clicking the day of the month.

<?php birthday_calendar($year,$month); ?>

Template: None.

The birthday calendar will show only member birthdays. No events will be shown.

<?php event_list_calendar($year,$month); ?>

Template: None

The "event list" version will show the titles of your events in the body of the calendar. No birthdays will be shown.

<?php event_link_calendar($year,$month); ?>

Template: None

The "event link" version will show each day of the month where there is an event as a link. No birthdays will be shown. This tag is handy if you want to create a mini version of the calendar.


mini_calendar()

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

Template: None

This tag displays a "mini" calendar, which you can place on your weblog page. Unlike the "full-size" calendars, this calendar provides links for days on which there was a weblog post made. Selecting the link will cause your weblog to display entries from the day selected.

You must specify the name of your weblog (if you only have one, leave it as "weblog") so that the calendar will know which weblog to point the links to. In addition, the calendar has a set of "next/previous" arrows, which allow you to navigate from month to month. When you do so, your weblog page will display a full month's worth of entries corresponding to whichever month the calendar is on. This is very similar to how your archives are displayed; only it happens on your primary weblog page.


Multiple Independent Calendars

The display preferences for both of the calendars are located in the "Calendar Preferences" page of the control panel. You can, however, manually override these settings if you need to display more than one of each calendar. As many instances of each calendar can be created - each one with a unique look.

In order to manually define the display preferences, you will use something called an "array". An array is a list of preferences. This is an example of how you'll construct the array:

Note: The sentences after the pound symbols (#) are only comments.

<?php $calpref['cell_width'] = "70"; # Width of each cell. $calpref['cell_height'] = "60"; # Height of each cell. $calpref['header_bg'] = "#6666cc"; # Background color of the calendar header. $calpref['weekday_bg'] = "#dddddd"; # Background color of the days of the week. $calpref['cell_border'] = "#cccccc"; # Calendar border color. $calpref['cell_bg'] = "#ffffff"; # Background color of the days of the month. $calpref['today_bg'] = "#eeeeee"; # Background color of today's date cell. $calpref['path'] = "http://www.yoursite.com/calendar/index.php"; # Absolute path to your calendar ?>

You will put this array immediately above the calendar tag. Then, you will add the $calpref parameter to any of the full-sized calendar tags:

<?php mixed_calendar($year,$month, $calpref); ?>

Or to the mini-calendar tag:

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

show_events()

<?php show_events($id); ?>

Template: None

This tag displays the event details. By default this tag is found in event.php.

Note: This is a Pro version tag.

There are two optional parameters that allow you to specify the formatting of the data and time. The date and time is specified using PHP timestamp codes, which you'll find in the appendix of the manual. You must specify the date and time as separate parameters, since events are not required to have the time, only a date. Here is an example of the tag with the two sets of parameters:

<?php show_events($id, "M d, Y", " h:i a"); ?>

Top of Page

Member Related Tags

These tags are only necessary if you require membership.

activation_instructions_form()

<?php activation_instructions_form(); ?>

Template: Membership > Member Activation Email

If a member attempts to log in before activating their account (if you require member activation), they will be told that their account is not yet active and shown a link to the page containing the "activation instructions form". This form enables them to re-request activation instructions.


member_email_form()

<?php member_email_form($id); ?>

Template: Membership > Email Member Form

Displays the email form that members can use to email other members directly from your site with. This feature requires member registration.

Since members can specify whether to accept email, or not, this feature works on a member-by-member basis. The form also does not reveal the address of the member who is being sent an email to the member sending the email.


member_forgot_pw_form()

<?php member_forgot_pw_form(); ?>

Template: Membership > Forgotten Password Form

Displays the "forgotten password form" that members can use to request their username and password.


member_login_form()

<?php member_login_form(); ?>

Template: Membership > Login Form

Displays the member login form.


member_messages()

<?php member_messages($number,$info); ?>

Template: None

This tag goes on the "member messages" page (messages.php). The purpose of this page to display messages that users might encounter while using your site. Generally these are error messages, like "The login information you submitted is incorrect". There are over 60 messages covering every conceivable situation. pMachine automatically re-directs members to this page whenever they do something requiring a message.


member_edit_profile_form()

<?php member_edit_profile_form(); ?>

Template: Membership > Profile Form (private)

Displays the form members use to edit the information in their profile. By default this tag is on a page called profile_edit.php. The link to this page in the "member nav bar", covered previously.


show_all_members()

<?php show_all_members($id); ?>

Template: Membership > Member List

Displays a list of all registered members. By default this tag is on a page called profile_view_all.php.


view_member_profile()

<?php view_member_profile($id); ?>

Template: Membership > Public Profile

Displays an individual member's publicly viewable profile. Not the private one mentioned earlier. By default this tag is on a page called profile_view_ind.php.


view_member_update()

<?php view_member_update($id); ?>

Template: Membership > Show Updated Profile

If a member edits their profile, this tag shows the updated information. By default this tag appears on a page called profile_view_update.php.


member_register_form()

<?php member_register_form(); ?>

Template: Membership > Registration Form

Displays the member registration form appearing in register.php.

Top of Page

Mailing List Tags

mailinglist_form()

<?php mailinglist_form(); ?>

Template: Email > Mailing List Templates

Displays a form that visitors will use to input their email into your mailing list database. Does not subscribe a user to a specific mailing list but will allow the user to receive site wide mailings.

mailinglist_subscribe_form()

<?php mailinglist_subscribe_form("mailinglist",$template); ?>

Template: None. Allows tag instance specific template.

Displays a form that visitors will use to subscribe to a specific mailing list. There is a default template, but the tag allows knowledgeable, advanced users to set a template for every instance of this tag. If you do use the template field, remember to use single-quotes (not curly or double-quotes) around your template.

Simple Example:

<?php mailinglist_subscribe_form("mailinglist"); ?>

Advanced Example:

<?php $template = '<input name="mlst" type="hidden" value="%%mlst%%" /> <input name="email" type="text" value="%%user_email%%" size="25" /> <input type="submit" name="Submit" value="Subscribe" />'; mailinglist_subscribe_form("mailinglist1",$template); ?>

Variables:

mailinglist_subscribe_menu()

<?php mailinglist_subscribe_menu($header,$results,$footer); ?>

Template: None. Allows tag instance specific templates.

Creates a form menu of all the publicly available mailing lists and allows the user to input their email address and subscribe to whichever mailing they so desire. There are default templates, but the tag allows knowledgeable, advanced users to set certain templates for every instance of this tag. If you do use the template field, remember to use single-quotes (not curly or double-quotes) around your templates.

Simple Example:

<?php mailinglist_subscribe_menu(); ?>

Advanced Example:

<?php $header = '<table cellpadding="4" cellspacing="1" border="0" width="40%"> <tr> <th>Mailing Lists</th> <th>Subscription status</th> </tr>'; $results = ' <tr> <td>%%mailinglistname%%</td> <td> <select name="%%field_name%%" class="smpulldown"> <option value="yes" %%mail_yes%%>yes</option> <option value="no" %%mail_no%%>no</option> </select> </td> </tr>'; $footer = '</table><br /> Your email: <input name="email" type="text" value="%%user_email%%" size="30" /> <br /><br /> <input type="submit" value="SUBMIT" class="button">'; mailinglist_subscribe_menu($header,$results,$footer); ?>

Variables:

subscription_reminder_form()

<?php subscription_reminder_form($template); ?>

Template: None. Allows tag instance specific template.

Sends an email to the entered email address displaying the email address' current mailing list subscriptions. There is a default template, but the tag allows knowledgeable, advanced users to set this template for every instance of this tag. If you do use the template field, remember to use single-quotes (not curly or double-quotes) around your templates.

Simple Example:

<?php subscription_reminder_form(); ?>

Advanced Example:

<?php $template = ' <input name="email" type="text" value="%%user_email%%" size="25" /><br /> <input type="submit" name="Submit" value="Submit" />'; subscription_reminder_form($template); ?>

Variables:

mail_archive_menu()

<?php mail_archive_menu("mailinglist","options", $template); ?>

Template: None. Allows tag instance specific template for displaying of results.

Advanced Example:

<?php $template = '<strong>Date:</strong> %%time_sent%%<br /> <strong>To:</strong> Mailing List - %%to_whom%% <br /> <strong>From:</strong> %%from_whom%% <br /> <strong>Subject:</strong> <a href="%%mail_link%%">%%subject%%</a> <br /> <strong>Message:</strong><br /> %%short_message%%<br /><br />'; mail_archive_menu("public","date sort author",$template); ?>

mail_archive_mailings()

<?php mail_archive_mailings("mailinglist","sort","limit",$template,"author", "date"); ?>

Template: None. Allows tag instance specific template.

Creates a list of mailings sent. There is a default template, but the tag allows knowledgeable, advanced users to set this template for every instance of this tag. If you do use the template field, remember to use single-quotes (not curly or double-quotes) around your templates.

Simple Example:

<?php mail_archive_mailings("public","date","20","","you@yoursite.com", "tmonth"); ?>

Advanced Example:

<?php $template = '<strong>Date:</strong> %%time_sent%%<br /> <strong>To:</strong> Mailing List - %%to_whom%% <br /> <strong>From:</strong> %%from_whom%% <br /> <strong>Subject:</strong> <a href="%%mail_link%%">%%subject%%</a> <br /> <strong>Message:</strong><br /> %%short_message%%<br /><br />'; mail_archive_mailings("public","","",$template,"you@yoursite.com", "tmonth"); ?>

view_mailing()

<?php view_mailing("id",$template); ?>

Template: None. Allows tag instance specific template.

Shows a single mailing.

Simple Example:

<?php view_mailing("12"); ?>

Advanced Example:

<?php $template = '<strong>Date:</strong> %%time_sent%%<br /> <strong>To:</strong> Mailing List - %%to_whom%% <br /> <strong>From:</strong> %%from_whom%% <br /> <strong>Subject:</strong> %%subject%% <br /> <strong>Message:</strong><br /> %%message%%<br /><br /> <a href="%%archive_link%%">Return to Archives</a>'; view_mailing("13",$template); ?>

Top of Page

Trackback Tags

<?php weblog_trackbacks($id); ?>

Template: Weblog > Trackback Templates

Displays the trackbacks associated with a particular weblog entry. You can use this tag on either your "comments" page, your "more" page (or both), or on specialty purpose pages. The formatting for this tag is done in the "Trackback Templates" template

Top of Page

Pingback Tags

<?php weblog_pingbacks($id); ?>

Template: Weblog > Pingback Templates

Displays the pingbacks associated with a particular weblog entry. You can use this tag on either your "comments" page, your "more" page (or both), or on specialty purpose pages. The formatting for this tag is done in the "Pingback Templates" template

Top of Page

RSS Parser Tag

Template: RSS Parser Templates

<?php show_rss_page("template_name","url_to_rss_page","10"); ?>

Shows an RSS feed from another web site. 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. Read the manual for more info.

Top of Page

Contact Form Tag

<?php contact_form(); ?>

Template: Email > Contact Form Template

Displays a "contact" form that visitors can use to send email to the site admin. The email message is sent to the address listed under "admin email" in the General Preferences page.

To change the look of the form you'll modify the "Contact Form Template" in the Control Panel. Note: you do not have to add opening and closing <form> tags since pMachine generates these automatically.

You can also specify a default subject that will appear in the subject field by adding it as an argument as follows:

<?php contact_form("Place your subject here like this"); ?>

Make sure and use quotes as shown.

You can also override the normal destination of the email by adding an email address to the tag. This is useful if you need multiple contact forms, all of them sending to different destinations.

<?php contact_form("subject","you@yoursite.com"); ?>

Note: If you want to add an email address, but you don't want to specify a subject, put empty quotes in the tag like this:

<?php contact_form("","you@yoursite.com"); ?>

Top of Page

Mailing List Tag

<?php mailinglist_form(); ?>

Template: Email > Mailing List Templates

Displays a form that visitors will use to subscribe to your mailing list.

Top of Page

Hit Counter Tag

hit_counter()

<?php hit_counter(); ?>

Template: None

Displays the hit-counter. In your General Preferences you can choose whether you want to display a graphic-based, or text-based hit counter. The graphic-based counter pulls images out of the images/digits/ directory to create the display.


Multiple Hit Counters

Although the control panel allows you to define the settings of your primary hit counter, you can create additional independent hit counters by adding parameters to the hit counter tag:

<?php hit_counter("name","startcount","leadingzeros","type","imagetype","path"); ?>

Note: All of the parameters except "name" are optional. If you omit parameters they will be taken from your primary hit counter.


Deleting A Hit Counter

You can delete any of your custom hit counters by putting the word "delete" in the second parameter and loading the page containing that particular hit counter:

<?php hit_counter("Name","delete"); ?>

Custom Images

To make your own digits: Create a set of ten images — one image for each number 0 through 9. These can be any image format (jpeg, gif, png, etc.). Name these images 0.x, 1.x, 2.x... 9.x (where x is the image type).



Top of Page

Statistics Tags

total_weblog_entries()

<?php total_weblog_entries(); ?>

Template: None

Total number of open weblog entries in your database. If you have more than one weblog, you can optionally limit the total to a specific weblog:

<?php weblog_stats("weblog"); ?>

total_comments()

<?php total_comments(); ?>

Template: None

Total number of comments from all open weblog entries in your database. If you have more than one weblog, you can optionally limit the total to a specific weblog:

<?php total_comments("weblog"); ?>

total_entries_and_comments()

<?php total_entries_and_comments(); ?>

Template: None

Total number of weblog entries and comments from all weblogs. If you have more than one weblog, you can optionally limit the total to a specific weblog:

<?php total_entries_and_comments("weblog"); ?>

date_of_recent_entry()

<?php date_of_recent_entry(); ?>

Template: None

Shows the date of the most recent weblog entry. If no parameters are used, the tag will show the most recent of all your weblogs (if you have more than one), and the date will be formatted according to the your main weblog preferences. There are two optional parameters:

<?php date_of_recent_entry("news","m/d/Y"); ?>

Note: If you want to manually set the date, but you do not want to specify a weblog, use empty quotes as the first parameter:

<?php date_of_recent_entry("","m/d/Y"); ?>

date_of_recent_comment()

<?php date_of_recent_comment(); ?>

Template: None

Shows the date of the most recent comment. If no parameters are used, the date will be formatted according to the your main weblog preferences. There are two optional parameters:

<?php date_of_recent_comment("news","m/d/Y"); ?>

Note: If you want to manually set the date, but you do not want to specify a weblog, use empty quotes as the first parameter:

<?php date_of_recent_comment("","m/d/Y"); ?>

date_of_recent_combined()

<?php date_of_recent_combined(); ?>

Template: None

Shows the date of the most recent weblog entry or the most recent comment, whichever one is more recent. If no parameters are used, the tag will show the most recent date out from all of you weblogs/comments. The date will be formatted according to the your main weblog or comments preferences. There are two optional parameters:

<?php date_of_recent_combined("news","m/d/Y"); ?>

Note: If you want to manually set the date, but you do not want to specify a weblog, use empty quotes as the first parameter:

<?php date_of_recent_combined("","m/d/Y"); ?>

total_members()

<?php total_members(); ?>

Template: None

Shows the total number of registered members. You can optionally show the total number of a particular member status by putting the status number in the tag:

<?php total_members(3); ?>

There are twelve status levels:

  1. Suspended
  2. Pending
  3. Active Member Level 1
  4. Active Member Level 2
  5. Active Member Level 3
  6. Active Member Level 4
  7. Admin Level 1
  8. Admin Level 2
  9. Admin Level 3
  10. Admin Level 4
  11. Admin Level 5
  12. Superuser

most_commented_entries()

<?php most_commented_entries(); ?>

Template: None

This tag will show a list of weblog entry titles, sorted by most comments. The titles will be formatted as links, pointing to the specific entry, shown by default on the "comments" page. Only entries for which there are comments will be listed. This tag has four optional parameters.

<?php most_commented_entries("all","10","yes","weblog"); ?>

Note: If you need to use any one parameter, but not all of them, you can put a set of quotes in place of the parameter. For example: If you want to show the total number of comments, but you don't want to limit the list or choose a weblog, use the tag like this:

<?php most_commented_entries("","","yes"); ?>

most_read_entries()

<?php most_read_entries(); ?>

Template: None

This tag is absolutely identical to the previous tag except that it displays the entries that have been read the most. All of the parameters from the previous tag are available for this one as well.


list_member_comments()

<?php list_member_comments($id); ?>

Template: None

This tag is designed be used on the member public profile page. It will generate a list of recent weblog entry titles for which the member has submitted comments. You can add an optional second parameter to limit the number of items in the list:

<?php list_member_comments($id,"10"); ?>

Note: This tag only works with registered members.


list_member_entries()

<?php list_member_entries($id); ?>

Template: None

This tag is similar to the previous tag, only it shows a list of "collective" entries that a particular member has submitted, therefore you will only use this tag if you have a collective weblog. It must also be used on the member public profile page. There are two optional parameters:

<?php list_member_entries($id,"10","comments"); ?>

Note: This tag only works with registered members.

Top of Page

Forum-Specific Tags

forum_entries()

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

Template: Forum > Weblog Multi-entry Templates

This tag is designed to go on the forum.php page. It is almost identical to the weblog_entries() tag used to display weblog entries (described in the weblog tags section), with one main exception: There is a variable ($which) in the second parameter, rather than the name of a specific weblog. The purpose of the variable is so that multiple forums can all share the same forum.php page. Normally pMachine requires that each weblog have it's own discreet page. By putting a variable in the tag, multiple forums can share one page.


forum_entry_form()

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

This tag is almost identical to the "collective entry form". When this version of the tag is used, pMachine knows you are using your collective weblog as a forum, rather than a normal collective weblog.


preview_forum_post()

<?php preview_forum_post($id); ?>

Template: None

This tag is designed to be placed on a separate "preview" page (preview.php). It allows forum posts to be previewed.


get_which()

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

Template: None

This tag is used with the "new post" button. It is used in the link to the submission form as follows:

<a href="newentry.php<?php get_which($id,$which); ?>">New Post</a>

get_weblog_name()

<?php get_weblog_name($id); ?>

Template: None

Generates the name of the weblog from the ID number present on the threads.php page. By default it's used in the links at the top of the threads.php page of the forum.

Top of Page

Security Tags

not_logged_in()

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

This tag "set" allows you to restrict content based on whether or not a member is logged in. You can use it torestrict an entire page or only a piece of content within a page.

There are two optional parameters:

Tag example:

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

This would restrict the content to any members level 7 or higher and would only show content from the weblog named "secret".

restrict_to_weblog()

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

In addition to making sure that non-members can't access your private pages, you can also ensure that none of that private data can appear on a public page if someone tries to manipulate the URL ID string. This is done by placing a tag on your public page, which specifies the weblog content that can appear on that page.

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 "secret" — and you had the standard "members only" code on the "secret" 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 "secret" 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