<?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/"
	>

<channel>
	<title>Easytech blog</title>
	<atom:link href="http://blog.easytech.com.ar/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.easytech.com.ar</link>
	<description>Technological Solutions</description>
	<pubDate>Wed, 30 Jul 2008 23:13:45 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7-bleeding</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Vistas Personalizadas con Drupal 6.x</title>
		<link>http://blog.easytech.com.ar/2008/07/07/vistas-personalizadas-con-drupal-6x/</link>
		<comments>http://blog.easytech.com.ar/2008/07/07/vistas-personalizadas-con-drupal-6x/#comments</comments>
		<pubDate>Mon, 07 Jul 2008 19:56:48 +0000</pubDate>
		<dc:creator>pmorales</dc:creator>
		
		<category><![CDATA[Drupal]]></category>

		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.easytech.com.ar/2008/07/07/vistas-personalizadas-con-drupal-6x/</guid>
		<description><![CDATA[Cuando generamos un View, y queremos darle un formato en particular tenemos que agregar una llamada desde nuestro templates a la función views_embed_view, pasando por parámetros el nombre de la vista, el display_id.
&#60;?php echo views_embed_view(&#8217;nombre_vista&#8217; , $display_id = &#8216;default&#8217;); ?&#62;
Cuando
hacemos esta llamada nos genera un html con el contenido de la vista.
Si queremos darle un [...]]]></description>
			<content:encoded><![CDATA[<p>Cuando generamos un View, y queremos darle un formato en particular tenemos que agregar una llamada desde nuestro templates a la función views_embed_view, pasando por parámetros el nombre de la vista, el display_id.</p>
<p>&lt;?php echo views_embed_view(&#8217;nombre_vista&#8217; , $display_id = &#8216;default&#8217;); ?&gt;</p>
<p>Cuando<br />
hacemos esta llamada nos genera un html con el contenido de la vista.<br />
Si queremos darle un formato html especial tenemos que generar un<br />
archivo con el nombre view_view&#8211;nombre_vista.tpl.php<br />
A esta función llega un objeto con el nombre $view-&gt;result, que contiene todo el contenido de nuestra vista.</p>
<p>Por ejemplo si quisieramos mostrar el contenido de la vista en una listado con el title y el teaser, el código seria el siguiente.</p>
<p>&lt;ul class=&#8221;destacados_libros&#8221;&gt;<br />
&lt;?php if (!empty($title)): ?&gt;<br />
&lt;li class=&#8221;top_titulo&#8221;&gt;&lt;?php print $title; ?&gt;&lt;/li&gt;<br />
&lt;?php endif; ?&gt;<br />
&lt;?php foreach ($view-&gt;result as $row): ?&gt;<br />
&lt;li&gt;&lt;?php echo $row-&gt;node_revisions_teaser; ?&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;?php echo $row-&gt;node_title;?&gt;&lt;/li&gt;<br />
&lt;?php endforeach; ?&gt;<br />
&lt;/ul&gt;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.easytech.com.ar/2008/07/07/vistas-personalizadas-con-drupal-6x/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Dumping CSV data with PostgreSQL</title>
		<link>http://blog.easytech.com.ar/2008/06/24/dumping-csv-data-with-postgresql/</link>
		<comments>http://blog.easytech.com.ar/2008/06/24/dumping-csv-data-with-postgresql/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 15:41:58 +0000</pubDate>
		<dc:creator>miquel</dc:creator>
		
		<category><![CDATA[Database]]></category>

		<guid isPermaLink="false">http://blog.easytech.com.ar/2008/06/24/dumping-csv-data-with-postgresql/</guid>
		<description><![CDATA[Many times you will need to quickly executa a query in PostgreSQL and dump
the results to comma delimited value (CSV) file. In this post I&#8217;ll show you
a quick way to do it with the psql command in PostgreSQL.
Just copy the following to a file called dump2csv.sql
-- ==================================================================
--
--  This script will execute and SQL query [...]]]></description>
			<content:encoded><![CDATA[<p>Many times you will need to quickly executa a query in PostgreSQL and dump<br />
the results to comma delimited value (CSV) file. In this post I&#8217;ll show you<br />
a quick way to do it with the <strong>psql</strong> command in PostgreSQL.<br />
Just copy the following to a file called dump2csv.sql</p>
<pre>-- ==================================================================
--
--  This script will execute and SQL query using the psql
--  command and dump the results to a file called /tmp/result.csv
--
-- ==================================================================
--
-- Uses the following psql options:
--   \a toggle between unaligned and aligned output mode
--   \t show only rows
--   \o [FILE] send query results to file or |pipe
--
\a
\t
\pset fieldsep ,
\o /tmp/result.csv

-- query
select ..</pre>
<p>To dump the result of the query to a file do:</p>
<p><em>$ psql -h  -U  -d  -W -f dump2csv.sql</em></p>
<p>the result of your query will be stored in /tmp/result.csv.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.easytech.com.ar/2008/06/24/dumping-csv-data-with-postgresql/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Adobe Air for Linux</title>
		<link>http://blog.easytech.com.ar/2008/04/01/adobe-air-for-linux/</link>
		<comments>http://blog.easytech.com.ar/2008/04/01/adobe-air-for-linux/#comments</comments>
		<pubDate>Tue, 01 Apr 2008 10:53:01 +0000</pubDate>
		<dc:creator>miquel</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.easytech.com.ar/2008/04/01/adobe-air-for-linux/</guid>
		<description><![CDATA[Yesterday Adobe released the first alpha of Adobe Air for Linux. I played with it for a while and was quite impressed with it. The installation went along flawlessly on my Fedora Core 8 and I downloaded a couple of applications that worked quite nicely. In the release notes they mentioned that transparency works when [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.easytech.com.ar/wp-content/uploads/2008/04/air.png" alt="A screenshot of Kuler and Pixelperfect running on Adobe Air for Linux" style="border: 0pt none ; margin: 5px; float: left" align="left" border="0" />Yesterday Adobe released the first alpha of Adobe Air for Linux. I played with it for a while and was quite impressed with it. The installation went along flawlessly on my Fedora Core 8 and I downloaded a couple of applications that worked quite nicely. In the release notes they mentioned that transparency works when using a composite window manager. I switched on the &#8216;desktop effects&#8217; (as they are called in FC8) and indeed the apps worked perfectly!</p>
<p>The apps I tried where: <a href="http://kuler.adobe.com/">kuler</a> and <a href="http://www.adobe.com/devnet/air/flex/quickstart/interacting_window.html">Pixel Perfect</a>. Kuler is an application which stores several hundred color combinations which are all very pretty. Pixel Perfect is a simple application which draws a translucent ruler on the desktop. The ruler can be moved around, resized and you can even change the transparency using the mouse wheel. All worked perfectly under Linux. You can download the source and read the article of how it works <a href="http://www.adobe.com/devnet/air/flex/quickstart/interacting_window.html">here</a>. I still need to test local applications tht make use of Air&#8217;s features like the local sqlite database, etc.</p>
<p>What really interests me is to use Air and Flex to build cross platform widgets as well as desktop applications. It seems to me, after having a quick peak at the code that Adobe is really pushing this technology under Linux and is not just writing a half working port for Linux.</p>
<p>I will continue to test is and update this post (or create a new one) with the news. For the moment you can learn more at <a href="http://labs.adobe.com/technologies/air/">Adobe labs</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.easytech.com.ar/2008/04/01/adobe-air-for-linux/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Debuggin Flex Applications</title>
		<link>http://blog.easytech.com.ar/2008/03/05/debuggin-flex-applications/</link>
		<comments>http://blog.easytech.com.ar/2008/03/05/debuggin-flex-applications/#comments</comments>
		<pubDate>Wed, 05 Mar 2008 19:53:27 +0000</pubDate>
		<dc:creator>ricardo</dc:creator>
		
		<category><![CDATA[Adobe Flex / Air]]></category>

		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Programming and Scripting]]></category>

		<guid isPermaLink="false">http://blog.easytech.com.ar/2008/03/05/debuggin-flex-applications/</guid>
		<description><![CDATA[Sometimes when programming, you have to debug your application. Yes, even when using Adobe Flex. The problem (and on the other hand, the good thing) is, that living in a Linux world makes you the one responsible for enabling every feature you need.
In this case, as mentioned, the feature I needed was to enable the [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.adobe.com/images/shared/product_logos/60x45/flex.gif" align="left" border="1" height="45" width="60" />Sometimes when programming, you have to debug your application. Yes, even when using <a href="http://www.adobe.com/flex">Adobe Flex</a>. The problem (and on the other hand, the good thing) is, that living in a Linux world makes <em>you</em> the one responsible for enabling every feature you need.</p>
<p>In this case, as mentioned, the feature I needed was to enable the trace() method for debugging Flex applications. To achieve this is actually quite simple. You just have to create a file in your home folder, named mm.cfg. When enabled, tracing is done automatically to the file <em>$HOME/.macromedia/Flash_Player/Logs/flashlog.txt </em>(you can, however, modify this location in the mm.cfg file).</p>
<p>The content of a simple, yet functional mm.cfg file sample is given below.</p>
<pre>
TraceOutPutFileName=$HOME/.macromedia/Flash_Player/Logs/flashlog.txt
ErrorReportingEnable=1
TraceOutputFileEnable=1</pre>
<p>There is one more caveat though. The trace() method only works when viewing your flash application in a debugging-enabled<br />
version of the Flash Player (or the flash plugin in mozilla).</p>
<p>As an added bonus, there is a plugin for Firefox, <a href="https://addons.mozilla.org/en-US/firefox/addon/3469">Flash Tracer</a>, that will display a sidebar with the output of the trace() calls. This can be quite handy so not to have to open a terminal just for viewing the log file.</p>
<p>Now that you know the truth, off you go, and happy debugging!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.easytech.com.ar/2008/03/05/debuggin-flex-applications/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Ultimate Vim Experience</title>
		<link>http://blog.easytech.com.ar/2008/02/08/the-ultimate-vim-experience/</link>
		<comments>http://blog.easytech.com.ar/2008/02/08/the-ultimate-vim-experience/#comments</comments>
		<pubDate>Fri, 08 Feb 2008 23:18:20 +0000</pubDate>
		<dc:creator>miquel</dc:creator>
		
		<category><![CDATA[Linux]]></category>

		<category><![CDATA[Programming and Scripting]]></category>

		<guid isPermaLink="false">http://blog.easytech.com.ar/2008/02/08/the-ultimate-vim-experience/</guid>
		<description><![CDATA[  As we have often said, we are very fond of vim here at Easytech. Even though it is an incredible editor I sometimes miss some features of editors like GEdit, Coda or TextMate. I don&#8217;t miss too many things, but some things are simpler when you have a good GUI. One example is [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.easytech.com.ar/wp-content/uploads/2008/02/p1.png" alt="A screenshot of Pida" style="border: 0pt none ; margin: 5px; float: left" align="left" border="0" />  As we have often said, we are very fond of vim here at Easytech. Even though it is an incredible editor I sometimes miss some features of editors like <a href="http://www.gnome.org/projects/gedit/" title="GEdit">GEdit</a>, <a href="http://www.panic.com/coda/" title="Coda">Coda</a> or <a href="http://macromates.com/" title="TextMate">TextMate</a>. I don&#8217;t miss too many things, but some things are simpler when you have a good GUI. One example is browsing files and managing several open buffers. Another is SVN integration (another tool we use here).</p>
<p>After a while looking at ways to integrate Vim into GTK applications and when I was just about to start a project myself I found the solution to my &#8216;itch&#8217;: <a href="http://pida.co.uk/" title="Pida Website Link">Pida</a>. Pida is basically an IDE for Python. The really cool thing about it is that it allows you to choose which editor to use. You get the only two real choices: Vi or Emacs.</p>
<p>In addition to having the editor window with all the powerful editing capabilities of Vi or Emacs you get a side panel which has a list of buffers to edit, a list of projects and a view of the filesystem of the selected project. This way you can easily  navigate the filesystem of your project and the open files. If you are using SVN then the state of each file is also displayed and you have a popup menu so it&#8217;s easy to do SVN operations on files or directories. By installing a plugin you can also watch pending tickets if you use Trac (which we do). Finally, the icing of the cake is that the applications is written using Python and GTK (PyGTK + Glade to be more specific) and with its plugin system its very easy to extend. If you like programming with Vi then Pida is definitively for you. Check it here: <a href="http://pida.co.uk/">http://pida.co.uk/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.easytech.com.ar/2008/02/08/the-ultimate-vim-experience/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Slicing Photoshop (PSD) files with PHP</title>
		<link>http://blog.easytech.com.ar/2008/01/14/slicing-photoshop-psd-files-with-php/</link>
		<comments>http://blog.easytech.com.ar/2008/01/14/slicing-photoshop-psd-files-with-php/#comments</comments>
		<pubDate>Mon, 14 Jan 2008 04:08:09 +0000</pubDate>
		<dc:creator>miquel</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.easytech.com.ar/2008/01/14/slicing-photoshop-psd-files-with-php/</guid>
		<description><![CDATA[ Graphic designers, when creating websites, will often give programmers the Photoshop (PSD) files of the screens and, if they have enough experience designing for the web, they will &#8217;slice&#8217; the design. Basically what they&#8217;ll do is mark a rectangular region (a &#8217;slice&#8217;) of the image that will then be used in the HTML of [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://blog.easytech.com.ar/wp-content/uploads/2008/01/psdslice.gif" style="float: left" alt="Photoshop Slice tool" /> Graphic designers, when creating websites, will often give programmers the Photoshop (PSD) files of the screens and, if they have enough experience designing for the web, they will &#8217;slice&#8217; the design. Basically what they&#8217;ll do is mark a rectangular region (a &#8217;slice&#8217;) of the image that will then be used in the HTML of the page. Often a single page is composed of many such slices. When the designer is happy with his work he will save in one shot all the slices and provide the programmer with the slices and PSD files in case he needs to modify anything later on. If you buy templates from templating sites such as <a href="http://www.templatemonster.com">Template Monster</a> you will receive the HTML, slices and PSD files.</p>
<p>Here in Easytech we mostly use The Gimp to read and modify PSD files. The Gimp can read and write PSD files with no problem, preserving layout information, etc. Unfortunately, it has no slice support and completely ignores all slice information stored on the PSD file. After looking a while for an alternative I was disapointed I couldn&#8217;t find one. What I did find is a little document which describes an old <a href="http://www.fileformat.info/format/psd/spec/03771aa3c5f144cdac75843737984b02">PSD file format  </a>and a <a href="http://www.codeproject.com/KB/graphics/PSDParser.aspx">C# parser which understands the Slices</a> section of the PSD file. With this information and a hex editor and some sample PSD files I was able to write a little PHP script which basically outputs a list of convert statements which can be used to slice an image.</p>
<p>To use the script:</p>
<p>1. Download the script by clicking <a href="http://blog.easytech.com.ar/wp-content/uploads/2008/01/slicepsd.zip" title="Slice PSD source code.">HERE.</a><br />
2. Open the PSD file with The Gimp and save it as a PNG<br />
3. Run this script on the PSD file<br />
4. Run the resulting converts on the PNG file to slice it up</p>
<p>This code is quite simple and was written over a weekend so its quite rudimentary. It has almost no error checking and is more a proof of principle. If later on I need something more sophisticated this code will provide a good starting point.</p>
<p>The first thing I should probably do is split the program into two smaller programs: one to write an XML document describing the slices and a second program that processes this document and writes the convert statements. In addition I should probably create a couple of Classes to make the code more re-usable. Maybe later&#8230; for the moment have fun with it!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.easytech.com.ar/2008/01/14/slicing-photoshop-psd-files-with-php/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hello world in Flex sample project</title>
		<link>http://blog.easytech.com.ar/2007/11/20/hello-world-in-flex-sample-project/</link>
		<comments>http://blog.easytech.com.ar/2007/11/20/hello-world-in-flex-sample-project/#comments</comments>
		<pubDate>Tue, 20 Nov 2007 11:58:45 +0000</pubDate>
		<dc:creator>miquel</dc:creator>
		
		<category><![CDATA[Adobe Flex / Air]]></category>

		<guid isPermaLink="false">http://blog.easytech.com.ar/2007/11/20/hello-world-in-flex-sample-project/</guid>
		<description><![CDATA[<img src="http://www.adobe.com/images/shared/product_logos/60x45/flex.gif" align="Left" width="60" height="45" alt="fx" / ><p>Lately I've been playing a lot with <a href="http://www.adobe.com/flex">Adobe Flex</a> so I thought it would be a good idea to show you how to setup the Flex SDK on your Linux box and get you going with this cool technology. In case you haven't heard, Flex is a framework to write Rich Internet Applications (RIAs). Using XML and Actionscript 3.0, you can write rich internet applications which use webservices to communicate with a backend. The programs are compiled using the Flex compiler into an SWF file.</p>]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.adobe.com/images/shared/product_logos/60x45/flex.gif" alt="fx" align="left" border="0" height="45" width="60" style="float:left;"/></p>
<p>Lately I&#8217;ve been playing a lot with <a href="http://www.adobe.com/flex">Adobe Flex</a> so I thought it would be a good idea to show you how to setup the Flex SDK on your Linux box and get you going with this cool technology. In case you haven&#8217;t heard, Flex is a framework to write Rich Internet Applications (RIAs). Using XML and Actionscript 3.0, you can write rich internet applications which use webservices to communicate with a backend. The programs are compiled using the Flex compiler into an SWF file. Read on to setup Flex under linux&#8230;</p>
<p><span id="more-54"></span></p>
<p>Programming in Flex is very simple and you only need the Flex SDK, Java and Ant to get started. The good news: it runs great in Linux and it&#8217;s free to use. Adobe has <a href="http://labs.adobe.com/wiki/index.php/Flex:Open_Source" target="_parent"></a><a href="http://labs.adobe.com/technologies/flex/flexbuilder_linux/" target="_parent"></a>recently open sourced it but I&#8217;ve only seen a little part of the code. If you would like to program from an IDE you can buy an Eclipse plugin to develop in Flex. There is a <a href="http://labs.adobe.com/technologies/flex/flexbuilder_linux/" target="_parent">new version </a>for Linux which I haven&#8217;t tried yet.</p>
<p>Ok, enough said. Lets get started. First you need to have download and installed the latest Java SDK and Ant. Go to <a href="http://java.sun.com" target="_parent">http://java.sun.com</a> and <a href="http://ant.apache.org" target="_parent">http://ant.apache.org/</a> and get the latest versions. Once you have those installed (you probably already have them) download the Flex SDK. You can get the latest Flex 3 <a href="http://labs.adobe.com/technologies/flex/flexbuilder3/" target="_parent">here</a>. The final download is the tar ball I&#8217;ve created for the project which you should uncompress it into a directory. Click <a href="http://www.easytech.com.ar/files/flex_hello_world.tar.gz" target="_parent">here</a> to download the file. You should see the following files:</p>
<pre>
 FlexHelloWorld/
 |-- bin
 |-- build.xml
 |-- css
 |   `-- hello_world.css
 |-- env.sh
 |-- hello_world.mxml
 `-- includes
     `-- hello_world.as</pre>
<p>The first thing you&#8217;ll need is to do is setup you <em>env.sh</em> file. This will setup your environment to work. Edit the file and replace the <em>JAVA_HOME</em> and <em>ANT_HOME</em> variables to point to where you have installed them. I usually install Java and Ant in <em>/<a href="http://labs.adobe.com/wiki/index.php/Flex:Open_Source" target="_parent"></a>opt</em> and make links like so:</p>
<pre>
[miquel@baggins Flex]$ <strong>ls -l /opt/</strong>
total 148
lrwxrwxrwx  1 root   root       9 2007-08-16 02:27 ant -&gt; ant-1.5.4
lrwxrwxrwx  1 root   root      42 2007-08-16 02:27 ant-1.5.4
lrwxrwxrwx  1 root   root      11 2007-06-03 13:39 java -&gt; jdk1.6.0_01
drwxr-xr-x 10 miquel miquel  4096 2007-03-14 07:57 jdk1.6.0_01</pre>
<p>Once you have edited <em>env.sh</em> you should run it like so:</p>
<pre>
[miquel@baggins Flex]$ <strong>. env.sh</strong></pre>
<p>This will add your <em>javac</em> compiler and <em>ant</em> commands to your path. The next step is to edit your ant <em>build.xml</em> file. Here you need to change the bold text on the tag which says:</p>
<pre>
  &lt;!-- location of MXML compiler --&gt;
  &lt;property name="flex.mxmlc" location="<strong>/home/miquel/Develop/Flex/flex/bin/mxmlc</strong>" /&gt;</pre>
<p>to point to your <em>mxmlc</em> compiler where you have installed the Flex SDK. In my case I installed it in <em>/home/miquel/Develop/Flex/flex</em></p>
<p>To build the SWF file you need to compile your <em>.as</em> and <em>.mxml</em> files: this is where ant comes in. To compile your project just type <em>ant</em> at the command prompt:</p>
<pre>
[miquel@baggins FlexHelloWorld]$ <strong>ant</strong>
Buildfile: build.xml

init:
   [delete] Deleting directory /home/miquel/Develop/Flex/FlexHelloWorld/bin
    [mkdir] Created dir: /home/miquel/Develop/Flex/FlexHelloWorld/bin

compile:
     [exec] Loading configuration file /home/miquel/Develop/Flex/flex/frameworks/flex-config.xml
     [exec] Warning: Source path entry, '/home/miquel/Develop/Flex/FlexHelloWorld/includes', is a ...

     [exec] bin/hello_world.swf (140072 bytes)

BUILD SUCCESSFUL
Total time: 36 seconds</pre>
<p>That&#8217;s it! You have compiled your first Flex project. To view the flex app open your browser and simply point to your SWF file which is stored in the <em>bin/</em> directory. You can make modifications to the two files where the source code lives: <strong>hello_world.mxml</strong> which has the GUI and <strong>includes/hello_world.as</strong> which has the Actionscript code where you should write the event handlers.</p>
<p>This sample project is the starting point for more complicated projects. If you build any serious Flex application you will definitively have a more complicated directory structure but this is a nice starting point for your flex development. To read more about flex visit <a href="http://flex.org" target="_parent">flex.org</a>, <a href="http://www.adobe.com/devnet" target="_parent">Adobe Devnet</a> and <a href="http://www.adobe.com/flex" target="_parent">the official flex site</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.easytech.com.ar/2007/11/20/hello-world-in-flex-sample-project/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Drupal Hack #2: content page for a role</title>
		<link>http://blog.easytech.com.ar/2007/11/01/drupal-hack-2-content-page-for-a-role/</link>
		<comments>http://blog.easytech.com.ar/2007/11/01/drupal-hack-2-content-page-for-a-role/#comments</comments>
		<pubDate>Thu, 01 Nov 2007 05:43:09 +0000</pubDate>
		<dc:creator>miquel</dc:creator>
		
		<category><![CDATA[Drupal]]></category>

		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://blog.easytech.com.ar/2007/11/01/drupal-hack-2-content-page-for-a-role/</guid>
		<description><![CDATA[While working on the administration section of a medium to large site, you may need to allow different roles to create and edit different content. Typically you want Role X to be able to create and view some content types only. The creation part is easy: go to the Access control section and give Role [...]]]></description>
			<content:encoded><![CDATA[<p>While working on the administration section of a medium to large site, you may need to allow different roles to create and edit different content. Typically you want Role X to be able to create and view some content types only. The creation part is easy: go to the Access control section and give Role X the Create and Edit permission for the content types you want this role to be able to create and edit. The next thing you&#8217;ll want to do is give the role a way to list all nodes for the content type it is allowed to view/edit and be able to administer these nodes. The logical thing would be to give the role access to the admin/content/node by giving this role the <em>administer nodes</em> permission. The problem is that the filter for this screen will show you nodes of <strong>all types</strong> regardless of what the role should be able to edit! This hack will guide you to another trick: creating a views page for Role X to be able to administer the nodes he should have access to. Read on for the rest of this hack.</p>
<p><a href="http://blog.easytech.com.ar/wp-content/uploads/2007/11/s9.png" title="A page to edit and create content types"><img src="http://blog.easytech.com.ar/wp-content/uploads/2007/11/s9.png" title="A page to edit and create content types" alt="A page to edit and create content types" style="border: 0px;" border="0" /></a></p>
<p style="clear: both">&nbsp;</p>
<p><span id="more-42"></span><br />
Lets assume <em>Role X</em> needs to be able to create nodes belonging to two content types: <em>content type 1</em> and <em>content type 2</em>. We will build a view that shows this two contente types. For this goto <em>admin/build/views</em> and create a new view. In the <em>Basic Information</em> section type a name, a description and allow Role X to have access.</p>
<p><a href="http://blog.easytech.com.ar/wp-content/uploads/2007/11/s1.png" title="The basic information section"><img src="http://blog.easytech.com.ar/wp-content/uploads/2007/11/s1.png" title="The basic information section" alt="The basic information section" style="border: 0pt none " border="0" hspace="100" /></a></p>
<p style="clear: both">&nbsp;</p>
<p>In the Page section check <em>Provide Page View</em>, assign a URL to access your view, choose <em>Table View</em> in the <em>View Type</em>. Its a good idea to check <em>Use Pager</em> since you might have many nodes once your site starts growing.</p>
<p><a href="http://blog.easytech.com.ar/wp-content/uploads/2007/11/s2.png" title="The Provide Page View"></a></p>
<p style="text-align: center"><a href="http://blog.easytech.com.ar/wp-content/uploads/2007/11/s2.png" title="The Provide Page View"><img src="http://blog.easytech.com.ar/wp-content/uploads/2007/11/s2.png" title="The Provide Page View" alt="The Provide Page View" style="border: 0pt none " border="0" /></a></p>
<p style="clear: both">&nbsp;</p>
<p>Next, add some HTML to the <em>Header Section</em> so that on the top of the view you have a couple of links to add content of the type Role X can create. This can be hardwired HTML or you can create it dynamically. In this example I&#8217;ve done it with static HTML.</p>
<p><a href="http://blog.easytech.com.ar/wp-content/uploads/2007/11/s3.png" title="The Header Section"></a></p>
<p style="text-align: center"><a href="http://blog.easytech.com.ar/wp-content/uploads/2007/11/s3.png" title="The Header Section"><img src="http://blog.easytech.com.ar/wp-content/uploads/2007/11/s3.png" title="The Header Section" alt="The Header Section" style="border: 0pt none " border="0" /></a></p>
<p style="clear: both">&nbsp;</p>
<p>If the view is empty the Header will not be shown so it&#8217;s a good idea to copy the text to the <em>Empty Text</em> textarea. Also remember to click on <em>Full HTML</em> if its static HTML or <em>PHP Code</em> if its dynamic.</p>
<p><a href="http://blog.easytech.com.ar/wp-content/uploads/2007/11/s4.png" title="HTML content displayed when the view is empty"></a></p>
<p style="text-align: center"><a href="http://blog.easytech.com.ar/wp-content/uploads/2007/11/s4.png" title="HTML content displayed when the view is empty"><img src="http://blog.easytech.com.ar/wp-content/uploads/2007/11/s4.png" title="HTML content displayed when the view is empty" alt="HTML content displayed when the view is empty" style="border: 0pt none " border="0" /></a></p>
<p style="clear: both">&nbsp;</p>
<p>Now its time to select the fields your view will show. In my case I chose <em>Node: ID</em>, <em>Node: Title</em>, <em>Node: type</em>, <em>Node: Edit link</em> and <em>Node: Delete link</em>. You can also add the last update date and author also. The trick is to have the Edit link and Delete link so that the user can quickly view, edit and delete content.</p>
<p><a href="http://blog.easytech.com.ar/wp-content/uploads/2007/11/s5.png" title="Fields which the view will show"></a></p>
<p style="text-align: center"><a href="http://blog.easytech.com.ar/wp-content/uploads/2007/11/s5.png" title="Fields which the view will show"><img src="http://blog.easytech.com.ar/wp-content/uploads/2007/11/s5.png" title="Fields which the view will show" alt="Fields which the view will show" style="border: 0pt none " border="0" /></a></p>
<p style="clear: both">&nbsp;</p>
<p>Next is the important step: add a filter to only display those nodes which belong to the content type the user is allowed to edit / create. It is also convinient to add a filter on the Node: Published flag and expose it so that the user can quickly filter those nodes which are published or unpublished.</p>
<p><a href="http://blog.easytech.com.ar/wp-content/uploads/2007/11/s6.png" title="Filters and exposed filters for our view"></a></p>
<p style="text-align: center"><a href="http://blog.easytech.com.ar/wp-content/uploads/2007/11/s6.png" title="Filters and exposed filters for our view"><img src="http://blog.easytech.com.ar/wp-content/uploads/2007/11/s6.png" title="Filters and exposed filters for our view" alt="Filters and exposed filters for our view" style="border: 0pt none " border="0" /></a></p>
<p style="clear: both">&nbsp;</p>
<p>Finally you should select a <em>Sort Criteria</em>. A good choice is to use the <em>Node: Updated Time</em> so that recently updated nodes are displayed on top.</p>
<p><a href="http://blog.easytech.com.ar/wp-content/uploads/2007/11/s7.png" title="The nodes will be sorted acording to this criteria."></a></p>
<p style="text-align: center"><a href="http://blog.easytech.com.ar/wp-content/uploads/2007/11/s7.png" title="The nodes will be sorted acording to this criteria."><img src="http://blog.easytech.com.ar/wp-content/uploads/2007/11/s7.png" title="The nodes will be sorted acording to this criteria." alt="The nodes will be sorted acording to this criteria." style="border: 0pt none " border="0" /></a></p>
<p style="clear: both">&nbsp;</p>
<p>Now that you have defined the view you can save it and have a look at it. Here is how mine looks like:</p>
<p><a href="http://blog.easytech.com.ar/wp-content/uploads/2007/11/s8.png" title="How our view looks like in the end"></a></p>
<p style="text-align: center"><a href="http://blog.easytech.com.ar/wp-content/uploads/2007/11/s8.png" title="How our view looks like in the end"><img src="http://blog.easytech.com.ar/wp-content/uploads/2007/11/s8.png" title="How our view looks like in the end" alt="How our view looks like in the end" style="border: 0pt none " align="top" border="0" /></a></p>
<p style="clear: both">&nbsp;</p>
<p>As you can see with this method you can quickly create pages for different roles so that they can edit restricted content types. This method is easy and the results are quite good. What is missing from this page is the ability to apply settings to groups of nodes and a couple of more filters. One thing you might be tempted to do is to expose the *Node: type* filter so that the user can filter content acording to node type. Unfortunately when Drupal builds the filter it will not filter out those content types which you excluded in the filter definition! This is really annoying but I really didn&#8217;t look through the views issues to see if this has been reported. I imagine it has.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.easytech.com.ar/2007/11/01/drupal-hack-2-content-page-for-a-role/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Find Oracle Application Server Version</title>
		<link>http://blog.easytech.com.ar/2007/08/31/find-oracle-application-server-version/</link>
		<comments>http://blog.easytech.com.ar/2007/08/31/find-oracle-application-server-version/#comments</comments>
		<pubDate>Fri, 31 Aug 2007 03:40:04 +0000</pubDate>
		<dc:creator>Lucas Mingarro</dc:creator>
		
		<category><![CDATA[Application Server]]></category>

		<category><![CDATA[Oracle]]></category>

		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.easytech.com.ar/2007/08/31/find-oracle-application-server-version/</guid>
		<description><![CDATA[The first time that i had to find the exact Oracle Application Server Version I thought it would be an easy task but, it is not so simple if you don&#8217;t  know where to look for it. I forgot that it was not straightforward because now I know where to find it. But the [...]]]></description>
			<content:encoded><![CDATA[<p>The first time that i had to find the exact Oracle Application Server Version I thought it would be an easy task but, it is not so simple if you don&#8217;t  know where to look for it. I forgot that it was not straightforward because now I know where to find it. But the other day a friend called me and asked me where to find OAS version. That&#8217;s why i&#8217;m writing this post.</p>
<p>If you got a fresh install you can look into &lt;ORACLE_HOME&gt;/install/readme.txt and find the version.</p>
<p>But i prefer to take a look into  &lt;ORACLE_HOME&gt;/config/ias.properties<br />
For example:</p>
<blockquote><p> $ grep Version $ORALCE_HOME/config/ias.properties<br />
Version=10.1.2.0.2</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://blog.easytech.com.ar/2007/08/31/find-oracle-application-server-version/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Oracle Application Server Console Hangs While Using Web Browser</title>
		<link>http://blog.easytech.com.ar/2007/08/29/oracle-application-server-console-hangs-while-using-web-browser/</link>
		<comments>http://blog.easytech.com.ar/2007/08/29/oracle-application-server-console-hangs-while-using-web-browser/#comments</comments>
		<pubDate>Wed, 29 Aug 2007 18:34:38 +0000</pubDate>
		<dc:creator>Lucas Mingarro</dc:creator>
		
		<category><![CDATA[Application Server]]></category>

		<category><![CDATA[Oracle]]></category>

		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://blog.easytech.com.ar/2007/08/29/oracle-application-server-console-hangs-while-using-web-browser/</guid>
		<description><![CDATA[In AIX 5L Version 5.3 when you start the iasconsole and then you access to Oracle Application Server console using a web browser, then the application hangs and the following error message is displayed in the web browser:

500 Internal Server Error

java.lang.NoClassDefFoundError: oracle/sysman/eml/app/Console
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java(Compiled Code))
at com.evermind[Oracle Application Server Containers for J2EE 10g  ... [...]]]></description>
			<content:encoded><![CDATA[<p>In AIX 5L Version 5.3 when you start the iasconsole and then you access to Oracle Application Server console using a web browser, then the application hangs and the following error message is displayed in the web browser:<br />
<code><br />
500 Internal Server Error</code><br />
<code><br />
java.lang.NoClassDefFoundError: oracle/sysman/eml/app/Console<br />
at java.lang.Class.forName0(Native Method)<br />
at java.lang.Class.forName(Class.java(Compiled Code))<br />
at com.evermind[Oracle Application Server Containers for J2EE 10g  ... </code></p>
<p>...</p>
<p>...</p>
<p><code> at java.lang.Thread.run(Thread.java:568)<br />
</code></p>
<p>This error occurs because the EMCTL IAS console hangs after logging in. Check the <code>emdctl.trc</code> file to verify the issue.</p>
<p>The next steps describe how to rectify this issue.</p>
<p><span id="more-24"></span></p>
<ol>
<li> Add the following text in emctl script available in $ORACLE_HOME/bin/ directory.</li>
<blockquote>
<pre>
if [ "$uname" = "AIX" ] ; then

   EM_OC4J_OPTS="-Djava.awt.headless=true $EM_OC4J_OPTS"

   export EM_OC4J_OPTS

fi</pre>
</blockquote>
<li>Modify the file $ORACLE_HOME/sysman/config/emd.properties:</li>
<p>Seacrh this line</p>
<blockquote>
<pre>
agentJavaDefines=-Doracle.dms.refresh.wait.time=1000 -DUrlTiming.UseJSSE=true</pre>
</blockquote>
<p>and change it to:</p>
<blockquote>
<pre>
agentJavaDefines=-Doracle.dms.refresh.wait.time=1000 -DUrlTiming.UseJSSE=true-Djava.compiler=NONE -DHTTPClient.disableKeepAlives=true</pre>
</blockquote>
<li>Restart the iasconsole and try again.</li>
</ol>
<p><em><strong>Note:</strong></em> This issue is documented in <strong>Oracle® Application Server Release Notes</strong><br />
<strong>10<span class="italic">g</span> Release 2 (10.1.2) for AIX 5L Based Systems (64-Bit)</strong> B25203-08</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.easytech.com.ar/2007/08/29/oracle-application-server-console-hangs-while-using-web-browser/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
