This morning I logged in to find 79 brand spanking new spam comments in the moderation queue, so it looks like I’m going to have to buckle down and figure out how to handle this problem. It’s going to be nasty: dealing with .htaccess files, and anti-spamming plugins; unfortunately, most methods I’ve found can in specific, reproducible circumstances, block actual people from the site, or from commenting. This bothers me more than if it randomly blocked people— probably because it seems like if you know what the problem is, you should be able to solve it. Unfortunately, Internet programming is never that tidy; you could plug as many holes as popped up one day, and the next day you’d discover some strange pathological situation in which the code blocked the wrong people. I wouldn’t bother if it wasn’t such a pain, trying to delete spam by hand.
The best looking anti-spam method I’ve found so far is based on .htacess files, awstat, and the Referrer-Karma script, and can be used in other applications than WP.
Hmmm… it seems WP doesn’t delete the comments that you mark as spam from the moderation queue; it simply marks them in the database and doesn’t display them, maybe as a precursor for using them to generate anti-spam software or dbs. Now I know that, seems like I have some db cleaning to do. There’s even a plug-in for this.
Possibly relevant posts:
Update: I realized that jsMath’s output doesn’t look too good in IE.
I’m writing a tiny plugin to load jsMath so I can use it in my posts. This should be a nice looking statement of the generalized integration by parts theorem:
\int_\Phi d(fw) = \int_\Phi w df + f dw = \int_{\partial \Phi} fw \Rightarrow \style{background-color: #AAEEFF; border-width: thin; border-style:solid; padding: 1em;}{\int_\Phi f dw = \int_{\partial \Phi} f w - \int_\Phi w df} \quad \text{( jsMath)}
vs.
Awesome! It finally works. I had to do a lot of digging in the WP code to implement this. First I found that the ‘wp_head’ hook isn’t sufficient, because jsMath must be loaded in the < body > , and wp_head loads in the < head > . Then, I looked and looked for an action hook that gets called at the top of the body whenever a page is rendered, but I couldn’t find one. Pretty strange that there doesn’t seem to be one. So, I spent a lot more time trying to track down how the plugin system works so I could add a hook myself. This may seem simple after the fact, but since I was looking for a more centralized architecture, it took me forever to figure out— I thought all the calls to do_action were registering hooks— but it turns out that the appropriate function will call do_action with the appropriate tag, to execute all the functions attached under that hook. Finally, I tracked down a sensible location for my additional hook: in the file template-functions-general.php as the last line in the function get_header, which returns the head of the file to be displayed, as well as the beginning of the body element.
The next thing to work on is making LaTeXRender use jsMath optionally— it’s a real pain to have to type in the start and end tags for a span or div everytime I want to use jsMath.
Possibly relevant posts:
So, looks like there’s competition for mindshare with Wordpress: Wordform is another blogging software based on Wordpress that seems to have inherited all the good features of Wordpress and extended it in some ways. I haven’t been able to extract much information from the website by cursorily glancing at the loads of posts, but from the screenshots, especially of the WYSIWYG interface for editing, its worth considering.
Possibly relevant posts:
I think I’ve discovered why the site keeps crashing. It seems that Mysql is not getting enough memory to operate. I’m working on figuring out exactly why that is, and how to remedy it without paying an extra $20/month for more memory.
Here’s a little trick for monitoring memory usage that I got from the FAQ pages at rimuhosting.com:
# create a memmon.sh script that tracks the current date, memory usage and running processes
echo '#!/bin/bash' > /root/memmon.sh
echo "
date;
uptime
free -m
vmstat 1 5
ps auxf --width=200
" >> /root/memmon.sh
chmod +x /root/memmon.sh
# create a cronjob that runs every few minutes to log the memory usage
echo '0-59/10 * * * * root /root/memmon.sh >> /root/memmon.txt' > /etc/cron.d/memmon
/etc/init.d/cron* restart
# create a logrotate entry so the log file does not get too large
echo '/root/memmon.txt {}' > /etc/logrotate.d/memmon
Possibly relevant posts:
- Radio silence (7/12/2007)
- Back up! (7/13/2007)
- Database problems (3/25/2005)
Several times mysql has gone down, and I’ve had to restart it by hand. I was hoping this was all just coincidences, but it’s happened twice in the past week, so obviously something is going on. I’m going to try updating, and see if that helps.
Possibly relevant posts:
For anyone who hasn’t already encountered it, Axiom is the best (in my considered opinion) freely available CAS, hands down. The only competition that comes even close is Maxima, but Maxima’s interface leaves a lot to be desired. Axiom has the potential to be better than Mathematica or Maple, and in some ways, I believe it already is— certainly the type system is a stroke of genius.
Recently I added an unstable repository to my list of Debian mirrors; that has given me a lot of goodies to mess around with.
Most spectacularly, after dreaming about having access to Axiom, I just installed in on this server! Which means that I can run it over a text display only, since this is a rented server, but I’m working on that… nothing seems to be stopping me from installing X Window and tunneling a connection except for the fact that I don’t know how to configure X Window properly over SSH.
Hopefully sometime soon I will have Axiom hooked up so I can run calculations through it, have Axiom convert the results to TeX, and then pipe that back here. I’m not really that familiar with Axiom (I read most of the Axiom book a year or so ago, but never had the opportunity to play with a working version), but I could probably do this, seeing as how that looks like what the AxiomInterface does.
Axiom ports are available for Windows and Macs. Luckily I brought the laptop to school today, so I’m going to download Axiom for Windows and give it a spin. And order the Axiom book from the library again.
TexMacs– a beautiful, albeit rather mispurposed program– can be used as a GUI for Axiom, under both Windows and Unix.
Possibly relevant posts:
I’m in the process of upgrading: I’ve already switched over to the Strayhorn release of WP (1.5) and installed all but one of the plugins I was using previously— the wp-plugins.org site times out, so I can’t get the AuthImage plugin for commenting protection, but I might not need it, considering the features of Strayhorn— we’ll see.
I was disappointed by the amount of effort it took to install the scriptygoddess Subscribe to Comments plugin: since Strayhorn has a new theming system which stores the templates for each theme in a different directory, for each theme, I’ll have to manually edit the commenting-related files to support subscribing to comments. Doesn’t seem like there’s any way around it.
Left to do: reorganize non-blog stuff and figure out a way to integrate the two so I can use WP as the frontend for the whole site. Spring Break is next week, so hopefully that’ll give me enough time to complete the update.
Possibly relevant posts:
I hate upgrading, but it has to be done. Some time soon, I’m going to be switching over to WP 1.5 (currently running 1.2), so there might be minor problems– most notably, I doubt the commenting system will be working again right away, since I’ll have to retrack down all the changes that needed to be made by hand.
On the other hand, this is the perfect opportunity to drastically change the look of the site– like designing a custom theme, and adding favicons. While I’m at it, I’m going to reorganize the layout of all my non-blog material.
So change can be good. A really good thing about WP 1.5 is the automatic whitelisting: the first time someone posts a comment or track-/ping-back, it goes to moderation, but then repeat visitors that have been approved can post normally. Also, the new ‘page’ feature should make it easier for me to integrate my non-blog content more naturally into the WP system that runs the site.
Possibly relevant posts:
I’ve been having intermittent problems accessing the site: sometimes when I try to view tangentspace.net/cz, the browser keeps waiting on the site, but nothing comes through. I don’t see anything in the server logs that might explain this. The most drastic thing I did recently was accidentally reinstall perl (I was trying to install perl-doc using apt-get, and it auto installed perl again), but I don’t see why it would cause this problem. I power cycled the VPS just now, and that seemed to clear up the problem, but I don’t know if that’s a permanent solution.
Possibly relevant posts: