The NewsPublisher snippet allows you to create your blog entries from the web site, without logging in to the Manager. Very quick and convenient.

News Publisher Users

Create a new Web Group, Blog Admins.

admin group

Create a new Document Group, Publish.

document group

Link the Blog Admin web user group to the Publish document group.

group link

Create a new Web user and assign him to the Blog Admins and Blog Readers groups.

admin permissions

Enabling the Rich Text Editor

We'll make this a really nice content entry form by enabling the Rich Text Editor, similar to the one used for creating documents in the Manager. To do this, we'll need to create a Template Variable (TV) and a chunk. The chunk will be used as the form template for NewsPublisher, and will contain the TV enabling the RTE.

First, create the TV. Fill out the fields as follows.

Variable Name: blogContent
Caption: blogContent
Description: RTE for new blog entries
Input Type: RichText (from the dropdown menu)
Widget: RichText (from the dropdown menu)
Widget Properties:
    Width:400px
    Height:410px
    Editor:FCKEditor (from the dropdown menu)

blogContent TV

Important! Make sure that the template you are using is checked in the Template Access section.

Next, create the form template chunk. Create a new chunk named BlogForm. Copy/paste the following code:

<div id="blogForm">
<form name="NewsPublisher" method="post" action="[~[*id*]~]">
<fieldset>
<h3>Publishing Details</h3>
<p>Note: Leaving the Publish Date empty will immediately publish your blog entry.</p>
<input name="NewsPublisherForm" type="hidden" value="on" />
<label for="pagetitle">Page title <abbr title="The title used on the browser window">?</abbr>: <input name="pagetitle" id="pagetitle" type="text" size="40" value="[+pagetitle+]" /></label>
<label for="longtitle">Headline <abbr title="The title used on the article">?</abbr>: <input name="longtitle" id="longtitle" type="text" size="40" value="[+longtitle+]" /></label>
</fieldset>
<fieldset>
<h3>The Content</h3>
<p>The Summary field is optional, but is used as a short version for RSS feeds and summary views on the main blog page.</p>
<label for="introtext">Summary (optional, but encouraged):<textarea name="introtext" cols="50" rows="5">[+introtext+]</textarea></label>
<label for="content">Content:[*blogContent*]</label>
</fieldset>
<fieldset>
<h3>You're Done</h3>
<input name="send" type="submit" value="Blog it!" class="button" />
</fieldset>
</form>
</div>

The News Publishing Page

Create a new document for the NewsPublisher form. It should be published and show in menu. In the Document content, put the NewsPublisher snippet tags.

[!NewsPublisher? &folder=`1` &canpost=`Blog Admins` &makefolder=`1` &formtpl=`BlogForm` &rtcontent=`tvblogContent`!]

In the Access premissions section at the bottom, check the Publish box to assign the document to the Publish document group.

access permission

Since we linked the Web Admins web user group with the Publish document group, the page will not show on the menu and cannot be accessed unless the user is logged in as a member of the Blog Admins group.

Log in as the web user you created above, and the Post Blog Entry will appear. Go to the page and enter your new Blog page.

NewsPublisher Options

  • &folder - Folder id where posts are stored
  • &makefolder - Set to 1 to automatically convert the parent document to a folder. Defaults to 0
  • &postid - Document id to load after posting news item. Defaults to the page created
  • &canpost - Comma delimitted web groups that can post comments. Leave blank for public posting
  • &badwords - Comma delimited list of words not allowed in post
  • &template - Name of template to use for news post
  • &headertpl - Header template (chunk name) to be inserted at the begining of the news content
  • &footertpl - Footer template (chunk name) to be inserted at the end of the news content
  • &formtpl - Form template (chunk name)
  • &rtcontent - Name of a richtext content form field
  • &rtsummary - Name of a richtext summary form field
  • &showinmenu - Sets the flag to true or false (1|0) as to whether or not it shows in the menu. Defaults to false (0)
  • &aliastitle - Set to 1 to use page title as alias suffix. Defaults to 0 - date created.
  • &clearcache - When set to 1 the system will automatically clear the site cache after publishing an article. Defaults to false (0)

( back to top )