User login

You are here

drupal

Extending Drupal's Honeypot module with log checking

Using some simple bash command like awk and sed, I cooked up this quick drush hack to examine the server logs, there's a specific robot getting around that continuously hits up the "/user/password?name=xyz" URL, this simple line fed script grabs the IP address in the first column, sort's them, counts how many uniq's there are, then uses awk again to only print out IP's that have tried this URL more than 2 times.

Facebook style realtime event notifications in Drupal+Node.JS

Ok so this one is a bit of a hack, but on my TShirtSlayer website it fits very nicely.

Essentially I wanted to do something similar to the way FB does automatic realtime notifications but instead of focusing on people, I wanted the the focus to be on the taxonomy (things added to the site broken down by category), this is our message/event we want to spread to other users.

Tips for testing Drupal Migrate (simpletest)

Recently completed a complex job where there was significant work in lining up exported fields exported with Views data export (CSV) into the excellent migrate module, basically so the operator could export data into excel spreadsheet, adjust and re-migrate

So here's some tips I learnt.

Synchronising comments in Drupal with YouTube playlists

Here's some nice hack to synchronise peoples comments in the forum - that contain youtube links to actual youtube playlists in your account.

For example, this is great on TShirtSlayer because it's a music related website, and people often paste in links to youtube, it's a lot of fun to play a youtube playlist back when it's based on really good discussion on your website

So let's get started, I really prefer to use Drush for these kinds of events, however you could create some kind of queue mechanism from the comment being submitted instead

Drupal webform - I have the worlds laziest progress bar

I've been working on a couple of project's using the greatly improved and very popular Drupal webform module with lots of pagebreaks (pages), unfortunately for these projects some medium level of backwards compatibily is required (damn you old browsers), so here's some cheap and cheerful jQuery to inject a simple Progressbar, I like this method better because it does not require one to customise the node-webform.tpl.php

(note: the following is for Drupal-7 release of webform only)

Site specific CAPTCHA images (or how I learned to beat the 'bot)

Recently, After some massive work upgrading TShirtSlayer from Drupal-5 to Drupal-7 (!) I enabled the Drupal "reCaptcha" and "Captcha" modules, only to discover they are totally and utterly useless, it was almost like they were making it easier for bots to find and get into the site by allowing the bots the right search text to locate the site in the search engines (probably where very carefully crafted software would then go and generate accounts on my site)

HOW TO: Configuring Drupal's Ubercart Bitcoin Payment module

So there's been a bit of noise about better documentation for setting up the Ubercart Bitcoin Payment's module, so you can accept Bitcoin payment's in the equivalent market rates to your existing currencies on your shop.

So, I assume that since you have your Ubercart shop setup, you probably got as far as setting up something like the Paypal gateway or whatever, and that you have a functioning existing shop working.

Now, onto Bitcoin.

Upgrading Drupal 5/6 votingapi_vote to a field_vote

If you have votes enabled on your comments, here's a little helper if you need to quickly migrate from old D5/6 votingapi_vote type datasets, You'll need to insert into your field revision table for your fivestar/voting field, problem is, your field_vote needs to know which comment-ID the vote was for (the entity), so we can just get a little hacky and pull that from the first comment entered by the user (grouped by node + uid)

Topic: 

Drupal + Apache2 htpasswd specific path exclusions

Sometimes you need to add a htpasswd directive to your Drupal's virtualhost directive for various reasons (Limiting access to clients, stopping crawlers of all sorts, etc), but what happens if you need to ALLOW access to certain path's ? In this case, we had to allow access to the /services/ path.

new module: taxonomy freetag detection

Sometimes there is the need to manage some keywords relating to an article, but only for a certain few important subset of words.

For example you might have some tricky financial blog entry and need to grab certain keywords from it.

Well wait no more try Taxonomy Freetag Detection

Pages

Subscribe to RSS - drupal