Costa Rica

Patch to enable print City and Country in Debug Mode for GeoIP API

Hello folks.

I did a small patch to include the Country and City in Debug mode for module GeoIP API  with Drupal 6, the debug mode for this module is important in development process and useful if you don't access to computers in other countries.

You can follow the issue request to include in next release at: http://drupal.org/node/1006424

Merry Christmas

enzo

Views Exposed Filters With a Reset Button

Hi folks

Views module is maybe one of the most powerful module on drupal, and when we create exposed filters in order to help the end user find any result it is even better, however if the user wants to reset a search, either he needs to click back on the web browser or go to the url again.

How to make the VBO option "Modify node taxonomy terms" works

When you put content taxonomy fields and VBO modules working together this can be frustrating with the "Modify node taxonomy terms" option.

AttachmentSize
views_bulk_operations-674864.patch1.38 KB

How to store all queries executed in MySQL in a Table

Hello folks.

If you have the task of debugging a Function, Store Procedure or a Program, maybe you need to store all executed queries to run a certain debug. You can do this by configuring your MySQL to store all queries inside a mysql table.

1. Enable log.

execute "SET GLOBAL general_log = 'ON';"
    execute "SET GLOBAL log_output = 'TABLE';"

2. Find inside your queries.

All queries now are stored in database/schema `mysql` inside table `general_log`, if you need to find a specific query, just run a query as below:

How to debug a MySQL function

Hello folks

If you are a MySQL Coder with some buggy functions and you need to debug this script inside you DB, but you don't know how do this, check the following approach.

1. Create a log Table

create table log ( id int AUTO_INCREMENT, 
                   timestamp int default 0 , 
                   name varchar(64), 
                   value varchar(255), key(id));

2. Update your function to include the debugging code

New Releases for Taxonomy Accordion Module

Hello folks

I just released a new version (6.x.1.3) for Taxonomy Accordion module to fix the bug http://drupal.org/node/989724.

Also, I released a new version 6.x.2.1 to enable the active trail path to start with the proper container accordion open, in order to maintain a consistent user navigation experience.

Enjoy it

Regards,

enzo

How to delete a specific node cache via code in Drupal 6

Hello folks.

If you for some reason need to delete via code the cache of a specific node and revision, you can use the snippet code listed below.

The cache_content table has a cid key this key is formed by [content:node_id:node_revision_id] , so imagine  you have a Node id: 500 and Node Revision Id: 1583 , then to delete the cache for this specific node and revision, you must run this sql.

How to get all records from a Display View in Drupal 6 via Code

Hello folks.

If you for some strange reason need to get how many records a view has in total without pagination, and you have the option to do this with php code, check the snipet code listed below.

<?php
$view = views_get_view('my_demo_view');
$view->get_total_rows = true;
$view->set_display('default');
$view->execute();
print "Total Records in my demo view:" . $view->total_rows;
?>

Enjoy it

enzo

Patch to disable redirect to External URLs with GlobalRedirect Module

Hello folks

A customer requested to remove an apparently security issue, caused by Global Redirect in the way it handles the request to translate node/xx to the human URL inside Drupal.

Well this treatment generates a problem with requests like this http://www.domain.com/?q=http://domain2.com, redirecting the customer to http://domain.com website.

How to send HTML email with drupal_mail function in Drupal 6

Hello folks.

If you need to send html email with drupal_mail function in your module,  here is a sample to achieve this requirement.

1. Implement the hook_mail in YOURMODULE

Pages

Subscribe to Costa Rica