Node Profile 5.x 1.1 released!

Submitted by fago on Mon, 04/30/2007 - 13:46
Thanks to the great subform element API module, which I wrote originally for pageroute, it was quite easy to implement some great new features for the node profile module, which make building simple node profiles a lot easier. So node profile 1.1 features
  • configurable user edit categories integration - edit a simple nodeprofile like a core profile
  • configurable node profile display integration on the user's (my account) page or - if used - also on the usernode
  • configurable user registration integration
  • easy integration of a nodeprofile in any theme
You can find the settings to this new features in the also new per content type node profile settings - just edit your node profile content type and click on the new "Node Profile" tab.

Subform Element 1.2 released!

Submitted by fago on Sun, 04/08/2007 - 14:07
I'm happy to announce the Subform Element module 1.2. It's intended to make developers life easier. It allows you to reuse existing forms inside your own forms, e.g. just embed a fully working node form. The notable changes since the 1.0 release are some new form element properties, first of all the new data separation feature!

data separation

Without data separation the values of each form will be transmitted as usual in the $_POST array. So if both forms use a field with the same name, e.g. 'title' both will end up in $_POST['title'], so obviously the latter title will overwrite the first one. This was an issue if you tried to put two node forms into one using subform elements. Subform Element 1.2 has #data_separation turned on per default, which let's subform element prefix all the elements name of a subform. So the data ends up in e.g. $_POST[$subform_id]['title'], where $subform_id is the id of your subform. Then the data is separated and you can safely combine forms with overlapping element names. Have a look at this handbook page, it shows how easy it is now to merge two node forms into one.

subform customization

So now it's easy to reuse every form by using the subform element. What's missing is an easy way to customize the subform, without modifying the original form. For this subform element 1.2 comes with two new optional properties:
  • #subform_after_build: An optional array of after_build functions for the subform.
  • #extra_form: An optional array of further form elements that will be added to the subform.
So with an #after_build function for the subform you can easily alter the original subform, e.g. hide some buttons. The #extra_forms property allows you to add some further form elements to the subform.

pageroute 5.x 1.0 and the new subform element module

Submitted by fago on Thu, 03/29/2007 - 21:13
I'm happy to announce the pageroute 5.x 1.0 release. There were quite some changes since the first 5.x compatible release 0.9, so have a look at the release notes!. You might have noticed, that I've created a new project: Subform Element. It's an API module, so just install it if another module tells you to do so - or of course if you are a developer. In short it provides a new form element type, that can be used by other modules. This form element allows you to reuse existing forms inside your form! I had developed it for pageroute, so as an affect pageroute depends on this module now.

Pageroute Nodefamily

Furthermore I've started with another new module: Pageroute Nodefamily. It's still under development, but it provides already some useful functionality. Currently this module allows you to associate a pageroute with a content type. Then the associated pageroute will be used for editing nodes of this content type. So if this is useful for you, you can already use this module for that. In future this module will create node relations for all nodes created within the pageroute. This way it will build "nodefamilies", families of nodes. The node of the content type associated with the pageroute will be the head of the family, holding all nodes together. Once created, the nodefamily could be edited with the associated pageroute. That's the idea, hopefully I've the time to finish it soon...

site running with drupal 5.x, new look and new documentation!

Submitted by fago on Fri, 03/23/2007 - 22:22
Finally I've ported this site and so the nodeprofile demo to 5.x :) As you see I've also installed a new theme: Aberdeen - hopefully you like it, I do. That's not the only thing that is new, there is also new nodeprofile documentation! A lot of users had troubles using the nodeprofile modules, because they didn't know where to start and to use which module for what. So I wrote a tutorial, which should help new users getting familiar with the modules. The tutorial is part of the new handbook section about the nodeprofile modules - fortunately sime has started organizing the documentation. Don't forget to participate by sharing your usage tips!

pageroute for 5.x released!

Submitted by fago on Mon, 03/19/2007 - 14:48
I've just released the first 5.x compatible pageroute release! The 5.x version has been substantially improved! I've rewritten huge parts of the module for 5.x. Now it's powered by a new API that makes contributing own page types for developers a lot easier! There are also some new features since 4.7.x:
  • The node edit page type deals now better with node deletion. Deleting a node is now possible without loosing the route!
  • Page type documentation is now displayed at the administrative page add/edit pages too!
  • The whole documentation has been updated / rewritten!
  • Don't forget reading UPGRADE.txt if you are updating from 4.7.x!
  • There is a new page type included with pageroute: The 'user edit form' page type, which makes even integration with the core profile module possible! However this is still experimental so read its help text!
Then there are two important issues open, which show the future of pageroute:
  • Integrate with nodefamily, so that a pageroute can be used for creating and editing whole nodefamilies! issue
  • Integrate with the states module from workflow-ng, for tracking users' progress in a route.
I'll start working on the states module integration soon, however first I have to write the states module ;)

subforms: easy form reusing

Submitted by fago on Tue, 03/06/2007 - 23:56
drupal 5.x allows one to programmatically submit forms. So wouldn't it be neat to reuse whole forms? This is what the subform form-element allows you to do. So you can build forms that reuse existing forms while you extend them with further form items. Note that form reusing means not only reusing the visual representation, but also the validation and submit logic. First I've implemented this for pageroute, as pageroute reuses a lot of existing forms. As it's also useful for other modules, I've created an own project for it. I had already a prototype for 4.7, but it had some drawbacks. The actual code for 5.x is much better, it handles validation and submitting of subforms correctly, so the subform will only be submitted if the main-form has also no validation errors. How to use it? All one needs to do, is to create a form element of the #type 'subform'. It needs the form_id as parameter (#id) and optionally it takes also #arguments, which will be passed to the form function. Then unfortunately one has to define an additional submit handler (subform_element_submit), which cares for submitting the subforms (if the validation was fine). Of course this handler could also be called from an already existing submit handler. ok, let's show a short usage example.
<?php function subform_test_form($node, $page) {
 
//this will present a full working node edit form
 
$form['node'] = array(
   
'#type' =?>
'subform',
    '#id' =&gt; $node-&gt;type .'_node_form',
    '#arguments' =&gt; array($node),
  );
  //this sets the subform submit handler
  $form['#submit']['subform_element_submit'] = array();

  return $form;
}
?&gt;
So this will create a fully working node form for you! Note: Now there is an own subform element project and a documentation page in the handbook, which contains another example.

Next generation workflows: workflow-ng!

Submitted by fago on Mon, 03/05/2007 - 20:05
I'm happy to announce that I start working on the next generation workflow module, called workflow-ng. It's inspired by the existing workflow module, but if things go well it's going to be a lot more powerful. I can use the development as practical work for my study and I will also write my bachelor thesis about this - thanks to the Information & Software Engineering Group of the TU vienna. Furthermore it's great that this all is sponsored by the Austrian company Pro.Karriere! So, what's workflow-ng? Workflow-ng ist the next generation module package for building workflows with Drupal. It allows building configurable state machines, which can be supplied programmatically or through the admin interface. So workflow-ng will be a tool for module developers as well as for site admins. Workflow-ng doesn't work only for content nodes, it will be coded on top of a “drupal entity” - so it will start with support for nodes, comments and users. Furthermore it doesn't urge you to introduce new states for your entities,because it does interpret each saved entity as a new possible state. This allows one to reuse existing information, e.g. reuse the existing „published“ and „moderated“ fields of nodes. Also workflow-ng won't allow one building state-machines only. One will also be able to react on various “events” with configurable actions, which allows site-admins or modules to adapt any default behaviour. E.g. this suits very well for e-mail notifications. Send a thank you message to the author of a certain node type? Just configure the action and workflow-ng will do it for you. Read more about it in the concept I wrote, it's attached to this post.

port the nodeprofile modules to 5.x and nodefamilies

Submitted by fago on Sat, 01/20/2007 - 18:15
Drupal 5 has been already released, so it's time to port the nodeprofile modules to 5.x My current employer Pro.Karriere has now also employed jpetso, who helps me porting the modules to 5.x. So thanks to jpetso the usernode module has been already ported - just check out its 5.x development branch. So what's next?
  • port nodefamily to 5.x -ported
  • port nodeprofile to 5.x -ported
  • port views_fusion to 5.x -ported
  • port pageroute to 5.x -ported

New Module: Menu per Role

Submitted by fago on Sat, 01/06/2007 - 19:08
I've just created a new module: Menu per Role This module allows you to restrict access of menu items per roles. It depends on the drupal core menu.module - just activate both modules and edit a menu item as usual. There will be a new fieldset that allows you to restrict access by role. Unfortunately the module requires a simple patch for drupal's menu.inc. So finally creating menu items for only a special role is possible through the admin interface. :)

configurable Automatic Nodetitles and Fieldgroup integrated in CCK

Submitted by fago on Thu, 01/04/2007 - 21:55
Thanks to Bèr Kessels automatic node titles are now configurable. Advanced users can now use a php snippet to define a pattern for automatic node titles. I've also ported the module to 5.x - please test. Update: Jeff Robbins contributed an integration for the great token module to the 5.0 version - that allows to use various node data for the autogenerated title - e.g. use the text of a CCK field. :) There are also some great news from the CCK corner. The fieldgroup module has been integrated into the CCK core and so is now packaged with CCK :)