General Info Template Language WCTL Commands WebX/Chat WebX/Pro
Release Notes Standard Templates URL Codes WebX/Multi FastCGI, NSAPI, ISAPI

Visit the Web Crossing Conference to find a wealth of WebX info and a community of WebX experts on the Web!

Web Crossing Standard Templates

Table of Contents

Revision history
About standard templates
List by function
Alphabetical list

» Revision history

05MAR98

  • Added authenticateFilter, loginFilter, loginFailureFilter, registerFailureFilter, httpBasicNewFilter.

    17FEB98

  • Added registerProcessFilter and preferencesProcessFilter.

    21APR97

  • Allow moderated messages to be posted directly if they do not contain any objectionable words (instead of showing the form to edit/approve the post).

    » About standard templates

    Web Crossing recognizes a large number of template macros which may be defined by the sysop to customize a Web Crossing site.

    The standard.tpl file includes an extensive set of templates which match the built-in page layouts as a starting point for your customization. You can copy templates from standard.tpl to your webx.tpl file and then edit them as appropriate. (If it doesn't already exist, create a new empty webx.tpl in the same directory as webx.db).

    » An example template

    To illustrate how whole-page templates work, portions of the standard login template are show here, with annotations.

    This initial piece defines the login template. The comment line makes it easier to find the template.

    This piece opens the HTML document and specifies the page title.

    This piece starts the page body. It uses the background and banner settings from the sysop control panel.

    This piece checks for the type of login. For a normal login, the sysop loginNews is displayed. Otherwise, the user is shown an error message.

    This piece starts the form to collect username and password. Note that the URL for the post is constructed by using template variables:

    This piece adds the input fields for the username and password.

    This piece uses the Login button if the user's browser supports this feature. Otherwise it puts up a form button. (The actual login template in standard.tpl adds the other buttons here.)

    This final piece closes the form, adds the footer, closes body and the HTML document, and ends the login template.

    » List by function

    The following tables organize all the Web Crossing standard templates by function. Just click on a template name to see a detailed description and an example of usage.

    » Login, Password, Greeting, Get-Info and Error Whole Pages
    loginLogin page
    loginToPostLogin page to post a message or add a new discussion/folder
    passwordPassword page
    greetingGreeting page
    registerRegistration page
    registeredRegistration complete page
    getInfoGet Info page
    errorStandard error page

    » Login, Password, and Greeting Components
    loginHeadingInserted as heading in built-in login page
    passwordHeadingInserted as heading in built-in password page
    greetingHeadingInserted as heading in built-in greeting page
    registerHeadingInserted as heading in built-in registration page
    registerCompleteHeadingInserted in built-in registration-complete page
    registerGroupsTemplate to define groups to add newly registered users to
    authenticateFilterControl initial authentication processing
    httpBasicNewFilterControl processing when an HTTP basic user isn't in the Web Crossing user directory
    loginFilterControl login processing
    loginFailureFilterControl login failure processing
    registerProcessFilterControl registration processing
    registerFailureFilterControl registration failure processing

    » Folder Whole Pages
    topLevelDisplay the top-level site page
    folderDisplay a folder
    addFolderAdd a new folder
    editFolderEdit a folder
    checkDeleteFolderCheck to delete a folder
    deletedFolderFolder has been deleted
    previewFolderPreview a new folder in a moderated area
    editPreviewFolderEdit the preview of a new folder in a moderated area

    » Folder Components
    bannerBanner
    titleTitle template
    folderHeadingBeforeInserted before a folder heading
    topLevelHeadingHeading for top-level folder
    defaultFolderHeadingFolder heading if none supplied by its author
    folderHeadingAfterInserted after a folder heading
    folderListEmptyUsed if a folder list is empty
    folderListBeforeInserted before a folder list
    folderListItemLays out a folder list item
    folderListAfterInserted after a folder list
    toolbarToolbar template
    footerFooter

    » Discussion and Message Whole Pages
    discussionDisplay a discussion
    addDiscussionAdd a new discussion
    editDiscussionEdit a discussion
    checkDeleteDiscussionCheck to delete a discussion
    deletedDiscussionDiscussion has been deleted
    editMessageEdit a message
    checkDeleteMessageCheck to delete a message
    deletedMessageMessage has been deleted
    messageErrorDisplay an error posting a message
    previewMessagePreview a moderated message
    editPreviewMessageEdit the preview of a moderated message
    previewDiscussionPreview a discussion
    editPreviewDiscussionEdit the preview of a discussion

    » Discussion and Message Components
    bannerBanner
    titleTitle template
    discussionHeadingBeforeInserted before a discussion heading
    defaultDiscussionHeadingDiscussion heading if none supplied by its author
    discussionHeadingAfterInserted after a discussion heading
    messageListBeforeInserted before a message list
    messageListItemLays out a message item
    messageListBetweenInserted between messages in a message list
    messageListAfterInserted after a message list
    toolbarToolbar template
    postHelpInserted at beginning of built-in add-message form
    unknownUserPostHelpHelp text for unknown users, inserted into the built-in add-message form
    editHelpHelp message for adding or editing a message
    addMessageAdd a new message
    footerFooter

    » Links Whole Pages
    addLinkAdd a link
    editLinkEdit a link
    deleteLinkDelete a link

    » Chat Rooms Whole Pages
    addChatAdd a chat room
    editChatEdit a chat room
    deleteChatDelete a chat room
    chatRoomEnter a chat room

    » Preferences, Bookmarks and User Information
    editPreferencesEdit user preferences
    preferencesProcessFilterControl processing of a user preferences form
    editedPreferencesFinished editing user preferences
    bookmarksUser bookmarks page
    userInfoUser personal information page

    » Subscription Whole Pages
    noSubscriptionsUser does not have a subscription page
    subscribedSubscribed page
    subscrCancelledSubscription canceled page
    noNewMessagesNo new subscription messages page

    » Search Whole Pages
    searchSearch page
    searchResultsSearch results page

    » Page Components
    bannerBanner
    titleTitle template
    toolbarToolbar template
    toolbarAfterInserted after the toolbar
    toolbarBeforeInserted before the toolbar
    toolbarBetweenInserted between lines of the toolbar
    footerFooter

    » Alphabetical list

    TemplateFunction
    addChatAdd a new chat room. If specified, this template is used to prepare the add-chat-room form. See the template in standard.tpl.
    addDiscussion Add a new discussion. If specified, this template is used to prepare the form to add a new discussion. See the template in standard.tpl.
    addFolder Add a new folder. If specified, this template is used to prepare the form to add a new folder. See the template in standard.tpl.
    addLinkAdd a new link. If specified, this template is used to prepare the add-link form. See the template in standard.tpl.
    addMessageAdd a new message. If specified, this template is used to prepare the add-message form following a discussion message list. (It replaces the postHelp, unknownUserPostHelp, and editHelp templates.)

    To have moderated messages that do not contain objectionable words post directly (instead of going through the normal approve/edit form), add the following to the addMessage form:

      <input name=postDirect type=hidden value=true>
    authenticateFilter Control initial user authentication processing. See WCTL Filters.
    bannerBanner. If specified, this supersedes the top-level banner in the sysop panel.
    bookmarks User bookmarks page. If specified, this supersedes the default bookmarks page.
    chatRoom Enter a chat room. If specified, this template is used to prepare the form to enter a chat room. See the template in standard.tpl.
    checkDeleteDiscussion Check to delete a discussion. If specified, this template is used to prepare the form to check to delete a discussion. See the template in standard.tpl.
    checkDeleteFolder Check to delete a folder. If specified, this template is used to prepare the form to check to delete a folder. See the template in standard.tpl.
    checkDeleteMessage Check to delete a message. If specified, this template is used to prepare the form to check to delete a message. See the template in standard.tpl.
    configtools HTML for the toolbar "config row". If specified, this supersedes the default configtools.
    defaultDiscussionHeading Discussion heading if none supplied by its author. If specified, this supersedes the entry in the sysop panel.
    discussion Whole page for a discussion.
    folder Whole page for a folder.
    defaultFolderHeading Folder heading if none supplied by its author. If specified, this supersedes the entry in the sysop panel.
    deleteChat Tells the user that a chat room has been deleted. If specified, this template is used to prepare the form to confirm that a chat room has been deleted. See the template in standard.tpl.
    deletedDiscussion Discussion has been deleted. If specified, this template is used to prepare the form to confirm that a discussion has been deleted. See the template in standard.tpl.
    deletedFolder Folder has been deleted. If specified, this template is used to prepare the form to confirm that a folder has been deleted. See the template in standard.tpl.
    deletedMessage Message has been deleted. If specified, this template is used to prepare the form to confirm that a message has been deleted. See the template in standard.tpl.
    deleteLink Tells the user that a link has been deleted. If specified, this template is used to prepare the form to confirm that a link has been deleted. See the template in standard.tpl.
    discussionHeadingAfter Inserted after a discussion heading. If specified, this supersedes the entry in the sysop panel.
    discussionHeadingBefore Inserted before a discussion heading. If specified, this supersedes the entry in the sysop panel.
    editChat Edit a chat room. If specified, this template is used to prepare the form to edit a chat room. See the template in standard.tpl.
    editDiscussion Edit a discussion. If specified, this template is used to prepare the form to edit a discussion. See the template in standard.tpl.
    editedPreferences Finished editing user preferences. If specified, this template is used to prepare the form to confirm editing of user preferences. See the template in standard.tpl.
    editFolder Edit a folder. If specified, this template is used to prepare the form to edit a folder. See the template in standard.tpl.
    editLink Edit a link. If specified, this template is used to prepare the form to edit a link. See the template in standard.tpl.
    editPreviewDiscussion Edit a moderated discussion prior to sending it. If specified, this template is used to prepare the form to edit a moderated discussion. See the template in standard.tpl.
    editPreviewFolder Edit a moderated new folder prior to sending it. If specified, this template is used to prepare the form to edit a moderated folder. See the template in standard.tpl.
    editPreviewMessage Edit a moderated message prior to sending it. If specified, this template is used to prepare the form to edit a moderated message. See the template in standard.tpl.
    editFolder Edit a folder. If specified, this template is used to prepare the form to edit a folder. See the template in standard.tpl.
    editHelp Help message for adding or editing a message. If specified, this supersedes the entry in the sysop panel.
    editMessage Edit a message. If specified, this template is used to prepare the form to edit a message. See the template in standard.tpl.
    editPreferences Edit user preferences. If specified, this template is used to prepare the form to edit a message. See the template in standard.tpl.

    Note that additional user variables can be added or edited through this template. Use an input name of "user.XXXX", where "XXXX" is the name you will use with the userField variable. See the example section on adding your own fields.

    error Display an error message. If specified, this template is used to prepare the form to display an error message. See the template in standard.tpl, and the error and errorTitle variables.
    folderHeadingAfter Inserted after a folder heading. If specified, this supersedes the entry in the sysop panel.
    folderHeadingBefore Inserted before a folder heading. If specified, this supersedes the entry in the sysop panel.
    folderListAfter Inserted after a folder list. If specified, this supersedes the entry in the sysop panel.
    folderListBefore Inserted before a folder list. If specified, this supersedes the entry in the sysop panel.
    folderListEmpty Used if a folder list is empty. If specified, this supersedes the entry in the sysop panel.
    folderListItem Lays out a folder list item. If specified, this supersedes the entry in the sysop panel.
    foldertools HTML for the toolbar "folder row". If specified, this supersedes the default foldertools.
    footer Footer. If specified, this supersedes the entry in the sysop panel.
    getInfo Get Info page. If specified, this template is used to prepare the Get Info page. See the template in standard.tpl.
    greeting Greeting page. If specified, this template is used to prepare the greeting page. See the template in standard.tpl.
    greetingHeading Inserted as heading in built-in greeting page. If specified, this supersedes the entry in the sysop panel.
    httpBasicNewFilter Control processing when an HTTP-basic-authentication user is not in the Web Crossing user directory. See WCTL Filters.
    login Login page. If specified, this supersedes the entry in the sysop panel.
    loginHeading Inserted as heading in built-in login page. If specified, this supersedes the entry in the sysop panel.
    loginFailureFilter Control processing when a user login fails. See WCTL Filters.
    loginFilter Control processing of the login form. See WCTL Filters.
    loginToPost Login page to post a message or add a new discussion/folder. If specified, this template is used to prepare the login-to-post page. This page is presented when an unknown user posts, and either the user name is registered, or only registered users are allowed to post. See the template in standard.tpl.
    messageError Message post error page.
    messageListAfter Inserted after a message list. If specified, this supersedes the entry in the sysop panel.
    messageListBefore Inserted before a message list. If specified, this supersedes the entry in the sysop panel.
    messageListBetween Inserted between messages in a message list. If specified, this supersedes the entry in the sysop panel.
    messageListItem Lays out a message item. If specified, this supersedes the entry in the sysop panel.
    noNewMessages No new subscription messages page. If specified, this template is used to prepare the form that tells the user there are no new messages after a Check Subscriptions command. See the template in standard.tpl.
    noSubscriptions User does not have a subscription page. If specified, this template is used to prepare the form that tells the user that he/she does not have a subscription list after a Check Subscriptions command. See the template in standard.tpl.
    password Password page. If specified, this template is used to prepare the password form during the login sequence. See the template in standard.tpl.
    passwordHeading Inserted as heading in built-in password page. If specified, this supersedes the entry in the sysop panel.
    preferencesProcessFilter Control processing of the user-preferences form. See WCTL Filters.
    postHelp Inserted at beginning of built-in add-message form. If specified, this supersedes the entry in the sysop panel.
    previewDiscussion Display a moderated discussion for the user to preview. If specified, the template is used to prepare the form to confirm or edit a moderated discussion. See the template in standard.tpl.
    previewFolder Display a moderated folder for the user to preview. If specified, the template is used to prepare the form to confirm or edit a moderated folder. See the template in standard.tpl.
    previewMessage Display a moderated message for the user to preview. If specified, the template is used to prepare the form to confirm or edit a moderated message. See the template in standard.tpl.
    register Registration page. If specified, this template is used to prepare the new-user registration form. See the template in standard.tpl.

    Note that additional user variables can be added through this template. Use an input name of "user.XXXX", where "XXXX" is the name you will use with the userField variable. See the example section on adding your own fields.

    registerCompleteHeading Inserted in built-in registration-complete page. If specified, this supersedes the entry in the sysop panel.
    registered Registration complete page. If specified, this template is used to prepare the new-user registration complete form. See the template in standard.tpl.

    Note that additional user variables can be displayed in this template. Use the userField variable. See the example section on adding your own fields.

    registerFailureFilter Control processing when a user registration fails. See WCTL Filters.
    registerGroups Template to define user-groups to which to add newly registered users. If this template is specified, new users will automatically be added to the user groups it returns at the time they register. Typically, this template uses the certificate tag to decide which groups the user belongs in.

    You must define this template to return a list of user-group names. (If a user-group does not exist, it is ignored.) For example,

      %% macro registerGroups %%
        %% if CertificateIs %%
          no_tag_group
        %% else if certificateIs text %%
          text_only
        %% endif %%
      %% endmacro %%

    Will add users registering with no tag to the "no_tag_group" group, and users registering with a "text" tag to the "text_only" group.

    Also see the step-by-step in the Sysop Documentation.

    registerHeading Inserted as heading in built-in registration page. If specified, this supersedes the entry in the sysop panel.
    registerProcessFilter Filter processing for a registration form. See WCTL Filters.
    search Search page. If specified, this template is used to prepare the search form. See the template in standard.tpl.
    searchResults Search results page. If specified, this template is used to prepare the search results form. See the template in standard.tpl.
    subscrCancelled Subscription canceled page. If specified, this template is used to prepare the subscription canceled form. See the template in standard.tpl.
    subscribed Subscribed page. If specified, this template is used to prepare the subscription added form. See the template in standard.tpl.
    title Title template. If specified, this supersedes the entry in the sysop panel.
    toolbar Toolbar template. This calls templates for each of the three toolbar rows: usertools, foldertools and configtools. If specified, this supersedes the default toolbar.
    toolbarAfter Inserted after the toolbar. If specified, this supersedes the entry in the sysop panel.
    toolbarBefore Inserted before the toolbar. If specified, this supersedes the entry in the sysop panel.
    toolbarBetween Inserted between lines of the toolbar. If specified, this supersedes the entry in the sysop panel.
    topLevel Whole page for top-level folder.
    topLevelHeading Heading for top-level folder. If specified, this supersedes the entry in the sysop panel.
    unknownUserPostHelp Help text for unknown users, inserted into the built-in add-message form. If specified, this supersedes the entry in the sysop panel.
    userInfo User personal information page. If specified, this template is used to prepare the personal information form. See the template in standard.tpl.

    Note that additional user variables can be displayed in this template. Use the userField variable. See the example section on adding your own fields.

    usertools HTML for the toolbar "user row". If specified, this supersedes the default usertools.


    Copyright © 1996-98 by Lundeen & Associates, Alameda, California.