Drupal Dump

Drupal Snippets, Hacks and more....

495 posts since 2011

User terms mass change

User terms module is best module for user taxonomy terms you can have in drupal 6. Mostly it works as it should and there is no lack of functionality. However, if you want to bulk change user terms, you are out of luck, VBO doesnt work with it so you have to do this manually.

Imagecache external add-on

There is a good module imageache external that creates variants of images from external links, it's in sort of API mode as you have to code to use it. Also for purpose of FBSMP module I am using with it and better SEO, I changed how it works and made it possible to have image filename correspond to status which is third parametar in

Drupal Clean-URL's don't work

I just had a stupid problem, had a drupal installation in subfolder and there is much info how to solve this on the official clean-url page, but this problem isn't there. Sometimes when you copy files to windows and then copy it back to linux .htaccess will lose it's dot and then clean-urls and something else might not work but you won't notice it because you don't look for it.

Views Send - mailing logs

Views Send is a great module for mass sending of mails/messages, kind of like newsletter but you can use whole power of views and VBO module, which gives you great flexibility.

Modal Frame - close modalframe by clicking outside frame

Nice JS code to add to your theme when using modal frames is this one. Closes window when you click outside the frame.


    /* close the modal box when the user clicks outside its bounds */
    $('.ui-widget-overlay').live('click', function(e){
      Drupal.modalFrame.close();
    });

Filepath change when moving sites

I just run into problem of having a site under subdomain and moving it to live domain. Image paths in file table were all wrong, but there is simple fix for this.


UPDATE files SET filepath = REPLACE(filepath, 'old/path', 'new/path');

run this in phpmyadmin and chage paths completly, something like is what I used

Moving site, Server settings and 500 error

Recently I was envolved with moving a site from one server (VPS) to other. I had to make a VPS installation also and setup of the server. I used Debian 6 which usually comes with php 5.3. Sometimes some modules have problems with 5.3 version of PHP.

Authoring information and permissions

User 1 has all the privilegies. But for other you need to set them. If you want that user has ability to change who authored node you will need to give him "administer nodes" permission. Usually overlooked, this permission is unde node module permission set.