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 News Manager Documentation

A Quick Introduction

For those wanting an easy interface to create news updates, this is the tool for you. Obviously, one simply needs to write up a news article. But the question of when, where and how to display it is also a matter of concern.

Using News Manager

News Manager has many different options for how to include and configure content on a news article, as well as several other helpful features that make posting news articles to a website much easier.

General Posting Features


Attaching files to a news article is easy with News Manager, and there are several different options for controlling availability and the display of the attachments to readers of the article. To attach something to an article, at the bottom of the page where you add and edit articles, there are several fields under the "Attachments" section that are for uploading attachments. Simply click "Browse" on one of the fields and locate the file you wish to attach.

Attachment Options:

Using Image Repository Manager for Attachments Feed

To enable Image Repository Manager for news attachments feed, add LOCAL_NEWSMANAGER_REPOSITORY_IMAGE_CATEGORY_IDS map with comma delimited repository image category IDs list to use. Then, all images in the categories will show in a set of select boxes under attachment image upload section of news add/edit form. You can use Image Repository Manager for images which will be used over and over. After an image is selected and saved, the same attachment options will be applied to the image from Image Repository Image.

NOTE: The Auto Link, Article Image, Headline Thumbnail and Caption options are set on an attachment-by-attachment basis, so in order to have access to them, you must first add the article with the attachments and then edit the article either directly after adding by selecting "Edit Article" or by going to the News Manager administration page, finding the article and then selecting to edit it. The attachments are listed in a table at the bottom of the edit article page.

Installing News Manager

  1. Run newsmanageradmin/, and follow instructions
  2. Make sure the news_uploads directory and the news_* templates are owned by the correct user
  3. News Manager is ready to use

The Basics

News Manager displays a list of articles at any location on your website by using typical LumpaCMS code. When each article is clicked, the content of clicked article displays. The example codes for a list of articles are as follows:

:::HEADLINES:5:ARGS: template=news_teaser_style&item_template=news_teaser_item_style&max_chars=55 :::
:::HEADLINES:-1:ARGS: yearly=1&rss_limit=10 :::

A number between HEADLINES and ARGS indicates maximum number of items to display in the list. -1 means no maximum. Comma separated variable and value pairs are options passed to news headline display function.

Using Templates And Overriding CSS

News Manager uses templatized HTML to generate output for News Headlines and News Article display.

Using templates and overriding CSS for News Headlines:

Using templates and overriding CSS for News Article:

Some sample template files (news_examples.template, news_archive_style.template, news_archive_item_style.template, news_article_style.template, news_teaser_style.template, and news_teaser_item_style.template) are available in your template directory. Please refer them. If you don't have them in your template directory, you can find them from LunpaCMS codebase.

Available Options

Using News Manager as a Blog

With a combination of the category_ids, template, and item_template options as well as formatting the templates with the proper descriptors, newsmanager can be easily formatted as a blog.


:::HEADLINES:5:ARGS: category_ids=1&template=news_blog_archive_style&item_template=news_blog_archive_item_style :::

This example has a blog where all the articles are set to the category of id 1, and the formatting of the news pages is controlled by the news_blog_archive_style template and the news_blog_archive_item_style template, shown below

news_blog_archive_style.template - simply displays the item_list for the news headline list block:

<div class="newsMgr">

news_blog_archive_item_style.template - edits the display of each headline

<div style="padding-bottom: 25px;">
  <table style="width: 100%;">
    <td style="vertical-align: top; width: 30px; text-align: right; padding-right: 5px;">::DESCRIPTOR:thumbnail::</td>
    <td style="vertical-align: top; text-align: left; padding-top: 5px;">
      ::DESCRIPTOR:news_headline:: ::DESCRIPTOR:news_byline::

Enabling Comment

You can enable comment feature on your news articles by adding the ::DESCRIPTOR:comment:: tag to the article style template.

By default, all news comments require moderation process before they are allowed to be posted on the site. To moderate comments, go to the News Manager Admin page, click "Moderate Comments" and review the comments to moderate. In order to skip moderation, set the LOCAL_NEWSMANAGER_COMMENT_AUTO_APPROVE map to 1, and comments will be posted as soon as they are entered.

Displaying News Articles Independently on a Website

In order to display the contents of a news article on another page of the site, without adding a link or using the :::HEADLINES::: tag which just lists the headlines of various news articles, you can use the :::NEWS_ARTICLE:ID:<news article id>::: tag. This displays the contents of the article where you place the tag, with the article truncated and including a link to the full article. By using using the :::NEWS_ARTICLE:ID:<news article id>:ARGS: <options> ::: tag with the options below.


Example: :::NEWS_ARTICLE:ID:<news article id>:ARGS: no_headline=1&max_chars=500&no_highlight_text ::: This will display the article with no main headline, 500 characters of the news article and will not highlight urls or email addresses.

Using Custom Headline Routine

News Manager provides a default sub routine for new headline, however, this sub routine can be overridden for any purpose. To override default sub routine, define LOCAL_NEWSMANAGER_CUSTOM_NEWS_OUTPUT map with custom sub routine's name as its value.

Embargo by Default

News Manager supports the option to embargo all new articles by default. This feature is useful for organizations that require a review process on new postings. To embargo news articles by default, set the LOCAL_NEWSMANAGER_AUTO_EMBARGO map to 1.

News Subscription

News Manager supports the option to email new postings to subscribers automatically.


The style template is called news_subscriber_email.template, which allows a style template to be configured seperately from other styles on the website due to the special nature of css and email.

In order for the subscriptions to be sent, several maps are required to be set:

Since a news article will be set a maximum of one time to the subscribers, it is recommended that the map LOCAL_NEWSMANAGER_AUTO_EMBARGO is set to 1 which will make it so news is automatically embargoed, and may help from accidentally sending articles before they are ready. This also allows the admin creating the article to view the article and share it with other admins for approval before sending. To send, either set a real embargo date and add the lines below to the crontab, or edit the article and turn off all embargos.

In order for news to be sent when they come off embargo, add these lines to the crontab for the site:

0,10,20,30,40,50 * * * * perl /htdocs/your
01 00 * * * perl /htdocs/your

To enable VERP, the following line must be added to the mail aliases file:

news-your-domain: "|/htdocs/local/newsmanageradmin/sys/ --cnf-file /home/mail/yourdomain-my.cnf --database yourdatabase --host"

News Statistics

LunpaCMS keeps statistics on news articles. To view the statistics for news manager, go to the admin page, click on News Manager and then News Statistics. At the top will be several different statistics to look at, such as Top Emailed Articles, Top Viewed Articles, etc. When on one of the pages of statistics, they can be filtered by time period by selecting the period desired from the drop down menu and clicking "Refresh." Statistics are not collected if you are viewing the article through the admin side of the website.

In order to view a single article's statistics, find the article you wish to see the stats for under the admin newsmanager page and open it. On the functions bar, next to the social media links, there will be two admin functions "edit" and "stats." Click stats to see all of the stats for that article. These can also be acquired by going to the News Statistics Page and clicking "Single Article" and entering the News Article's ID.

News Statistics Archiving

For sites that have a large amount of news articles and high traffic, LunpaCMS has the ability to archive older statistics. By not keeping track of the day-by-day stats older than 6 months (by default), the table size is greatly reduced.

Setting Up Archiving:

Place this line in your crontab to run the archiving script once a month:

01 0 1 * * perl /htdocs/<Your Site Name>/html/admin/newsmanager/sys/

News Search Indexing

LunpaCMS indexes newsmanager articles once a day to make sure that searches in news articles are as accurate as possible. The price for this is that indexing news articles (especially on a site with a large amount of articles) can be a timely process. To avoid the first user of the day encountering a problem with a very slow load time on their page, an automatic call to the page does the index can be made daily.


  1. On the server that hosts the site, type crontab -e which will bring up the cron processes
  2. Add this line to your crontab: 01 00 * * * perl /htdocs/<sitename>/html/admin/newsmanageradmin/sys/

Email News Article Ajax

When the option no_popup is applied to a list of headlines, the news article will open on the same page as the headlines. This also activates the ajax email functionality for the news article. In order to make sure the email functionality still works properly when switching from a popup article to a no_popup article, make sure that you add the ::DESCRIPTOR:email:: tag to the news article style. This will add a form on the same page as the news article from which users can send the article and will submit the form via ajax.

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 © 2024 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.