<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Quite a Bright Light &#187; Websites</title>
	<atom:link href="http://www.quitebrightlight.com/category/websites/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.quitebrightlight.com</link>
	<description></description>
	<lastBuildDate>Mon, 10 May 2010 19:40:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Eclipse or Aptana en Pydev: &#8220;Project interpreter not specified&#8221;</title>
		<link>http://www.quitebrightlight.com/2010/05/eclipse-or-aptana-en-pydev-project-interpreter-not-specified/</link>
		<comments>http://www.quitebrightlight.com/2010/05/eclipse-or-aptana-en-pydev-project-interpreter-not-specified/#comments</comments>
		<pubDate>Mon, 10 May 2010 19:39:25 +0000</pubDate>
		<dc:creator>jefke</dc:creator>
				<category><![CDATA[Django]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[aptana]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[pydev]]></category>

		<guid isPermaLink="false">http://www.quitebrightlight.com/?p=89</guid>
		<description><![CDATA[After installing pydev in aptana (trying out for Django-development), I got this error message: &#8220;project interpreter not specified&#8221;. Apparently this is an error that mainly hits non-English speaking people, as I found no solution in English. Google translate helped me out, but I thought I&#8217;d save you the trouble:
Go to:  Window>Preferences>pydev>interpreter-python where you can [...]]]></description>
			<content:encoded><![CDATA[<p>After installing pydev in aptana (trying out for Django-development), I got this error message: &#8220;project interpreter not specified&#8221;. Apparently this is an error that mainly hits non-English speaking people, as I found no solution in English. Google translate helped me out, but I thought I&#8217;d save you the trouble:<br />
<strong>Go to:  Window>Preferences>pydev>interpreter-python </strong>where you can <strong>set the python interpreter.</strong> For me, the <strong>&#8220;auto-config&#8221; </strong>button worked just fine&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.quitebrightlight.com/2010/05/eclipse-or-aptana-en-pydev-project-interpreter-not-specified/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Drupal 6: adding and modifying html using javascript</title>
		<link>http://www.quitebrightlight.com/2010/02/drupal-6-adding-and-modifying-html-using-javascript/</link>
		<comments>http://www.quitebrightlight.com/2010/02/drupal-6-adding-and-modifying-html-using-javascript/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 21:29:40 +0000</pubDate>
		<dc:creator>jefke</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Websites]]></category>

		<guid isPermaLink="false">http://www.quitebrightlight.com/?p=58</guid>
		<description><![CDATA[


A while ago, I had a simple website, with a simple js script for calculating a price based on some user input. The script uses an updater function that, after all required choices have been made (radio buttons), calculates the final price and shows the price. It does this by adding html to a predefined [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-0445421940264769";
google_ad_slot = "7713378196";
google_ad_width = 468;
google_ad_height = 15;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>A while ago, I had a simple website, with a simple js script for calculating a price based on some user input. The script uses an updater function that, after all required choices have been made (radio buttons), calculates the final price and shows the price. It does this by adding html to a predefined &#8216;price div&#8217;  (price.innerHTML = &#8220;&#8230;&#8221;) and setting it&#8217;s height from 0 to &#8216;auto&#8217;. Nothing fancy, but worked quite nice.<br />
Upon changing the website for a Drupal site, I was confronted with implementing the js within Drupal. And even though it wasn&#8217;t really hard, it took me a while to figure it out, so I thought I&#8217;d share my findings, hoping they would be useful to somebody. </p>
<p>First of all, I created a normal page within Drupal. The downside of the method (to some people) is that I had to enable PHP for the page input. But as I am the only person ever seeing an input form on this particular site, I didn&#8217;t care too much. For adding the required js (and some extra css for that page), I used: </p>
<div class="insertcode">drupal_add_js(&#8217;sites/all/js/prices.js&#8217;); drupal_add_js(&#8217;sites/all/js/updater.js&#8217;);<br />
drupal_set_html_head(&#8216;&lt;script type=&#8221;text/javascript&#8221;><br />
window.onload = function() {<br />
includePrices();<br />
};</script><br />
');<br />
drupal_add_css(path_to_theme().'/prices.css', 'theme', 'all', TRUE);<br />
$styles = drupal_get_css();
</div>
<p>And then I added an html form which calls the updater function on each click. This makes it possible to have the second choice customers have to make depend on the first choice they make.</p>
<div class="insertcode">
&lt;div onclick="update();" id="priceform"><br />
&lt;div onclick="update();" id="house_type"><br />
&lt;form id="typeform"><br />
    Type house:<br />
    &lt;input type="radio" value="1" ...<br />
&lt;/form><br />
...
</div>
<p>Works like a charm for me...</p>
]]></content:encoded>
			<wfw:commentRss>http://www.quitebrightlight.com/2010/02/drupal-6-adding-and-modifying-html-using-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal: Random sort in Views 2</title>
		<link>http://www.quitebrightlight.com/2009/12/drupal-random-sort-in-views-2/</link>
		<comments>http://www.quitebrightlight.com/2009/12/drupal-random-sort-in-views-2/#comments</comments>
		<pubDate>Sat, 05 Dec 2009 12:46:32 +0000</pubDate>
		<dc:creator>jefke</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[Views 2]]></category>

		<guid isPermaLink="false">http://www.quitebrightlight.com/?p=38</guid>
		<description><![CDATA[


Without a doubt, the Views module is one of those Drupal modules without which Drupal wouldn&#8217;t be the same. With Drupal 6, Views got a major revision, and I must say I quite like the new interface. There was one thing that I couldn&#8217;t figure out immediately however: how to random sort the selection. I [...]]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-0445421940264769";
google_ad_slot = "7713378196";
google_ad_width = 468;
google_ad_height = 15;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
<p>Without a doubt, the Views module is one of those Drupal modules without which Drupal wouldn&#8217;t be the same. With Drupal 6, Views got a major revision, and I must say I quite like the new interface. There was one thing that I couldn&#8217;t figure out immediately however: how to random sort the selection. I should have looked harder in the sort criteria &#8211; which is the most logical place to put it &#8211; but I was sort of expecting the possiblity to add randomness to any sort criterion I selected (e.g. node:type). Not so: <strong>in the list with all possible criteria, you have to select &#8220;global:random&#8221;</strong>. </p>
<p>Still not sure whether that is the most logical way of doing it. Personally, I would think adding &#8220;random&#8221; as a choice for each criterion (besides &#8220;ascending&#8221; and &#8220;descending&#8221;) would yield a much finer granularity <em>and</em> makes more sense. The fact that the random sort criterion is listed as &#8220;global:random asc&#8221; (asc for ascending) doesn&#8217;t really help changing this view either. </p>
<p>But probably there is a good reason for doing it this way. To paraphrase a French proverb: The programmer has his reasons that reason doesn&#8217;t know.  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.quitebrightlight.com/2009/12/drupal-random-sort-in-views-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>IP based redirect for bots using .htaccess</title>
		<link>http://www.quitebrightlight.com/2009/04/ip-based-redirect-for-bots-usin-htaccess/</link>
		<comments>http://www.quitebrightlight.com/2009/04/ip-based-redirect-for-bots-usin-htaccess/#comments</comments>
		<pubDate>Thu, 23 Apr 2009 21:01:53 +0000</pubDate>
		<dc:creator>jefke</dc:creator>
				<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Websites]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.quitebrightlight.com/?p=22</guid>
		<description><![CDATA[Like all of us &#8211; I think &#8211; I really hate comment spammers. I really hate unruly bots, actually. I really do. If you start keeping stats of visitors on your site, you&#8217;ll quickly spot bots crawling all over your site, searching for all sorts of ways to epxloit your website. They look for email [...]]]></description>
			<content:encoded><![CDATA[<p>Like all of us &#8211; I think &#8211; I really hate comment spammers. I really hate unruly bots, actually. I really do. If you start keeping stats of visitors on your site, you&#8217;ll quickly spot bots crawling all over your site, searching for all sorts of ways to epxloit your website. They look for email addresses, they try to submit spam comments, they try to find ways to enter your database, they do everything but help you. They are leeches. They stink. I really don&#8217;t like them&#8230;</p>
<p>Luckily, there are different ways to handle bots as well. If you&#8217;re using a .htacces file, for example, you can add a snippet to block the vermin based on their IP address. An idea I liked even better is to <a href="http://amifamousnow.com/how-to/howto-htaccess-ip-redirect-to-any-site/" onclick="pageTracker._trackPageview('/outgoing/amifamousnow.com/how-to/howto-htaccess-ip-redirect-to-any-site/?referer=');">redirect the bots</a> to a site that tries to reeducate the bots. You never know. </p>
<p>In stead of redirecting the bots to a governement site where they can take a seat and follow a hands-on course on cyber crimes, another good idea is to send the little bastards to a <a href="http://www.americanbeaconfunds.com/contact/spam/trap.html" onclick="pageTracker._trackPageview('/outgoing/www.americanbeaconfunds.com/contact/spam/trap.html?referer=');">spam trap page</a>. Gives me visions of all bots in the world swimming around in a pool of interlinked spam pages, never able to get out by them selves. Heaven&#8230;</p>
<p>So that&#8217;s what I do now, I redirect the bots to a spam trap. Typing in the IP&#8217;s in the required format for the .htaccess file, however, can be a PITA. Therefore, I wrote a little script to generate the .htaccess snippet based on a list of IP&#8217;s in their normal format. The .htaccess format itself comes from <a href="http://amifamousnow.com/how-to/howto-htaccess-ip-redirect-to-any-site/" onclick="pageTracker._trackPageview('/outgoing/amifamousnow.com/how-to/howto-htaccess-ip-redirect-to-any-site/?referer=');">Am I Famous Now</a>. Insert the URL where you want to send the bots to or leave the one I use, insert the IP&#8217;s of the bots and push the button:</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-0445421940264769";
google_ad_slot = "7713378196";
google_ad_width = 468;
google_ad_height = 15;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<br />
<script type="text/javascript" src="http://www.quitebrightlight.com/wp-includes/js/jquery/jquery.form.js"></script><br />
<script type="text/javascript"> function createhtaccess() {
  var queryString = jQuery("#IPform").formToArray();
  jQuery("#IPresult").load("/scripts/IPredirect.php", queryString);
  jQuery("#IPresult").addClass("insertcode");
  }
  </script></p>
<form id="IPform">
<strong>The URL to refer the bots to:</strong></p>
<div class='field'>
<TEXTAREA name="URL" id="URL" rows="2" cols="60">http://www.americanbeaconfunds.com/contact/spam/trap.html</TEXTAREA>
</div>
<p><strong>The IP&#8217;s to refer (one per line):</strong></p>
<div class='field'>
<TEXTAREA name="IPs" id="IPs" rows="10" cols="60">xxx.xxx.xxx.xxx</TEXTAREA>
</div>
<input type=button value='generate .htaccess snippet' onclick='createhtaccess();' />
</form>
<div name = 'IPresult' id = 'IPresult'></div>
<p>Copy paste the snippet into your .htaccess file, and you&#8217;re all set. (WATCH OUT: if you don&#8217;t know what you&#8217;re doing, messing with .htaccess can wreck your site in a second. Don&#8217;t blame me. I told you.) This works fine, ofcourse, when you can easily keep track of the bots. When you have huge traffic on your site, you probably have a huge number of bots visiting it as well. In that case, you&#8217;re probably better of with a lean and mean, fully automated and integrated bot trapping/blocking device like <a href="http://www.kloth.net/internet/bottrap.php" onclick="pageTracker._trackPageview('/outgoing/www.kloth.net/internet/bottrap.php?referer=');">this</a> or <a href="http://www.kloth.net/internet/bottrap.php" onclick="pageTracker._trackPageview('/outgoing/www.kloth.net/internet/bottrap.php?referer=');">this</a></p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-0445421940264769";
google_ad_slot = "7713378196";
google_ad_width = 468;
google_ad_height = 15;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://www.quitebrightlight.com/2009/04/ip-based-redirect-for-bots-usin-htaccess/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
