Drupal for Facebook - changing what is published to facebook Walls when users submit nodes

There is one and only one module you should use when using facebook integration with drupal its Drupal for Facebook(DFF). It has many features but its also a bit harder to setup and use. I won't get into details of this, but you MUST read readme files and all documentation to make it work, you will need to spend some hours learning it :-( but then again you will know it for future and your knowledge will be appliable to many drupal sites. Lets get to the point.

Files: 

Taxonomy node module - Term View problem

If you are using Taxonomy Node to have additiona data for your taxonomy you are in for supprise if you go to term page and see "There are currently no posts in this category." message. Other then this, module works fine. To solve this problem, use views and activate default taxonomy_term view and make some eddits.

Expanding Taxonomy Term data:Taxonomy Node or Term Fields?

So yo want to have additional data for your taxonomy term, maybe even a full blown node. There are 2 good solution

Views, passing argument from node taxonomy term

This code will be often used if you want to pass current node taxonomy term to view to list some other nodes, for example to have a list of similar nodes, nodes with same term. Choose taxonomy term:ID and write thise code down. We load current nodes data and get term ID from key of term.

$node=node_load(arg(1));
$argum=key($node->taxonomy);
return $argum;

Printing out Node Variables nicely

You often have to print out node variables to see what you need to do. There are few ways to do that, before i used Drupal Themer for doing this which is part of Devel module. But this is very slow module and it takes a lot of time to load so i am not using it anymore. You can either use dpm function from devel module to dump something to screen nicely or just using plain old

<pre><?php print_r ($node); ?></pre>.

Will get you printed node structure. So past that into your code, node.tpl.php or page.tpl.php.

User imports and Duplicat Emails

When you are importing user with Drupal, you probably do it with user import module, but you'll probably have a list of uses without any email or with duplicate emails, in this module its hardcoded that one email is used per person. However if you install shared emails module and do some hacking on current DEV version (2.x) you will be able to do that.  In modules "supported" folder there is user.inc and go to line 235, there is a code that says

Same Email, different Username - What module?

It is the shared email module, that is the answer. As drupal permits one email per user, for testing purpose or site building with many users who didn't give you email address, this is very useful module.

Fastest way to edit files, change CSS etc

Fastest way i found to make small changes on your site is to use FTP program like FileZilla. Then you just go to file you want to edit and click view/edit. File is downloaded locally and opened in your default (or the one you set in FileZilla) editor. Then you just change what is needed and after all is done just confim on FileZilla that you want to upload changes.

Lightbox2, hiding flash content

Having problem with Flash when using lightbox for overlay? Just add transparency to those flash embed codes and they will be in the dark.

<param name="wmode" value="transparent" />
<EMBED src="swf.swf" quality=best bgcolor=#FFFFFF wmode="transparent" WIDTH="550" ...

How to print Description under the each Imagefield

So you put description for your images but there are nowhere to be seen? You or your client wants to have descriptions of images under each one. Well you will have to do some theming, in fact you have to create content-field.tpl.php and put it in your theme directory. And the code should be like this

<?php if (!$field_empty) : ?>
<div class="field field-type-<?php print $field_type_css ?> field-<?php print $field_name_css ?>">
  <?php if ($label_display == 'above') : ?>