<?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; plugins</title>
	<atom:link href="http://www.digitalbase.eu/blog/tag/plugins/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>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>5</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>
		<item>
		<title>FusionCharts Symfony Plugin: dbFusionChartsPlugin</title>
		<link>http://www.digitalbase.eu/blog/fusioncharts-symfony-plugin-dbfusionchartsplugin/</link>
		<comments>http://www.digitalbase.eu/blog/fusioncharts-symfony-plugin-dbfusionchartsplugin/#comments</comments>
		<pubDate>Sat, 15 Mar 2008 11:00:00 +0000</pubDate>
		<dc:creator>Bart Vanderstukken</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[charts]]></category>
		<category><![CDATA[dbFusionChart]]></category>
		<category><![CDATA[graphs]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://dibav3.gnelisse.desktop01/blog/?p=70</guid>
		<description><![CDATA[We're creating an object oriented package to easily create FusionCharts charts.]]></description>
			<content:encoded><![CDATA[<p>
We&#39;re<br />
currently writing an OO class to create <a href="http://www.fusioncharts.com/" target="_blank" title="FusionCharts v3">FusionCharts</a><br />
quickly, easily &amp; intuitive, because the existing FusionCharts.php class is not OOP and, honestly, we thought we could do better&#8230;<br />
Our package is based on and tested against the <a href="http://www.fusioncharts.com/free/" target="_blank" title="Free Flash Charts">FusionCharts Free v2</a> package. It&#39;s written<br />
symfony independent, but we provide a helper, for easy use in symfony.
</p>
<p>
The symfony plugin, <a href="http://trac.symfony-project.com/wiki/dbFusionChartPlugin" target="_blank" title="SymfonyPlugins">dbFusionChartPlugin</a>, is<br />
in its alpha state now, because it only includes basic <a href="http://www.fusioncharts.com/free/docs/?gMenuItemId=19" target="_blank" title="FusionCharts Free Documentation">single</a>  &amp; <a href="http://www.fusioncharts.com/free/docs/?gMenuItemId=19" title="FusionCharts Free Documentation">multi-series</a>  chart support. Although the basic code is ready, it needs to be extended, to work with all chart types, but a mediocre programmer should be able to understand its structure and adapt/extend it to his needs. We deeply appreciate all <a href="/contact" target="_blank" title="Contact us">help and suggestions!</a>
</p>
<h3>
Symfony<br />
helper<br />
</h3>
<p>
[code]FC helper ex[/code]
</p>
<p>
This helper creates the necessary JavaScript.
</p>
<p>
[code]FC javaScript[/code]
</p>
<h3>Documentation</h3>
<p>
You can find the dbFusionChart <a href="http://www.phpdoc.org/" target="_blank" title="phpDoc">phpDoc</a> at <a href="/dbFusionChart/doc/index.html" target="_blank" title="dbFusionChart v0.0.1">digitalbase.eu/dbFusionChart/doc/index.html</a>
</p>
<h3>Logic</h3>
<p>
As you can see in the <a href="http://www.fusioncharts.com/free/docs/?gMenuItemId=19" target="_blank" title="FusionCharts Documentation">FusionCharts Documentation</a>, you need to define your chart&#39;s data in an XML file. Our dbFusionChartXML class uses the <a href="http://www.php.net/dom" target="_blank" title="DOM Functions">php DOM extension</a> to  encapsulate that XML logic by providing methods to add categories and (datasets with) sets. It has (for now) the descendants dbFC_Single &amp; dbFC_Multi. The latter will make sure there are always as many sets in each dataset as there are categories, when adding a dataset or category.
</p>
<h3>Stay tuned</h3>
<p>
We have recently added a check in the addCategory function so it<br />
wouldn&#39;t add the same category twice, no matter how many times it&#39;s<br />
being called, e.g. when looping <a href="http://propel.phpdb.org/trac/" target="_blank" title="Propel Documentation">Propel</a>   objects to init a dbFusionChartXML. It&#39;s checks like these that need to be added, among much much more&#8230; So <a href="/blog/tag/dbfusionchart/rss" target="_blank" title="RSS Feed">stay tuned!</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.digitalbase.eu/blog/fusioncharts-symfony-plugin-dbfusionchartsplugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
