LunpaCMS Whipping your website into shape! Introducing Lunpa, our mascot.  Her mother was a hamster and her father was Chilean M00se.  Oddly, neither smelt of elderberries.


LunpaCMS Contact Manager Documentation

A Quick Introduction

Organizes lists of contacts into groups for easy display.

The Basics

Creating a New Set

Enter name of new set, and click "Add" button. This will create an empty set.

What Is Happening When a New Set Is Created

  1. Blank admin_contactmanager_set_(set_ID_number)_add_edit.template file is added in the template directory.
  2. Following tables are added:
    contact_manager_set_(set_ID_number)_groups
    contact_manager_set_(set_ID_number)_contacts
    contact_manager_set_(set_ID_number)_contact_descriptors
    contact_manager_set_(set_ID_number)_contact_subdescriptors
  3. Following maps are created:
    LOCAL_CONTACT_MANAGER_SET_(set_ID_number)_BEGIN
    LOCAL_CONTACT_MANAGER_SET_(set_ID_number)_END
    LOCAL_CONTACT_MANAGER_SET_(set_ID_number)_GROUP_BEGIN
    LOCAL_CONTACT_MANAGER_SET_(set_ID_number)_GROUP_END
    LOCAL_CONTACT_MANAGER_SET_(set_ID_number)_HIDE_UNCATEGORIZED
    LOCAL_CONTACT_MANAGER_SET_(set_ID_number)_MULTIPLE_DESCRIPTOR_SEPARATOR
    LOCAL_CONTACT_MANAGER_SET_(set_ID_number)_NAME
    LOCAL_CONTACT_MANAGER_SET_(set_ID_number)_ROW

Getting Ready with Template File

Template file - admin_contactmanager_set_(set_ID_number)_add_edit.template is used to generate contact add/edit form.

Currently following descriptors are available for a contact:

To use a new descriptor which is not listed above, the descriptor must be added to descriptors array in get_contact_descriptor_structure().

<form method=post action="/admin/contactmanager/edit_contact.cgi">
<input type=hidden name=submit_action value="save">
<input type=hidden name=contact_set_id value=":::contact_set_id:::">
<table width=90% align=center cellpadding=5 cellspacing=2 border=0>
<tr>
<td valign=top align=right><b>Contact Name:</b></td>
<td><input type=input name="contact_name" value=":::contact_name:::" size=60>
<input type=hidden name="contact_id" value=":::contact_id:::"></td>
</tr>
<tr>
<td valign=top align=right><b>Description:</b></td>
<td><textarea name="contact_description" rows=10 cols=50>:::contact_description:::</textarea>
<input type=hidden name="contact_description_id" value=":::contact_description_id:::"></td>
</tr>
<tr>
<td valign=top align=right><b>Website:</b></td>
<td><input type=input name="contact_website" value=":::contact_website:::" size=60>
<input type=hidden name="contact_website_id" value=":::contact_website_id:::"></td>
</tr>
<tr>
<td valign=top align=right><b>Contact Number:</b></td>
<td>:::CONTACT_NUMBER_BLOCK:ARGS: var_name=contact_number&type=Phone|Fax :::</td>
</tr>
<tr>
<td valign=top align=right><b>Address:</b></td>
<td>:::CONTACT_ADDRESS_BLOCK:ARGS: var_name=contact_addrs :::</td>
</tr>
<tr>
<td valign=top align=right><b>Email Address:</b></td>
<td><input type=input name="contact_email_address" value=":::contact_email_address:::" size=60>
<input type=hidden name="contact_email_address_id" value=":::contact_email_address_id:::"></td>
</tr>
<tr>
<td valign=middle align=center colspan=2><input type=submit value="Save Contact"></td>
</tr>
</table>
</form>

Getting Ready with Maps

Please see "sample_maps.txt" for the usage and example of each map. Please use :;: instead of ::: to avoid parsing during load_page_info.

Usage and example of each map.

  1. LOCAL_CONTACT_MANAGER_SET_(set_ID_number)_BEGIN: HTML code which will be printed at the beginning of this set.
    Example:
    -----------------------------------------------------------------------------
    <center>:;:HEADING: :::map_LOCAL_CONTACT_MANAGER_SET_1_NAME::: :ARGS: font_size=28 :;:
    :;:TOC:2:;:
    </center><br>
    -----------------------------------------------------------------------------
    :;:TOC:2:;:
    - this line creates table of content with 2 columns.
  2. LOCAL_CONTACT_MANAGER_SET_(set_ID_number)_END: HTML code which will be printed at the end of this set.
  3. LOCAL_CONTACT_MANAGER_SET_(set_ID_number)_GROUP_BEGIN: HTML code which will be printed at the beginning of each group in this set,
    Example:
    -----------------------------------------------------------------------------
    <table align=center width=95% border=0 cellpadding=10 cellspacing=0 bgcolor=:;:color_table_border:;:>
    <tr><td align=center bgcolor=:;:color_table_body:;:>:;:GROUP_NAME:ARGS: font_size=24 :;:</td></tr>
    -----------------------------------------------------------------------------
  4. LOCAL_CONTACT_MANAGER_SET_(set_ID_number)_GROUP_END: HTML code which will be printed at the end of each group in this set.
    Example:
    -----------------------------------------------------------------------------
    </table><br>
    -----------------------------------------------------------------------------
  5. LOCAL_CONTACT_MANAGER_SET_(set_ID_number)_HIDE_UNCATEGORIZED: Flag for displaying non-grouped contacts under 'Uncategorized Group'.
    Value '1' - Hide uncategorized contacts.
    Value '0' or empty - Show uncategorized contacts.
  6. LOCAL_CONTACT_MANAGER_SET_(set_ID_number)_MULTIPLE_DESCRIPTOR_SEPARATOR: Separator which will be used between multiple descriptors. This feature was not implemented at the time of this writing.
  7. LOCAL_CONTACT_MANAGER_SET_(set_ID_number)_NAME: Name of this set.
  8. LOCAL_CONTACT_MANAGER_SET_(set_ID_number)_ROW: Template which will be used for rendering each contact.
    Example:
    -----------------------------------------------------------------------------
    <tr :;:ROWCOLOR:;:>
    <td valign=top align=left>
    <b>:;:CONTACT_DESCRIPTOR:Name:;:</b><br>
    :;:CONTACT_DESCRIPTOR_COMPONENT:Address:;:
    :;:CONTACT_DESCRIPTOR_COMPONENT:contact number:;:
    :;:CONTACT_DESCRIPTOR:Website:;:
    :;:CONTACT_DESCRIPTOR:email address:;:
    :;:CONTACT_DESCRIPTOR:Description:;:
    </td>
    </tr>
    -----------------------------------------------------------------------------

Rating System

Contact Manager has a rating system that allows you to place a rating scale next to each contact for users to rate. Users must be logged in in order to use this system.

To implement the rating scale, place a :;:VOTE:;: tag in an appropriate place in the LOCAL_CONTACT_MANAGER_SET_(Set_ID_number)_ROW map for the sets that you want to have this scale.

Contact manager also has a tag to display the global rating across all users with the :;:GLOBAL_VOTE:;: tag. This tag does not allow users to rate, so it needs the :;:VOTE:;: in order to enable users to vote.

Use the :;:VOTE:ARGS: <parameters> :;: tag to submit parameters such as numvotes, which controls the number of votes displayed, as well as icon_width and icon_height parameters in number of pixels to control the size of the icons. The Global Vote tag as a similar :;:GLOBAL_VOTE:ARGS: <parameters> :;: tag with the same parameters, and the numvotes parameter (if set) should be the same as the one in the Vote tag.

Place the icons for the scale in /images/voting directory of the site. They must be named:


Add Your Comment


(Only a limited set of HTML tags such as <b>, <i>, <u> are allowed. Embedded flash video from Youtube or Vimeo are also supported.)


Copyright © 2018 Peregrine Computer Consultants Corp. All rights reserved.

About Lunpa, our mascot. Her mother was a hamster and her father was an ill-tempered Chilean M00se. Oddly, neither smelt of elderberries.
The artist is Jennifer Lomax.