Archive for the ‘Drupal’ Category
-
Votingpoints contrib for User Points
Saturday, March 14th, 2009
User points is module that gives a user points when performing an action. This module has a couple of contributes that give the api the specific desired functionality.
I added a contribute for this module that makes it possible to assign user points when users vote, using the drupal voting api. -
Building a nice slideshow with Drupal views and jQuery
Thursday, January 22nd, 2009
For one of my projects at One-Agency, i had to build a slideshow with images of one of my content types.
I started to make my promotions content type with CCK and make it possible to upload an image and add extra information on the promo.
After that, i could start with the real work.I made a block-view with the settings to show only promotions that are published, and show the nodes in this view as a node. Once you have this set up, you can start to prepare you’re template file.
-
Expose database fields to views in a custom drupal module
Wednesday, October 22nd, 2008
Developers who wrote a custom node module in drupal will know that you always have to make a couple of choices at the start of a project. Will I write a custom node module or use CCK to generate a content module. Or when using views, you might ask yourself it is better to write your own view. Or could it be wiser to use it all and take the best of all things into your project. Once I have such questions, I hear a little voice in my head “Time to test and compare”.
-
Sortables in a custom node form
Tuesday, October 21st, 2008
Draggables and sortables are commonly used in the drupal core. Taxonomy, menu, cck, … . The items that are sortable always belong to ‘a parent’. If this parent is listed as sortable in another parent, then it is a cascading system with a maximum of levels. The typical tree listing together with draggable handle icons, will tell the users that they can drag. This belong to relation controls a parent with its children that all have a positional sortorder variable. In Drupal, these are called weights. I wondered if this could be quickly implemented in custom modules where you have this relation ship. Since this is everywhere in drupal, why not do the test now?
-
Hooking drupal s’ logout button with jquery
Tuesday, September 30th, 2008
In a project I am working on, I had to hook the login and logout of drupal, so that an extra action would be taken. More specific to my case: when logging in and/or out of a drupal, the same action should be taken for another session to a second server.
As drupal login and logout are buttons that are built in Drupal, It had to work around it. The most common solution would be to add an extra class attribute to the links that performed the logout. This class then could be triggered with Jquery to override the logout button to handle things differently. You could think of it as branching the logout task. In stead of going to a different page to perform logout, we call two pages with Jquery’s AJAX methods.