Gizra.com http://www.gizra.com Sun, 23 Nov 2014 20:06:01 +0200 Sun, 23 Nov 2014 20:06:01 +0200 1800 Todo app with RESTful backend <p>The Drupal community can now proudly claim its own implementation of a <a href="http://gizra.github.io/todo_restful/#/">Todo app</a> with a RESTful backend!</p> <p><img src="http://www.gizra.com/assets/images/posts/todo-restful/image1.jpg" /></p> <p><a href="http://todomvc.com/">TodoMVC</a> is a site that helps you select the right JS MVC library. But more then that, it allows you to learn by comparing those libraries, as they all implement the same thing - a simple Todo app.</p> <p>I&#39;ve decided to fork the <a href="http://todomvc.com/examples/angularjs/#/">Angular example</a>, and build it on top of <a href="https://github.com/Gizra/restful">RESTful</a>. Looking at the Angular code, I was pleasantly surprised.</p> <p><a href="http://www.gizra.com/content/todo-restful-backend/">Continue reading…</a></p> http://www.gizra.com/content/todo-restful-backend http://www.gizra.com/content/todo-restful Sun, 23 Nov 2014 00:00:00 +0200 Behat - The Right Way <p><a href="http://behat.org">Behat</a> is a wonderful tool for automatic testing. It allows you to write your user stories and scenarios in proper English, which is then parsed by Behat and transformed to a set of clicks or other operations that mimic a real user.</p> <p>If you don&#39;t have automated tests on your project, I would argue that you&#39;re doing it wrong (I explain why on <a href="https://www.getpantheon.com/blog/drupal-development-gizra-way">The Gizra Way</a> presentation). Even having a <em>single</em> test is much better than none.</p> <p>With that said, it&#39;s super easy to abuse Behat. We are developers and we think sort of like machines (not really, but you get my point). If you would like to test login to your site you could easily do</p> <div class="highlight"><pre><code class="cucumber language-cucumber" data-lang="cucumber"><span class="k">Given </span><span class="nf">I visit &quot;</span><span class="s">/user/login</span><span class="nf">&quot;</span> <span class="nf"> </span><span class="c"># fill the username and password input fields, and click submit</span><span class="nf"></span> <span class="nf"> </span><span class="k">When </span><span class="nf">I fill &quot;</span><span class="s">username</span><span class="nf">&quot; with &quot;</span><span class="s">foo</span><span class="nf">&quot;</span> <span class="nf"> </span><span class="k">And </span><span class="nf">I fill &quot;</span><span class="s">password</span><span class="nf">&quot; with &quot;</span><span class="s">bar</span><span class="nf">&quot;</span> <span class="nf"> </span><span class="k">And </span><span class="nf">I press &quot;</span><span class="s">Login</span><span class="nf">&quot;</span> <span class="nf"> </span><span class="k">Then </span><span class="nf">I should get a &quot;</span><span class="s">200</span><span class="nf">&quot; HTTP response</span> </code></pre></div> <p>Your test will return green, but it could be improved:</p> <p><a href="http://www.gizra.com/content/behat-the-right-way/">Continue reading…</a></p> http://www.gizra.com/content/behat-the-right-way http://www.gizra.com/content/behat-the-right-way Mon, 17 Nov 2014 00:00:00 +0200 RESTful Discovery - Who knows about your API? <p>As extremely pedantic developers we take documenting our APIs very seriously. It&#39;s not rare to see a good patch rejected in code review just because the PHPdocs weren&#39;t clear enough, or a <code>@param</code> wasn&#39;t declared properly.</p> <p>In fact, I often explain to junior devs that the most important part of a function is its signature, and the PHPdocs. The body of the function is just &quot;implementation details&quot;. How it communicates its meaning to the person reading it is the vital part.</p> <p>But where does this whole pedantic mindset got when we open up our web-services?<br> I would argue that at least 95% of the developers who expose their web-service simply enable RESTws without any modifications. And here&#39;s what a developer implementing your web-service will see when visiting <code>/node.json</code>:</p> <p><a href="http://www.gizra.com/content/restful-discovery/">Continue reading…</a></p> http://www.gizra.com/content/restful-discovery http://www.gizra.com/content/restful-discovery Thu, 30 Oct 2014 00:00:00 +0200 Gizra - We've Got Your Headless Covered <h2>What&#39;s the name of the Angular component for login?</h2> <p>The difficulties in creating a semi or fully decoupled site isn&#39;t in the RESTful part. Spitting out JSON is now covered by several modules, including <a href="https://github.com/Gizra/restful">RESTful</a> which aims for a &quot;best practices&quot; solution.</p> <p>One of the real problems, though, is how to prevent us, the community, from re-inventing the wheel over and over again. Basically, how do we package our frontend code similarly to how we package our generic backend code - AKA &quot;modules&quot;. I discussed these problems, and offered some solutions in my &quot;BoF&quot; persentation:</p> <iframe width="560" height="315" src="//www.youtube.com/embed/wh6ZQOEzOgs?rel=0" frameborder="0" allowfullscreen></iframe> <p><a href="http://www.gizra.com/content/gizra-we-have-got-your-headless-covered/">Continue reading…</a></p> http://www.gizra.com/content/gizra-we-have-got-your-headless-covered http://www.gizra.com/content/gizra-weve-got-your-headless-covered Sun, 19 Oct 2014 00:00:00 +0300 Headless Drupal - Form API, Drupal 9 <h2>Defining moment</h2> <p>A few months ago my DrupalCon Austin session was rejected. I was a bit upset, since presenting plays a big part in my trip to the states, and also surprised, as I mistakenly assumed my presentation repertoire would almost guarantee my session would be accepted. But the committee decided differently.</p> <p>This has been an important moment for me. Two days later I told myself I don&#39;t care. I mean, I cared about the <em>presentation</em>, I just stopped caring that it was not selected, since I decided I was going to do it anyway. As an &quot;unplugged&quot; BoF.</p> <p><a href="https://www.getpantheon.com/blog/drupal-development-gizra-way">The Gizra Way</a>. I think this is probably the best presentation I&#39;ve given so far, and quite ironically my <em>rejected</em> session is second only to Dries&#39;s keynote in YouTube.</p> <p>You see - I had a &quot;<a href="https://www.youtube.com/watch?v=dzm8kTIj_0M">there is no spoon</a>&quot; moment. The second I realized it can be done differently, I was on my own track, perhaps even setting the path for others.</p> <h2>Form API, Drupal 9</h2> <blockquote> <p>I use Drupal because Form API is so great <div class="small">No one, ever</div></p> </blockquote> <p><a href="http://www.gizra.com/content/headless-drupal-form-api-drupal9/">Continue reading…</a></p> http://www.gizra.com/content/headless-drupal-form-api-drupal9 http://www.gizra.com/content/headless-drupal-form-api-9 Thu, 24 Jul 2014 00:00:00 +0300 Headless Drupal - Inline edit <p>In our <a href="http://www.gizra.com/content/restful-angular-forms/">last example</a> we showed how to create node using an angular form served from Drupal itself. This time we are taking one big step further and create the node from a completely decoupled <a href="https://github.com/Gizra/angular-drupal-forms-example">web app</a>.<br> And if that&#39;s not enough for the readers excited by the idea of a decoupled Drupal, we&#39;ve also added inline editing to the example!</p> <p>Enjoy the <a href="http://gizra.github.io/angular-drupal-forms-example/#/">live demo</a></p> <div class="thumbnail"> <img src="http://www.gizra.com/assets/images/posts/headless-drupal-inline-edit/image1.gif" /> <div class="caption">If you know Form API's pains, you should be excited now</div> </div> <p><a href="http://www.gizra.com/content/headless-drupal-inline-edit/">Continue reading…</a></p> http://www.gizra.com/content/headless-drupal-inline-edit http://www.gizra.com/content/headless-drupal-inline-edit Mon, 14 Jul 2014 00:00:00 +0300 Backend-free apps with Grunt, jekyll and D3.js <p>When we started working on a mobile web site for <a href="http://www.gizra.com/content/casa-del-lector/">Casa del Lector</a>&#39;s exhibition, we decided early on it would be a backend-free app, mainly for reasons of stability and performance:</p> <div class="thumbnail"> <img src="/assets/images/posts/backendless-apps/image1.jpg" /> <div class="caption">App is faster than 96% of other websites</div> </div> <p>The data was entered by the client on a 3rd party desktop tool which exported it to XML. We used a bunch of open source tools to massage it a bit and prepare it for the App. Since the project is open sourced you can check out the <a href="https://github.com/Gizra/CDL">actual code</a>.</p> <div class="thumbnail"> <img src="/assets/images/posts/casa-del-lector/cdl-item.gif" /> <div class="caption">The App in action</div> </div> <p><a href="http://www.gizra.com/content/backend-free-apps-grunt-jekyll-d3js/">Continue reading…</a></p> http://www.gizra.com/content/backend-free-apps-grunt-jekyll-d3js http://www.gizra.com/content/grunt-jekyll-and-d3 Thu, 10 Jul 2014 00:00:00 +0300 Headless Drupal, One form at a time <ul> <li>Form API is great, but Form API is hard when you try to do fancier stuff - like wizards and other things that clients often want.</li> <li>Angular forms are great, but Angular forms are hard too - you need to write your own custom endpoints and server side validation.</li> </ul> <p>But now that <a href="https://github.com/Gizra/restful">RESTful</a> integrates with Entity Validator, I would change the equation and simply say something rarely heard in the Drupal community: Forms are Fun!</p> <div class="thumbnail"> <img src="http://www.gizra.com/assets/images/posts/restful-angular-forms/angular-form.gif" /> <div class="caption">This form is not Form API, it's angular!</div> </div> <p>Go ahead, <a href="https://github.com/Gizra/restful/blob/7.x-1.x/modules/restful_angular_example/README.md#test-on-simplytestme-recommended">try it</a> yourself on simplyTest.me</p> <p><a href="http://www.gizra.com/content/restful-angular-forms/">Continue reading…</a></p> http://www.gizra.com/content/restful-angular-forms http://www.gizra.com/content/restful-angular-forms Wed, 09 Jul 2014 00:00:00 +0300 No more CSS in your Drupal Theme! <h2>Treat your custom CSS as contrib</h2> <p>Getting your Drupal to be pixel perfect is hard. In fact, it&#39;s probably four times faster to write the logic of a page, in comparison to the time it takes to get it&#39;s markup right. Not to talk about making it responsive.</p> <p>If you&#39;ve seen my presentation about <a href="http://goo.gl/hJhZb8">The Gizra Way</a> you noticed we take pixel perfect very seriously.</p> <p>One of the tools that helps us getting the markup fast, correct and in a way that would allow us to communicate with the client is Jekyll - the static site generator. Here&#39;s the idea in a nutshell:</p> <ul> <li>Using Jekyll we can concentrate on a clean markup</li> <li>Using Grunt we compile the SASS, and are able to push the the HTML into Github pages - where the client can easily see and interact with the final markup</li> <li>The CSS produced by Jekyll is treated by our Drupal application as contrib. This means we have zero custom CSS in our theme. Seriously, <strong>absolutely no custom CSS in your Drupal theme!</strong></li> <li>Any change to the CSS can be done only in a <em>single</em> place, which is Jekyll</li> </ul> <p><a href="http://www.gizra.com/content/custom-css-as-contrib-with-jekyll/">Continue reading…</a></p> http://www.gizra.com/content/custom-css-as-contrib-with-jekyll http://www.gizra.com/content/jekyll-css Tue, 01 Jul 2014 00:00:00 +0300 Creating a Custom Breakpoint in Bootstrap-Sass <p>Bootstrap is our go to base theme, but what happens when the grid the client asks for has different width, or more break points? Using Bootstrap-Sass creating a custom grid is possible in a manner that can be copied and adjusted from one project to another. As example for this post, and for your future reference you may follow the <a href="http://gizra.github.io/custom-breakpoint-example/">live demo</a> and <a href="https://github.com/Gizra/custom-breakpoint-example">repository</a> that changes Bootstrap to work with five breakpoints (tip: use <a href="http://lab.maltewassermann.com/viewport-resizer/">Resizer</a> for easy viewport resize).<br> Note that example is using Jekyll for simplicity, however the same technique can be used on Drupal.</p> <p><a href="http://www.gizra.com/content/custom-breakpoint-bootstrap-sass/">Continue reading…</a></p> http://www.gizra.com/content/custom-breakpoint-bootstrap-sass http://www.gizra.com/content/creating-a-custom-grid-in-sass-bootstrap Wed, 25 Jun 2014 00:00:00 +0300 Introducing Emmet! <h2>Instant HTML and CSS</h2> <p><img src="http://www.gizra.com/assets/images/posts/emmet-tutorial/emmet-demo.gif" alt=""></p> <p>Emmet is a great tool that can enhance your productivity and save you a lot of time when coding or prototyping.<br> Some of you may know it as &quot;Zen coding&quot; and for quite some time (Since 2012) it’s known as <a href="http://emmet.io/">Emmet</a>.</p> <p>Emmet is a plugin for a text editor which greatly improves html and css workflow.<br> The idea behind it is to instantly expand a simple abbreviation (shortened form of a word or phrase) into complex code snippet.<br> Emmet uses these abbreviations to parse them in runtime and transform them into structured code block: HTML, CSS, XML or any other structured markup.</p> <p><a href="http://www.gizra.com/content/emmet-tutorial//">Continue reading…</a></p> http://www.gizra.com/content/emmet-tutorial/ http://www.gizra.com/content/emmet-tutorial Sun, 08 Jun 2014 00:00:00 +0300 How to submit an application to iTunes App Store <p>Submitting an app to the iTunes App Store is, to put it mildly, not as simple as one might think.</p> <p>Afters struggling with it a few times, we thought it might be useful to create a step-by-step guide - hopefully you might find it useful too.</p> <p><a href="http://www.gizra.com/content/how-to-submit-an-application-to-itunes-app-store/">Continue reading…</a></p> http://www.gizra.com/content/how-to-submit-an-application-to-itunes-app-store http://www.gizra.com/content/how-to-submit-an-application-to-itunes-app-store Mon, 26 May 2014 00:00:00 +0300 The @amitaibu show (unplugged) <p>Wait, what? Did you actually think I&#39;m going to be in a DrupalCon without giving a presentation? Oh, the fact that my session was <em>not</em> selected made you think that. I see. I can understand how that could have caused the confusion.</p> <p>So the thing is that I have a presentation titled &quot;The Gizra Way&quot; that I&#39;ve been giving for the past year all over Israel, and recently in DrupalCamp Spain. Reactions were pretty good.</p> <blockquote class="twitter-tweet" lang="en"><p>My prediction is that most watched <a href="https://twitter.com/search?q=%23DrupalcampEs&amp;src=hash">#DrupalcampEs</a> video will be <a href="https://twitter.com/amitaibu">@amitaibu</a> session as soon as it is available. Really inspiring!</p>&mdash; penyaskito (@penyaskito) <a href="https://twitter.com/penyaskito/statuses/467674213906931712">May 17, 2014</a></blockquote> <script async src="//platform.twitter.com/widgets.js" charset="utf-8"></script> <p>We are still looking for a place to do it. Maybe in a BoF room. Or in the staircase. Or a bar near the hotel. And you know what? I&#39;m really excited about this idea. It feels like I&#39;m preparing for the unplugged version of my show. Anyway, we&#39;ll <a href="https://twitter.com/gizra_drupal">tweet</a> the time and location once we find the place.</p> <p><a href="http://www.gizra.com/content/the-amitaibu-show/">Continue reading…</a></p> http://www.gizra.com/content/the-amitaibu-show http://www.gizra.com/content/the-amitaibu-show Sun, 25 May 2014 00:00:00 +0300 How to have lunch without speaking Drupal <p>Oh no, It’s lunch time!<br> I wonder if I’ll have anything to contribute to the conversation today. Will lunch today - like yesterday or the day before that - revolve around pull requests, Organic groups, migrate, scrum, code reviews, modules. Boring.<br> If you share the same feeling reading the above lines, this blog post if for you.</p> <div class="thumbnail"> <img src="/assets/images/posts/lunch/photo1.jpg" /> <div class="caption">Geeks having a spontaneous reaction to a new version of a Drupal module. I love those guys!</div> </div> <p>Don’t get me wrong - I love my job and I love my co-workers as well. It’s just that every time they talk about these things it makes me wanna stand up on our designer kitchen chair and shout:<br> <strong>My name is Orit and I am not a Drupal geek!</strong></p> <p>I have never developed any module in my life, didn&#39;t contribute anything to OG nor have I never requested Brice or Amitai to give me a scrutinizing code review. So here are some tips:</p> <p><a href="http://www.gizra.com/content/how-to-have-lunch-without-speaking-drupal/">Continue reading…</a></p> http://www.gizra.com/content/how-to-have-lunch-without-speaking-drupal http://www.gizra.com/content/how-to-have-lunch-without-speaking-drupal Thu, 22 May 2014 00:00:00 +0300 RESTful module <p><a href="https://github.com/Gizra/restful#restful-best-practices-for-drupal">RESTful module</a> is a new approach to providing a REST server in Drupal. Its concepts and philosophy appears in the module&#39;s README so I won&#39;t repeat it, but I&#39;d like to go over some of the key points.</p> <div class="highlight"><pre><code class="php language-php" data-lang="php"><span class="cp">&lt;?php</span> <span class="c1">// Handler v1.0</span> <span class="nv">$handler</span> <span class="o">=</span> <span class="nx">restful_get_restful_handler</span><span class="p">(</span><span class="s1">&#39;articles&#39;</span><span class="p">);</span> <span class="c1">// GET method.</span> <span class="nv">$result</span> <span class="o">=</span> <span class="nv">$handler</span><span class="o">-&gt;</span><span class="na">get</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span> <span class="c1">// Output:</span> <span class="k">array</span><span class="p">(</span> <span class="s1">&#39;id&#39;</span> <span class="o">=&gt;</span> <span class="mi">1</span><span class="p">,</span> <span class="s1">&#39;label&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;example title&#39;</span><span class="p">,</span> <span class="s1">&#39;self&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;https://example.com/node/1&#39;</span><span class="p">,</span> <span class="p">);</span> <span class="c1">// Handler v1.1 extends v1.0, and removes the &quot;self&quot; property from the</span> <span class="c1">// exposed properties.</span> <span class="nv">$handler</span> <span class="o">=</span> <span class="nx">restful_get_restful_handler</span><span class="p">(</span><span class="s1">&#39;articles&#39;</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">1</span><span class="p">);</span> <span class="nv">$result</span> <span class="o">=</span> <span class="nv">$handler</span><span class="o">-&gt;</span><span class="na">get</span><span class="p">(</span><span class="mi">1</span><span class="p">);</span> <span class="c1">// Output:</span> <span class="k">array</span><span class="p">(</span> <span class="s1">&#39;id&#39;</span> <span class="o">=&gt;</span> <span class="mi">1</span><span class="p">,</span> <span class="s1">&#39;label&#39;</span> <span class="o">=&gt;</span> <span class="s1">&#39;example title&#39;</span><span class="p">,</span> <span class="p">);</span> <span class="cp">?&gt;</span><span class="x"></span> </code></pre></div> <p>In the past year almost every site we have is either completely decoupled from the server side where AngularJs serves the webapp, or AngularJS plays a smaller part, and we just embed web components inside a Drupal page to provide a slick UI.</p> <p>Up until now our go to module was RestWs by the wonderful Klausi, which wraps around Entity API module&#39;s metadata wrapper. Basically, it hands over to the metadata wrapper the responsibility for the access and for the actual value it spits out. It works fine, however the JSON it exposes has too much information.</p> <p><a href="http://www.gizra.com/content/restful-server/">Continue reading…</a></p> http://www.gizra.com/content/restful-server http://www.gizra.com/content/restful-server Tue, 06 May 2014 00:00:00 +0300 Casa del Lector <p>Last week saw the launch of a pretty unique <a href="http://gizra.github.io/CDL/">project</a> for us. It&#39;s not every day a product we&#39;ve worked on gets a <a href="http://cultura.elpais.com/cultura/2014/03/05/actualidad/1394047004_090821.html">write up on El Pais</a>, or has this kind of launch event:</p> <p><img src="/assets/images/posts/casa-del-lector/IMG_8388-2.JPG" alt=""></p> <p>The target audience is a bit unusual as well. While it can be accessed like any other site, it&#39;s targeted to be used inside a specific exhibition in the <a href="http://casalector.fundaciongsr.com/">Casa del Lector</a> museum in Madrid, on tablets handed out to the museum visitors:</p> <p><img src="/assets/images/posts/casa-del-lector/IMG_8259%20-%202.JPG" alt=""></p> <p>We took great care to stay within the touch UI conventions. When entering the site, the user is presented with a network of connections between items. As she zooms, details are revealed - subitems, their connections and finally their titles:</p> <p><img src="/assets/images/posts/casa-del-lector/cdl-map-1.gif" alt=""></p> <p><a href="http://www.gizra.com/content/casa-del-lector/">Continue reading…</a></p> http://www.gizra.com/content/casa-del-lector http://www.gizra.com/content/casa-del-lector Thu, 13 Mar 2014 00:00:00 +0200 Zariz Loves Entity Reference <p>Zariz is now integrated with entity reference and is &quot;branch&quot; aware. This means that the reference will change on the fly. For example:</p> <p><a href="http://www.gizra.com/content/zariz-entity-reference/">Continue reading…</a></p> http://www.gizra.com/content/zariz-entity-reference http://www.gizra.com/content/zariz-entity-reference Mon, 20 Jan 2014 00:00:00 +0200 OpenScholar and the new Biblio <p>OpenScholar is the de facto go to solution for academic sites. Over the past year we saw it being adopted in many Harvard departments and higher ed institutions worldwide.</p> <p><img src="/assets/images/posts/os-biblio/6.jpg" alt=""></p> <p>I&#39;m proud that our work is not just based on open source, but also contributes to it - big time. Case in point, the <a href="https://github.com/Gizra/biblio">Biblio</a> module which is responsible for bibliographies and citations since back in Drupal 4.6, and has provided a great solution. It was becoming clear the 4.6 architecture is showing its age, and could use an overhaul.</p> <p><a href="http://www.gizra.com/content/openscholar-new-bilbio/">Continue reading…</a></p> http://www.gizra.com/content/openscholar-new-bilbio http://www.gizra.com/content/openscholar-new-bilbio Mon, 20 Jan 2014 00:00:00 +0200 Zariz on TV <p>I had a fun conversation with Jam this morning, regarding <a href="http://www.gizra.com/content/zariz-means-agile/">Zariz</a> - the set of Drupal modules we&#39;re developing that (a) <a href="http://www.gizra.com/content/zariz-in-pics/">brings version control into the content space</a> and (b) <a href="http://www.gizra.com/content/drupal-x5-faster/">brings Drupal into the static site space</a>. If you&#39;re into that kind of stuff, you might enjoy it too:</p> <iframe width="560" height="315" src="//www.youtube.com/embed/vGUSXwURVVo" frameborder="0" allowfullscreen></iframe> <p><a href="http://www.gizra.com/content/zariz-on-tv/">Continue reading…</a></p> http://www.gizra.com/content/zariz-on-tv http://www.gizra.com/content/zariz-on-tv Thu, 16 Jan 2014 00:00:00 +0200 Drupal, only x5 faster <p>This is the <code>live</code> branch on the Drupal site <img src="/assets/images/posts/zariz-static/1.jpg" alt=""></p> <p>This is the static site created out of the live site. It looks the same, but loads x5 faster. <img src="/assets/images/posts/zariz-static/2.jpg" alt=""></p> <p><a href="http://www.gizra.com/content/drupal-x5-faster/">Continue reading…</a></p> http://www.gizra.com/content/drupal-x5-faster http://www.gizra.com/content/zariz-static Thu, 09 Jan 2014 00:00:00 +0200 Zariz in Pics <p><a href="https://github.com/Gizra/zariz">Zariz </a> isn&#39;t just about static sites. In fact the Zariz module itself isn&#39;t aware of any static generation. It&#39;s about modeling the content creation around Git, which is a new approach to content staging.</p> <p>Here are 10 images that will make the whole idea clear.</p> <p>This is the <code>live</code> branch<br> <img src="/assets/images/posts/zariz2/0.jpg" alt=""></p> <p>We branch out of it<br> <img src="/assets/images/posts/zariz2/1.jpg" alt=""></p> <p><img src="/assets/images/posts/zariz2/2.jpg" alt=""></p> <p><a href="http://www.gizra.com/content/zariz-in-pics/">Continue reading…</a></p> http://www.gizra.com/content/zariz-in-pics http://www.gizra.com/content/zariz-in-pics Tue, 24 Dec 2013 00:00:00 +0200 Zariz Means Agile <p><a href="https://github.com/Gizra/zariz">Zariz</a> is a new project we&#39;re working on. The word means &quot;quick&quot;, or &quot;agile&quot; in Hebrew. We&#39;ve began working on it when we hit some bumps working on Dekyll.</p> <h3>Dekyll Frustrations</h3> <p>Dekyll was Jekyll based. We love Jekyll - it powers our own site, and in fact I&#39;m writing this blog post with the excellent Prose.io. But for Dekyll we wanted to stay close to Drupal, keeping the various abilities it developed over the years like fine grained access control, workflows etc and allowing users to stay within an environment they already know.</p> <p>Relying on Jekyll added another component to the system. A very good one, but still with its own requirements and needs. We wanted to simplify, and minimize the number of moving parts.</p> <h3>A New Beginning</h3> <p>So we were back at the drawing board. Around that time I saw Clay Shirky&#39;s <a href="http://www.ted.com/talks/clay_shirky_how_the_internet_will_one_day_transform_government.html">Ted talk</a>. When he gave that funny yet precise explanation about why lawyers don&#39;t use Git, I realized something.</p> <p><a href="http://www.gizra.com/content/zariz-means-agile/">Continue reading…</a></p> http://www.gizra.com/content/zariz-means-agile http://www.gizra.com/content/zariz-means-quick Wed, 11 Dec 2013 00:00:00 +0200 The "About" Story <p><a href="http://www.gizra.com/content/the-about-story/">Continue reading…</a></p> http://www.gizra.com/content/the-about-story http://www.gizra.com/content/the-about-story Thu, 31 Oct 2013 00:00:00 +0200 How We Achieve Faster Development and Happier Clients by Opening Our GitHub Issues <p>As we <a href="http://www.gizra.com/content/the-gizra-way/">mentioned</a> before, in Gizra each project&#39;s GitHub repository - code, issues etc - is completely open &amp; transparent to the client from the day we start working together. We&#39;ve discovered this provides us with some unexpected benefits.</p> <p><a href="http://www.gizra.com/content/how-we-use-github-issues/">Continue reading…</a></p> http://www.gizra.com/content/how-we-use-github-issues http://www.gizra.com/content/how-we-use-github-issues Thu, 31 Oct 2013 00:00:00 +0200 Tipa.li – a Tool for Easily Finding Polio Vaccination Clinics <p>No one is sure what caused the Polio virus, eradicated from Israel since the 1990s, to reappear. The virus was detected in sewage samples in the south of the country in early summer and began spreading northwards, prompting Ministry of Health to start a <a href="http://www.npr.org/blogs/health/2013/09/02/217194998/to-keep-polio-at-bay-israel-revaccinates-a-million-kids">massive vaccination drive</a>.</p> <p>Parents of children under the age of 9 were asked to bring them to the nearest Tipat Halav clinic for vaccination. Country-run Tipat Halav (in Hebrew, “drop of milk”) childcare clinics are a household name in Israel. Spread throughout the country, they helped it reach some of the <a href="http://www.indexmundi.com/facts/indicators/SP.DYN.IMRT.IN/compare?country=il#country=au:xd:xr:xs:il:gb:us">world’s lowest infant mortality rates</a>.</p> <p>The Ministry of Health decided to create a mobile application to help parents find the nearest clinic. It commissioned one of the country’s largest development shops to create it. They decided to create a native app. <a href="https://play.google.com/store/apps/details?id=com.matrix.tipathalav">This is the Android version</a>:</p> <div class="thumbnail"> <img src="/assets/images/posts/tipa/image1.jpg" /> <div class="caption">It’s in Hebrew, but you get the idea</div> </div> <p>I assume the iOS version is still undergoing the App Store approval process.</p> <p>We discussed the app during lunch at Gizra. We’re no doctors, but we thought we could do something about the software. Going with a native app didn’t seem ideal for a single-use application which needs to be deployed on as many platforms ASAP. As for the UI, I’ll leave the image above as an exercise to the reader.</p> <p><a href="http://www.gizra.com/content/tipali-a-tool-for-easily-finding-polio-vaccination-clinics/">Continue reading…</a></p> http://www.gizra.com/content/tipali-a-tool-for-easily-finding-polio-vaccination-clinics http://www.gizra.com/content/tipali-a-tool-for-easily-finding-polio-vaccination-clinics Wed, 04 Sep 2013 00:00:00 +0300 Open Source - Real World <p><strong>In this guest post, <a href="http://www.itamarburstein.com/">Itamar Burstein</a> shares his thoughts about &quot;Open source&quot; - the culture that Drupal belongs to - as seen through the eyes of an Industrial designer.</strong></p> <p>Amitai, my brother asked me to write a little something about, and I quote, &quot;Open source or Drupal or whatever&quot; - to give some examples and to show some pictures. He was very particular about the pictures.</p> <p>This might be a good moment to point out that I&#39;m a designer, industrial designer, I mostly work with the furniture industry making very specific objects which are decided by the manufacturer, a bunch of business guys and, well, myself. You can imagine that open source doesn&#39;t have much to do with what I am doing, but he asked, and I don&#39;t like to disappoint my baby brother.</p> <p><a href="http://www.gizra.com/content/open-source-real-world//">Continue reading…</a></p> http://www.gizra.com/content/open-source-real-world/ http://www.gizra.com/content/open-source-real-world Wed, 28 Aug 2013 00:00:00 +0300 Dekyll's new "Github Pages" flavor <p><a href="http://www.gizra.com/content/dekyll-drupal-on-jekyll/">Dekyll</a> (Drupal on Jekyll) comes now in two flavors. The first one is &quot;normal&quot;, which is more advanced and allows you to build more complex websites, the second is called &quot;Github Pages&quot; and it lets you quickly serve a new site using Github.</p> <p>We are working hard in Gizra to make this process as smooth as possible, with the goal of letting non-developers the ability to serve their content using Jekyll, on Github Pages - without them having to bother with knowing what Jekyll, Git or Github Pages are. A worthy goal indeed, but not trivial.</p> <p><a href="http://www.gizra.com/content/dekyll-new-github-pages-flavor//">Continue reading…</a></p> http://www.gizra.com/content/dekyll-new-github-pages-flavor/ http://www.gizra.com/content/dekyll-new-github-pages-flavor Sun, 14 Jul 2013 00:00:00 +0300 Dekyll - Drupal on Jekyll <p>Drupal is no doubt one of the best CMS out there; Jekyll is no doubt one of the best static site generators out there. See where I&#39;m going? And it&#39;s no longer just a concept, it is a complete installation profile called <a href="https://github.com/Gizra/dekyll">Dekyll</a>.</p> <h3>The DrupalCon Portland BoF</h3> <p>So we had this idea, of combining Drupal and Jekyll. It was a result of building <a href="http://gizra.com">gizra.com</a> with Jekyll. When I came to Portland I already knew that apart of the usual business schmoozing, and presenting OG and the Message stack, I wanted to get other people&#39;s opinion on our idea.</p> <p>I was pleasantly surprised to see more than 20 people in the BoF (Birds of Feather) session. I had a vision of what I wanted but I still didn&#39;t have the elevator pitch for it. The discussion we had helped sharpen the way I can explain that vision. To quote Steve Persch (@stevector)</p> <blockquote> <p>When I heard your idea I thought it&#39;s crazy. After the BoF I still thought it&#39;s crazy... but!</p> </blockquote> <p>Before diving into Dekyll, let&#39;s understand what are the problems that it tries to solve.</p> <p><a href="http://www.gizra.com/content/dekyll-drupal-on-jekyll//">Continue reading…</a></p> http://www.gizra.com/content/dekyll-drupal-on-jekyll/ http://www.gizra.com/content/dekyll-drupal-on-jekyll Sun, 30 Jun 2013 00:00:00 +0300 Amitai's DrupalCon Portland Presentation <p>Amitai returned from DrupalCon Portland reporting it was raining all the time, the flights were very long (apparently the &quot;Gizra Platinum Executive Traveller&quot; card we gave him in the office failed to deliver the expected First Class upgrade) and he still doesn&#39;t really get Portlandia.</p> <p>Still, he had an awesome conference and a great presentation on Organic Groups and Message modules, sprinkled with anecdotes from the open source module developer&#39;s life. Thanks to <a href="https://www.getpantheon.com/blog/drupalcon-portland-video-amitai-burstein-organic-groups-message">Pantheon&#39;s</a> video crew, you can now verify the latter claim yourself:</p> <iframe width="853" height="480" src="http://www.youtube.com/embed/XglUUroifsg" frameborder="0" allowfullscreen></iframe> <p><a href="http://www.gizra.com/content/gizra-drupalcon-portland//">Continue reading…</a></p> http://www.gizra.com/content/gizra-drupalcon-portland/ http://www.gizra.com/content/drupalcon-portland Sun, 23 Jun 2013 00:00:00 +0300 The Gizra Way - How We Roll (and Rollback) <p>My involvement with Gizra is a bit unusual. Before settling into my fake Aeron in Gizra&#39;s plush Tel Aviv facilities I was actually a client for two years, contracting Brice &amp; Amitai to write code for a New York startup I was working for. Together, we managed to build a continuous deployment setup where we pushed new code to production every day while working 7 timezones apart, while, surprisingly, keeping our sanity mostly intact.</p> <p><a href="http://www.gizra.com/content/the-gizra-way//">Continue reading…</a></p> http://www.gizra.com/content/the-gizra-way/ http://www.gizra.com/content/how-we-roll Mon, 17 Jun 2013 00:00:00 +0300 Harvard's OpenScholar <p>When people ask you about big projects done with Drupal, what&#39;s the <em>second</em> item on your list? I know the first one is <a href="http://www.whitehouse.gov/">WhiteHouse.gov</a> - that&#39;s not Drupal&#39;s foot in the door, it&#39;s the foot that broke the door.</p> <p>I&#39;d like to share with you the second item on our list. Harvard. Seriously. If it&#39;s the first time you hear that Harvard is using Drupal, or that they have an amazing distribution they work on called <a href="http://openscholar.harvard.edu/">Harvard OpenScholar</a>, or that they have a team of five developers along with two developers from Gizra and a many <a href="http://hwp.harvard.edu/people">others</a> working on it <em>full time</em>, or you are not aware to the amount of contributions given back to the community... You do now.</p> <p><a href="http://www.gizra.com/content/harvard-openscholar//">Continue reading…</a></p> http://www.gizra.com/content/harvard-openscholar/ http://www.gizra.com/content/harvard-openscholar Tue, 04 Jun 2013 00:00:00 +0300 Migrate, and baking content <p>A small problem in Drupal occurs when developing new modules, or installation profiles. Content. It goes missing, and without it developing can go wrong very quickly. Also, starting up a site’s install profile that reveals a site without content gives a feel of walking into an empty bakery shop. There’s ovens, flour, and bakers, and that great bakery smell all around, but no bread. And possible clients go to other bakeries if you run out of bread. So to solve this issue, <a href="http://drupal.org/project/migrate">Migrate</a> module helps us fill up the shop with bread. Oh, and you can also migrate data from other (older) sites.</p> <p><a href="http://www.gizra.com/content/migrate-and-baking-content//">Continue reading…</a></p> http://www.gizra.com/content/migrate-and-baking-content/ http://www.gizra.com/content/migrate-and-baking-content Thu, 27 Dec 2012 00:00:00 +0200 Drupal, Node.js, Pantheon, and Heroku <p>Some title, right?</p> <p><a href="http://drupal.org/project/nodejs">Node.js</a> module for Drupal is so great and a time saver, I’ve got spare time to blog about how to set it up. Future me, we’ll thank me for doing so.</p> <p>First, let’s define the goals for this blog post</p> <ul> <li>Learn how to setup the Node.js module and server on a <em>local</em> server</li> <li>Setup on a remote server using Heroku and Pantheon</li> </ul> <p><a href="http://www.gizra.com/content/drupal-nodejs-pantheon-and-heroku//">Continue reading…</a></p> http://www.gizra.com/content/drupal-nodejs-pantheon-and-heroku/ http://www.gizra.com/content/drupal-node-js-pantheon-and-heroku Wed, 19 Dec 2012 00:00:00 +0200 Message-subscribe - A New Subscription System <blockquote> <p>Drupal 6 had Messaging &amp; Notification Drupal 7 has Message-subscribe &amp; Message-notify</p> </blockquote> <p><a href="http://drupal.org/project/message_subscribe">Message-subscribe</a> is a new module in the Message stack, that finally ties everything together to give us the ability to subscribe to content, and send notifications.</p> <p>If you know Message you already know that some development skills, or knowing Rules really really good are needed. This post will go over the main concepts and flow of the notification process.</p> <p>Message-subscribe, just like Message module has zero knowledge about your business logic - it is up to you to implement the Message creation. What Message subscribe gives you, though, is one simple function your implementing module will call -- and that’s it. It will take care of it from there.</p> <p><a href="http://www.gizra.com/content/message-subscribe-new-subscription-system//">Continue reading…</a></p> http://www.gizra.com/content/message-subscribe-new-subscription-system/ http://www.gizra.com/content/message-subscribe-a-new-subscription-system Wed, 31 Oct 2012 00:00:00 +0200 DrupalCamp Montreal Keynote <p>Checkout my presentation - it has been a long time since I did a funny one. If your not a total geek the first 15 minutes will be enough. Unless you are interested in hearing about OG (in that case you <em>are</em> a geek).</p> <p><a href="http://www.gizra.com/content/drupalcamp-montreal-keynote//">Continue reading…</a></p> http://www.gizra.com/content/drupalcamp-montreal-keynote/ http://www.gizra.com/content/drupalcamp-montreal-keynote Thu, 18 Oct 2012 00:00:00 +0200 What is Message module, and its new features <p><a href="http://drupal.org/project/message">Message</a> module’s inclusion in the upcoming version of Commerce Kickstart, and it’s very likely inclusion in Drupal Commons 7 turns this not very known module into an important module to know about. Message can help with many tasks from simple logs to complicated activity streams and even, with the use of Message Notify module, multilingual digest emails.</p> <p><a href="http://www.gizra.com/content/what-message-module-and-its-new-features//">Continue reading…</a></p> http://www.gizra.com/content/what-message-module-and-its-new-features/ http://www.gizra.com/content/what-is-message-module-and-its-new-features Thu, 12 Jul 2012 00:00:00 +0300 About strong partnership and winning a game of bowling <p>We are too old - or so we thought - to still be naïve. You might be familiar with the feeling – you and reps of some other company are sitting and talking and talking about possible cooperation, and you are so hoping that this time it&#39;s for real. You actually force yourself to believe that it&#39;s the real thing this time, when suddenly the other party says something along the lines of quality not being quite so important to them, or that they don&#39;t believe in contributing to the community. Heck, at some point, we were even told by the other side that it was their belief that we should work for free, damn it. Do you dig what I am saying? You know, one cannot even be sure it&#39;s an age thing, maybe it&#39;s just a matter of having experience; either way, we are no longer naïve.</p> <p><a href="http://www.gizra.com/content/about-strong-partnership-and-winning-game-bowling//">Continue reading…</a></p> http://www.gizra.com/content/about-strong-partnership-and-winning-game-bowling/ http://www.gizra.com/content/about-strong-partnership-and-winning-a-game-of-bowling Mon, 09 Jul 2012 00:00:00 +0300 How to deal with colliding aliases <p>Here&#39;s a common problem with aliases:</p> <ul> <li><code>users/[user:name]/blog</code> -- This is a page defined by Panels. It shows a list of latest blog posts</li> <li><code>users/[user:name]/blog/[node:title]</code> -- This is the alias of the node that is a blog post. But if you will try to use it, Drupal thinks you refer to the Panels page, and shows you the lastest blog posts, instead of the node</li> </ul> <p><a href="http://www.gizra.com/content/how-deal-colliding-aliases//">Continue reading…</a></p> http://www.gizra.com/content/how-deal-colliding-aliases/ http://www.gizra.com/content/how-to-deal-with-colliding-aliases Thu, 01 Mar 2012 00:00:00 +0200 Banner rotator <p>A common design element we see lately in a lot of sites is a banner rotator - image slideshow with some text and links on the side.</p> <p>There are several modules that try to deal with it in Drupal (such as &quot;ddblock&quot;, which we don&#39;t use), however we find that using the good old Views slideshow module can give us everything we need. The following blog post gives an overview of how we achieved this task without any code, just Views configuration and a bit of CSS. As always we provide a <a href="http://drupal.org/sandbox/RoySegall/1442236">feature</a> that can be installed and enabled (visit <code>/banner-rotator</code>).</p> <p><a href="http://www.gizra.com/content/banner-rotator//">Continue reading…</a></p> http://www.gizra.com/content/banner-rotator/ http://www.gizra.com/content/banner-rotator Thu, 16 Feb 2012 00:00:00 +0200 Commerce product + Subform <p><strong>Edit: Use the <a href="http://drupal.org/project/inline_entity_form">Inline entity form</a> module that was created after this post was published.</strong></p> <p>This post will go over an example (yet fully functionally) module that shows how we can embed a commerce product form inside a node form, and have the node reference the commerce product - without horrible hacks.</p> <p><a href="http://www.gizra.com/content/commerce-product-subform//">Continue reading…</a></p> http://www.gizra.com/content/commerce-product-subform/ http://www.gizra.com/content/commerce-product-subform Sun, 29 Jan 2012 00:00:00 +0200 Sending LOTS of emails (Hint: with Drush) <p>On my <a href="http://www.gizra.com/content/message-notify-multilingual-email-notifications">last blog</a> post I talked about Message notify module, and mentioned we were using it to send digest emails. While Message notify really eases the pain of creating personalized emails, and sending them, we still needed to find a scalable solutions for sending lots of emails. LOTS of emails!</p> <p>Doing it on hook_cron() is nice if you need to send few emails, but when you need to send thousands of emails a day, it won’t do. Cron will take too long, or might hang up if we try to process too many digest emails at once.</p> <p>A nice and simple solution we came up with, was to write a Drush command that will process a small batch of users, and use Jenkins to fire up this command every two minutes.</p> <p>This post will demonstrate the code, that can be used by others - however you will need to copy and change the command to fit your business logic.</p> <p><a href="http://www.gizra.com/content/sending-lots-emails-hint-drush//">Continue reading…</a></p> http://www.gizra.com/content/sending-lots-emails-hint-drush/ http://www.gizra.com/content/sending-lots-of-emails-hint-with-drush Tue, 24 Jan 2012 00:00:00 +0200 Message notify - Multilingual email notifications <p>Email notification is a convenient way to be updated about new content or comments. There are several modules in Drupal that already deal with this issue, and I would like to propose another solution, and highlight the advantages of using it. The new system relies on <a href="http://drupal.org/project/message_notify">Message-notify</a> module, which depends on the Message module - a general logging system (think activity stream, but without a fancy query builder).</p> <p>Message module itself is pretty simple. You can have different message types, and when you want to create a message, you actually create a new entity called Message.</p> <p><a href="http://www.gizra.com/content/message-notify-multilingual-email-notifications//">Continue reading…</a></p> http://www.gizra.com/content/message-notify-multilingual-email-notifications/ http://www.gizra.com/content/message-notify-multilingual-email-notifications Sun, 01 Jan 2012 00:00:00 +0200 OG7 and Entity reference - Part 2 <p>Following my <a href="http://www.gizra.com/content/og7-and-entity-reference-sponsor-me">previous</a> post, and after getting some great reaction from the community via IRC and in Drupalcamp Toulouse, I’d like to share both my thoughts about the sponsoring and about the technical stuff.</p> <p>The sponsoring, which already has <a href="http://funnymonkey.com/">FunnyMonkey</a> committing to pay almost half the price, and providing on top of that developer hours, was something I’ve decided to do only after I was convinced there are some big players using OG7. The thing is that _anyway I intend to do this change. The sponsoring is just giving it a boost, and making sure it will be _sooner than later!</p> <p>I’m happy I was able to post that request and to get good reaction from the community. I’m equally happy that Planet Drupal isn’t swamped with such requests. It’s not about Drupal App. It’s about harnessing the community towards a goal. Companies offering to assist by providing developer hours is exactly the proof of that.</p> <p>Now here’s a quick overview of the planned changes. First the conceptual changes: <ul> <li>Instead of OG having it&#39;s own field type, we easily hook into Entity reference field, as it allows registering our own handler using a CTools plugin</li> <li>Instead of saving the field values <em>and the OG membership as we currently do, we save the OG membership, and use hook</em>field<em>load() to populate the Entity reference with the correct value. Yes, I know, the docs clearly say that we should not load fieldable entities in hook</em>field_load() as it might cause loading recursion, so we&#39;ll just make sure you can&#39;t attach group-audience fields to OG membership (which anyway doesn&#39;t make much sense). The benefit of doing that, after a long talk with the people form the community, notably fago (thanks again fago!), came out as the best solution for a problematic thing</li> <li>OG membership is now tightly coupled with the field that it belongs to. This means we can care about the field cardinality (i.e. how many OG membership can be created per field), and since we know the OG membership type we can provide smarter metadata</li> <li>We can have multiple fields, to allow subscribing users/ content to group with different membership type. No more hard-coding of the field name as-well</li> </ul></p> <p>Sneak preview time... As usual we can make a content type (Clubs in this example) a group, through the content type edit.</p> <p><a href="http://www.gizra.com/content/og7-and-entity-reference-part-2//">Continue reading…</a></p> http://www.gizra.com/content/og7-and-entity-reference-part-2/ http://www.gizra.com/content/og7-and-entity-reference-part-2 Wed, 07 Dec 2011 00:00:00 +0200 OG7 and Entity reference - Sponsor me <ul> <li>Update 3: <a href="http://treehouseagency.com/">Treehouse Agency</a> are sponsoring and providing developer help</li> <li>Update 2: Dev version is out</li> <li>Update 1: <a href="http://funnymonkey.com/">FunnyMonkey</a> are sponsoring and providing developer help</li> </ul> <p>I was walking back home from work and thinking to myself Drupal thoughts. One of the thought was about OG7 and its use of &quot;group&quot; entity. At the time of writing OG it seemed as a good idea. It allows flexibility of showing all the groups of the site, without worrying what entity type they are (as the group ID isn’t equal to the node ID). It also allows easier internalization of group nodes, as again the group ID isn’t the node ID. In a very Drupal like way, in the other side of the world, a day later fago was asking the same question.</p> <p>After more than a year that OG7 is out, it seems that the flexibility of showing all the groups at once has a price in complexion. It makes Views require one more relationship. It makes Panels require one more relationship. It makes creating Rules and using tokens a non-intuitive task. I&#39;ve opened a new <a href="http://drupal.org/node/1342632">issue</a>, with one thing in mind -- deprecating the group entity, and making OG even slimmer and even more robust. The idea is to rely on the new kid on the block - Entity Reference, which means your reference field will know how to reference a group of a single entity type. That change will result with changing the signature of a lot of function in OG (i.e. instead of passing the group ID, one will have to pass the entity type of the group, and the entity ID of the group), but it will also result with better UX and DX.</p> <p>The idea is to create a 2.x branch, to allow people to migrate from 1.x. I honestly don’t think it will be very painful, as I’ll provide automatic migration of data. So it will be just a matter of updating the Views, Panels and custom code. In the above issue there are already comments from known community members giving it a big +1, and saying &quot;Let’s see this sooner than later&quot;. I also want to see this happening _fast, but my time resources are not enough.</p> <p>I’m looking for someone to sponsor this huge and non-trivial feature, which will cost US$7,500 Please do <a href="http://www.gizra.com/contact">contact</a> me if you are interested. I will credit you on the OG module page, in the README file, and on this blog. The community will thank you greatly.</p> <p><a href="http://www.gizra.com/content/og7-and-entity-reference-sponsor-me//">Continue reading…</a></p> http://www.gizra.com/content/og7-and-entity-reference-sponsor-me/ http://www.gizra.com/content/og7-and-entity-reference-sponsor-me Sun, 20 Nov 2011 00:00:00 +0200 About that walk bojanz, Damz and I had in London <p>Another Drupalcon is getting closer, and the sessions are open for votes. Let’s clear the technical stuff first - please vote for my <a href="http://denver2012.drupal.org/program/sessions/og7-pride-and-prejudice">OG7 session</a>.</p> <p>Now after all the required link clicking has been done we can talk about that walk Bojan Živanović (bojanz), Damien Tournoud (Damz) and I had in London. It was the night commerce module was officially released. I somehow found myself in a restaurant with the rest of the commerce guys celebrating the event. After some good paeia and a french amount of wine we headed back to the hotel. We were talking about the day we had in Druplcaon London, the sessions we attended and so on.</p> <p>&quot;Oh yeah, you had your core conversation&quot;, I said to Damien. &quot;You were talking about Document oriented storage, right. What is it exactly?&quot; I asked. Damien, being Damien, gave me a Damien answer. Bojan, being Bojan, explained it to me. You should have heard what he was talking about. Seriously, I imagined people literally banging their heads in the table, and I think I even imagined someone bursting into flames. I think it’s called self combustion - it happens to geeks when they hear such ideas.</p> <p>After that ,there was a minute of silence before I asked Damien how did the people react, and did he think they liked it. Damien, well, you know. He just said - but this time with a little smile - &quot;I don’t know if they liked it, but it sure was disruptive&quot;.</p> <p>The next day I had my own presentation. It’s no secret some parts of it were completely non-linear. If I may, I would use Damien’s answer to describe my own presentation.</p> <p><a href="http://www.gizra.com/content/about-walk-bojanz-damz-and-i-had-london//">Continue reading…</a></p> http://www.gizra.com/content/about-walk-bojanz-damz-and-i-had-london/ http://www.gizra.com/content/about-that-walk-bojanz-damz-and-i-had-in-london Fri, 04 Nov 2011 00:00:00 +0200 Drupalcamp Spain - Sevilla <p>Here&#39;s my presentation held in Drupalcamp Spain. I&#39;m going over a new feature in OG7, that allows having multiple group audience fields and having a membership type assigned to each field -- in English it means that you can have some users join a group with &quot;Default&quot; membership and others with &quot;Expire&quot; membership.</p> <p>Also checkout Pedro&#39;s (pcambra) new suit!</p> <p><a href="http://www.gizra.com/content/drupalcamp-spain-sevilla//">Continue reading…</a></p> http://www.gizra.com/content/drupalcamp-spain-sevilla/ http://www.gizra.com/content/drupalcamp-spain-sevilla Sun, 02 Oct 2011 00:00:00 +0300 OG7 Drupalcon London <p>The sound quality in the first minute is poor, but it gets better...</p> <p><a href="http://www.gizra.com/content/og7-drupalcon-london//">Continue reading…</a></p> http://www.gizra.com/content/og7-drupalcon-london/ http://www.gizra.com/content/og7-drupalcon-london Sun, 18 Sep 2011 00:00:00 +0300 User modal <p>The <a href="http://drupal.org/project/user_modal">user modal</a> is an interesting module we’ve been working lately in gizra for <a href="http://medico.com">Medico.com</a>, and I’d like to share our experience.</p> <p><img src="http://drupal.org/files/images/user-modal.jpg" alt="User modal example from Medico.com" title="User modal example from Medico.com" width="560" height="382"> From the README:</p> <blockquote> User modal module allows opening the Register/ Login/ Reset password menu items as tabs. Since the tabs are shown via JS and not AJAX, this may lead to a better user experience, as there is no time waiting for the selected tab to load. Furthermore, the user modal form can be used by other implementing modules, and for example allow a user to submit a node and register in the same time. </blockquote> <p><a href="http://www.gizra.com/content/user-modal//">Continue reading…</a></p> http://www.gizra.com/content/user-modal/ http://www.gizra.com/content/user-modal Mon, 27 Jun 2011 00:00:00 +0300 OG 7.x-1.1-RC2 is out! <p>The 2nd release candidate of OG7 is out, and it&#39;s probably a good time to tell the (Drupal) planet about what&#39;s new and about the things that I learned since the first official release (See OG&#39;s <a href="http://drupal.org/project/og">home page</a> to get the latest release candidate link).</p> <p>Here are some things, mostly related to Drupal, I&#39;ve learned since Og-7.x-1.0</p> <h2>Data migration</h2> <p>OG6 and OG7 have different tables and different data. OG7 has its tables, its fields and its related entities (group and group membership -- I&#39;ll soon go over those). At first I tried migrating it via hook<em>update</em>N(). I still feel the burns! &quot;Your hook<em>update</em>N() shouldn&#39;t assume anything about the state of a module or it&#39;s API&quot;, said fago, and I listened. Just like CCK has content-migrate module, OG7 has og-migrate. Whenever a module needs to migrate data, they can set a variable to TRUE, implement og-migrate plugins (a la CTools), and the job is done. This means design decisions (and oh boy I had a few) can be rectified without many struggles.</p> <h2>Fields and entities</h2> <p>OG7 has two important fields and an entity that acts as a meta-data related to that field. og-group field, which is a Boolean field that marks if a node is a group, when is set to TRUE creates a group entity that holds the group ID, entity ID, creation data, group label etc&#39;. So far so good, no problems here.</p> <p>The second field is group-audience that holds the the information about the relation a piece of content has with a group (i.e. membership). As of 7.x-1.1 whenever a user selects groups in this field, a group membership entity is created that holds the group ID, entity ID, membership state (i.e. active, pending, blocked) etc&#39;. The group membership idea is awesome (thanks donquixote). The problem is actually the field. If we delete a group there is no field API bulk update, that will remove the deleted group from the member&#39;s field. So, the group membership entities have the most up-to-date data, and the fields might not have. After 7.x-1.1 is out I intend to still use the field for it&#39;s widget and formatter, but not as storage. I mean, after a user will select the groups in group-audience field, OG will create the group membership entities, but the fields its will not be written to the DB. I think it&#39;s interesting that also other modules (Field-collection, Relation) decide to use a field but not for it&#39;s storage which is probably the main purpose, but for it&#39;s generic interaction with the entities&#39; form.</p> <h2>(Thinking of) module renaming</h2> <p>Don&#39;t do it. Seriously, I&#39;m now stuck with some hybrid of og / group in places I prefer not to change. It&#39;s not horrible, but if your the Anal type it bothers a bit.</p> <p><a href="http://www.gizra.com/content/og-7x-11-rc2-out//">Continue reading…</a></p> http://www.gizra.com/content/og-7x-11-rc2-out/ http://www.gizra.com/content/og-7-x-1-1-rc2-is-out Wed, 18 May 2011 00:00:00 +0300 CTools context tutorial <p>Why should you use panels node-preview-example module? You shouldn&#39;t, it&#39;s just an example ;)</p> <p>This post covers how to build a CTools content-type plugin that has context. CTools &quot;Context&quot; should not be mistaken with the context module. Context is CTools way of saying, my plugin (read, block) shouldn&#39;t be dumb. If it requires a node or a user to extract data from, then it should let others know about it. &quot;Others&quot; in our case is Page manager module. It will load the context for the plugins and hand it over. In fact, if the context is not present it will not even bother loading the plugin.</p> <p>I have created an example module called node-preview-example, that you can simply download and enable, create an Article page, and see how Panels is now showing the body field on the left and on the right a (silly) &quot;Summary&quot; of the node -- this is our plugin.</p> <p><a href="http://www.gizra.com/content/ctools-context-tutorial//">Continue reading…</a></p> http://www.gizra.com/content/ctools-context-tutorial/ http://www.gizra.com/content/ctools-context-tutorial Wed, 11 May 2011 00:00:00 +0300 Data Migration - part 2 <p>This is the 2nd part of the tutorial. You can see the 1st part <a href="/content/data-migration-part-1">here</a>.</p> <p>Now that we have imported the users using the basic tools of migration module. We will learn to import references (nid or uid) and files.</p> <p>Install the <a href ="http://drupal.org/project/migrate_extras" >migrate extras</a> module . Migrate extra module enables import of file field.</p> <p>The following example demonstrate how to import the old cars table.</p> <p><a href="http://www.gizra.com/content/data-migration-part-2//">Continue reading…</a></p> http://www.gizra.com/content/data-migration-part-2/ http://www.gizra.com/content/data-migration-part-2 Mon, 24 Jan 2011 00:00:00 +0200 Data Migration - part 1 <p>Moving an old site to Drupal?</p> <p>The following article will discuss the right way to do this using the module <a href ="http://drupal.org/project/migrate"> Migrate (version2)</a>. Migrate V2 uses <a href ="http://drupal.org/project/drush">Drush</a> (Drupal Shell) to execute the migration functions, if your are not familiar with Drush I suggest looking into this very powerful tool.</p> <p>Here is a list of the main challenges I have faced during the process :</p> <ol> <li> Mapping old information to the new structure.</li> <li> Mapping the old values to match the new fields.</li> <li> Moving the references between the old objects into Drupal.</li> </ol> <p><a href="http://www.gizra.com/content/data-migration-part-1//">Continue reading…</a></p> http://www.gizra.com/content/data-migration-part-1/ http://www.gizra.com/content/data-migration-part-1 Thu, 06 Jan 2011 00:00:00 +0200 Drupalcamp Athens <p>I&#39;m back from <a href="http://drupalcamp.gr/">Drupalcamp Athens</a>. When I met Nektarios Sylligardakis and George Papadongonas in Copenhagen they told me Greece was a Joomla country and Drupal wasn&#39;t well known, so my expectations were not very high. That&#39;s why I was so surprised. Not only did I find a large and warm community, but I found myself waiting for the presentations to start so I could learn new things.</p> <p>Since my Greek sucks, and since they understood that their presentations can have an appeal world-wide, most of the people gave the presentations in English. Varnish, Cloud computing, Security issues, Crazy clients with crazy demands and even crazier implementations were some of the topics. Not all movies have been uploaded yet, but <a href="http://vimeo.com/user426096/videos/sort:date">here</a> are at least some of them. It&#39;s worth watching.</p> <p>Although my stay was very short I still had the chance to see the Acropolis a la <a href="http://acquia.com/blog/drupal-greece">Robert Douglass</a> style. This means storming out of the hotel - because my presentation starts in less than two hours - jumping inside a taxi, checking out every spot really quickly, taking a photo or two, back in the taxi, and we&#39;re back. It was much fun!</p> <p><a href="http://www.gizra.com/content/drupalcamp-athens//">Continue reading…</a></p> http://www.gizra.com/content/drupalcamp-athens/ http://www.gizra.com/content/drupalcamp-athens Sun, 26 Dec 2010 00:00:00 +0200 A moment of Zen #1 <p>Organic groups for Drupal 7 has an alpha release. Sure there are bugs, but I try not to let it ruin the warm and fuzzy feeling of seeing all the tests pass.</p> <p><a href="http://www.gizra.com/content/moment-zen-1//">Continue reading…</a></p> http://www.gizra.com/content/moment-zen-1/ http://www.gizra.com/content/a-moment-of-zen-1 Sun, 26 Dec 2010 00:00:00 +0200 Rounded corners <p><strong>[Edit: I have found a better solution that allows using CSS3 on IE as-well -- <a href="http://css3pie.com/">CSS3PIE</a>]</strong></p> <p>CSS is annoying and I&#39;d like to deal with it as little as possible. For that I&#39;m using 960 grid design, I&#39;ve started looking into LESS, and the latest is a rewrite I did to the <a href="http://drupal.org/project/rounded_corners">Rounded corners</a> module.</p> <p>Rounded corners is no longer a &quot;dumb&quot; wrapper for the jQuery plugin, but rather an API that lets you do what you want with as little code possible.</p> <p><a href="http://www.gizra.com/content/rounded-corners//">Continue reading…</a></p> http://www.gizra.com/content/rounded-corners/ http://www.gizra.com/content/rounded-corners Wed, 20 Oct 2010 00:00:00 +0200 Message example = Github news feed <p>It&#39;s time for some P.R. (Public relations) on the <a href="http://drupal.org/project/message">Message</a> module, and the best way is a Message example module that loosely imitates Github&#39;s news feed feature.</p> <p>I won&#39;t get into too much explanation here, just look at the screenshots, or try it yourself - since everything in Message is exportable, you don&#39;t need to do anything to make it work! (Apart of generating nodes and &quot;making friends&quot; by flagging other users).</p> <p><a href="http://www.gizra.com/content/message-example-github-news-feed//">Continue reading…</a></p> http://www.gizra.com/content/message-example-github-news-feed/ http://www.gizra.com/content/message-example-github-news-feed Wed, 29 Sep 2010 00:00:00 +0200 OG7 session in Drupalcon Copenhagen <p>Finally, we&#39;ve been able to collect all the movies and edit them together. Unfortunately the quality isn&#39;t great in the first few minutes, but it&#39;s getting better and I hope you&#39;ll enjoy watching it.</p> <p>Thanks to our &quot;camera guys&quot; - <a href="http://twitter.com/davidm_en">David Mollière</a> and <a href="http://drupal.org/user/401243">Peter Stumpf</a> (that as it turns out, is really working for the UN and uses OG for that!)</p> <p><a href="http://www.gizra.com/content/og7-session-drupalcon-copenhagen//">Continue reading…</a></p> http://www.gizra.com/content/og7-session-drupalcon-copenhagen/ http://www.gizra.com/content/og7-session-in-drupalcon-copenhagen Tue, 07 Sep 2010 00:00:00 +0300 Let sleeping dogs lie <p>Here&#39;s the story in one (code) line:</p> <div class="highlight"><pre><code class="text language-text" data-lang="text">find ./ -name *.* -type f -exec s -i &quot;s/group/og/g&quot; &#39;{}&#39; \; </code></pre></div> <p>For the humans amongst us, I&#39;ll explain. As part of the rewrite of Organic groups to Drupal 7, I thought that the name also deserves a rename -- to follow Drupal&#39;s naming standards. Since there weren&#39;t enough votes in the <a href="http://groups.drupal.org/node/75988/">poll</a> in g.d.o I&#39;ve decided _not to go with the change. OG module will keep its name - although in the UI we will use &quot;Group&quot; (the same way as node is refereed to as content).</p> <p><a href="http://www.gizra.com/content/let-sleeping-dogs-lie//">Continue reading…</a></p> http://www.gizra.com/content/let-sleeping-dogs-lie/ http://www.gizra.com/content/let-sleeping-dogs-lie Sat, 03 Jul 2010 00:00:00 +0300 Views and Panels Ajaxified <p>If you haven&#39;t read Roger Lopez <a href="http://zroger.com/node/30">Ajax without Javascript</a> take a 5 minutes break and do it. If you are not a developer and all this code makes you frightened then you are excused. This post will also have a little code, but take a big breath and you&#39;ll see how easy it is to Ajaxify your Panels!</p> <ol> <li>Download this <a href="https://drive.google.com/file/d/0B943t2AqZZxCNEFzcHhpRGFUWGM/edit?usp=sharing">feature</a> and the related modules <code>drush dl ctools panels views && drush en page_manager panels views_content views_ui story_list php -y</code></li> <li>Add a few story nodes (title and body), or use Devel generate module to do it for you</li> <li>Navigate to <code>/story-list</code> and you should see a list of the last 10 stories on the left and the body of the first story on the right</li> <li>Click on any of the titles and notice how the body text changes, without any page load. Hooray!</li> </ol> <p><a href="http://www.gizra.com/content/views-and-panels-ajaxified//">Continue reading…</a></p> http://www.gizra.com/content/views-and-panels-ajaxified/ http://www.gizra.com/content/views-and-panels-ajaxified Wed, 30 Jun 2010 00:00:00 +0300 Message module and CTools $plugin <p>If I may quote myself: <blockquote>I&#39;m thinking, _which is easier than actually sitting down and writing a patch, that it would be neat if CTools exportables plugin had a uniform UI that modules such as Context, Message and others to come, could use. </blockquote></p> <p>We&#39;re in a scratch your own itch world aren&#39;t we, huh? So I&#39;ve created a CTools repository in github, created a branch called export-ui and it resulted with this <del>getting-close-to-commit</del> committed <a href="http://drupal.org/node/787644">patch</a>.</p> <p>When I started writing <a href="http://drupal.org/project/message">Message</a> I had some understanding of how CTools exportables work but having merlinofchaos review my work, explain some of his thoughts and providing his golden code, really changed the way I look at writing generic and reusable code. In fact, I&#39;ve decided to overhaul much of the Message module for it to be more inline with CTools&#39; standards.</p> <p>Message was a inspired by Context module. Context uses some object oriented, so I&#39;ve copied that too. That&#39;s where I got it wrong - because my use case was a bit different. OOP is powerful _when it&#39;s needed but sometimes it might be an overkiller. Ok, so no OOP, but I still needed a pluggable system. CTools has the $plugin concept. Its almost the same as having an info hook, only it&#39;s without a hook - you place it directly on an <code>inc</code> file that CTools will include for you when its needed. But the &quot;trick&quot; that I&#39;ve learned - and there shouldn&#39;t be any drum rolls cause it might be obvious - is to use a &quot;process&quot; function that populates the $plugin with defaults. The defaults can be for example the callbacks that will be used, the Views handlers that will be automatically declared, the text strings, the allowed operations, etc&#39;. Basically, when you use the $plugin, you should be thinking how an extending module can alter the module&#39;s behavior by simple changes.</p> <p><a href="http://www.gizra.com/content/message-module-and-ctools-plugin//">Continue reading…</a></p> http://www.gizra.com/content/message-module-and-ctools-plugin/ http://www.gizra.com/content/message-module-and-ctools-plugin Thu, 10 Jun 2010 00:00:00 +0300 Code sample for DrutNet API - connect, load node, save node and upload file <p>In the previous <a href="/content/drutnet-drupal-net-api">post</a> I&#39;ve introduced DrutNet API with an already compiled example, today I will show some code examples. Since last post I&#39;ve added a new method that allow file upload with Services, using the base-64 conversion, I will show you how this method works.</p> <p><a href="http://www.gizra.com/content/code-sample-drutnet//">Continue reading…</a></p> http://www.gizra.com/content/code-sample-drutnet/ http://www.gizra.com/content/code-sample-for-drutnet-api-connect-load-node-save-node-and-upload-file Mon, 17 May 2010 00:00:00 +0300 Group (the new OG) intro <p>In the past few month, since Drupalcon Paris, I was busy upgrading Organic groups (a.k.a OG) to Drupal7. I&#39;d like to give a quick overview of what has been done, what needs to be done, and the changes that came with the upgrade.</p> <p>The first noticeable thing is that like Ubecart became Commerce, Organic groups has changed its name to <a href="http://drupal.org/project/group">Group</a>. The second thing you will notice, is that Group is a complete rewrite of OG! Why was it done? OG is a great module, and it has been around for a long time. Long enough to be very popular and feature rich, but on the same time, concepts and implementations that were right in earlier Drupal versions became outdated. Using Drupal 7 new features - especially field API - were too hard to resist.</p> <p>Here are the Group&#39;s main concepts, by importance: <ol> <li>Allow associating entities (e.g. node, users, etc&#39;.) to other entities - In plain English it means that you can have posts related to a group. Not more, not less</li> <li>Introduce the concept of roles and permissions, on the group level</li> <li>Provide integration with superior modules such as Views. We don&#39;t need to invent the wheel - just need to know how to hook into an existing one</li> </ol></p> <p>Writing those concepts down made it easier to determine what should be in the core of Group and what should be a contrib module. The UI was separated to another module as-well, leaving us with a Group API module, that has as little assumptions as possible about how it will be used.</p> <p><a href="http://www.gizra.com/content/group-intro//">Continue reading…</a></p> http://www.gizra.com/content/group-intro/ http://www.gizra.com/content/group-the-new-og-intro Sun, 09 May 2010 00:00:00 +0300 DrutNet - Drupal .NET API <p>DrutNet is a .NET API to create client applications that connects to a Drupal site, and allow file upload, node save/load, view get and more.</p> <p><strong>Introduction</strong> I&#39;ve created this simple API to connect Drupal with .NET applications easily and quickly, this API was based on an API that I wrote for one of our projects, for this project we had to create a few client application to upload files, connect to desktop application and update the content. I used two different interfaces to cover all my needs, cURL - to upload files; and Services module - to create/ update nodes.</p> <p><strong>Features Snapshot</strong> DrutNet API has a <code>Services</code> class: <ul> <li>Services.Login - Login to Drupal</li> <li>Services.NodeGet - Load a node</li> <li>Services.UserGet - Load a user</li> <li>Services.NodeSave - Save a node</li> </ul></p> <p><a href="http://www.gizra.com/content/drutnet-drupal-net-api//">Continue reading…</a></p> http://www.gizra.com/content/drutnet-drupal-net-api/ http://www.gizra.com/content/drutnet-drupal-net-api Thu, 29 Apr 2010 00:00:00 +0300 Zen-960 <p><strong>UPDATE: Since writing this post ninesixty theme has advanced. I am now using it as my base theme, and create a subtheme. I no longer use Zen.</strong></p> <p><a href="http://drupal.org/project/zen">Zen</a> is my first favorite base theme. <a href="http://drupal.org/project/ninesixty">Ninesixty</a> is the other. The following post will show how we can enjoy both of them - How we can have a &quot;<a href="http://drupal.org/project/zen_ninesixty">Zen-960</a>&quot; theme _done correctly.</p> <p>As always, lets first understand _why we want to combine those two themes. JohnAlibn&#39;s Zen is a great starter theme - if you need a list of features, just head to the project page, you won&#39;t be disappointed. dvessel&#39;s Ninesixty takes the power of grid 960 -that we really love as it allows us to spend less time banging our heads on CSS - and adapts it to Drupal.</p> <p>The way that I look at it - Zen should be doing the job of defining the page _elements (how fonts will look, lists, tabs, etc&#39;) and defining their RTL equivalent. Ninesixty on the other hand should be doing the job of defining the page _layout.</p> <p>So what is the problem? Well, according to Drupal I&#39;m too griddy! I want my theme to have two base themes - and that&#39;s currently not possible. Ok, so why not just download zen_ninesixty theme (a.k.a Zen-960) and go on with my life?</p> <p><a href="http://www.gizra.com/content/zen-960//">Continue reading…</a></p> http://www.gizra.com/content/zen-960/ http://www.gizra.com/content/zen-960 Mon, 26 Apr 2010 00:00:00 +0300 Message module intro <p>Here&#39;s a quick overview of the <a href="http://drupal.org/project/message">Message</a> module.</p> <p>For those that find my accent hard to understand, or simply for those that prefer reading - I&#39;ve published the <a href="http://docs.google.com/View?id=dcp3t3ms_194wdbgsmfc">movie script</a>.</p> <p><a href="http://www.gizra.com/content/message-module-intro//">Continue reading…</a></p> http://www.gizra.com/content/message-module-intro/ http://www.gizra.com/content/message-module-intro Thu, 22 Apr 2010 00:00:00 +0300 Dynamic landing pages <p>The following post will cover how to create dynamic landing pages. First lets define our mission:</p> <p>Allow easily creating landing pages, with different content. The layout should be a header and footer which are always the same, and the main-content should be three columns layout, with dynamic content.</p> <p><a href="http://www.gizra.com/content/dynamic-landing-pages//">Continue reading…</a></p> http://www.gizra.com/content/dynamic-landing-pages/ http://www.gizra.com/content/dynamic-landing-pages Wed, 14 Apr 2010 00:00:00 +0300 CTools, Context and Message <p>When I decided I&#39;ll use CTools for the <a href="http://drupal.org/project/message">Message</a> module, I knew it will save me some time. I mean, everybody knows the &quot;let&#39;s re-use the same API&quot; concept. I started copying from Context module the parts that I needed, and added my own logic.</p> <p>Today, I&#39;ve decided it is time to add a message UI module. It took me about twenty minutes which ended with the commit message: &quot;Added message UI - A shameless copy/ paste from Context module.&quot;</p> <p>It was much faster than what I thought it would be. So, it&#39;s not just about using the same API, it is about using the API the _same way as others. And if &quot;others&quot; are yhahn and jmiccolis then I can sleep better at night (or at least when the baby doesn&#39;t cry).</p> <p><a href="http://www.gizra.com/content/ctools-context-and-message//">Continue reading…</a></p> http://www.gizra.com/content/ctools-context-and-message/ http://www.gizra.com/content/ctools-context-and-message Mon, 05 Apr 2010 00:00:00 +0300 Thinking 960 <p>If you are not familiar with the concept of <a href="http://960.gs/">960 grid system</a> you should be. In one sentence, 960 is a CSS framework that divides a page to 12 or 16 columns with a total of 960 pixels.</p> <p>960 is a framework. As so, it doesn&#39;t only give us tools, it also encourages us to use them the _right way. I think it&#39;s a bit like forms API in Drupal that helps us build our forms correctly. In 960 you have CSS classes that can be used to set elements width and position.</p> <p><a href="http://www.gizra.com/content/thinking-grid-960//">Continue reading…</a></p> http://www.gizra.com/content/thinking-grid-960/ http://www.gizra.com/content/thinking-960 Thu, 21 Jan 2010 00:00:00 +0200 User points - Rules style <p><a href="http://www.nicklewis.org/40-essential-drupal-6-modules">Nick Lewis</a> wrote about his 40+ essential modules, and I really missed two modules there - Rules and Flag. I commented that <blockquote> My top 5 are: Views, CCK, Flag, Rules, Panels. I think that the Flag &amp; Rules combo is less known in the community, but there are so many use cases they can cover. Because they are a bit abstracted it&#39;s hard for newbies to realize their potential. </blockquote></p> <p>I think there&#39;s no better way to show my point, than a tutorial. Lazy people can even download the feature from <a href="http://www.gizra.com/sites/default/files/user_points_rules.tar_.gz">here</a>. This tutorial will be about having &quot;User points&quot; functionality without using the user points module. I&#39;m not saying that module is bad, but sometimes I need multiple user points per user. Also, re-using existing modules always feels me with great joy. GREAT joy! Also, thinking about Drupal 7 with fields API, suddenly _user points can become _any-fieldable-entity points... The tutorial will cover the &quot;Rule sets&quot; concept in Rules module, which is also considered by many as a great mystery. Let&#39;s define our mission:</p> <p><a href="http://www.gizra.com/content/user-points-rules-style//">Continue reading…</a></p> http://www.gizra.com/content/user-points-rules-style/ http://www.gizra.com/content/user-points-rules-style Thu, 14 Jan 2010 00:00:00 +0200 Organic groups 7! <p>You might have already heard, that <a href="http://cyrve.com/maintainership">Moshe Weitzman</a> has handed over Organic groups to me. It&#39;s fun and scary at the same time.</p> <p>It&#39;s is now time for some community &quot;tough love&quot; - OG7 needs reviews. Before people start diving into the code, you should realize that OG has changed and its concept has been polished and can be summarized into one line: <blockquote> OG brings roles and permissions to the _group level. </blockquote></p> <p><a href="http://www.gizra.com/content/organic-groups-7//">Continue reading…</a></p> http://www.gizra.com/content/organic-groups-7/ http://www.gizra.com/content/organic-groups-7 Sun, 03 Jan 2010 00:00:00 +0200 Using git to write patches <p>Drupal is using CVS for version controlling core and contrib modules. CVS has diffing options, but it becomes annoying when you try adding or deleting new files. Here&#39;s an example of how to use git to patch a contrib module - Organic groups.</p> <p><a href="http://www.gizra.com/content/using-git-write-patches//">Continue reading…</a></p> http://www.gizra.com/content/using-git-write-patches/ http://www.gizra.com/content/using-git-to-write-patches Sun, 27 Dec 2009 00:00:00 +0200 Outsourcing and Kittens <p>Few years back there was a real hype about outsourcing development projects. I was working and living in New-Delhi, India at that time, and you could almost see the buzz of &quot;outsourcing&quot; in the air - people were so excited.</p> <p>The hype, like all hypes, has ended. People realized that paying low prices might cost more if things didn&#39;t turn out as they expected them to. Don&#39;t get me wrong, there are lots of talented people, but there were just as much unprofessional ones.</p> <p>The idea of outsourcing is still good and valid - you move your projects into places where it will cost you less - as simple as that. Everybody wins.</p> <p>So how will you know if the people you are communicating over via email (cause you can&#39;t understand their accent when you talk in Skype) are the right people for you? The price is ok , maybe a little high than what you imagined but the timetable they show you sounds realistic more or less - but can they deliver?</p> <p>To know almost for sure send the following email: <blockquote> Hi,</p> <p>Can you please hook<em>update</em>6000() my site. I&#39;ll need some basic fago to go with the user registration, and later allow quicksketching nodes. Oh, and we really want to have some chaos going all over the site, and can you take out that function Crell _really hates?</p> <p>btw, Do you think kittens will die in the process? </blockquote></p> <p>Don&#39;t hire them if they answer: <blockquote> WTF? </blockquote></p> <p>Hire them if they answer: <blockquote> Howdy,</p> <p>So you want to upgrade your site to Drupal 6, add content profile module to the user registration, allow users to flag nodes, and add some CTools love to it? Meh, no kittens should die.</p> <p>p.s. About Crell - don&#39;t worry, we know better than to use arg(). </blockquote></p> <p>Ok. I&#39;m not 100% serious about sending such an email - my point is this - If they are involved in the community, know the people and speak the lingo, they are probably aware of which modules are good and have a future; they probably know the best practices for deployment; they probably know how to write _secure code. So even if they charge more than another company, but that company answered &quot;WTF&quot;? - go with the more expensive company, as in the end it will cost you less.</p> <p><a href="http://www.gizra.com/content/outsourcing-kittens//">Continue reading…</a></p> http://www.gizra.com/content/outsourcing-kittens/ http://www.gizra.com/content/outsourcing-and-kittens Mon, 14 Dec 2009 00:00:00 +0200 Does every page really need to be a node? <p>No. Let&#39;s take the &quot;usual&quot; home page as an example:</p> <ul> <li>It doesn't need to have an author</li> <li>It doesn't have comments</li> <li>It rarely changes (Maybe it has Views in it that change the content that is shown, but the layout and static text don't change)</li> </ul> <p>So we can use <a href="http://drupal.org/project/panels">Panels</a> for that. It also makes deployment easier:</p> <p><a href="http://www.gizra.com/content/does-every-page-really-need-be-node//">Continue reading…</a></p> http://www.gizra.com/content/does-every-page-really-need-be-node/ http://www.gizra.com/content/does-every-page-really-need-to-be-a-node Mon, 07 Dec 2009 00:00:00 +0200 hook_widget_settings_alter() and Pandora <p>As <a href="http://drupal.org/user/39593">markus<em>petrux</a> wrote: <blockquote> It seems that the new addition to CCK, the new hook</em>widget<em>settings</em>alter() opened Pandora&#39;s box. </blockquote></p> <p>There are quite a few modules that attach their own logic to CCK fields. Up until now those modules had to have their own DB or set their own variables.</p> <p>In CCK 2.5, <code>hook_widget_settings_alter()</code> got in, which allows your module to hook into the field settings, and rely on CCK to save and load those settings when needed.</p> <p>But that&#39;s not all - as the settings are becoming part of the CCK field defention it means that when you&#39;ll export the CCK to code - your module settings will be there. Your module now actually has import/ export functionality without you even having to bother about.</p> <p><a href="http://www.gizra.com/content/hookwidgetsettingsalter-and-pandora//">Continue reading…</a></p> http://www.gizra.com/content/hookwidgetsettingsalter-and-pandora/ http://www.gizra.com/content/hook_widget_settings_alter-and-pandora Thu, 19 Nov 2009 00:00:00 +0200