Autarchy of the Private Cave

Tiny bits of bioinformatics, [web-]programming etc

    • Archives

    • Recent comments

    Archive for the 'WP PlugIns' Category

    fail2ban and Google translate: how to easily cut your WP blog traffic

    14th November 2009

    translate_logofail2ban has a php-url-fopen rule.

    WordPress has a Global Translator plugin, which – among others – uses Google Translate service.

    If someone uses Google Translate (e.g. using Global Translate’s mini-language-flags), and goes back to your blog – that someone might get banned by fail2ban (especially if you have set maxretry to 1), as the referrer will contain the php-URL-fopen attack signature. The bad thing is that you will not realize that until after you check one or several translations yourself, as a random site visitor experiencing the problem is highly unlikely to bother reporting this problem – especially when your blog’s Contact page is also inaccessible.

    Clearly, Google Translate is not the only legitimate service which will trigger that rule.

    Solution: The only solution I have found is to specify the whitelist regex for the php-URL-fopen rule.

    Share

    Posted in *nix, Software, Web, WP PlugIns | No Comments »

    Blog accessibility from handheld and mobile devices

    26th December 2008

    I’ve seen someone reading my blog from a 320×240 handheld device, and realized that it must be pretty inconvenient. Testing my blog with the help of ready.mobi confirmed my worst expectations with a mobile-readiness score of 1.

    I’ve installed and then tested one-by-one a series of WP plugins designed to make your blog mobile-accessible. Testing was done using ready.mobi; all plugins were using default settings – except for viewMobile, which had Images option set to Resize, not Keep As Is.

    pluginscoresize (KiB)min cost (EUR)max cost (EUR)best speed (sec)worst speed (sec)passeswarningsfails
    mowser plugin3.573.420.010.061.012.832114
    viewMobile3.4823.380.070.401.057.672033
    PDA & iPhone2.2324.650.070.421.057.971844
    MobilePress1.7453.980.160.921.1115.081943
    no plugin0.92820.854.801.5570.410610
    Mobilize by MippinN/AN/AN/AN/AN/AN/AN/AN/AN/A

    On Mobilize by Mippin plugin ready.mobi exited with error “Could not retrieve page content”, which is no wonder as Mippin plugin redirects the handheld device’s browser to mippin.com, which converts the page into mobile-accessible form (however, it is indeed strange that mowser.com plugin worked fine, though it is also a redirector). I’ve used mippinmaker to estimate what would my blog look like via mippin – and it appears to me that mippin is using my RSS as the source of content; actually, plugin description explicitly states that. I’m sure this would get real high scores on ready.mobi, but I can’t find the way to test that; thus Mippin plugin didn’t participate in the final feature-based comparison.

    viewMobile plugin is a clear winner best by score in “plugins” group – it has the highest scores in the feature table (well, after mowser plugin, which is not a plugin but a redirector to an external service). Also, in addition to “keep as is” and “downsample”, there is an option to “strip” images – I presume that would bring the page size further down. However, viewMobile removes comment forms from posts; at the same time, PDA & iPhone plugin preserves comment forms – thus it is better for my purposes.

    The mowser-based service has even higher scores than viewMobile – but is an external dependency. For my blog, I decided to stick to PDA & iPhone plugin. Also, such a low page size (see table) is due to mowser splitting the tested main blog page into two pages – and ready.mobi then only weighs the first (much smaller) page; so there is no benefit in page size when using mowser.

    Please comment to share your experience of turning your blog mobile-accessible, or of reading my blog from handheld/mobile devices.

    P.S. If you are used to visiting websites and blogs from your handheld device, and those sites/blogs are not optimized for mobile devices, I’d recommend using the free mowser service (though Opera Mini is easier, I guess).

    P.P.S. This post wasn’t sponsored by mowser or any other mentioned services :)

    Important update: clearly, viewMobile and any other PHP-level mobile accessibility plugins are incompatible with SuperCache. So either (super) caching, or mobile version – but not both. I’ll have to look into possible solutions.

    Update 2

    A “clever” solution would be to have a subdomain or even a different TLD domain for the mobile version of the blog (to avoid SuperCache interference – ideally, both database and files would be the same, but some tiny bit of configuration would make all the difference; the easiest tiny bit would be a mod_rewrite rule). Another good solution would be to modify SuperCache’s mod_rewrite rules, so that mobile User-Agents aren’t fed cached versions – and thus viewMobile has a chance to trigger and serve correct version (this solution doesn’t require another domain or subdomain, but is less reliable).

    I’ve tried mowser plugin, but it suffers from the same cache interference problem (because it is also PHP-level, and SuperCache works at apache and mod_rewrite level). For the same reason, PDA & iPhone plugin wouldn’t work as well.

    For now, I’ve disabled SuperCache (leaving WPCache on), and turned on PDA & iPhone plugin (unlike viewMobile, it does show the comments form below each post). Seems working. Will look into domain/mod_rewrite solutions.

    Update 3

    SuperCache is back on, except for a list of mobile User-Agents; those User-Agents were also added to SuperCache’s UA exclude list. Thus now if a “normal” browser requests a page, such a request is cached, or a cached page is fed to the browser. If the mobile browser requests a page, it is not fed a cached page even if one exists, and cache page is not created while running WP’s PHP engine. Tested using both built-in browser (I could even fill in captcha while commenting) and Opera Mini on a Samsung phone: seems to work fine. However, all of ready.mobi’s phone emulators for some reason choked on the comment form’s textarea, refusing to display the page. I ignore this but if compliance is important then viewMobile will be a better choice than PDA & iPhone.

    Drawbacks of this solution: 1) mobile requests are not cached, 2) if the mobile browser’s User-Agent is not in the list, then it will be fed a standard-looking page, 3) hard to maintain – need to update both the list of UAs in .htaccess and in the configuration of SuperCache.

    Better solutions are welcome.

    Share

    Posted in how-to, Web, WP PlugIns | No Comments »

    Spam Karma 2 (SK2) is a life saver plugin

    9th April 2008

    As an update to WordPress anti-spam plugins, I highly recommend Spam Karma 2. For a time, it seems to be the ultimate protection. I turned off all the other anti-spam plugins (including Aksimet), and everything’s just perfect! SK2 gathers up to a thousand spam comments/trackbacks during a single week on this blog, and I never had a complaint from blog visitors on their inability to add a comment (though some did have to fill in captcha to post a comment with links).

    And SK2 still works under WP 2.5! (SK 2.3 was released to support WP 2.1)

    Kudos to Dave!

    It would be a pity if this excellent plugin is abandoned and stops functioning in one of the upcoming WP releases.

    Update: SpamKarma is now GPL (at google code).

    Share

    Posted in CMS, Software, Web, WP PlugIns | No Comments »

    Comment referrers WordPress plugin

    27th February 2008

    Get it here.

    It adds Referrer of the person who’s leaving comment on your WP blog. May help to take the right action for seemingly legit, but really spam comments (e.g. if someone was just searching for blogs with enabled commenting to leave a comment with name linked to their biz-website).

    Share

    Posted in Software, Web, WP PlugIns | No Comments »

    Updating everything

    3rd February 2008

    Today I moved my blog and gallery into MySQL5 databases from an elderly MySQL4. Also, both WP and gallery are now updated to the latest versions. Soon I’ll change the WP and G2 themes – for the lighter, less cluttered – and will remove some ads… and will also add some others instead :)

    Update generally went well, except for the message I got on the main page:

    Sorry, but you are looking for something that isn’t here.

    It was quite easy to figure out that new WP conflicts with an elderly “Sideblog” plugin – so I had to deactivate that one, and will have to update all the active plugins to avoid some other less evident problems… (actually, just completed updating all the plugins… quite a time-eater, that was.)

    Also, there will be a slight change to what and how I write. No other details for now – but stay tuned! All the changes with no exceptions are planned for the good of readers, and for the users’ benefits!

    Share

    Posted in CMS, Misc, Web, WP PlugIns | No Comments »

    WordPress [Anti-]Spam plugins

    22nd January 2007

    You may discover, that as your blog gets more visitors and pageviews, your are getting more spam in comments to your posts. They originate as actually comments, pings, and trackbacks.
    Read the rest of this entry »

    Share

    Posted in Web, WP PlugIns | 1 Comment »

    SPA (Snap Preview Anywhere) WordPress Plugin

    3rd January 2007

    More and more often I came across “snap previews” appearing on the links in other blogs. So I decided to try it on my blog as well…

    The Snap Preview Anywhere is a WordPress Plugin to display those previews. The actual service, providing the previews, is snap.com. They also offer the FireFox Snap search engine (top-right in FF), though I don’t quite get it’s intended purpose…

    The plugin page has all the necessary instructions (and even more), so won’t copy-paste here.

    The only unanswered question is “Does my blog really needs this?”.
    I’ll let it be for the time being… if it gets too annoying, will remove. Please comment if you think that snap previews do help somehow, and if you think that “useless” is not about snap previews.

    Update: snap preview anywhere is annoying, if used on all the links. So I decided to leave SPA on for external links only, and (thanks to the new version 1.2) now the preview appears only when hovering the tiny image to the right from the link itself. This is now much less annoying, but still allows to see the preview of the linked page, if you desire to do so.

    Share

    Posted in Web, WP PlugIns | No Comments »