Drupal

How to enable a Close button in popups for Drupal 6

Hello folks

If you want to create popups for Drupal using the modules Popup and Popup filter to render elements like Nodes or Webforms, you will find a big problem: How to enable a close button?, because the documentation doesn't provide this information, below you can find a solution for it.


Here is an example to render a node using popup filter:

Check for Login Status in Javascript for Drupal

Hello folks.

By default in Drupal 6 you don't have the option to check the login status in JavaScript, if you need this functionality include in your template file i.e page.tpl.php the following code:
 

<?php
global $user;
echo '<script type="text/javascript">';
echo 'var logged_in = ' . ($user->uid)?'true':'false';
echo '</script>';
?>


Now you can use in your JavaScripts the variable logged_in to check user login status

Enjoy It

enzo

How to customize $content variable for Nodes in Drupal

Hello folks

If you have been coding for a while Drupal, you noticed it's hard trying to modify elements inside of a variable $content from template node.tpl.php. Well here's a solution.

Imagine you have a content type, and you want to sort the content type to present two cck fields above the title and before the body, just like the scheme represented below:

CCK Field # 1

CCK Field # 2

Node Title

Node Body
 

1. Hide the title

Problems with pager and ajax request for Drupal Module Dynamic display block

Hello folks

I found a problem with the pager of Dynamic display block module, because I was using a custom implementation of Dialog module and after any ajax call the pager was regenerated and appending to the current pager.

Please check the attached path to jquery.cycle.all.min.js


The change was the following:

OLD Version

AttachmentSize
jquery.cycle_.all_.min_.js_.txt26.3 KB

How to change the menu system path in Drupal

Hello folks

Today I had the task to change the response page for the Drupal system menu/path: user/login to a custom page, since this is not a visual menu, you can't use the Drupal Menu system to change or redirect URL .

So you must solve this request using code, below two examples how you can solve it:

Replace the response function:

Patch to enable Profile in Finder User module for Drupal 6

Hello folks

If you had the opportunity of using the great module Finder, you probably wonder why you can't find inside profile fields from Profile module.

Well I spent several hours understanding the Finder API  and finally I did a patch to support finding inside profile fields.

I requested to include this patch in the next stable version, you can find the thread at: http://drupal.org/node/965944

Enjoy it

enzo

AttachmentSize
finder_user_profile.patch4 KB

Drupal: How to render diferent RSS icons for each feed format

Hello folks.

If you have a view with several feed formats, like one for standard RSS and one for iTunes RSS, Drupal 6 by default will assign the same icons for both links, if you want to use custom icons for each one, you have the option to include a custom function like the function listed below.

Also you have a css class for each RSS link.

 

Custom version for MultiSite Search Module V2

Hello folks

This is the second version of Multi Site Search.

Drupal : How to enable FileField Image to Print images with Print Module HTML/PDF

Hello folks

Well if you use the module ImageField  + FileField to include images in your custom node content types and if you need to print your custom content type, you will notice that all images are rendered as files with links in HTML and PDF formats, off course you want to include images to get a close print representation of your node.

Drupal How to alter Views Query (SQL)

If you are a Drupal Developer using the Views module, is probable you want the option to rewrite the SQL query executed for this module.

Maybe because you think it's easier this way or maybe because you can't do complex stuff like grouping elements, or an argument taxonomy negation or something similar.

No matter the reason why you need to change the query, now you can do this using the module  Views modify query.

Pages

Subscribe to Drupal