Archive for the ‘Drupal’ Category
-
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.
-
Install cck types, taxonomy, content and roles through multiple AJAX calls
Sunday, September 28th, 2008
Deploying from a development to a review, staging and live server can be a real pain in the ass with drupal. You can write custom code in your modules and deploy the changes with CVS or SVN in the way you are used to. But what about the stuff you built through clicking and in drupal, you can click untill you drop. Suppose you have installed four cck types, a couple of taxonomy vocabularies and terms, a few roles and you made dummy content to ease your work during development. Is there a way to deploy these things?
-
Ahah forms in drupal 6
Saturday, September 27th, 2008
Writing ahah forms in drupal 6 is very easy. I used it in a project where a custom slide node form had to be updated by ajax, depending on the selected slide_template. The slide_template object is built into the node object as composite. This way I can approach the form as $node->template->has_new_tag() , and this [...]
-
How to save a node with multiple taxonomy terms
Sunday, September 21st, 2008
I did some quick research on how to save taxonomy attached to your node. In my case I needed it in a page where I create 3 dummy nodes. This post explains how you can approach attaching several taxonomy terms (from different vocabulary) while calling node_save. You could avoid using this function and work with the taxonomy instead, but I prefer the node way.
-
Enforce themes to content-types in Drupal
Wednesday, September 10th, 2008
Yesterday, for my project at ONE-agency, I was seeking for a module that could change theme settings beyond default implementation. When installing Drupal, which is drupal6 in my case, you can add your own theme. After adding, it is available in the administration themes list so you can set it as default (admin/build/themes). Because drupal [...]