Skin Purple Beauty
I converted the popular skin Purple Beauty to B2evolution >= v2.4.1. This skin has always been a popular choice back in the 1.10 days. EdB coded the skin for 1.9. Original design is by Dieter Schneider. The skin is listed in the skins repositories where is gets a 2.9 / 5 vote.
When EdB coded the skin he left a few points to be improved. At that time I spent a lot of time on this skin and managed to solve most issues. That's documented in this forumpost. Of course all improvements are implemented in this version.
Skinshot -this is from the 1.10 version, but it hasn't changed that much-:

Download: Skins for b2evolution 2.x - Purple Beauty.
Have fun
Freelance custom work
If you have a specific job and can't find time or knowledge I offer custom support on a freelance basis. For both individuals and corporations I can set up single blogs and weave a B2evolution install into your existing site. Most often you will be looking for a specific custom job, like a skin based on your home page or corporate style, a plugin that fulfills your needs or upgrading an old install to the latest version.
As a member of the B2evolution support team ("Afwas") I have a thorough knowledge and understanding of the software and it's implementations. All the skins on this site are converted by me. I made a variety of B2evolution plugins, both custom and for the repository. I can advise you and help you with the lesser known features of the engine.
I will do both small jobs as well as complete sites. All my work will comply to XHTML and CSS standards and come with full warranty on functionality. Furthermore I work on a 'no cure no pay' basis that will ensure a result you will like.
I code in PHP, (X)HTML, SQL, javaScript, jQuery and I'm never lazy when presented with new challenges.
I will normally charge € 20,- / hour for installations and from € 30,- / hour onward when coding is involved. Most likely I will agree on a fixed price based on the hours I think I need to spend on the job. That way you are not unpleasantly surprised afterwards.
Feel free to contact me with your ideas and I will discuss the way in which I can assist you. You find a contact button in the footer of this blog.
Donkey Kong

DadHacker is the creator of the Atari game Donkey Kong. The game originated in 1981. Recently DadHacker wrote in his blog about his days at Atari and particularly about writing Donkey Kong. It's an incredible story.
B2evolution 1.10.3 & 2.4.0
HOWTO: use an external SMTP mailserver
If you cannot send mail through B2evo, probably because your host has disabled PHP's mail() function you must use another mailserver. There are other situations where you deliberately want to use this.
This solution will work with any SMTP server you have access to (can authenticate through username/password).
I had a successful go with Swift mailer in B2evo 1.10.3 and in 2.4.0 rc2. This is how to set it up:
1) Download swift-smtp from http://www.swiftmailer.org/download/ . Unpack and upload the /lib/ folder. I made a directory in /inc/_misc/ called swift-smtp where I put the lib folder. So this looks like /inc/_misc/swift-smtp/lib/. Feel free to add the folder to /htsrv/ where I think it belongs.
2) Open /inc/_misc/_misc.funcs.php and replace lines 2348 - 2362. If you are using B2evo v2.4.0 rc 2 look for this codesnippet in inc/misc/_misc.funcs.php line ~1568.:
if( $debug > 1 )
{ // We agree to die for debugging...
if( ! mail( $to, $subject, $message, $headerstring ) )
{
debug_die( 'Sending mail from
«'.htmlspecialchars($from).'» to
«'.htmlspecialchars($to).'», Subject
«'.htmlspecialchars($subject).'» FAILED.' );
}
}
else
{ // Soft debugging only....
if( ! @mail( $to, $subject, $message, $headerstring ) )
{
$Debuglog->add( 'Sending mail from
«'.htmlspecialchars($from).'» to
«'.htmlspecialchars($to).'», Subject
«'.htmlspecialchars($subject).'» FAILED.', 'error' );
return false;
}
}
by:
//setup swift-smtp
require_once( dirname(__FILE__).'/swift-smtp/lib/Swift.php' );
require_once( dirname(__FILE__).'/swift-smtp/lib/Swift/Connection/SMTP.php' );
global $smtp_server, $smtp_user, $smtp_password, $smtp_port;
$smtp =& new Swift_Connection_SMTP( $smtp_server, $smtp_port);
$smtp->setUsername( $smtp_user );
$smtp->setpassword( $smtp_password );
$swift =& new Swift($smtp);
$mail =& new Swift_Message( $subject, $message);
$to_name = preg_replace( '/^.*?<(.+?)>$/', '$0', $to );
$from_name = preg_replace( '/^.*?<(.+?)>$/', '$0', $from );
$to_email = preg_replace( '/^.*?<(.+?)>$/', '$1', $to );
$from_email = preg_replace( '/^.*?<(.+?)>$/', '$1', $from );
$new_to = new Swift_Address( $to_email, $to_name );
$new_from = new Swift_Address( $from_email, $from_name );
if( $debug > 1 )
{ // We agree to die for debugging...
if( ! $swift->send( $mail, $new_to, $new_from ))
{
debug_die( 'Sending mail from
«'.htmlspecialchars($from).'» to
«'.htmlspecialchars($to).'», Subject
«'.htmlspecialchars($subject).'» FAILED.' );
}
}
else
{ // Soft debugging only....
if( ! @$swift->send( $mail, $new_to, $new_from ))
{
$Debuglog->add( 'Sending mail from
«'.htmlspecialchars($from).'» to
«'.htmlspecialchars($to).'», Subject
«'.htmlspecialchars($subject).'» FAILED.', 'error' );
return false;
}
}
I prefer the variables in /conf/_advanced.php. Somewhere put this block:
/**
* SMTP
* uses swift-smtp
*/
$smtp_server = 'smtp.server.tld';
$smtp_port = 25;
$smtp_user = 'user';
$smtp_password = 'password';
If you want to put the Swift mailer files in the /htsrv/ folder (/htsrv/swift-smtp/lib/) you change these lines of the code:
require_once( dirname(dirname(dirname(__FILE__))).'/htsrv/swift-smtp/lib/Swift.php' );
require_once( dirname(dirname(dirname(__FILE__))).'/htsrv/swift-smtp/lib/Swift/Connection/SMTP.php' );
Once again: I took the /lib/ folder from the package and put it in a custom made /swift-smtp/ folder. You may copy the /lib/ folder from swift-smtp directly to the /htsrv/ folder, but change the path accordingly.
Thanks to dcihon for testing.
Good luck
Conditional CSS through PHP
Wouldn't it be nice to be able to change the skin's appearance based on some condition. In this tip & trick I'm going to change the colour of this post to red at daytime and blue at night. Times are local CET (Europe).
The nice thing about PHP is that you can deploy it everywhere in the page. So why not within the CSS file.
First you want to point to this special file. Somewhere in the header (for B2evo that's ../blogs/skins/YOURSKIN/_html_header.inc.php) make this call:
<link rel="stylesheet" href="phpstyle.php" type="text/css" />
Every PHP statement must be within a PHP file. We create this phpstyle.php file and start it with:
<?php header("Content-type: text/css"); ?>
That's about it. The file acts as any other CSS file, but since it's a PHP file we can interweave (we say 'lard' in Holland) with any thinkable condition. It's like serverside JavaScript.
On with the task I've set. Let's call the server time:
$time_at_server = date(G);
$time_in_europe = $time_at_server + 9;
Now the condition:
if ($time_in_europe >= 6 && $time_in_europe < 18 )
{
// It's daytime
$sun_is_shining = 1;
}
else
{
// it's night
$sun_is_shining = 0;
};
This is the complete phpstyle.php:
<?php header("Content-type: text/css"); ?>
<?php
$time_at_server = date(G);
$time_in_europe = $time_at_server + 9;
// Found a bug. This is the fix:
if ( $time_in_europe > 23 )
{
$time_in_europe = $time_in_europe - 24;
}
if ( $time_in_europe >= 6 && $time_in_europe < 18 )
{
// It's daytime
$sun_is_shining = 1;
}
?>
.day_or_night p {
<?php
if ( $sun_is_shining )
{
echo ( "color: red; \n" );
}
else
{
echo ( "color: blue; \n" );
}
// output
/**
* .day_or_night p {
* color: red;
* }
*
*/
?>
}
I've started this post with <div class=" day_or_night"> and ended it with </div>.
That's it. I Hope you like it. Can you think of some other uses for this conditional css statements? Leave a comment if you do.
Have fun.