Tag: programming

drupal 6, tagadelic cache clear

I’ve got some problem with the tagadelic module in Drupal 6.x to create tag clouds. Even having removed the “cache” from the site setting, when a new post was published, the clouds didn’t change, never!

At the end I’ve fount a little patch on the web and I’m trying here to explain it to new users, not familiar with patch.

  1. go into the module directory “sites/all/modules/tagadelic” and open the file tagadelic.module with your favourite editor
  2. goto line 215 (or around there) and change the line “
    $cache = cache_get($cache_name);" to $cache = cache_get($cache_name, 'cache_block');<br /></pre></li><li>goto line 228 and do the same: change<br /><pre>cache_set($cache_name, $tags); to <br />cache_set($cache_name, $tags, 'cache_block', CACHE_TEMPORARY);

upload the file and the problem will magically disappear.

Original source thanks to: http://drupal.org/node/231030

drupal 6, tagadelic cache clear

PHP convertire apostrofo in apice

Copiando un testo da MS Word in una form capita a volte di imbattersi negli apostrofi di tipo ” ’ ” che difficilmente vengono convertiti correttamente in UTF-8. Questo capita (leggendo un po’ di bug report di php) con alcune versioni di php.

Brutale mna efficace al scelta di convertire tutti questi apostrofi con il singolo apice ‘

  $patterns[0] = ‘/[\x82\x91\x92]/’;
  $replacements[0] = “‘”;
  $txt = preg_replace($patterns, $replacements, “Governatore d’Italia”);

che renderà “Governatore d’Italia”

PHP convertire apostrofo in apice

Aptana Studio RedRails Error

I was curious to try an IDE on Osx for Rails development and APTANA STUDIO seems to be the right product. (I do use TextMate as editor)

Aptana Studio is fully installed on my laptop but, when I try to install the RedRails plugin, it returns this error:

Requested operation cannot be performed because it would invalidate the current configuration. See details for more information.


Ruby Mylyn Connector Feature (Optional) (0.9.3.6479) requires feature
"org.eclipse.mylyn.context_feature (2.0.0.v20070628-1000)", or later version.

The solution: http://support.aptana.com/issues/browse/ROR-156

The most important steps are:

  1. Went to Help=>Updates=>Find and Install. Installed three Eclipse updates that the system found. Installation of updates worked ok.
  2. When the update window appears with RadRails updates, expand the tree and uncheck the box next to the Ruby Mylyn Connector Feature. This is an optional extension for users of Mylyn. You don’t need it, so you can safely uncheck the box and install.

This seems to works either on Windows, Osx and Linux

Aptana Studio RedRails Error