Archive for April, 2009

 |  0 Comments  |  Posted in Script Smart By Aaron

At loooonnnngggg last my unblockable exit hover popup script that is inside Script Smart is W3C compliant.

This means it will work in websites that have this sort of code at the top of every page…

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

Most new websites built over the last 2 years or so, use the W3C to allow their websites to show the same way on all browsers. It makes sense to use it.

Of course the hover popup still works fine on websites that don’t use the W3C to force compliance.

The easiest way to upgrade is to just start Script Smart and it will prompt you to upgrade.

You use the hover popup in the same manner as you did before, it’s just the output script that is W3C compliant.

Thank you to all my users that have been waiting patiently for this update to Script Smart. Believe it or not it took 3 freelance web programmers and me, to get this script 100% compliant.

I’m really proud of it, because it’s the smallest size (~20KB) unblockable hover popup script with exit hover capabilities that is W3C compliant (will run on all browsers and site designs) available on the internet.

There are others on the market of course, but the nearest rival is ~120KB in size as the finished script.

Of course with higher speed internet these days around the world, the overal size of a webpage and how quickly it loads is becoming a mute point.

Aaron


 |  8 Comments  |  Posted in Website Software By Aaron

ed. 13Nov12 – This has been tested and amended to be current with v3.11 of PHPBB3 (if you haven’t upgraded your PHPBB3 board to the current version I highly recommend it).

I use PHPBB3 for my niche forums that I own. It’s powerful open source software, and I highly recommend it.

However on certain servers the emails that the PHPBB3 software sends out have incomplete header information. Now in PHPBB3 defense they do specify all the header information in their code, but it’s only on certain server configurations that you need to go one extra step further. Hopefully one day they will add this to their core code.

Here is the problem, the return-path and envelope-from fields are not marked with the forum email address. They are marked with the servers nobody email address.

Return-path: < nobody@server.com >
Envelope-to: user@forumuser.com
Delivery-date: Sat, 04 Apr 2009 22:22:21 +1000
Received: from nobody by server.com with local (Exim 4.69)
(envelope-from < nobody@server.com >)
id 1Lq4tB-0000vz-FW
for user@forumuser.com; Sat, 04 Apr 2009 22:22:21 +1000

What this means is that any bounce messages will go to the server admin (if they are even looking) and not back to the individual PHPBB3 board administrator for them to take action on it.

Unfortunately a core code hack is required to fix this, and this will need to be re-applied each time PHPBB3 has an upgrade. But it’s only a couple of lines of code, so it’s easy.

You want to edit the /includes/functions_messenger.php file…

Find this code (there is 1 instance of this code in v3.11)

	// On some PHP Versions mail() *may* fail if there are newlines within the subject.
	// Newlines are used as a delimiter for lines in mail_encode() according to RFC 2045 section 6.8.
	// Because PHP can't decide what is wanted we revert back to the non-RFC-compliant way of separating by one space (Use '' as parameter to mail_encode() results in SPACE used)
	$result = $config['email_function_name']($to, mail_encode($subject, ''), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $headers);

and make it this code

	// On some PHP Versions mail() *may* fail if there are newlines within the subject.
	// Newlines are used as a delimiter for lines in mail_encode() according to RFC 2045 section 6.8.
	// Because PHP can't decide what is wanted we revert back to the non-RFC-compliant way of separating by one space (Use '' as parameter to mail_encode() results in SPACE used)
	$result = $config['email_function_name']($to, mail_encode($subject, ''), wordwrap(utf8_wordwrap($msg), 997, "\n", true), $headers, "-f" . $config['board_email']);

What that does is add in the 5th parameter (“-f”forumadmin@messageboard.com) to the PHP sendmail function which is for specifying the return-path and envelope-from fields.

Now your output will look like this

Return-path: < forumadmin@messageboard.com >
Envelope-to: user@forumuser.com
Delivery-date: Sat, 04 Apr 2009 22:33:17 +1000
Received: from nobody by server.com with local (Exim 4.69)
(envelope-from < forumadmin@messageboard.com >)
id 1Lq53l-000177-Nx
for user@forumuser.com; Sat, 04 Apr 2009 22:33:17 +1000

and any bounces or PHPBB3 sent email issues will come back to you personally and not your hosting server admin.

Aaron