Administrators guide to 'blogging' with SurgeMail

There is a global setting 'g_blog_enable' once this is turned on then users will find a 'Blogs' button in the user self administration web interface and in WebMail.

FIve main blogs pages are available to users:

  • Listed blogs page shows all listed blogs on the system
  • My Blogs shows users current blogs (listed and unlisted) and form for creating a new blog
  • Settings to control settings for an individual blog.
  • Posts to edit/moderate posts and comments
  • View to view an individual blog.

On the first page the user can create a new blog, to do this they specify a 'urlname' and a 'title'. The urlname must be suitable to appear in a normal url, so would not contain spaces or unusual characters. e.g.

UrlName for blog: fishchips
Title: Fish and Chips

The blogs external address (used to view the blog) is then made using the urlname: http://your.domain/blogs/urlname

or alternatively

Note ! The users name does not appear in this url, the blogs name must be unique for the entire domain.

After creating the blog the user can select from one or more template sets to define the appearance of the blog. These template sets are stored in:


If you wish to add new template sets or modify the default ones, you can modify the files in those directories, in general you should create new ones so that any updates from netwin will not over-ride your new ones.

When the blog is created one of those template sets (the default one) is coppied to the users blog directory, at which point they can then modify it further. If you update a template set the user will not see the changes unless they press on the buttons to 'reset the template set'

A template set can contain multiple files, including images, style sheets etc, this structued approach allows new templates to be quickly created just by modifying a style sheet or other 'ancillary' files.

Blogs and attached posts form part of the users normal email disk quota.

Example template:

<link rel="stylesheet" href="blog.css" type="text/css">
<body ||r_body_add||>

<img src="||h_banner||">
WIDTH="100%" BGCOLOR="#336699">
<TD width="403"><a href="/"><IMG BORDER=0 SRC="/web/blogban.gif" NAME=""></href></TD>
<TD><B><font face="Verdana, Arial, Helvetica, sans-serif" color="white">||h_title||</font></B></TD>

<td valign="top" width="259">
<p><span class="archive_header">List of archives</span><br>
<span class="archive_list">
<a href="/blogs/||h_urlname||/index_||year||_||month||.htm"> Archives ||year|| ||month||</a>
||end_list_archive_months|| </p>
<span class="index_header">Index of items on this page:</span><br>
<span class="index_list">
<a href="/blogs/||h_urlname||/item_||item||.htm"> ||subject|| </a><br>

<p class="item_date">Posted By: ||name|| - ||datetime_long(time)||</p>
<p class="item_subject">||subject|| <br>
<span class="item_body">||body|| </span></p>
<p class="commentheader">||c_name|| ||datetime_long(c_time)||</p>
<p class="commentbody">
<form action="/cgi/user.cgi" method="POST" align="left" name="create">
<input type="hidden" name="urlname" value="||urlname||">
<input type="hidden" name="inreplyto" value="||item||">
<input type="submit" name="cmd_blog_comment" value="$$Add comment$$" ||button_style||>

<a href="/blogs/||h_urlname||/rss.xml">RSS feed</a>
There had been a total of ||h_visitor|| visitors at time of last post.


Note: The template language used in these templates is not compatible with other blog servers, sorry, we have no plans to make it so. Our goal was to make it simple and powerful. So our standard templates would be easy to understand and change. Note how small this template is and yet it's fully functional.

The users directory structure looks something like this:

tellmail path

...\xx\yy\username\mdir\... (normal mailbox stuff)

...\xx\yy\username\blogs\urlname\ (Everything about the blog 'urlname')

.\attach -- Attached files extracted from email messages or uploaded posts (images)
.\posts -- Each post and comment in the blog, one item per file
.\tpl -- The template files currently being used by this user.
.\www -- The generated blog html files (Index archives and individual posts)

Note that the html files are generated when the user posts, so viewing the pages does not create significant load on the server.

References to other files from the template directory do not need to include ../attach/ etc, when parsing these files the www tpl and attach directories are all searched, this makes templates much simpler and easier to edit with a normal html editor.

So in a template, to reference a file in the attach directory you just specify it's name, e.g. <img src="picture.jpg">

The files that make up the users blog are all part of the users normal quota.

See this page for an outline of blog features and screen shots