<?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>Digital Base - Blog &#187; Programming</title>
	<atom:link href="http://www.digitalbase.eu/blog/category/all/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.digitalbase.eu/blog</link>
	<description>A blog about webdesign, PHP, development and IT</description>
	<lastBuildDate>Mon, 10 May 2010 16:16:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>DigitalBase attending Symfony Live 2010</title>
		<link>http://www.digitalbase.eu/blog/digitalbase-attending-symfony-live-2010/</link>
		<comments>http://www.digitalbase.eu/blog/digitalbase-attending-symfony-live-2010/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 16:28:22 +0000</pubDate>
		<dc:creator>Gijs Nelissen</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[symfony paris conference php]]></category>

		<guid isPermaLink="false">http://www.digitalbase.eu/blog/?p=306</guid>
		<description><![CDATA[You must know by now, Digital Base is using Symfony as the framework of choice for all web development projects.
Therefore all DigitalBase developers will be attending Symfony Live 2010. Monday evening we will travel to Paris by train with a delegation of 4 symfony geeks/fans/enthousiasts.
From the symfony 2010 website :
Sensio  Labs is proud to [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-full wp-image-309" style="margin-left: 10px; margin-right: 10px; float: right;" title="banner_square" src="http://www.digitalbase.eu/blog/wp-content/uploads//2010/02/banner_square-172x172-custom.jpg" alt="banner_square" width="172" height="172" />You must know by now, Digital Base is using Symfony as the framework of choice for all web development projects.</p>
<p>Therefore all DigitalBase developers will be attending <a href="http://www.symfony-live.com/" target="_blank">Symfony Live 2010.</a> Monday evening we will travel to Paris by train with a delegation of 4 symfony geeks/fans/enthousiasts.</p>
<p>From the symfony 2010 website :</p>
<p><cite><a href="http://www.sensiolabs.com/" target="_blank">Sensio  Labs</a> is proud to announce that the second <a href="http://www.symfony-project.org/">symfony</a> live conference           will be held <strong>February 16-17th in Paris</strong> (in  English).           The symfony live conference is a unique opportunity to meet  the symfony community, talk with the symfony core team,           and share your experience with the framework. You can even <a href="http://www.symfony-live.com/symfony-live-2010-sponsor-guide.pdf">sponsor</a> the event.</cite></p>
<p><a href="http://www.symfony-live.com/schedule">The schedule</a> :</p>
<p><img class="aligncenter size-full wp-image-308" title="symfony schedule" src="http://www.digitalbase.eu/blog/wp-content/uploads//2010/02/screenshot5.png" alt="symfony schedule" width="594" height="924" /></p>
<p>I look forward to the following items, in order of priority</p>
<ul>
<li>trying out some of the french wine &amp; food</li>
<li><a href="http://www.symfony-live.com/schedule#session-gb1">symfony internals</a></li>
<li><a href="http://www.symfony-live.com/schedule#session-db2">using symfony events to create clean class interfaces</a></li>
<li><a href="http://www.symfony-live.com/schedule#session-av1">debugging symfony applications</a></li>
<li><a href="http://www.symfony-live.com/schedule#session-db2">deploying symfony applications into the cloud</a></li>
<li><a href="http://www.symfony-live.com/schedule">symfony 2 revealed</a></li>
</ul>
<ul>
<li></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalbase.eu/blog/digitalbase-attending-symfony-live-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is important in a PHP editor/IDE ?</title>
		<link>http://www.digitalbase.eu/blog/what-is-important-in-a-php-editoride/</link>
		<comments>http://www.digitalbase.eu/blog/what-is-important-in-a-php-editoride/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 11:00:37 +0000</pubDate>
		<dc:creator>Gijs Nelissen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[editor]]></category>
		<category><![CDATA[IDE]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://dibav3.gnelisse.desktop01/blog/?p=45</guid>
		<description><![CDATA[An overview of what i find important in an IDE. What to look for when looking for a nice php developing tool.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been building websites for a while now. So i could say i am quite experienced although my (programming) knowledge is <span style="text-decoration: line-through;">limited</span> mainly focussed on building php applications. As a developer time is expensive, that&#8217;s why i am always looking for ways to speed up the web development process. A good start for fast &amp; secure development is to have the right tools and the right feeling/connection with your editor.</p>
<p>On day-to-day basis i could say 80% of the time i have an open editor somewhere. Based on the amount of time you are &#8220;working together&#8221; with this piece of software, you could compare it to a marriage (although you shouldn&#8217;t trade wives as soon as you meet a younger, smarter and more beautiful girl).</p>
<p>I have a few expectations / requirements for a modern, good working editor</p>
<h1>Decent Code Completion / Code Assistance</h1>
<p>We all know word completion : auto completion involves the program predicting a word or sentence without the user actually having to type it in completely. This feature is used alot in text messaging (sms), email clients, browsers, search engines etc&#8230;</p>
<p><img class="aligncenter size-full wp-image-259" title="google_image_autocomplete" src="http://www.digitalbase.eu/blog/wp-content/uploads//2008/12/google_image_autocomplete.png" alt="google_image_autocomplete" width="622" height="352" /></p>
<p>Autocompletion speeds up the entire process of typing a message, entering an address or, in our case, writing PHP code.</p>
<p>A decent source code editor analyses your source and suggests the function based on the first characters of the variable, function name or object. Most editors these days have code completion although they come in many flavours.</p>
<p><img class="aligncenter size-full wp-image-160" title="eclipse autocomplete" src="http://www.digitalbase.eu/blog/wp-content/uploads//2008/12/3138497480_8b6500d9e4_o.png" alt="eclipse autocomplete" width="591" height="95" /></p>
<p>Larger web applications tend to use alot of classes &amp; files. That&#8217;s what it is really important your autocompletion allows you to use an unlimited depth of super- &amp; sub classes (<a title="Inheritance OO" href="http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29" target="_blank">inheritance</a>). For this your IDE should have a decent understanding of the relation between classes. If in some case the code completion does not work for a certain object, you should be able to tell the editor which class your object belongs to, so it will allow you to use the code completion on next occurences of the same object/variable.</p>
<h1><strong>Code Documentation / PHPDoc<br />
</strong></h1>
<p>Another important aspect of code completion is documentation. It is very useful for a programmer to get as much visible feedback as possible about the method/function he is calling. For a php core function this should be a short summary what the function does, for custom methods/functions this would be the description as entered by the one that created the class/method.</p>
<p><img class="aligncenter size-full wp-image-262" title="eclipse_link" src="http://www.digitalbase.eu/blog/wp-content/uploads//2008/12/eclipse_link.jpg" alt="eclipse_link" width="716" height="235" /></p>
<p>Next to that information it could be useful to show the return type and perhaps some information about the needed arguments. All these things should be integrated in the IDE, readily available when i enter the name of a method/class without opening a seperate manual or the php.net website.</p>
<p>When adding custom classes/methods/functions it is important that you document this code using phpdoc. Eclipse will then pick up this documentation and show it whenever you are using it somewhere else throughout your project.</p>
<h1><strong>Syntax Highlighting / Coloring</strong></h1>
<p>Code should look good. If you&#8217;re spending most of your time looking at code, it&#8217;s important to take care of your eyes. A good syntax highlighter highlights the different code to make a clear distinction between actual code, variables &amp; documentation. Marking different type of elements in seperate colors will increase readability and help you understand a function faster.</p>
<p>Syntax highlighting also helps in finding errors in your code. Some editors mark incorrect code (missing delimiter, etc), this comes in handy when you are paying less attention. The editor will immediately show you you are doing something wrong&#8230;</p>
<p>Personally i prefer dark editors, many other programmers agree that this is alot better for your eyes. Next to that i find dark color schemes to be alot clearer and more beautiful to look at. TO give you an idea, this is what my eclipse looks like :</p>
<p><img class="aligncenter size-full wp-image-258" title="screenshot1" src="http://www.digitalbase.eu/blog/wp-content/uploads//2008/12/screenshot1.png" alt="screenshot1" width="659" height="471" /></p>
<h1>Code Bookmarks</h1>
<p>When we are writing code it is important to keep track of important locations throughout the project. Code Bookmarks is the easiest way to do it.</p>
<p>A good implementation of bookmarks should allow you to easily switch to next/previous bookmark and give you an overview/listing of the current &#8220;bookmarks&#8221;.</p>
<p><img class="aligncenter size-full wp-image-264" title="screenshot3" src="http://www.digitalbase.eu/blog/wp-content/uploads//2008/12/screenshot3.png" alt="screenshot3" width="494" height="172" /></p>
<p>If you look on the left side, you will see a small flag that marks the current line as being bookmarked.</p>
<p><img class="aligncenter size-full wp-image-269" title="screenshot7" src="http://www.digitalbase.eu/blog/wp-content/uploads//2008/12/screenshot7.png" alt="screenshot7" width="600" height="169" /></p>
<p>Once you have these &#8220;code bookmarks&#8221;, its hard to code without them.</p>
<h1>Smart/Quick opening</h1>
<p>Now where did i put this code/file again ? Which class defines the foo() method ? Most of you will agree with me that opening the correct resource/file/method takes alot of time. A good editor should allow you to find/open everything you are looking for with a few keystrokes and (more important) without touching your mouse.</p>
<p>My favourite editor (Eclipse) allows you to use ctrl+shift+R to &#8220;open resource&#8221; and quickly find the file you were looking for.</p>
<p><img class="aligncenter size-full wp-image-274" title="screenshot8" src="http://www.digitalbase.eu/blog/wp-content/uploads//2008/12/screenshot8.png" alt="screenshot8" width="657" height="181" /></p>
<p>This means i do not need to touch my mouse or open the &#8220;file explorer&#8221; to look for the file. Easy &amp; Fast&#8230;</p>
<p>I know some people who use &#8220;grep -r &#8216; methodname()&#8217; to find the location of a method. I personally think this stinks. A good editor should contains some ways to easily open a file/method.</p>
<h1>Class Outline</h1>
<p>It&#8217;s easy to lose track of the variables/methods that are defined in a class. This is where the &#8220;outline view&#8221; comes in handy. This &#8220;outline&#8221; view will give you a the overview of every method/variable defined.</p>
<p><img class="aligncenter size-full wp-image-276" title="screenshot9" src="http://www.digitalbase.eu/blog/wp-content/uploads//2008/12/screenshot9.png" alt="screenshot9" width="732" height="394" /></p>
<p>Double clicking a method will take you to this method. No search, no scrolling, no touching the mouse. In eclipse there is an even better way. Once inside a class you can use CTRL+O to get a quick outline with autocomplete functionality, finding the method you were looking for never was this easy&#8230;</p>
<p><img class="aligncenter size-full wp-image-277" title="eclipse quick outline" src="http://www.digitalbase.eu/blog/wp-content/uploads//2008/12/screenshot.png" alt="eclipse quick outline" width="707" height="443" /></p>
<p>Thanks Eclipse <img src='http://www.digitalbase.eu/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<h1>Platform Independance</h1>
<p>If you are a regular reader of this blog, you will know we are using several linux flavours in our office. So for us it is very important t he same editor can be used on Windows &amp; Linux platforms. Most &#8220;multi-platform&#8221; ide&#8217;s are based on java (zend, eclipse,&#8230;) but there are some other ide&#8217;s that have clients for both platforms.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalbase.eu/blog/what-is-important-in-a-php-editoride/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>How to unsecure admin generated modules in Symfony</title>
		<link>http://www.digitalbase.eu/blog/how-to-unsecure-admin-generated-modules/</link>
		<comments>http://www.digitalbase.eu/blog/how-to-unsecure-admin-generated-modules/#comments</comments>
		<pubDate>Thu, 22 Jan 2009 14:38:37 +0000</pubDate>
		<dc:creator>Bart Vanderstukken</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://www.digitalbase.eu/blog/?p=245</guid>
		<description><![CDATA[You gotta love the admin generator&#8230; There&#8217;s only one problem: it&#8217;s secured by default (according to the symfony site).
But I want to use these modules in a non-secured environment.
Adding credentials: [] in the admin generator does not work&#8230; Why?
Look at your automoduleactions. You&#8217;ll find a preExecute function:

  public function preExecute&#40;&#41;
  &#123;
   [...]]]></description>
			<content:encoded><![CDATA[<p>You gotta love the admin generator&#8230; There&#8217;s only one problem: it&#8217;s secured by default (according to the symfony site).<br />
But I want to use these modules in a non-secured environment.<br />
Adding credentials: [] in the admin generator does not work&#8230; Why?<br />
Look at your auto<em>module</em>actions. You&#8217;ll find a preExecute function:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> preExecute<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">configuration</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> eventGeneratorConfiguration<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getUser</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">hasCredential</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">configuration</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCredentials</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getActionName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">forward</span><span style="color: #009900;">&#40;</span>sfConfig<span style="color: #339933;">::</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sf_secure_module'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> sfConfig<span style="color: #339933;">::</span><span style="color: #004000;">get</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'sf_secure_action'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">dispatcher</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">notify</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> sfEvent<span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'admin.pre_execute'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'configuration'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">configuration</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">helper</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> eventGeneratorHelper<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span></pre></div></div>

<p>This code is always executed before any action.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getUser</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">hasCredential</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">configuration</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getCredentials</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getActionName</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span></pre></div></div>

<p>the getCredentials function:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getCredentials<span style="color: #009900;">&#40;</span><span style="color: #000088;">$action</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span> <span style="color: #339933;">===</span> <span style="color: #990000;">strpos</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$action</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'_'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$action</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$action</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">1</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #b1b100;">return</span> <span style="color: #990000;">isset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">configuration</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'credentials'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$action</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span> ? <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">configuration</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'credentials'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$action</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">:</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The problem is that hasCredential(array()) returns false.<br />
My solution:<br />
Override the hasCredential function in myUser</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> hasCredential<span style="color: #009900;">&#40;</span><span style="color: #000088;">$credential</span><span style="color: #339933;">,</span> <span style="color: #000088;">$useAnd</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #666666; font-style: italic;">//for usage in generator =&gt; + as credential will return hasCredential=true (even if user has no credentials at all)</span>
    <span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$credential</span> <span style="color: #339933;">===</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span> <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">true</span><span style="color: #339933;">;</span>
    <span style="color: #666666; font-style: italic;">//btw =&gt; you could have checked for an empty array of credentials which is what the generator is returning</span>
    <span style="color: #b1b100;">return</span> parent<span style="color: #339933;">::</span><span style="color: #004000;">hasCredential</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$credential</span><span style="color: #339933;">,</span> <span style="color: #000088;">$useAnd</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span></pre></div></div>

<p>Now to make it work, put in generator.yml</p>

<div class="wp_syntax"><div class="code"><pre class="yml" style="font-family:monospace;">  config:
     actions:
        _delete:        { credentials: admin }
        _list:            { credentials: + }
        index:           { credentials: + }
#        _new:         { credentials: + }
#        _edit:         { credentials: + }</pre></div></div>

<p>Ps: You could also use false &#038; -</p>
<p>EDIT: This problem appears to be fixed. View this ticket <a href="http://trac.symfony-project.org/ticket/5582">http://trac.symfony-project.org/ticket/5582</a> (thanks to Jukea for pointing that out)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalbase.eu/blog/how-to-unsecure-admin-generated-modules/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>Simplifying Queries: Using sum, count, etc in Propel 1.3</title>
		<link>http://www.digitalbase.eu/blog/simplifying-queries-using-sum-count-etc-in-propel-13/</link>
		<comments>http://www.digitalbase.eu/blog/simplifying-queries-using-sum-count-etc-in-propel-13/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 10:57:32 +0000</pubDate>
		<dc:creator>Bart Vanderstukken</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[propel]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://www.digitalbase.eu/blog/?p=228</guid>
		<description><![CDATA[My old post handled Propel 1.2.
This is the way to do it in Propel 1.3

1
2
3
4
5
6
7
    $c = new Criteria&#40;&#41;;
    $c-&#62;add&#40;FavoriteDatePeer::EVENTDATAPROPOSAL_ID, $this-&#62;getId&#40;&#41;&#41;;
    $c-&#62;addSelectColumn&#40;&#34;SUM(&#34;.FavoriteDatePeer::SCORE.&#34;) as rank&#34;&#41;;
&#160;
    $stmt = FavoriteDatePeer::doSelectStmt&#40;$c&#41;;
    $row = $stmt-&#62;fetch&#40;&#41;;
    return $row&#91;'rank'&#93;;

]]></description>
			<content:encoded><![CDATA[<p>My <a title="Sum, count, etc. in Propel 1.2" href="http://www.digitalbase.eu/blog/simplifying-queries-using-sum-count-etc-in-propel/">old post</a> handled Propel 1.2.</p>
<p>This is the way to do it in Propel 1.3</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="php" style="font-family:monospace;">    <span style="color: #000088;">$c</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> Criteria<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$c</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">add</span><span style="color: #009900;">&#40;</span>FavoriteDatePeer<span style="color: #339933;">::</span><span style="color: #004000;">EVENTDATAPROPOSAL_ID</span><span style="color: #339933;">,</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getId</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$c</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">addSelectColumn</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;SUM(&quot;</span><span style="color: #339933;">.</span>FavoriteDatePeer<span style="color: #339933;">::</span><span style="color: #004000;">SCORE</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;) as rank&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$stmt</span> <span style="color: #339933;">=</span> FavoriteDatePeer<span style="color: #339933;">::</span><span style="color: #004000;">doSelectStmt</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$c</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$row</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$stmt</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">fetch</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$row</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'rank'</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.digitalbase.eu/blog/simplifying-queries-using-sum-count-etc-in-propel-13/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>using dbFormExtraPlugin for datepicker or datetimepicker</title>
		<link>http://www.digitalbase.eu/blog/using-dbformextraplugin-for-datepicker-or-datetimepicker/</link>
		<comments>http://www.digitalbase.eu/blog/using-dbformextraplugin-for-datepicker-or-datetimepicker/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 00:00:55 +0000</pubDate>
		<dc:creator>Gijs Nelissen</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[dbFormExtraPlugin]]></category>
		<category><![CDATA[forms]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[symfony]]></category>
		<category><![CDATA[ui]]></category>
		<category><![CDATA[webdesign]]></category>

		<guid isPermaLink="false">http://www.digitalbase.eu/blog/?p=208</guid>
		<description><![CDATA[For an internal web development project i was looking for a good date picker. I bounced onto sfFormExtraPlugin, but it took me a while to find the correct jquery &#38; jquery UI css &#38; javascript files and set the paths. I decided to create my owner datepicker based on the one in sfFormExtraPlugin (which was [...]]]></description>
			<content:encoded><![CDATA[<p>For an internal web development project i was looking for a good date picker. I bounced onto <a href="http://www.symfony-project.org/plugins/sfFormExtraPlugin" target="_blank">sfFormExtraPlugin</a>, but it took me a while to find the correct <a title="jquery" href="http://jquery.com/" target="_blank">jquery</a> &amp; <a href="http://ui.jquery.com/" target="_blank">jquery UI</a> css &amp; javascript files and set the paths. I decided to create my owner datepicker based on the one in sfFormExtraPlugin (which was based on the <a href="http://marcgrabanski.com/pages/code/jquery-ui-datepicker" target="_blank">jQuery UI Datepicker</a>).</p>
<p>As we already had a plugin containing some of the widgets/validators we are using for some of our webdesign projects, i decided to <a href="ww.symfony-project.org/plugins/dbFormExtraPlugin/0_0_5?tab=plugin_changelog" target="_blank">include</a> those widgets into t<a href="http://www.symfony-project.org/plugins/dbFormExtraPlugin" target="_blank">he existing one</a> named <a title="dbFormExtraPlugin" href="http://www.symfony-project.org/plugins/dbFormExtraPlugin" target="_blank">dbFormExtraPlugin</a>, original name, i know&#8230;</p>
<h2>Installing dbFormExtraPlugin</h2>
<p>It&#8217;s really this simple, install, publish assets, en clear your cache.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">symfony plugin:<span style="color: #c20cb9; font-weight: bold;">install</span> dbFormExtraPlugin <span style="color: #660033;">--release</span>=0.0.5
symfony plugin:publish-assets
symfony cache:<span style="color: #c20cb9; font-weight: bold;">clear</span></pre></div></div>

<h2>sfWidgetFormDateJQuery</h2>
<p>This is based on the normal <a href="http://marcgrabanski.com/pages/code/jquery-ui-datepicker" target="_blank">jQuery date picker</a></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> ProjectForm <span style="color: #000000; font-weight: bold;">extends</span> BaseProjectForm
<span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> configure<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
&nbsp;
      <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">widgetSchema</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'published_at'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> sfWidgetFormDateJQuery<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Should give you something like this</p>
<p><img class="aligncenter size-full wp-image-214" title="sfwidgetformdatejquery" src="http://www.digitalbase.eu/blog/wp-content/uploads//2009/01/sfwidgetformdatejquery.png" alt="sfwidgetformdatejquery" width="580" height="271" /></p>
<h2>sfWidgetFormDateTimeDyn</h2>
<p>This is based on the <a title="DynDateTime - a date time slider for jQuery" href="http://code.google.com/p/dyndatetime/" target="_blank">dyndatetime project</a>, something i found on google code. From their website :</p>
<blockquote><p>jQuery has lots of date pickers, but no date- time pickers. This supports date and time, and renders the value to a single field in a configurable format.</p></blockquote>
<p>Use it like this</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> ProjectForm <span style="color: #000000; font-weight: bold;">extends</span> BaseProjectForm
<span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> configure<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
      <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">widgetSchema</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'featured_at'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> sfWidgetFormDateTimeDyn<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Results in a popup, similar to the <a href="http://dynarch.com/projects/calendar/" target="_blank">dynarch calendar picker</a>, including time sliding capabilities !</p>
<p><img class="aligncenter size-full wp-image-215" title="sfwidgetformdatetimedyn" src="http://www.digitalbase.eu/blog/wp-content/uploads//2009/01/sfwidgetformdatetimedyn.png" alt="sfwidgetformdatetimedyn" width="534" height="295" /></p>
<p>I still have some work todo on configuration/customisation but it does work (out of the box).<br />
Other <a href="http://www.symfony-project.org/plugins/dbFormExtraPlugin/0_0_5?tab=plugin_installation" target="_blank">installation instructions here</a>. Comments welcome. Leave a message on this post, <a href="http://trac.symfony-project.org/newticket" target="_blank">post a bugticket</a> on the symfony trac or contact us by email.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalbase.eu/blog/using-dbformextraplugin-for-datepicker-or-datetimepicker/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Developer Faster with lightning fast Eclipse</title>
		<link>http://www.digitalbase.eu/blog/developer-faster-with-lightning-fast-eclipse/</link>
		<comments>http://www.digitalbase.eu/blog/developer-faster-with-lightning-fast-eclipse/#comments</comments>
		<pubDate>Sat, 06 Dec 2008 11:24:56 +0000</pubDate>
		<dc:creator>Gijs Nelissen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://www.digitalbase.eu/blog/?p=127</guid>
		<description><![CDATA[When maintaining &#38; developming large web applications you might notice that eclipse slows up a bit. Building workspace, showing the autocomplete or syntax highlighting might take a while to load. The solution for this is to optimise your eclipse.ini and tell your favourite PHP development IDE to use more memory.
After installing eclipse you open the [...]]]></description>
			<content:encoded><![CDATA[<p>When maintaining &amp; developming large web applications you might notice that eclipse slows up a bit. Building workspace, showing the autocomplete or syntax highlighting might take a while to load. The solution for this is to optimise your eclipse.ini and tell your favourite PHP development IDE to use more memory.</p>
<p>After installing eclipse you open the eclipse.ini in the root. If you followed <a href="http://www.digitalbase.eu/blog/installing-eclipse-latest-php-development-tools-pdt-20/" target="_blank">my previous post</a>, the default settings should be something like this :</p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;">-startup
plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.101.R34x_v20080805
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Xms40m
-Xmx256m</pre></div></div>

<p>This means eclipse will use in between 40 and 256mb. These default settings will allow you to run Eclipse on a pre historic PII with less then 1GB ram, although i wouldn&#8217;t recommend that.</p>
<p>Most of you, especially developers working in a development agency, will have powerful workstations. So lets tell eclipse to use a bit more resources</p>

<div class="wp_syntax"><div class="code"><pre class="ini" style="font-family:monospace;">-startup
plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20080819.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.101.R34x_v20080805
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
-vmargs
-Xms256m
-Xmx1024m
-XX:MaxPermSize<span style="color: #000066; font-weight:bold;">=</span><span style="color: #660066;">256m</span></pre></div></div>

<p>I changed the xms, xmx and xx:maxpermsize settings.</p>
<p>What does it mean ?</p>
<ul>
<li> Xms sets the initial Java heap size</li>
<li>Xmx sets the maximum Java heap size</li>
<li>XX:MaxPermSize allows for the JVM to be able to grow the PermSize to the amount specified. Initially when the IDE is loaded, the MaxPermSize will still be the default value but will not actually take up that amount until it is needed.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalbase.eu/blog/developer-faster-with-lightning-fast-eclipse/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Wordpress : Seperate RSS feed for Category / Author / Tag</title>
		<link>http://www.digitalbase.eu/blog/wordpress-seperate-rss-feed-for-category-author-tag/</link>
		<comments>http://www.digitalbase.eu/blog/wordpress-seperate-rss-feed-for-category-author-tag/#comments</comments>
		<pubDate>Sat, 06 Dec 2008 01:10:27 +0000</pubDate>
		<dc:creator>Gijs Nelissen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[rss]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.digitalbase.eu/blog/?p=119</guid>
		<description><![CDATA[As you may have read we migrated this blog to a wordpress one. Yeahyeah, we are not officially wordpressified.
My impression of the core
The default wordpress core holds alot of use&#8217;eable functions, but it took me a while to figure out how the thing worked. You need to know that wordpress is not really written very [...]]]></description>
			<content:encoded><![CDATA[<p>As you may have read we migrated this blog to a wordpress one. Yeahyeah, we are not officially wordpressified.</p>
<h2>My impression of the core</h2>
<p>The default wordpress core holds <a href="http://codex.wordpress.org/Function_Reference" target="_blank">alot of use&#8217;eable functions</a>, but it took me a while to figure out how the thing worked. You need to know that wordpress is not really written very object oriented, so basically its a collection of functions although some &#8220;under the hood&#8221; core functionality is object oriented.</p>
<p>If i was not convinced wordpress is a serious project with a great future, i wouldn&#8217;t have chosen it, so let&#8217;s not start the &#8220;code quality&#8221; discussion.</p>
<h2>The problem</h2>
<p>Something i was missing after the default drupal installation was an easy way to retrieve the related rss feed based on the page the visitor was accessing. If a visitor was on the &#8220;all posts by author X&#8221; page, the linked rss feed should only hold those posts. Same for category pages and tag pages.</p>
<p>Getting the information of a tag, author of category is very easy. There are some built in functions like <a href="http://codex.wordpress.org/Function_Reference/get_category" target="_blank">get_category</a>, and <a href="http://codex.wordpress.org/Function_Reference/get_category_feed_link" target="_blank">get_category_feed_link</a> that will give you this information. The downside is, this information is basically only available inside &#8220;<a href="http://codex.wordpress.org/The_Loop" target="_blank">the loop</a>&#8220;.</p>
<h2>The solution</h2>
<p>To get the information about the selected category, author or tag i had to jump a few hoops. It&#8217;s a combination of core functions and some minor custom code where i had to retrieve the current tag from the queried variables.</p>
<p>Then I created a custom method that returns the most related feed based on the page request. The method will check what type of page the visitor is accessing (category, tag, author or main page) and return the appropriate rss feed.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #009933; font-style: italic;">/**
 * This method will give you the most related rss feed based on the current page request
 *
 * @param $type
 * @return string (feed url)
 */</span>
<span style="color: #000000; font-weight: bold;">function</span> get_feed_url<span style="color: #009900;">&#40;</span><span style="color: #000088;">$type</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;rss2_url&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
&nbsp;
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_category<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$current</span> <span style="color: #339933;">=</span> get_the_category<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$current</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$current</span><span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>cat_ID<span style="color: #339933;">;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$url_rss</span> <span style="color: #339933;">=</span> get_category_feed_link<span style="color: #009900;">&#40;</span><span style="color: #000088;">$current</span><span style="color: #339933;">,</span><span style="color: #000088;">$type</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_author<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$current</span> <span style="color: #339933;">=</span> get_query_var<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'author_name'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$current</span> <span style="color: #339933;">=</span> get_userdatabylogin<span style="color: #009900;">&#40;</span><span style="color: #000088;">$current</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$current</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$current</span><span style="color: #339933;">-&amp;</span>gt<span style="color: #339933;">;</span>ID<span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">return</span> get_author_feed_link<span style="color: #009900;">&#40;</span><span style="color: #000088;">$current</span><span style="color: #339933;">,</span><span style="color: #000088;">$type</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span>is_tag<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$current</span> <span style="color: #339933;">=</span> get_query_var<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'tag'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$formaturl</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;/feed/&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">switch</span> <span style="color: #009900;">&#40;</span><span style="color: #000088;">$type</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
      <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">&quot;rss_url&quot;</span><span style="color: #339933;">:</span>
        <span style="color: #000088;">$formaturl</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;/rss/&quot;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">case</span> <span style="color: #0000ff;">&quot;atom_url&quot;</span><span style="color: #339933;">:</span>
        <span style="color: #000088;">$formaturl</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;/atom/&quot;</span><span style="color: #339933;">;</span>
      <span style="color: #b1b100;">break</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #009900;">&#125;</span>
    <span style="color: #b1b100;">return</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;url&quot;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;/tag/&quot;</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$current</span> <span style="color: #339933;">.</span> <span style="color: #000088;">$formaturl</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
&nbsp;
  <span style="color: #b1b100;">return</span> get_bloginfo<span style="color: #009900;">&#40;</span><span style="color: #000088;">$type</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<h2>Examples</h2>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">get_feed_url<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;rss2_url&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// on page /blog/</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//returns : http://www.digitalbase.eu/blog/feed/</span>
&nbsp;
get_feed_url<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;atom_url&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// on page /blog/category/digitalbase/</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//returns : http://www.digitalbase.eu/blog/category/digitalbase/feed/atom_url/</span>
&nbsp;
get_feed_url<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;rss_url&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #666666; font-style: italic;">// on page /blog/tag/symfony</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//returns : http://www.digitalbase.eu/blog/tag/symfony/rss/</span></pre></div></div>

<p>Enjoy</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalbase.eu/blog/wordpress-seperate-rss-feed-for-category-author-tag/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Installing Eclipse + Latest Php Development Tools (PDT 2.0)</title>
		<link>http://www.digitalbase.eu/blog/installing-eclipse-latest-php-development-tools-pdt-20/</link>
		<comments>http://www.digitalbase.eu/blog/installing-eclipse-latest-php-development-tools-pdt-20/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 18:32:00 +0000</pubDate>
		<dc:creator>Gijs Nelissen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://www.digitalbase.eu/blog/?p=105</guid>
		<description><![CDATA[Following up on my previous post on &#8220;installing 3.4 + PDT 2.x&#8221; i wanted to let you know there is a much easier way. As we are coming close to a stable version of pdt 2.x (launch on 29th of December) :

 2.0 M1 &#8211; November 03
 2.0 M2 &#8211; November 24
 2.0 RC1 &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>Following up on my previous post on &#8220;<a href="http://www.digitalbase.eu/blog/installing-eclipse-3-4-pdt-2-x-nightly-build/">installing 3.4 + PDT 2.x</a>&#8221; i wanted to let you know there is a much easier way. As we are coming close to a stable version of pdt 2.x (launch on 29th of December) :</p>
<div id="midcolumn">
<li> 2.0 M1 &#8211; November 03</li>
<li> 2.0 M2 &#8211; November 24</li>
<li> 2.0 RC1 &#8211; December 08</li>
<li> 2.0 RC2 &#8211; December 14</li>
<li> 2.0 RC3 &#8211; December 23</li>
<li><strong> 2.0 Release &#8211; December 29 </strong></li>
</div>
<p>The PDT core team decided to setup an &#8220;update site&#8221; so you can easily fetch the latest version from within eclipse.</p>
<h1>Installation</h1>
<h2>Getting &amp; Running Eclipse</h2>
<p>Get the latest version of Eclipse from <a href="http://www.eclipse.org/downloads/" target="_blank">the download site</a>. I went for &#8220;<a class="packageTitle" href="http://www.eclipse.org/downloads/download.php?file=/eclipse/downloads/drops/R-3.4.1-200809111700/eclipse-SDK-3.4.1-linux-gtk.tar.gz" target="_blank">Eclipse Classic 3.4.1 (151 MB)</a>&#8220;. Extract it and double eclipse the eclipse executable.</p>
<h2>Adding the PDT 2.x</h2>
<p>When you selected a workspace and fired up eclipse add the different update sites (Help &gt; Software Updates&#8230; &gt; Available Software &gt; Manage Sites)</p>
<p>A list of the ones you need to add :</p>
<ul>
<li><a class="external text" title="http://download.eclipse.org/technology/dltk/updates-dev/1.0/" rel="nofollow" href="http://download.eclipse.org/technology/dltk/updates-dev/1.0/">download.eclipse.org/technology/dltk/updates-dev/1.0/</a> DLTK 1.0</li>
<li> <a class="external text" title="http://download.eclipse.org/tools/pdt/updates/2.0/interim/" rel="nofollow" href="http://download.eclipse.org/tools/pdt/updates/2.0/interim/">download.eclipse.org/tools/pdt/updates/2.0/interim/</a> : PDT 2.0 updates</li>
</ul>
<p>Also make sure to enable the default Ganymede update site.</p>
<p><a href="http://www.digitalbase.eu/blog/wp-content/uploads//2008/12/imagepdt-install-p2.png"><img class="alignnone size-full wp-image-110" title="imagepdt-install-p2" src="http://www.digitalbase.eu/blog/wp-content/uploads//2008/12/imagepdt-install-p2.png" alt="" /></a></p>
<div id="attachment_113" class="wp-caption aligncenter" style="width: 510px"><a href="http://www.digitalbase.eu/blog/wp-content/uploads//2008/12/screenshot12.png"><img class="size-full wp-image-113" title="update site (eclipse)" src="http://www.digitalbase.eu/blog/wp-content/uploads//2008/12/screenshot12.png" alt="make sure these checkboxes are ... checked :)" width="500" height="528" /></a><p class="wp-caption-text">make sure these checkboxes are ... checked <img src='http://www.digitalbase.eu/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p></div>
<p><a href="http://www.digitalbase.eu/blog/wp-content/uploads/english/2008/12/imagepdt-install-p2.png"><img class="alignright size-medium wp-image-107" title="imagepdt-install-p2" src="http://www.digitalbase.eu/blog/wp-content/uploads/english/2008/12/imagepdt-install-p2.png" alt="" /></a></p>
<p>Expand the DLTK site and select the <strong>Dynamic Languages Toolkit &#8211; Core Frameworks</strong> or <strong>Dynamic Languages Toolkit &#8211; Core Frameworks SDK</strong> Feature.<br />
Then check the PDT SDK feature (PDT SDK 2.0.0 &#8230;.). Click install &amp; restart eclipse.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalbase.eu/blog/installing-eclipse-latest-php-development-tools-pdt-20/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Custom .debs for Symfony (1.0/1.1 &amp; 1.2) for Debian/Ubuntu</title>
		<link>http://www.digitalbase.eu/blog/custom-debs-for-symfony-1-0-1-1-1-2-for-debian-ubuntu/</link>
		<comments>http://www.digitalbase.eu/blog/custom-debs-for-symfony-1-0-1-1-1-2-for-debian-ubuntu/#comments</comments>
		<pubDate>Thu, 04 Dec 2008 13:33:25 +0000</pubDate>
		<dc:creator>Gijs Nelissen</dc:creator>
				<category><![CDATA[All]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[System Administration]]></category>
		<category><![CDATA[debian]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[symfony]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://dibav3.gnelisse.desktop01/blog/?p=86</guid>
		<description><![CDATA[I created some custom .debs that are useable for everyone on debian/ubuntu using aptitude allowing you to test/try different versions of symfony before making your choice.]]></description>
			<content:encoded><![CDATA[<h1>Installing multiple versions of symfony</h1>
<p>As i wanted to test some of my projects compability against <a href="http://www.symfony-project.org/book/1_1/" target="_blank">symfony 1.1</a>, i wanted to install multiple symfony versions on my system. The main reason for this i want to keep the default symfony installation on my desktop as well as on our production environment.Â</p>
<p>Now as you know, we are working with 5 workstations and multiple servers. So it&#8217;s a real pain in the *** doing this stuff all over again on each of those machines, so i decided to create some .debs.</p>
<h2>The Solution</h2>
<p>Thanks to a <a title="Howto Install Multiple Versions Of Symfony" href="http://trac.symfony-project.org/wiki/InstallingMultipleVersionsOfSymfony" target="_blank">great guide posted on the Symfony Wiki</a> i was up &amp; running in under 5 minutes. I had to check out the different versions, create some folders to hold the different symfony installs and create some symlinks to make sure you can use those different versions by command line.</p>
<h2>The Packages</h2>
<p>I created 3 different packages for each version of symfony. You can install as many as you like, as those will all use a different path. <a title="Different version of symfony deb" href="http://dump.digitalbase.eu/deb/" target="_blank">Direct Link</a> .</p>
<ul>
<li>db-symfony-1.0.0.17 (<a title="Download Symfony 1.0 (deb package)" href="http://dump.digitalbase.eu/deb/db-symfony-1.0-0.11220025079.deb">download link</a> )</li>
<li>db-symfony-1.1.1 (<a title="Download Digital Base Symfony 1.1 deb" href="http://dump.digitalbase.eu/deb/db-symfony-1.1-0.11220024780.deb" target="_blank">download link</a> )</li>
<li>db-symfony-1.2 (<a title="Symfony 1.2 download" href="http://dump.digitalbase.eu/deb/db-symfony-1.2-0.11220022677.deb">download link</a> )</li>
</ul>
<p>I tested these packages on an Ubuntu Hardy &amp; Feisty and it works like a charm. Let me know if it doesn&#8217;t for you.</p>
<p>If you have a hard time figuring out which version of the symfony framework you want to use for your project, <a title="Which version of symfony for your project" href="http://www.symfony-project.org/blog/2008/08/26/which-version-of-symfony-for-your-next-project" target="_blank">check this post</a></p>
<h2>Show me the magic</h2>
<p>You can see you now have 3 (or 4) different versions of Symfony available to you.Â</p>
<p><img title="Multiple Version of Symfony On the same system" src="/uploads/assets//blog/screens/screenshot1.png" border="0" alt=" Multiple Version of Symfony On the same system" width="604" height="258" /></p>
<h2>Configuration</h2>
<p>Now the hardest part (if you can even call it that). Howto tell your symfony application which symfony to use ? Just go to your applications config/config.php and update the paths to the corresponding version.</p>
<p>[code]#52[/code]</p>
<p>Don&#8217;t forget to also update the /js path in your <a href="http://httpd.apache.org/docs/1.3/vhosts/" target="_blank">virtual host configuration</a> , change the version to the one you want to use for this project.</p>
<blockquote><p>Alias /sf /usr/share/php/symfony_1.0/data/web/sf</p></blockquote>
<p>Feedback/Suggestions welcome, just send an email to <a title="info@digitalbase.eu" href="mailto:info@digitalbase.eu">info@digitalbase.eu</a> Â</p>
<p>Update : if you have a problem opening PHP files (error occured during Selection Job Title) here is <a title="Error During &quot;Selection Job Title&quot;" href="http://www.digitalbase.eu/blog/bug-in-eclipse3-4-pdt-2-0-all-platforms">my follow-up post</a> (the fix)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalbase.eu/blog/custom-debs-for-symfony-1-0-1-1-1-2-for-debian-ubuntu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>dbFusionChartPlugin : Simple Example</title>
		<link>http://www.digitalbase.eu/blog/dbfusionchartplugin-simple-example/</link>
		<comments>http://www.digitalbase.eu/blog/dbfusionchartplugin-simple-example/#comments</comments>
		<pubDate>Tue, 18 Mar 2008 11:00:00 +0000</pubDate>
		<dc:creator>Gijs Nelissen</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[charts]]></category>
		<category><![CDATA[dbFusionChart]]></category>
		<category><![CDATA[example]]></category>
		<category><![CDATA[graphs]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[snippets]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://dibav3.gnelisse.desktop01/blog/?p=71</guid>
		<description><![CDATA[This first example will show you howto integrate a FusionChart graph in your symfony application, using the dbFusionChart Plugin.]]></description>
			<content:encoded><![CDATA[<p>
This first example will show you howto integrate a FusionChart (<a href="http://www.fusioncharts.com/free/" target="_blank" title="FusionCharts free">free</a>  / <a href="http://www.fusioncharts.com" target="_blank" title="FusionCharts">non-free</a> ) graph in your <a href="http://www.symfony-project.org" target="_blank" title="Symfony Project">symfony</a>  application, using the <a href="http://trac.symfony-project.com/wiki/dbFusionChartPlugin" target="_blank" title="dbFusionChartPlugin">dbFusionChartPlugin</a> . I will explain &#39;example1&#39; included in version 0.0.2 of our plugin.
</p>
<h3>The Result</h3>
<p>
Before getting to the code, here is what the final graph/chart will look like
</p>
<p>
[partial]dbFusionChartExample/example1[/partial]
</p>
<p>
&nbsp;
</p>
<h3>The Partial</h3>
<p>
The example1 is a partial that looks like this
</p>
<p>[code]dbfusionchart-example1-partial[/code]</p>
<p>
As you can see the code in this partial is pretty easy. First you tell the symfony application to load the FusionChart helper (using : use_helper). After that you load the graph/chart itself. dbfusionchart_js takes multiple arguments, the most important are the first 2.
</p>
<ul>
<li>the first argument is the type of chart (using class constants)</li>
<li>second argument is the url to the xml</li>
<li>extra arguments tell the dbFusionChart how big the chart should be (width &amp; size).</li>
</ul>
<p>
Very important in the url to the xml is that symfony knows it needs to return valid xml (an no html).
</p>
<h3>The Action</h3>
<p>
In the action.class of the dbFusionChartExample module we have the following action :
</p>
<p>
[code]dbfusionchart-example1-action[/code]
</p>
<p>
<strong><br />
Line 5 &#8211; 6</strong> tell symfony to not include the debug bar and send the response as XML (and not html)<br />
On <strong>line 8</strong> you will see the declaration of the chart. The classes are pretty smart, but the above example is a very basic example (copy pasted from FusionChart documentation).
</p>
<p>
When you are ready setting the properties of your chart (we will explain that in further posts), you tell symfony to return the xml (see <strong>line : 40</strong>).
</p>
<p>
&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalbase.eu/blog/dbfusionchartplugin-simple-example/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

