blog_index.cgi - A simple blog-style view of your list's archived messages
Refer to the version of Dada Mail you're using.
Currently, this script can be run just as a simple CGI script. Once configured, it'll show your last x archived messages, all on one screen, with links to the individual archived entries.
As a suggestion, try using it as an old-school server side include:
<!--#include virtual="/cgi-bin/dada/extensions/blog_index.cgi" -->
To embed the index of archived messages to a static page of yours.
Currently, this extension takes no options via a query string. All the configuration is done in the script itself.
None, really.
There are a few variables at the top of the script that will need to be changed. They are:
Required
You'll need to set $Plugin_Config{List} to a valid list shortname that you would like to use for your blog index.
Optional
$Plugin_Config{Entries} holds the count of how many archived messages you'd like shown at once. If set to undef or a number below, 1, this extension will use the default value set in the Manage Archives - Archive Options - Advanced list control panel screen (which itself defaults to, 10.
Optional
Currently, there are two styles supported when showing the archived messages, full and, blurb
If this variable is set to, full, the entire archived message will be shown.
If this variable is set to, blurb, only the first few words (basically) will be shown and a link to the rest will be provided.
Optional
This variable holds the embedded template for the actual HTML to display. If you'd like to change the design of the HTML that's outputting, here's the place to do it.
The Template is written in the HTML::Template system, just like much of the rest of Dada Mail.
Some of the variables that are available:
This holds all the archived entries that are to be displayed. You'll most likely want to call it in a loop:
<!-- tmpl_loop archive_entries -->
...
<!--/tmp_loop>
You can also use it to check the existance of entries available:
<!-- tmpl_unless archive_entries -->
Currently, there are no archived entries!
<!--/tmpl_unless-->
When you're looping over all the archived messages, other variables will be available to you, inside the loop:
``pretty-fied'' version of the subject. If you want the raw subject, use the subject variable.
``pretty-fied'' version of the date the message was posted on. Should be following the formatting options you've set in: Manage Archive - Archive Options - Advanced
Is set to, 1 if you're using the, blurb style in, $Plugin_Config-{Style}>.
Will hold the actual email message body. If you're using the, full style, the message will already be converted to HTML (if needed) and massaged in a way that it'll look really well without any help.
If you're using the blurb style, the message will be a plaintext string, with all HTML encoding stripped.
Holds the URL to your Dada Mail Installation
Holds the value that you've set in, $List
Holds the message_id that's associated with the archived message.
Holds the value that you've set in, $List
(This is also available to you, outside of the archive_entries loop.
Holds the URL to your Dada Mail Installation
(This is also available to you, outside of the archive_entries loop.
This extension is shipped with (currently) an alpha version of Dada Mail 3.0, and you should probably use this extension with that version. =head1 INCOMPATIBILITIES
Currently, this extension is simple, and only handles one list at a time.
If this extension becomes popular, I may give it the capability to handle all lists and at the same time, as well as have some of the more interesting archive capabilities support (embedded attachments, etc)
Please, let me know if you find any bugs.
Justin Simoni
See: http://mojo.skazat.com/contact
Copyright (c) 2007 Justin Simoni All rights reserved.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.