<?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>Ben Jao Ming &#187; Web</title>
	<atom:link href="http://overtag.dk/wordpress/category/computers/web/feed/" rel="self" type="application/rss+xml" />
	<link>http://overtag.dk/wordpress</link>
	<description>101% objective... always</description>
	<lastBuildDate>Fri, 02 Apr 2010 23:50:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9-rare</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Uservoice feedback widget: Changing its style</title>
		<link>http://overtag.dk/wordpress/2009/09/uservoice-feedback-widget-changing-its-style/</link>
		<comments>http://overtag.dk/wordpress/2009/09/uservoice-feedback-widget-changing-its-style/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 09:19:49 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[feedback]]></category>
		<category><![CDATA[tab]]></category>
		<category><![CDATA[uservoice]]></category>
		<category><![CDATA[vertical]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://overtag.dk/wordpress/?p=173</guid>
		<description><![CDATA[I have a feedback tab that&#8217;s blocking vital content on a website. Here&#8217;s how to alter the style of the Uservoice Feedback Tab &#8212; for instance the vertical offset: You have to insert this AFTER your widget js code, so that it will effectively overwrite the CSS declarations generated by Uservoice. Also it&#8217;s pretty annoying [...]]]></description>
			<content:encoded><![CDATA[<p>I have a feedback tab that&#8217;s blocking vital content on a website. Here&#8217;s how to alter the style of the Uservoice Feedback Tab &#8212; for instance the vertical offset: You have to insert this AFTER your widget js code, so that it will effectively overwrite the CSS declarations generated by Uservoice. Also it&#8217;s pretty annoying that it shows up on printed media, so the last style block is to remove it from print.</p>

<div class="wp_syntax"><div class="code"><pre class="css">&lt;style type=<span style="color: #ff0000;">&quot;text/css&quot;</span>&gt;
  body a<span style="color: #cc00cc;">#uservoice-feedback-tab</span>,
  body a<span style="color: #cc00cc;">#uservoice-feedback-tab</span><span style="color: #3333ff;">:link</span>
  <span style="color: #66cc66;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">margin-top</span><span style="color: #66cc66;">:</span> <span style="color: #933;">10px</span> !important<span style="color: #66cc66;">;</span>
  <span style="color: #66cc66;">&#125;</span>
&lt;/style&gt;
&lt;style rel=<span style="color: #ff0000;">&quot;stylesheet&quot;</span> type=<span style="color: #ff0000;">&quot;text/css&quot;</span> media=<span style="color: #ff0000;">&quot;print&quot;</span>&gt;
  body a<span style="color: #cc00cc;">#uservoice-feedback-tab</span>,
  body a<span style="color: #cc00cc;">#uservoice-feedback-tab</span><span style="color: #3333ff;">:link</span>
  <span style="color: #66cc66;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">display</span><span style="color: #66cc66;">:</span> <span style="color: #993333;">none</span> !important<span style="color: #66cc66;">;</span>
  <span style="color: #66cc66;">&#125;</span>
&lt;/style&gt;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://overtag.dk/wordpress/2009/09/uservoice-feedback-widget-changing-its-style/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MarkItUp Markdown footnote button</title>
		<link>http://overtag.dk/wordpress/2009/09/markitup-markdown-footnote-button/</link>
		<comments>http://overtag.dk/wordpress/2009/09/markitup-markdown-footnote-button/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 11:51:05 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[markdown]]></category>
		<category><![CDATA[markitup]]></category>

		<guid isPermaLink="false">http://overtag.dk/wordpress/?p=164</guid>
		<description><![CDATA[Here&#8217;s a simple addition to markItUp, that will prompt the user for a footnote number, a footnote text and then insert the number after the selection and the footnote text at the end of the full text. As handy extra feature, the plugin will save the previous entered footnote and not ask for further numbers [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a simple addition to markItUp, that will prompt the user for a footnote number, a footnote text and then insert the number after the selection and the footnote text at the end of the full text. As handy extra feature, the plugin will save the previous entered footnote and not ask for further numbers during the session, but instead increment the number each time the button is pressed.</p>
<p>Add this to your code to <strong>set.js</strong> inside your settings object:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript"><span style="color: #009900;">&#123;</span><span style="color: #000066;">name</span><span style="color: #339933;">:</span><span style="color: #3366CC;">'Insert footnote'</span><span style="color: #339933;">,</span>
	beforeInsert<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>h<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		instructions <span style="color: #339933;">=</span> <span style="color: #3366CC;">&quot;Type in the number of the footnote:)&quot;</span><span style="color: #339933;">;</span>
		<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>h.<span style="color: #006600;">last_footnote</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			h.<span style="color: #006600;">last_footnote</span> <span style="color: #339933;">=</span> <span style="color: #000066;">prompt</span><span style="color: #009900;">&#40;</span>instructions<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span> <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000066; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span>isNaN<span style="color: #009900;">&#40;</span>h.<span style="color: #006600;">last_footnote</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
				h.<span style="color: #006600;">last_footnote</span> <span style="color: #339933;">=</span> parseInt<span style="color: #009900;">&#40;</span>h.<span style="color: #006600;">last_footnote</span><span style="color: #009900;">&#41;</span> <span style="color: #CC0000;">+1</span><span style="color: #339933;">;</span>
			<span style="color: #000066; font-weight: bold;">else</span>
				h.<span style="color: #006600;">last_footnote</span> <span style="color: #339933;">=</span> <span style="color: #000066;">prompt</span><span style="color: #009900;">&#40;</span>instructions<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
		h.<span style="color: #006600;">footnote_content</span> <span style="color: #339933;">=</span> <span style="color: #000066;">prompt</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Type in the text of the footnote:&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
	closeWith<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>h<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #3366CC;">'[^'</span> <span style="color: #339933;">+</span> h.<span style="color: #006600;">last_footnote</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">']'</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span>
	afterInsert<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span>h<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		h.<span style="color: #006600;">textarea</span>.<span style="color: #006600;">value</span> <span style="color: #339933;">+=</span> <span style="color: #3366CC;">'[^'</span> <span style="color: #339933;">+</span> h.<span style="color: #006600;">last_footnote</span> <span style="color: #339933;">+</span> <span style="color: #3366CC;">']: '</span> <span style="color: #339933;">+</span>
			h.<span style="color: #006600;">footnote_content</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">,</span></pre></div></div>

<p>And put this icon in the set&#8217;s <strong>images</strong> folder: <a href="http://overtag.dk/wordpress/wp-content/uploads/footnote.png"><img src="http://overtag.dk/wordpress/wp-content/uploads/footnote.png" alt="footnote" title="footnote" width="16" height="16" class="alignnone size-full wp-image-167" /></a></p>
<p>After that be sure to modify style.css so it says something like (if 14 was the placement of the footnote button):</p>

<div class="wp_syntax"><div class="code"><pre class="css"><span style="color: #6666ff;">.markItUp</span> <span style="color: #6666ff;">.markItUpButton14</span> a	<span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">background-image</span><span style="color: #3333ff;">:url</span><span style="color: #66cc66;">&#40;</span>images/footnote<span style="color: #6666ff;">.png</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://overtag.dk/wordpress/2009/09/markitup-markdown-footnote-button/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tip: Extending Django flatpages</title>
		<link>http://overtag.dk/wordpress/2008/07/tip-extending-django-flatpages/</link>
		<comments>http://overtag.dk/wordpress/2008/07/tip-extending-django-flatpages/#comments</comments>
		<pubDate>Sat, 12 Jul 2008 22:59:28 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Django]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://overtag.dk/wordpress/?p=53</guid>
		<description><![CDATA[I did a Google search and since nothing came up, I&#8217;m writing this little tip on creating your own CMS by extending Django&#8217;s flatpages. What&#8217;s good about flatpages is that they&#8217;re included in Django and has some basic code to get you started. But clearly they&#8217;re not enough if you want other people to administer [...]]]></description>
			<content:encoded><![CDATA[<p>I did a Google search and since nothing came up, I&#8217;m writing this little tip on creating your own CMS by extending Django&#8217;s flatpages. What&#8217;s good about flatpages is that they&#8217;re included in Django and has some basic code to get you started. But clearly they&#8217;re not enough if you want other people to administer a site.. you&#8217;ll want to add extra fields and special help texts for the admin. But we still don&#8217;t want to rewrite those ~150 lines of code, and they can really help you get past all the boring stuff and into the action.</p>
<p>Simply do the following:</p>
<blockquote><p>
cp -R /usr/share/python-support/python-django/django/contrib/flatpages my_project/my_flatpages
</p></blockquote>
<p><i>views.py</i></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="python"><span style="color: #ff7700;font-weight:bold;">from</span> my_project.<span style="color: black;">my_flatpages</span>.<span style="color: black;">models</span> <span style="color: #ff7700;font-weight:bold;">import</span> FlatPage</pre></td></tr></table></div>

<p><i>middleware.py</i></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="python"><span style="color: #ff7700;font-weight:bold;">from</span> my_project.<span style="color: black;">my_flatpages</span>.<span style="color: black;">views</span> <span style="color: #ff7700;font-weight:bold;">import</span> flatpage</pre></td></tr></table></div>

<p><i>urls.py</i></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>3
4
5
</pre></td><td class="code"><pre class="python">urlpatterns = patterns<span style="color: black;">&#40;</span><span style="color: #483d8b;">'my_project.my_flatpages.views'</span>,
    <span style="color: black;">&#40;</span>r<span style="color: #483d8b;">'^(?P&lt;url&gt;.*)$'</span>, <span style="color: #483d8b;">'flatpage'</span><span style="color: black;">&#41;</span>,
<span style="color: black;">&#41;</span></pre></td></tr></table></div>

<p><em>my_project.my_flatpages.middleware.FlatpageFallbackMiddleware</em> has to be added to your <strong>MIDDLEWARE_CLASSES</strong> and <em>my_project.my_flatpages</em> to your <strong>INSTALLED_APPS</strong> and you&#8217;ll need to run <em>manage.py syncdb</em>, possibly changing the table name in <em>models.py</em>, so it doesn&#8217;t conflict with the old flatpages table. That&#8217;s basically it. After that you can work on the templates as described in the other howto&#8217;s, but now you have your own model to extend.</p>
]]></content:encoded>
			<wfw:commentRss>http://overtag.dk/wordpress/2008/07/tip-extending-django-flatpages/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>A web-based clipboard &#8211; useful at least!</title>
		<link>http://overtag.dk/wordpress/2005/10/a-web-based-clipboard-useful-at-least/</link>
		<comments>http://overtag.dk/wordpress/2005/10/a-web-based-clipboard-useful-at-least/#comments</comments>
		<pubDate>Tue, 11 Oct 2005 00:06:38 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://overtag.dk/wordpress/?p=6</guid>
		<description><![CDATA[Here&#8217;s your problem: You&#8217;re working on different computers. Maybe because you&#8217;re at school doing an assignment, maybe because you&#8217;re at work making notes for tonights TV Schedule, maybe you own a KVM Switch or maybe because you&#8217;re running back and forth doing system administration.
This is what you usually do: Copy text to some file on [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s your problem: <b>You&#8217;re working on different computers</b>. Maybe because you&#8217;re at school doing an assignment, maybe because you&#8217;re at work making notes for tonights TV Schedule, maybe you own a KVM Switch or maybe because you&#8217;re running back and forth doing system administration.</p>
<p>This is what you usually do: Copy text to some file on a LAN share, send yourself an e-mail, an SMS or <b>even worse: You write it on paper!</b></p>
<p>Well, now you won&#8217;t have to do that anymore! With your new OSS PHP Clipboard <b>you can just type in whatever you like and press save.</b> Your content will then remain accessible until you choose to save something else.</p>
<p>Go try the demo or download it and put it on your own server:</p>
<ul>
<li><a href="/blog/scripts/clipboard.php" target="_blank">Demo</a></li>
<li><a href="/blog/scripts/clipboard.php.tar.gz" target="_blank">Download tar.gz</a></li>
</ul>
<p><b>Installation is easy!</b> Just put the .php file on your webserver somewhere safe from people and bots. Chmod the file 777 and it&#8217;ll work.</p>
<p>This is an early version, but please help me develope the idea and the code. Right now I&#8217;m thinking that it should be able to do optional IP and/or login checking. And maybe there should be a file upload feature, too&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://overtag.dk/wordpress/2005/10/a-web-based-clipboard-useful-at-least/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SuDoKu &#8211; A JavaScript version</title>
		<link>http://overtag.dk/wordpress/2005/10/sudoku-a-javascript-version/</link>
		<comments>http://overtag.dk/wordpress/2005/10/sudoku-a-javascript-version/#comments</comments>
		<pubDate>Sun, 09 Oct 2005 13:55:15 +0000</pubDate>
		<dc:creator>benjamin</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://overtag.dk/wordpress/?p=5</guid>
		<description><![CDATA[The Linux Format Bounty round 1 has finished, and I was one of the competers. I ended up doing a JS version of SuDoKu because of my own skills and the fact that JS/HTML is so cross-platform and easy to do GUIs in. I also thought that SuDoKu would be easy on performance, but I [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://www.linuxformat.co.uk/bounty" target="_blank">Linux Format Bounty</a> round 1 has finished, and I was one of the competers. I ended up doing a JS version of SuDoKu because of my own skills and the fact that JS/HTML is so cross-platform and easy to do GUIs in. I also thought that SuDoKu would be easy on performance, but I was wrong there. It takes alot of resources and JS is slow as a politician&#8217;s brain. Anyways, it all ended up very playable.</p>
<p>Anyways, <a href="/sudoku/sudoku.html" target="_blank">check out the game</a> or grab a version with <a href="/sudoku/sudoku_source_code.html" target="_blank">readable, commented JS</a>.</p>
<p><b style="color: #c00">Important update:</b> <b>I fixed a bug showing off solutions for every field in &#8220;field info&#8221;. It was worth a few laughs, though =)</b></p>
]]></content:encoded>
			<wfw:commentRss>http://overtag.dk/wordpress/2005/10/sudoku-a-javascript-version/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
