Rev 264 | Blame | Compare with Previous | Last modification | View Log | RSS feed
ezmlm-php 2.0Nov 13, 2002http://www.unixpimps.org/software/ezmlm-phpezmlm-php is a group of files written in php that allow you to fetch messagesfrom a ezmlm mailing list archive via a web page. It is fully customizable soit can fit into an existing layout design very well, it is also self containedso that you can run it with no existing site setup.The new version has been rewritten from the ground up to exclude all externaldependancies (except one which comes with the source, see makehash later on)and now implements RFC2045 MIME parsing in pure PHP.The system is now also object based to allow greater flexibility within thecode itself, it also makes the code much more managable and readable.INSTALLATION~~~~~~~~~~~~*NOTE*The installation of ezmlm-php now requires access to a compiler to build theincluded makehash program. See the MAKEHASH section at the end.1. Unpack the tarball and copy the files to your webroot in the directory youwant the list to be accessed from. For example using /home/www/mailinglistgzip -d ezmlm-php-2.0.tar.gztar xvf ezmlm-php.2.0.tarcd /home/www/mailinglistcp ~/ezmlm-php-2.0/*.php .cp ~/ezmlm-php-2.0/*.def .2. Build the included makehash program.cd ~/ezmlm-php-2.0gzip -d makehash.tar.gztar xvf makehash.tarcd makehashmakeIf you do not have compiler access check the binaries directory in themakehash.tar file as there are some common binaries there. If you buildmakehash on a new platform please feel free to submit the binary forinclusion.3. Move the resulting binary to your webroot.4. Edit ezmlm.php and change the user configurable options. Search forUSER-CONFIG to find where to edit. See CONFIGURATION below.5. Access www.yoursite.com/mailinglist to test the installation.CONFIGURATION~~~~~~~~~~~~~This section will explain each variable. If you used the last version mostof these are the exact same.Name Meaning~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~listdir This variable should be pointed at the root of the ezmlmarchive. For instance /usr/home/lists/ragga-junglelistname The name of the list (everything before the @)listdomain The domain name of the listtempdir Where to store the cache files. /var/tmp should be finefor most installations. /tmp is another choice.sendheaders If set to TRUE then ezmlm will generate the nessesarypage headers. If set to FALSE your header file needs togenerate them. See 'includebefore'sendbody If set to TRUE then ezmlm will generate the <body></body>tags.sendfooters If set to TRUE then ezmlm will generate the tage neededto finish the document. If set to FALSE your footer fileneeds to generate them. See 'includeafter'includebefore This is a file that will be included before ezmlm-phpgenerates any output. You can have ezmlm-php generatethe nessesary headers (sendheaders = TRUE) and stillinclude a file of your own. The file is included by theinclude_once function.includeafter This is the exact same as includebefore except the fileis included after ezmlm-php has sent all of it's data.href This is a string to prepend to the path whenever an<a href= tag is generated. This option was added to fixthe problem of using a <base href= tag.prefertype This is the mime type that you wish to send if thecurrent message is a multipart message. If this type isn'tfound it defaults to the first part.Some examples are: text/html, text/plain, etc...showheaders This is an array of the headers to show. You can add orremove any valid RFC822 header you wish to this array.Some examples: X-Mailer, Message-ID(This is case-insensitive)msgtemplate This is a file to use as the message template, if blankthe internal one is used. See the file MSGTEMPLATE formore information as it is to much to describe here.tablescolours This is an array of colour hex triplets for use when atable is generated. For each row that is generated thenext colour is used, just use a single element if youdon't want alternating colours.(Yes there is a U in colours, the software was writtenin Canada ;)thread_subjlen This is an integer that tells the software how manycharacters to allow the subjects when displayed inthreads or on the info page. This is useful if youwant to limit subjects to a certain length so that noline wrapping occurs.MAKEHASH~~~~~~~~So what is this little binary you need to build? Simply put it is a smalllittle C program to generate the nessesary ezmlm-idx hashes for crossreferencing authors. In the last version this was done by recursivley doinga grep on the /authors directory which isn't very efficient when the listsubscriber base grows above 1000 or so. This program computes the hash byusing the same algorithim the software does and speeds things up a lot.-FIN-