Archive

Archive for the ‘WebDev’ Category

Cold Steel UK

July 14th, 2010 Mark No comments

I’ve been working on our Cold Steel website a lot recently and have managed to achieve a Y-Slow ‘B’ Grade which is pretty good considering the amount of images & JS/CSS used.. also honed down the adwords campaigns from >£40/day to <£10/day

We're currently running a competition to win a Sjambok (it’s a bit like a whip, apparently used by the police in South Africa for riot control).. if you’d like the chance to win a FREE 42″ Sjambok then just click the previous Sjambok links and follow the instructions provided

Categories: Marketing, WebDev Tags:

Akismet SPAM Filtering in phpBB3

June 3rd, 2009 Mark 6 comments

Recently I’ve been seeing a shitload of Spambot signups and actual spam postings on my Coopersguns BodyBuilding forums

phpBB 3 had a little spam hiatus whilst the spammers cracked the new captcha system, however it’s obviously been well and truly broken now

I decided to clean the forums up and get rid of the spammers. I have employed 2 techniques:

  1. A phpBB3 mod called daroPL_AntiSpam
  2. Some code I quickly conjured up to check with Akismet when a comment is posted

I will obviously be talking about the latter here, follows are instructions on how to implement the Akismet check on posts:

If you want to copy & paste the following code snippets, hover over them and click the ‘copy’ button

1) Download akismet-php-curl-class
2) Copy the akismet.curl.class.php from the archive to your phpBB3 forum’s ‘includes’ folder (e.g. ~/public_html/forums/includes)
3) Edit message_parser.php in the ‘includes’ folder and make the following changes:

Find:

if (!class_exists('bbcode'))
{
        include($phpbb_root_path . 'includes/bbcode.' . $phpEx);
}

After it, insert the following

if (!class_exists('akismet')) {
        include($phpbb_root_path . 'includes/akismet.curl.class.' . $phpEx);
}

Find:

// Check number of links
if ($config['max_' . $mode . '_urls'] && $num_urls > $config['max_' . $mode . '_urls'])
{
	$this->warn_msg[] = sprintf($user->lang['TOO_MANY_URLS'], $config['max_' . $mode . '_urls']);
	return (!$update_this_message) ? $return_message : $this->warn_msg;
}

After it, insert the following:

// Akismet SPAM check
if (($user->data['user_posts']<=6) && ($user->data['user_type']==0)) {

	$akismet_comment = array(
	    'comment_type'              => 'comment',
	    'comment_author'            => $user->data['username'],
	    'comment_author_email'      => $user->data['user_email'],
	    'comment_author_url'        => $user->data['user_website'],
	    'comment_content'           => $this->message,
	);

	$akismet = new akismet('YOURAKISMETAPIKEYHERE','http://www.yourforums.com/forums');

	if(!$akismet->error) {

		if($akismet->valid_key()) {

			if($akismet->is_spam($akismet_comment)) {

				$this->warn_msg[] = $user->lang['AKISMET_SPAM'];
				$a_to = "you@youraddress.com";
				$a_subject = "Attempted SPAM Post by ".$user->data['username'];
				$a_body = $this->message;
				$a_headers = "From: admin@yourforums.com";
				mail($a_to, $a_subject, $a_body, $a_headers);

			}

		}

	}

}

4) Edit posting.php in the ‘language/en/’ folder (obviously you’ll need to add this to other languages your users use too)

Find:

        'TOO_FEW_CHARS'                         => 'Your message contains too few characters.',

After it, insert the following:

        'AKISMET_SPAM'                  => 'Your message looks like SPAM.',

5) Finished!

New website created: Cold Steel UK

October 27th, 2008 Mark No comments

Just posting here to get the latest website I’ve produced indexed in Google..

The website is Cold Steel UK – it’s the UK distributors website, for trade and retail. Cold Steel UK sell knives and swords of the highest quality, amongst other things.

The ecommerce system used is Actinic v9 and on the website side, technologies used include jQuery & PHP (via Actinic’s embedded PHP engine)

Categories: Internet, WebDev Tags: , ,

Secpay, Actinic & SSL lameness

October 30th, 2007 Mark 1 comment

Currently when enabling SSL on shopping cart pages in Actinic, Actinic will no longer be able to link up Secpay transactions to orders.

After numerous hours debugging, I figured out what was going wrong.. when SSL is enabled on shopping cart pages, Actinic provides Secpay with HTTPS callbacks – as you’d expect. It also sets a parameter which Secpay needs if the callbacks are HTTPS. However for some reason at this moment in time Secpay won’t use the HTTPS callbacks – the request is never sent to the server

I don’t know why this is happening, I even used the alternative method of informing Secpay that the callback is HTTPS – via the ‘options’ parameter.. no dice

The solution I’m currently using is to modify the ‘OCCSecPayScriptTemplate.pl’ file, inserting a line after the following block of code:

# to enable Diners cards, remove the ‘#’ from the start of the 2 lines below
#$sOptions .= ‘,’ if ($sOptions ne ”);
#$sOptions .= ‘diners=true’;

the line to change the callback URLs back to HTTP is:

$::sCallBackURLAuth =~ s/https/http/;

GoDaddy SSL (StarfieldTech) and Safari Issues

September 25th, 2007 Mark 2 comments

We’ve had a few customers over the past few months inform us of a ‘security warning’ with regard to our e-commerce websites checkout pages (SSL secured). Recently a kind customer sent us a screenshot of the problem and it became immediately apparent what the issue was..

Apple up until the most recent versions of Safari did not bundle the StarfieldTech root certificate with Safari. Therefore if a Safari user visits a GoDaddy SSL secured site (GoDaddy retail StarFieldTech Certificates) then a warning dialog will pop up informing the user that ‘Safari can’t verify the identity of the website “xxx.com”‘.

The easiest solution is to upgrade Safari to the latest version.. and alternative is to install the StarfieldTech root certificate manually by visiting the following URL: StarfieldTech root certificate

Categories: Internet, WebDev Tags:

StumbleUpon, Analytics, Mint & Adsense!

July 13th, 2006 Mark No comments

People who read this blog (yes, that’s you two over there!) might know that I’m currently working on a health/fitness/bodybuilding website in my spare time

We’ve created a pretty useful exercise encyclopedia full of instructional exercise videos

The only problem is getting it noticed! I don’t really want to pay for a link from a high traffic/high PR website.. I want the SEO to be natural, i.e. site geared for optimal user experience = natural SEO

I stumbled upon an interesting site that helps you to discover great websites on the web that others have visited and rated highly. Yesterday I placed a comment on Coopers Guns via StumbleUpon and since then there’s been a steady stream of traffic from StumbleUpon.. the techy nature of the users of StumbleUpon means little to no ad revenue but I’m more interested in mere eyeballs at the moment

Here’s some Analytics graphs to illustrate the above:

Visitors and Page Views

Visits By Source

Geo Map Overlay

New vs Returning Visitors

I’ve also purchased a licence for Shaun Inman‘s Mint.. I like analytics but Mint gives me a clearer and more concise picture of 0-second statistics

Most visitors to the site use Firefox:

Browser Family

And not many use a resolution below 1024×768 (thankfully!)

Screen Resolution

I was a bit worried that Adsense wasn’t counting impressions properly as the “page view” count difference between Analytics and Adsense was off by quite a margin. I realised though that quite a lot of savvy/techy web surfers actually use stuff like adblock, etc… that explains the difference!

Categories: Internet, WebDev Tags:

WordPress’ TinyMCE Popup Width In Firefox

July 13th, 2006 Mark 7 comments

I’m surprised there isn’t much about this online.. although I admit my search wasn’t very comprehensive

Anyway, for a while now I’ve been a bit annoyed with the TinyMCE editor in WordPress.. for example, when you click the “Insert/edit link” button on the toolbar, a popup window is launched which proceeds to resize itself to be a less than useful width

Apparently according to one of the developers of TinyMCE in this thread, it’s down to Firefox using the status bar width when it shouldn’t

Anyway, the fix is as follows:

Just after the statements below in tiny_mce_popup.js

   // Netscape 7.1 workaround
   if (this.isWindow && tinyMCE.isNS71) {
      window.resizeBy(0, 10);
      return;
   }

Add the following:

   // Gecko workaround
   if (this.isWindow && tinyMCE.isGecko) {
      window.resizeBy(20, 10);
      return;
   }

That seems to work alright and resize the window to a useable width!

Categories: Programming, WebDev Tags:

CoopersGuns Exercise Encyclopedia Completed

June 27th, 2006 Mark No comments

Just a quick post to let everyone know that CoopersGuns Health, Fitness & Bodybuilding Exercise Encyclopedia is now complete!

A flash app guides you through picking the muscle group you require exercises for and then links you to a page which contains a list of possible exercises, grouped by category

Once you select an exercise you are taken to a page which describes the exercise and shows you exactly how to perform it with the aid of a video of the exercise (flv flash video technology)

Categories: Health, WebDev Tags:

Unobtrusive onkeypress with behaviour.js

June 21st, 2006 Mark No comments

The following seems to work quite well for some AJAXified forms I have (a behaviour.js rule):

'#form_field_id' : function(element){
	element.onkeypress = function(e){
		e = (e)?e:window.event;
		var kc = e.keyCode ? e.keyCode : e.charCode;
		if(kc == 13) {
			do_something();
			return false;
		}
	}
}
Categories: Internet, WebDev Tags:

CoopersGuns Exercise Encyclopedia

June 7th, 2006 Mark No comments

We’ve recently added an Exercise Encyclopedia to CoopersGuns (health/fitness website I’m helping to develop)

I decided to use Flash video (flv) for the exercise videos – it seems to work quite well

Please not however that it’s not 100% complete yet as some of the videos are missing the accompanying textual descriptions

Categories: Health, WebDev Tags: