By admin on 25 November 2009
Assuming that we need to add custom meta tags by page url or node type, drupal hook_preprocess_page() is the last function called before displaying the page, so it's the right place for doing that :
By admin on 18 November 2009
working with a Mac with SVN can be fastidious especially when you have dozen of .DS_Store ..
So you have to look for the subversion config file on the server at the section global-ignores and add this pattern :
global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store .AppleDouble ._*
Or if you don't have enough permission to do this use the svn propedit svn:ignore command
svn propedit svn:ignore files
By admin on 10 November 2009
First Japanse lesson 1 : How to tell someone that he is a Jerk
- The Complete Form : あなたわ ばか です! (Anatawa baka desu !).
- The Short Form : ばか!(baka !)
How to say that you are a Jerk :
By admin on 09 November 2009
By admin on 08 November 2009
Searching for funny sticker in internet i've found this one, So ask my self why don't try to draw it on photoshop ans see the result.
For the resources i've used patterns from http://www.brusheezy.com/patterns, this site is great ! and you can found amazing ressources.
After a few hours of drawing and try of patterns here is the result. If any one is ineterested i can publish the psd.
By admin on 04 November 2009
Drupal form control can be tiresome some times, especially when developping custom modules .. In my case it was the integration of country and region select boxes from the ubercart module.
In my implementation of hook_form_alter we are adding these two elements in code :
By admin on 03 November 2009
MySQL function group_concat is a powerful tool to concat strings using a custom sperator :
GROUP_CONCAT([DISTINCT] expr [,expr ...]
[ORDER BY {unsigned_integer | col_name | formula} [ASC | DESC] [,col ...]]
[SEPARATOR str_val])
But sometimes the execution result may be truncated because of mysql default setting, so in this case "group_concat_max_len" haveto be changed to a bigger value
SET [GLOBAL | SESSION] group_concat_max_len = val;
By admin on 01 November 2009
Assuming that we have to trace every intervention on a database called « stats»
As result we wil have a new database with the "history_" prefix which will contain all the same tables of our source database "stats" but with different column definition. We have to add 3 new colums.
- Operation.
- Time.
- Operation made.
Creating the histroy database.
To continue we assume that the mysql user is having all the correct privilieges for creating databases and Triggers.
By admin on 01 November 2009
Making screen capture is pretty easy on mac Os and you don't have to install anything ..
Shortcuts :