Submitted by enzo on Fri, 12/17/2010 - 15:08
When you put content taxonomy fields and VBO modules working together this can be frustrating with the "Modify node taxonomy terms" option.
Submitted by enzo on Tue, 12/14/2010 - 15:51
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:
Submitted by enzo on Tue, 12/14/2010 - 12:15
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
Submitted by enzo on Thu, 12/09/2010 - 19:53
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
Submitted by enzo on Thu, 12/09/2010 - 09:09
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.
Submitted by enzo on Wed, 12/08/2010 - 09:32
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
Submitted by enzo on Wed, 12/01/2010 - 14:29
Submitted by enzo on Wed, 12/01/2010 - 10:57
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
Submitted by enzo on Mon, 11/22/2010 - 17:03
Submitted by enzo on Mon, 11/22/2010 - 08:59
Hello folks
If you have content types with cck fields as node reference and if you use the print module, you notice you get a link to the node reference, but a link in a print document is not useful.
So below there is a solution to overwrite the default nodereference theme function to render the nodereference fields as a teaser inside the print format.
Pages