Was helping Teejay with his Cock n Bull web-site the other night, and we needed to setup a ‘page’ link in the top main navigation as a ‘link’ to the blog feed. Anyway, we found a WordPress plugin that does that: Page Links To. Pretty handy!
Category Archives: Sys Admin
MediaWiki templates, revisited
After spending the afternoon investigating MediaWiki templates, I’ve decided that for the most part they are more trouble than they’re worth for any of my applications. I tried to create a ‘done’ template, that took username, user initials, date and ‘done note’ parameters, but really the code to call the template was just as long as not using the template, and the template broke when the ‘done note’ included a link that included an equals sign, which is just too shoddy. I’m giving up on templates until I find I actually have a use for them where the technology solves a problem that I actually have. At the moment that’s nothing.
MediaWiki templates
Today, after a long time, I am finally ready to learn about MediaWiki templates. After having put that off for weeks since I’d first heard of them, I found that it only took about five minutes to learn just about everything there is to know about them from the MediaWiki templates documentation. I think there are a few areas of the ProgClub wiki that could do with the use of templates, might go and see to that now.
Configuring MediaWiki email settings
Found the doco for MediaWiki’s email settings and now my config looks a little like this:
$wgEnableEmail = true; $wgEnableUserEmail = true; # UPO $wgEmergencyContact = "pcwiki@progclub.org"; $wgPasswordSender = "pcwiki@progclub.org"; $wgNoReplyAddress = $wgEmergencyContact; $wgPasswordSenderName = "ProgClub wiki";
WordPress hooks
I wanted to configure the “From” email address that WordPress uses when emailing password resets. The way to do this is with a WordPress hook, specifically a filter hook in this case. So, in wp-config.php I added the following code:
add_filter( 'wp_mail_from', 'pcblog_mail_from' );
add_filter( 'wp_mail_from_name', 'pcblog_mail_from_name' );
function pcblog_mail_from() {
return 'pcblog@progclub.org';
}
function pcblog_mail_from_name() {
return 'ProgClub blog';
}
Discarding messages flagged as spam with mailman
I found these instructions for configuring spamassassin in mailman. The defaults seem a little high to me, so I’ve reconfigured with:
SPAMASSASSIN_DISCARD_SCORE = 7
SPAMASSASSIN_HOLD_SCORE = 2
SPAMASSASSIN_MEMBER_BONUS = 5
Binding all IP addresses with MySQL
Had a problem where localhost wasn’t bound because I’d used bind-address to bind the internet IP address. The fix was to remove bind-address altogether, meaning that all addresses get bound.
Configuring svnmailer
I stumbled upon this documentation for svnmailer while I was closing my browser windows, and in it I found how to modify the subject line for the commit hook emails to include the author. Handy!
Mailman not showing lists
Had a problem with mailman not showing mailing lists on its listinfo page. The problem turned out to be related to my virtual hosts settings.