Tag: resolved

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

safari background color differences

It’s quite strange that Safari Browser does render images in a different way from others browsers. I mean: the same .jpg with a black color inside for example, in firefox is shown in the right way, in safari the “black” become a “dark gray”…


safari snapshot


the same in firefox

Well, after a while and many trials I discoverd that the problem is generated by the “profile colors” embedded into jpg saved from photoshop.

You need to save the file again removing the color profiles option:

safari background color differences

Configure printer on ubuntu

I’ve got to configure my printer on the new UBUNTU release 8.04; everything was fine, printer on USB detected and so on but, when I’ve got to do the last magic click, the GUI asked me for a localhost password…
Obviously no password was right and I could not finish my setup.
Reading around I’ve found this little trick that might be usefull to someone else:

Alt-F2 to open application launcher and type

gksudo  system-config-printer

Ubuntu will ask your system password and then you’ll be able to configure, delete and modify your printers.

Configure printer on ubuntu