Arrow

Posts on this site are never sponsored.

Peter’s Random Anti-Spam Image Version 1.1 for eZ Publish 3.8+

May 6th, 2007

I’ve spun off my anti-spam WordPress plugin — this time for eZ Publish!

I work for eZ Systems, the maker of eZ Publish, as an editor. So I certainly don’t have awesome technical skills, but I’ve managed to create an extension for eZ Publish to help fight comment spam (just as the comment plugin on this blog works where you have to type in the anti-spam word before being submitting a comment). eZ Publish is a rockin’ Open Source Enterprise Content Management System.

First, download Peter’s Random Anti-Spam Image for eZ Publish. Then:

(French instructions available here.)

1) Unzip the customantispam directory into the eZ Publish extension directory.

2) Activate the extension in the eZ Publish Administration Interface by clicking on the Setup tab, then the Extensions menu item.

3) Run the SQL query in customantispamtables.sql to insert the necessary tables into the same database as your eZ Publish installation.

4) Add a policy under the Anonymous Role (click the User accounts tab, then the Roles and Policies link) to grant full access to the customantispam module.

5) Add a new workflow. Click the Setup tab, then the Workflows menu item. Click the New workflow group button and enter any name you want (such as “Anti-spam”).

a) In the new workflow group, click the New workflow button. Name it “Anti-spam” and select the event “Event / Custom anti-spam”, then click the Add event button.

b) Alternatively, you can add the “Custom anti-spam” event to a multiplexer workflow. This is useful if you have several events that you need to run in the “content / publish / before” trigger (in step 6). In that case, select the event “Event / Multiplexer”, then click the Add event button. There are many more options in the Multiplexer event, such as affected sections, languages, classes, versions and users. For this workflow, you can leave all of the options as “all”. If you are using this extension to filter objects of the Comment class, select that under the Classes to run workflow list box. In the Workflow to run dropdown list, select the “Anti-spam” workflow. Then, click the OK button.

6) Add a new trigger by clicking the Setup tab, then the Triggers menu item. Under the “content” module, “publish” function and “before” connection type, select the workflow “anti-spam” then click the Apply changes button.

7) Find your comment template (for ezwebin, it’s extension/ezwebin/design/ezwebin/override/templates/edit/comment.tpl).

Add this at the top of your template:

{set-block scope=root variable=cache_ttl}0{/set-block}

If you are putting the anti-spam protection into a different template (such as directly in a blog post if you are using Kristof’s powercontent extension at http://ezpedia.org/wiki/en/ez/powercontent to add a comment form directly in a template), add cache-blocks around the sections of the page preceding and following the anti-spam code:

{cache-block}
Start of page
{/cache-block}
anti-spam code
{cache-block}
Rest of page
{/cache-block}

However, cache-blocks are probably not necessary if you are editing the edit/comment.tpl template.

Add the following code to the form, usually above the message text area:

<div class="block">
{def $antispam = custom_anti_spam()}
<label>Anti-spam word</label><div class="labelbreak"></div>
<input type="hidden" name="matchthis" value="{$antispam}" />
<a href={concat("/customantispam/audio/(audio)/",$antispam)|ezurl("double")}><img src={concat("/customantispam/image/(image)/",$antispam)|ezurl("double")} style="border: 1px solid black" alt="Click to hear an audio file of the anti-spam word"/></a><div class="labelbreak"></div>
<input type="text" name="securitycode" size="10" />
</div>

D’Angelo (Canada): as good as Sun-Rype for apple juice

May 6th, 2007

I drink apple juice daily. But I was getting tired of the rising prices of Sun-Rype juice, with the once-in-a-blue-moon sales at regular grocery stores clocking in at $1.33 CAD for a 1 litre carton (which I think is the regular price at Costco) and the regular price of around $1.79.

Other juices (which aren’t really cheaper) are from concentrate. So for the not-from-concentrate stuff, I’ve been stuck with Sun-Rype.

Luckily I found D’Angelo apple juice on sale at Zellers for $0.99 for a 1.36 litre bottle. I bought a few bottles to try and quite frankly, it’s just as good as the Sun-Rype variety and also not-from-concentrate (only ingredient: apple juice).

1.36 litre bottle of D'Angelo apple juice

The regular price at Zellers is $1.49, which is the equivalent of $1.10 per litre. I’m a D’Angelo convert.

The red, white, and blue categories in Court Philippe Chatrier at the French Open

May 6th, 2007

Pardon the randomness, but during my first Eurotrip I’m going to see the French Open (aka Roland-Garros, the tennis tournament on clay). Sourcing tickets is not easy and my advice is to… plan early, like as early as November (the tournament is at the end of May and beginning of June).

Anyway, from what I’ve discovered, there are three kinds of tickets (Philippe Chatrier — center court + general grounds, Suzanne Lenglen — court #1 + general grounds, and just general grounds) all good for access for a day. This is described quite well on the websites of ticket resellers such as this one. There’s also a 4th kind of ticket that you can buy the day of, in order to see night matches only.

I ended up buying a ticket to Philippe Chatrier (and the other courts except for Suzanne Lenglen) on eBay. Yeah, probably not the best place to get the ticket, but I don’t really have any contacts in France to line up for the leftover tickets sales and I don’t really want to rely on the scalpers. The big confusion for me is that my research about Philippe Chatrier reveals that there are three categories of tickets for that court — red, white, and blue. But the map that accompanies the ticket seller looks like this:

Map of the seating for Philippe Chatrier stadium

Yeah, no red, white, or blue. So how do you know what tickets you’re getting in advance?

Well, the lower-level seating AB, BB, CB, and DB are the red section. The middle, front of the upper-level of sections A, B, and D are the white section, while the corner and back sections of A, B, and D are the blue section.

How I unlocked a Nokia 3100 cell phone from Fido Canada

May 6th, 2007

I managed to get my hands on a perfectly functioning but cast-off Nokia 3100 cell phone that was previously with the Fido service… now, I wanted to use it with a 7-Eleven Speak Out Wireless SIM card I had (which came in a pleasant but black & white Nokia 1112), but of course the moment I put the 7-Eleven SIM card into the Nokia phone, the phone said that it was locked to Fido…

So I guess this is my first foray into the whole cell phone unlocking thing. Luckily, I’d heard that Nokia phones are usually easy to unlock… just find the correct code! I was a bit scared as I tried a few codes from a Google search and they were wrong. And, as I’ve read:

If the unlock code has been entered incorrectly 4 times or more then only a professional unlocker can help you by using an expensive cable solution.

Thankfully I found this site (there’s Peter in the address, but it’s got nothing to do with me): http://www.peters1.dk/webtools/nokia/nokiaonline.php?sprog=en

All I had to do was:
1) Find the IMEI code, which can be found behind the battery
2) Enter the code into the form on that website (along with model number, service provider, and country) to generate the unlock password
3) Turn on the phone without a SIM card in it, then enter the unlock password

Success! Perhaps I was lucky with the Nokia 3100, as I’ve read that with some phones, you have to use some sort of unlocking clip, or connect them to the computer to interact with software, or even pay someone to unlock it.

Got a Nokia phone that isn’t listed on the site above? Try posting in this forum and they’ll probably reply with an unlock code for free.

August 31, 2007 Update: I’ve also found this site, where I was able to unlock a Nokia 6101b that was locked to Rogers Wireless in Canada.

Pay a friend back instantly by transferring money within Citizens Bank accounts

April 18th, 2007

Need to pay your friend back for those concert tickets? Having trouble meeting up? Sick of writing cheques? Forgetful? Well, if you both have Citizens Bank accounts, just transfer the money over Internet banking. All you need is your friend’s account number. Then log in to your account, follow a few steps and poof — instant transfer! I just did this for the first time to pay my friend back for some contact lenses and was surprised at how easy it was. Not only that, I was happy to see that the money actually transferred instantly. At some banks, I’ve found that even to transfer money between two of my own accounts takes a day or more.

Most of the banks actually have this feature. However, it’s not really talked about much (and hey, I just discovered it myself). On most of the major bank websites I see that they advertise their Interac Email Money Transfer service a lot more heavily, which costs $1.50 for the sender. Of course, that service allows you to transfer money to your friend’s bank at a different financial institution other than yours, but if you’re going to go that route, get personal PayPal accounts and pay each other back without fees! (No more fees, OK?)

So, in the spirit of “friends don’t let friends bank with other banks” (or something), bank with the same bank and enjoy the convenience of free instant money transfers. I’ve touted (and reviewed) online banking in a previous post, and because I’m so excited about how fast and easy it was to pay my friend back with Citizens Bank (no, I don’t work there), I’ll show you how it’s done:

Log in to your account, then click the Transfers button at the top. Specify that you are transferring money to “Another Citizens Bank Account”.

Step one in paying your friend back

Specify how much money you want to transfer, from which account to which account…

Step two in paying your friend back

Then voilà — better than cheques!

Step three in paying your friend back

At which point your friend logs into their account and sees that they have money, along with a quirky memo that you wrote.