Blog

Posted by: 
Dominique De Cooman

I just discovered a very handy api to import taxonomy.
I needed to do something very simple import some terms into a vocabulary (no hierarchy, no related terms, just tags..).
It is included with the taxonomy csv module in the file taxonomy_csv.api.inc

Posted by: 
Dominique De Cooman

I was trying to post to a webservice and was getting the 60 error code: Peer certificate cannot be authenticated with known CA certificates. .
The webservice I was trying to reach was over https.
The solution is very simple.
You need to set curl not to verify the ssl peer. You can do this by setting an option.

curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);

Posted by: 
Dominique De Cooman

The whole thing did not work without this line.

ftp_pasv($conn_id, true);

Apparently with some ftp accounts you need to transfer in passive mode. As usual not documented by the client.

Posted by: 
Dominique De Cooman

My problem was I didnt want php code in my views footer. But I still needed to check if a module existed to call a function of that module.
Here is the hook_views_pre_render, what happens in the function is :
- checking for the correct view and adding content to the footer
- setting the filter format which is the full html id
- setting the empty option

Posted by: 
Dominique De Cooman

When installing a xampp on mac os Mysql could throw an error #1153 - Got a packet bigger than 'max_allowed_packet' bytes
Solution : Extend the max_allowed_packet size located in Application/Xampp/xamppfiles/etc/my.cnf

On windows systems the file is called my.ini
On linux systems it is also my.cnf

Posted by: 
Dominique De Cooman

Clients often ask for clean urls in file names because they want to publish them in magazines so they want urls as clean as possible. H

Here is how to do this using mod_rewrite rules in htaccess:

In your .htaccess file of your drupal root folder you add following line.
For example :

Posted by: 
Dominique De Cooman

This post provides a little bit of documentation about the feedapi.
There is no setting to choose how long your feed items are cached. The default cache time is 3600 sec. Which mean when you re testing the feedapi your feed isnt updated immediatly.

Posted by: 
Dominique De Cooman

Used to resize images, scale and crop images. Use it allot.
Install the image cache module. Create a preset and call it with this function.

<?php
example $image 
theme('imagecache''nieuws_teaser'$node->field_image[0]['filepath'], $node->field_image[0]['data']['alt'], $node->field_image[0]['data']['title'], array('description' => $node->field_image[0]['data']['description']));
?>

Posted by: 
Dominique De Cooman

Corresponding node references is a module I contributed to drupal.

What does it do:
It syncs the node reference between two node types which have a nodereference to each other, so double editing nodes is no more needed. If one node has a reference the other node receives also a reference to the saved node if it is referenced in that node.

Posted by: 
Dominique De Cooman

The vocabulary edit form hardcodes the value of the 'hierarchy' flag to '0', therefore resetting it when the form is submitted and the vocabulary saved. (from drupal.org)
You also need to resave your vocabularies.
You will probably have discovered this bug while working met facetted search.

What should you do?
Change in taxonomy.admin.inc line 172 from

Pages

Subscribe to Blog