Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/sessions/model/_session.class.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /home/hemmi3/public_html/blog/inc/sessions/model/_session.class.php:215) in /home/hemmi3/public_html/blog/inc/sessions/model/_session.class.php on line 222

Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/items/model/_itemquery.class.php on line 628

Warning: Cannot modify header information - headers already sent by (output started at /home/hemmi3/public_html/blog/inc/sessions/model/_session.class.php:215) in /home/hemmi3/public_html/blog/inc/_core/_template.funcs.php on line 59
Tips, hacks and skins for B2evo http://www.blog.hemminga.net/index.php?blog=6 en-US http://blogs.law.harvard.edu/tech/rss 60 Skin Purple Beauty http://www.blog.hemminga.net/index.php/skin-purple-beauty?blog=6
Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/_core/_misc.funcs.php on line 870
Mon, 18 Aug 2008 17:38:56 +0000 admin Skins 248@http://www.blog.hemminga.net/ <p>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. <a href="http://wonderwinds.com">EdB</a> coded the skin for 1.9. Original design is by <a href="http://www.webart.no/webshop">Dieter Schneider</a>. The skin is listed in the <a href="http://skins.b2evolution.net/one.php?blog=7&amp;page=1&amp;paged=3">skins repositories</a> where is gets a 2.9 / 5 vote.<br /> 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 <a href="http://forums.b2evolution.net/viewtopic.php?t=12810">this forumpost</a>. Of course all improvements are implemented in this version.</p> <p>Skinshot -this is from the 1.10 version, but it hasn't changed that much-:</p> <div class="image_block"><img src="http://www.blog.hemminga.net/media/blogs/B2evo/skinshot.jpg" alt="" title="" width="240" height="180" /></div> <p>Download: <a href="http://skins.b2evolution.net/two.php/2008/08/18/purple_beauty_1">Skins for b2evolution 2.x - Purple Beauty</a>.</p> <p>Have fun</p><div class="item_footer"><p><small><a href="http://www.blog.hemminga.net/index.php/skin-purple-beauty?blog=6">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div> 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

]]>
http://www.blog.hemminga.net/index.php/skin-purple-beauty?blog=6#comments http://www.blog.hemminga.net/index.php?blog=6&tempskin=_rss2&disp=comments&p=248
Freelance custom work http://www.blog.hemminga.net/index.php/freelance-custom-work?blog=6
Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/_core/_misc.funcs.php on line 870
Thu, 27 Mar 2008 07:41:26 +0000 admin Announcement 207@http://www.blog.hemminga.net/ <p>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.</p> <p>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.</p> <p>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. </p> <p>I code in PHP, (X)HTML, SQL, javaScript, jQuery and I'm never lazy when presented with new challenges.</p> <p>I will normally charge &#8364; 20,- / hour for installations and from &#8364; 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.</p> <p>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.</p><div class="item_footer"><p><small><a href="http://www.blog.hemminga.net/index.php/freelance-custom-work?blog=6">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div> 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.

]]>
http://www.blog.hemminga.net/index.php/freelance-custom-work?blog=6#comments http://www.blog.hemminga.net/index.php?blog=6&tempskin=_rss2&disp=comments&p=207
Donkey Kong http://www.blog.hemminga.net/index.php/donkey-kong?blog=6
Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/_core/_misc.funcs.php on line 870
Sun, 09 Mar 2008 02:30:38 +0000 admin Announcement Tips Computers 180@http://www.blog.hemminga.net/ <div class="image_block"><img src="http://www.blog.hemminga.net/media/blogs/B2evo//donkeykong_big.gif" alt="" title="" width="448" height="512" /></div> <p>DadHacker is the creator of the Atari game Donkey Kong. The game originated in 1981. Recently DadHacker <a href="http://www.dadhacker.com/blog/?p=987">wrote</a> in his blog about his days at Atari and particularly about writing Donkey Kong. It's an incredible story.</p><div class="item_footer"><p><small><a href="http://www.blog.hemminga.net/index.php/donkey-kong?blog=6">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>

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.

]]>
http://www.blog.hemminga.net/index.php/donkey-kong?blog=6#comments http://www.blog.hemminga.net/index.php?blog=6&tempskin=_rss2&disp=comments&p=180
B2evolution 1.10.3 & 2.4.0 HOWTO: use an external SMTP mailserver http://www.blog.hemminga.net/index.php/title-6?blog=6
Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/_core/_misc.funcs.php on line 870
Thu, 31 Jan 2008 09:21:37 +0000 admin Announcement 153@http://www.blog.hemminga.net/ <p>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.<br /> This solution will work with any SMTP server you have access to (can authenticate through username/password).</p> <p>I had a successful go with <a href="http://www.swiftmailer.org">Swift mailer</a> in B2evo 1.10.3 and in 2.4.0 rc2. This is how to set it up:</p> <p>1) Download swift-smtp from <a href="http://www.swiftmailer.org/download/">http://www.swiftmailer.org/download/</a> . 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.<br /> 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.:</p> <!-- codeblock lang="php" line="1" --><pre><code> if( $debug &gt; 1 ) { // We agree to die for debugging... if( ! mail( $to, $subject, $message, $headerstring ) ) { debug_die( 'Sending mail from &amp;laquo;'.htmlspecialchars($from).'&amp;raquo; to &amp;laquo;'.htmlspecialchars($to).'&amp;raquo;, Subject &amp;laquo;'.htmlspecialchars($subject).'&amp;raquo; FAILED.' ); } } else { // Soft debugging only.... if( ! @mail( $to, $subject, $message, $headerstring ) ) { $Debuglog-&gt;add( 'Sending mail from &amp;laquo;'.htmlspecialchars($from).'&amp;raquo; to &amp;laquo;'.htmlspecialchars($to).'&amp;raquo;, Subject &amp;laquo;'.htmlspecialchars($subject).'&amp;raquo; FAILED.', 'error' ); return false; } }</code></pre><!-- /codeblock --> <p>by:</p> <!-- codeblock lang="php" line="1" --><pre><code>//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 =&amp; new Swift_Connection_SMTP( $smtp_server, $smtp_port); $smtp-&gt;setUsername( $smtp_user ); $smtp-&gt;setpassword( $smtp_password ); $swift =&amp; new Swift($smtp); $mail =&amp; new Swift_Message( $subject, $message); $to_name = preg_replace( '/^.*?&lt;(.+?)&gt;$/', '$0', $to ); $from_name = preg_replace( '/^.*?&lt;(.+?)&gt;$/', '$0', $from ); $to_email = preg_replace( '/^.*?&lt;(.+?)&gt;$/', '$1', $to ); $from_email = preg_replace( '/^.*?&lt;(.+?)&gt;$/', '$1', $from ); $new_to = new Swift_Address( $to_email, $to_name ); $new_from = new Swift_Address( $from_email, $from_name ); if( $debug &gt; 1 ) { // We agree to die for debugging... if( ! $swift-&gt;send( $mail, $new_to, $new_from )) { debug_die( 'Sending mail from &amp;laquo;'.htmlspecialchars($from).'&amp;raquo; to &amp;laquo;'.htmlspecialchars($to).'&amp;raquo;, Subject &amp;laquo;'.htmlspecialchars($subject).'&amp;raquo; FAILED.' ); } } else { // Soft debugging only.... if( ! @$swift-&gt;send( $mail, $new_to, $new_from )) { $Debuglog-&gt;add( 'Sending mail from &amp;laquo;'.htmlspecialchars($from).'&amp;raquo; to &amp;laquo;'.htmlspecialchars($to).'&amp;raquo;, Subject &amp;laquo;'.htmlspecialchars($subject).'&amp;raquo; FAILED.', 'error' ); return false; } }</code></pre><!-- /codeblock --> <p>I prefer the variables in /conf/_advanced.php. Somewhere put this block:</p> <!-- codeblock lang="php" line="1" --><pre><code>/** * SMTP * uses swift-smtp */ $smtp_server = 'smtp.server.tld'; $smtp_port = 25; $smtp_user = 'user'; $smtp_password = 'password';</code></pre><!-- /codeblock --> <p>If you want to put the Swift mailer files in the /htsrv/ folder (/htsrv/swift-smtp/lib/) you change these lines of the code:</p> <!-- codeblock lang="php" line="1" --><pre><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' );</code></pre><!-- /codeblock --><p> <br /> 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.</p> <p>Thanks to <strong>dcihon</strong> for testing.</p> <p>Good luck</p><div class="item_footer"><p><small><a href="http://www.blog.hemminga.net/index.php/title-6?blog=6">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div> 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
 &laquo;'.htmlspecialchars($from).'&raquo; to
 &laquo;'.htmlspecialchars($to).'&raquo;, Subject
 &laquo;'.htmlspecialchars($subject).'&raquo; FAILED.' );
		}
	}
	else
	{	// Soft debugging only....
		if( ! @mail( $to, $subject, $message, $headerstring ) )
		{
			$Debuglog->add( 'Sending mail from
 &laquo;'.htmlspecialchars($from).'&raquo; to
 &laquo;'.htmlspecialchars($to).'&raquo;, Subject
 &laquo;'.htmlspecialchars($subject).'&raquo; 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
 &laquo;'.htmlspecialchars($from).'&raquo; to
 &laquo;'.htmlspecialchars($to).'&raquo;, Subject
 &laquo;'.htmlspecialchars($subject).'&raquo; FAILED.' );
		}
	}
	else
	{	// Soft debugging only....
		if( ! @$swift->send( $mail, $new_to, $new_from ))
		{
		$Debuglog->add( 'Sending mail from
 &laquo;'.htmlspecialchars($from).'&raquo; to
 &laquo;'.htmlspecialchars($to).'&raquo;, Subject
 &laquo;'.htmlspecialchars($subject).'&raquo; 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

]]>
http://www.blog.hemminga.net/index.php/title-6?blog=6#comments http://www.blog.hemminga.net/index.php?blog=6&tempskin=_rss2&disp=comments&p=153
Conditional CSS through PHP http://www.blog.hemminga.net/index.php/conditional-css-through-php?blog=6
Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/_core/_misc.funcs.php on line 870
Sun, 02 Dec 2007 05:39:45 +0000 admin Tips 129@http://www.blog.hemminga.net/ <div class="day_or_night"><p>Wouldn't it be nice to be able to change the skin's appearance based on some condition. In this tip &amp; trick I'm going to change the colour of this post to red at daytime and blue at night. Times are local CET (Europe).<br /> The nice thing about PHP is that you can deploy it everywhere in the page. So why not within the CSS file.<br /> 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:</p><!-- codeblock lang="" line="1" --><pre><code> &lt;link rel="stylesheet" href="phpstyle.php" type="text/css" /&gt;</code></pre><!-- /codeblock --> <p>Every PHP statement must be within a PHP file. We create this phpstyle.php file and start it with:</p> <!-- codeblock lang="" line="1" --><pre><code>&lt;?php header("Content-type: text/css"); ?&gt;</code></pre><!-- /codeblock --> <p>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.</p> <p>On with the task I've set. Let's call the server time:</p> <!-- codeblock lang="php" line="1" --><pre><code>$time_at_server = date(G); $time_in_europe = $time_at_server + 9;</code></pre><!-- /codeblock --> <p>Now the condition:</p> <!-- codeblock lang="php" line="1" --><pre><code>if ($time_in_europe &gt;= 6 &amp;&amp; $time_in_europe &lt; 18 ) { // It's daytime $sun_is_shining = 1; } else { // it's night $sun_is_shining = 0; };</code></pre><!-- /codeblock --> <p>This is the complete phpstyle.php:</p> <!-- codeblock lang="php" line="1" --><pre><code>&lt;?php header("Content-type: text/css"); ?&gt; &lt;?php $time_at_server = date(G); $time_in_europe = $time_at_server + 9; // Found a bug. This is the fix: if ( $time_in_europe &gt; 23 ) { $time_in_europe = $time_in_europe - 24; } if ( $time_in_europe &gt;= 6 &amp;&amp; $time_in_europe &lt; 18 ) { // It's daytime $sun_is_shining = 1; } ?&gt; .day_or_night p { &lt;?php if ( $sun_is_shining ) { echo ( "color: red; \n" ); } else { echo ( "color: blue; \n" ); } // output /** * .day_or_night p { * color: red; * } * */ ?&gt; }</code></pre><!-- /codeblock --> <p>I've started this post with &lt;div class=" day_or_night"&gt; and ended it with &lt;/div&gt;.</p> <p>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.<br /> <br /> Have fun.</p> </div><div class="item_footer"><p><small><a href="http://www.blog.hemminga.net/index.php/conditional-css-through-php?blog=6">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div>

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.

]]>
http://www.blog.hemminga.net/index.php/conditional-css-through-php?blog=6#comments http://www.blog.hemminga.net/index.php?blog=6&tempskin=_rss2&disp=comments&p=129
New item in blogroll http://www.blog.hemminga.net/index.php/new-item-in-blogroll?blog=6
Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/_core/_misc.funcs.php on line 870
Thu, 29 Nov 2007 04:44:20 +0000 admin Hacks 127@http://www.blog.hemminga.net/ <p>Adding an extra item to the menu (blogroll) in B2evolution -like the forum link in this blog- should be easy, and fortunately it is. It requires a minor hack though. The development team and especially <a href="http://innervisions.org.uk/" target="_blank"></p><div class="item_footer"><p><small><a href="http://www.blog.hemminga.net/index.php/new-item-in-blogroll?blog=6">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div> Adding an extra item to the menu (blogroll) in B2evolution -like the forum link in this blog- should be easy, and fortunately it is. It requires a minor hack though. The development team and especially

]]>
http://www.blog.hemminga.net/index.php/new-item-in-blogroll?blog=6#comments http://www.blog.hemminga.net/index.php?blog=6&tempskin=_rss2&disp=comments&p=127
Quotes around blockquote http://www.blog.hemminga.net/index.php/quotes-around-blockquote?blog=6
Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/_core/_misc.funcs.php on line 870
Wed, 28 Nov 2007 10:14:12 +0000 admin Tips 126@http://www.blog.hemminga.net/ <p>The [block] button in the QuickTags toolbar generates a blockquote. It is fun to play with. Some very nice things can be done with the styling.</p> <blockquote><p>And so even though we face the difficulties of today and tomorrow, I still have a dream. It is a dream deeply rooted in the American dream.<br /> <br /> I have a dream that one day this nation will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident, that all men are created equal."<br /> <br /> I have a dream that one day on the red hills of Georgia, the sons of former slaves and the sons of former slave owners will be able to sit down together at the table of brotherhood.<br /> <br /> I have a dream that one day even the state of Mississippi, a state sweltering with the heat of injustice, sweltering with the heat of oppression, will be transformed into an oasis of freedom and justice.<br /> <br /> I have a dream that my four little children will one day live in a nation where they will not be judged by the color of their skin but by the content of their character.<br /> <br /> I have a dream today!<br /> <br /> I have a dream that one day, down in Alabama, with its vicious racists, with its governor having his lips dripping with the words of "interposition" and "nullification" -- one day right there in Alabama little black boys and black girls will be able to join hands with little white boys and white girls as sisters and brothers.<br /> <br /> I have a dream today!</p></blockquote> <p>The styling is done in ../rsc/css/basic.css. Some skin styles will already have something different for the blockquotes. You will find it somewhere in the css file in the skin's directory. Replace what's in there for the blockquote with something similar to this:</p> <amcode><pre><code>blockquote { text-indent: 25px; background: url(http://www.blog.hemminga.net/rsc/img/quotes1.png); background-position: 0 2px; background-repeat: no-repeat; } blockquote p { background-color: #eee; display: inline; margin: 0; padding-right: 24px; background: url(http://www.blog.hemminga.net/rsc/img/quotes2.png); background-position: bottom right; background-repeat: no-repeat; }</code></pre></amcode> <p>The images can be found <a href="http://www.blog.hemminga.net/rsc/img/quotes1.png">here</a> and <a href="http://www.blog.hemminga.net/rsc/img/quotes2.png">here</a>.</p> <p>Have fun.</p><div class="item_footer"><p><small><a href="http://www.blog.hemminga.net/index.php/quotes-around-blockquote?blog=6">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div> The [block] button in the QuickTags toolbar generates a blockquote. It is fun to play with. Some very nice things can be done with the styling.

And so even though we face the difficulties of today and tomorrow, I still have a dream. It is a dream deeply rooted in the American dream.

I have a dream that one day this nation will rise up and live out the true meaning of its creed: "We hold these truths to be self-evident, that all men are created equal."

I have a dream that one day on the red hills of Georgia, the sons of former slaves and the sons of former slave owners will be able to sit down together at the table of brotherhood.

I have a dream that one day even the state of Mississippi, a state sweltering with the heat of injustice, sweltering with the heat of oppression, will be transformed into an oasis of freedom and justice.

I have a dream that my four little children will one day live in a nation where they will not be judged by the color of their skin but by the content of their character.

I have a dream today!

I have a dream that one day, down in Alabama, with its vicious racists, with its governor having his lips dripping with the words of "interposition" and "nullification" -- one day right there in Alabama little black boys and black girls will be able to join hands with little white boys and white girls as sisters and brothers.

I have a dream today!

The styling is done in ../rsc/css/basic.css. Some skin styles will already have something different for the blockquotes. You will find it somewhere in the css file in the skin's directory. Replace what's in there for the blockquote with something similar to this:

blockquote {
	text-indent: 25px;
	background: url(http://www.blog.hemminga.net/rsc/img/quotes1.png);
	background-position: 0 2px;
	background-repeat: no-repeat;
}
blockquote p {
	background-color: #eee;
	display: inline;
	margin: 0;
	padding-right: 24px;
	background: url(http://www.blog.hemminga.net/rsc/img/quotes2.png);
	background-position: bottom right;
	background-repeat: no-repeat;
}

The images can be found here and here.

Have fun.

]]>
http://www.blog.hemminga.net/index.php/quotes-around-blockquote?blog=6#comments http://www.blog.hemminga.net/index.php?blog=6&tempskin=_rss2&disp=comments&p=126
Declaration of independance II http://www.blog.hemminga.net/index.php/declaration-of-independance-ii?blog=6
Warning: mktime() [function.mktime]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/_core/_misc.funcs.php on line 870
Sun, 11 Nov 2007 22:29:51 +0000 admin Announcement 118@http://www.blog.hemminga.net/ <p>He has refused his Assent to Laws, the most wholesome and necessary for the public good.</p> <p>He has forbidden his Governors to pass Laws of immediate and pressing importance, unless suspended in their operation till his Assent should be obtained; and when so suspended, he has utterly neglected to attend to them.</p> <p>He has refused to pass other Laws for the accommodation of large districts of people, unless those people would relinquish the right of Representation in the Legislature, a right inestimable to them and formidable to tyrants only.</p> <p>He has called together legislative bodies at places unusual, uncomfortable, and distant from the depository of their Public Records, for the sole purpose of fatiguing them into compliance with his measures.</p> <p>He has dissolved Representative Houses repeatedly, for opposing with manly firmness his invasions on the rights of the people.</p> <p>He has refused for a long time, after such dissolutions, to cause others to be elected, whereby the Legislative Powers, incapable of Annihilation, have returned to the People at large for their exercise; the State remaining in the mean time exposed to all the dangers of invasion from without, and convulsions within.</p> <p>He has endeavoured to prevent the population of these States; for that purpose obstructing the Laws for Naturalization of Foreigners; refusing to pass others to encourage their migrations hither, and raising the conditions of new Appropriations of Lands.</p> <p>He has obstructed the Administration of Justice by refusing his Assent to Laws for establishing Judiciary Powers.</p> <p>He has made Judges dependent on his Will alone for the tenure of their offices, and the amount and payment of their salaries.</p> <p>He has erected a multitude of New Offices, and sent hither swarms of Officers to harass our people and eat out their substance.</p> <p>He has kept among us, in times of peace, Standing Armies without the Consent of our legislatures.</p> <p>He has affected to render the Military independent of and superior to the Civil Power.</p> <p>He has combined with others to subject us to a jurisdiction foreign to our constitution, and unacknowledged by our laws; giving his Assent to their Acts of pretended Legislation:</p> <p>For quartering large bodies of armed troops among us:</p> <p>For protecting them, by a mock Trial from punishment for any Murders which they should commit on the Inhabitants of these States:</p> <p>For cutting off our Trade with all parts of the world:</p> <p>For imposing Taxes on us without our Consent:</p> <p>For depriving us in many cases, of the benefit of Trial by Jury:</p> <p>For transporting us beyond Seas to be tried for pretended offences:</p> <p>For abolishing the free System of English Laws in a neighbouring Province, establishing therein an Arbitrary government, and enlarging its Boundaries so as to render it at once an example and fit instrument for introducing the same absolute rule into these Colonies</p> <p>For taking away our Charters, abolishing our most valuable Laws and altering fundamentally the Forms of our Governments:</p> <p>For suspending our own Legislatures, and declaring themselves invested with power to legislate for us in all cases whatsoever.</p> <p>He has abdicated Government here, by declaring us out of his Protection and waging War against us.</p> <p>He has plundered our seas, ravaged our coasts, burnt our towns, and destroyed the lives of our people.</p> <p>He is at this time transporting large Armies of foreign Mercenaries to compleat the works of death, desolation, and tyranny, already begun with circumstances of Cruelty &amp; Perfidy scarcely paralleled in the most barbarous ages, and totally unworthy the Head of a civilized nation.</p> <p>He has constrained our fellow Citizens taken Captive on the high Seas to bear Arms against their Country, to become the executioners of their friends and Brethren, or to fall themselves by their Hands.</p> <p>He has excited domestic insurrections amongst us, and has endeavoured to bring on the inhabitants of our frontiers, the merciless Indian Savages whose known rule of warfare, is an undistinguished destruction of all ages, sexes and conditions.</p> <p>In every stage of these Oppressions We have Petitioned for Redress in the most humble terms: Our repeated Petitions have been answered only by repeated injury. A Prince, whose character is thus marked by every act which may define a Tyrant, is unfit to be the ruler of a free people.</p> <p>Nor have We been wanting in attentions to our British brethren. We have warned them from time to time of attempts by their legislature to extend an unwarrantable jurisdiction over us. We have reminded them of the circumstances of our emigration and settlement here. We have appealed to their native justice and magnanimity, and we have conjured them by the ties of our common kindred to disavow these usurpations, which would inevitably interrupt our connections and correspondence. They too have been deaf to the voice of justice and of consanguinity. We must, therefore, acquiesce in the necessity, which denounces our Separation, and hold them, as we hold the rest of mankind, Enemies in War, in Peace Friends.</p> <p>We, therefore, the Representatives of the united States of America, in General Congress, Assembled, appealing to the Supreme Judge of the world for the rectitude of our intentions, do, in the Name, and by Authority of the good People of these Colonies, solemnly publish and declare, That these united Colonies are, and of Right ought to be Free and Independent States, that they are Absolved from all Allegiance to the British Crown, and that all political connection between them and the State of Great Britain, is and ought to be totally dissolved; and that as Free and Independent States, they have full Power to levy War, conclude Peace, contract Alliances, establish Commerce, and to do all other Acts and Things which Independent States may of right do. </p><div class="item_footer"><p><small><a href="http://www.blog.hemminga.net/index.php/declaration-of-independance-ii?blog=6">Original post</a> blogged on <a href="http://b2evolution.net/">b2evolution</a>.</small></p></div> He has refused his Assent to Laws, the most wholesome and necessary for the public good.

He has forbidden his Governors to pass Laws of immediate and pressing importance, unless suspended in their operation till his Assent should be obtained; and when so suspended, he has utterly neglected to attend to them.

He has refused to pass other Laws for the accommodation of large districts of people, unless those people would relinquish the right of Representation in the Legislature, a right inestimable to them and formidable to tyrants only.

He has called together legislative bodies at places unusual, uncomfortable, and distant from the depository of their Public Records, for the sole purpose of fatiguing them into compliance with his measures.

He has dissolved Representative Houses repeatedly, for opposing with manly firmness his invasions on the rights of the people.

He has refused for a long time, after such dissolutions, to cause others to be elected, whereby the Legislative Powers, incapable of Annihilation, have returned to the People at large for their exercise; the State remaining in the mean time exposed to all the dangers of invasion from without, and convulsions within.

He has endeavoured to prevent the population of these States; for that purpose obstructing the Laws for Naturalization of Foreigners; refusing to pass others to encourage their migrations hither, and raising the conditions of new Appropriations of Lands.

He has obstructed the Administration of Justice by refusing his Assent to Laws for establishing Judiciary Powers.

He has made Judges dependent on his Will alone for the tenure of their offices, and the amount and payment of their salaries.

He has erected a multitude of New Offices, and sent hither swarms of Officers to harass our people and eat out their substance.

He has kept among us, in times of peace, Standing Armies without the Consent of our legislatures.

He has affected to render the Military independent of and superior to the Civil Power.

He has combined with others to subject us to a jurisdiction foreign to our constitution, and unacknowledged by our laws; giving his Assent to their Acts of pretended Legislation:

For quartering large bodies of armed troops among us:

For protecting them, by a mock Trial from punishment for any Murders which they should commit on the Inhabitants of these States:

For cutting off our Trade with all parts of the world:

For imposing Taxes on us without our Consent:

For depriving us in many cases, of the benefit of Trial by Jury:

For transporting us beyond Seas to be tried for pretended offences:

For abolishing the free System of English Laws in a neighbouring Province, establishing therein an Arbitrary government, and enlarging its Boundaries so as to render it at once an example and fit instrument for introducing the same absolute rule into these Colonies

For taking away our Charters, abolishing our most valuable Laws and altering fundamentally the Forms of our Governments:

For suspending our own Legislatures, and declaring themselves invested with power to legislate for us in all cases whatsoever.

He has abdicated Government here, by declaring us out of his Protection and waging War against us.

He has plundered our seas, ravaged our coasts, burnt our towns, and destroyed the lives of our people.

He is at this time transporting large Armies of foreign Mercenaries to compleat the works of death, desolation, and tyranny, already begun with circumstances of Cruelty & Perfidy scarcely paralleled in the most barbarous ages, and totally unworthy the Head of a civilized nation.

He has constrained our fellow Citizens taken Captive on the high Seas to bear Arms against their Country, to become the executioners of their friends and Brethren, or to fall themselves by their Hands.

He has excited domestic insurrections amongst us, and has endeavoured to bring on the inhabitants of our frontiers, the merciless Indian Savages whose known rule of warfare, is an undistinguished destruction of all ages, sexes and conditions.

In every stage of these Oppressions We have Petitioned for Redress in the most humble terms: Our repeated Petitions have been answered only by repeated injury. A Prince, whose character is thus marked by every act which may define a Tyrant, is unfit to be the ruler of a free people.

Nor have We been wanting in attentions to our British brethren. We have warned them from time to time of attempts by their legislature to extend an unwarrantable jurisdiction over us. We have reminded them of the circumstances of our emigration and settlement here. We have appealed to their native justice and magnanimity, and we have conjured them by the ties of our common kindred to disavow these usurpations, which would inevitably interrupt our connections and correspondence. They too have been deaf to the voice of justice and of consanguinity. We must, therefore, acquiesce in the necessity, which denounces our Separation, and hold them, as we hold the rest of mankind, Enemies in War, in Peace Friends.

We, therefore, the Representatives of the united States of America, in General Congress, Assembled, appealing to the Supreme Judge of the world for the rectitude of our intentions, do, in the Name, and by Authority of the good People of these Colonies, solemnly publish and declare, That these united Colonies are, and of Right ought to be Free and Independent States, that they are Absolved from all Allegiance to the British Crown, and that all political connection between them and the State of Great Britain, is and ought to be totally dissolved; and that as Free and Independent States, they have full Power to levy War, conclude Peace, contract Alliances, establish Commerce, and to do all other Acts and Things which Independent States may of right do.

]]>
http://www.blog.hemminga.net/index.php/declaration-of-independance-ii?blog=6#comments http://www.blog.hemminga.net/index.php?blog=6&tempskin=_rss2&disp=comments&p=118

Warning: date() [function.date]: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'America/Los_Angeles' for 'PDT/-7.0/DST' instead in /home/hemmi3/public_html/blog/inc/sessions/model/_hitlist.class.php on line 127