samedi 22 mai 2010

[drupal][Views] Display a view Total Rows

Using the views module is always a cool and funny experience but when you have to display the number of rows/results and a counter for each row then you stop smiling :-/.

I finally found how to do it in a simple way :-) Here we go ...
(I assume you know how to ovewrite a theme file and to display a view using the Table styling)
1- Enable the pagination (without this you won't get the $view->total_rows value)
2- Copy and the file 'views-view-table.tpl.php' in your theme folder (themes/garland or sites/all/themes/my_theme for example)3- Rebuild the theme registry to enable your new table_theme file
4- Adding the total by displaying the $view->total_rows variable

TOTAL : total_rows ; ?>
and that's it !!

PS: As far as the line number counter all you need is to define a variable ($counter) that you increment in the foreach loop.

jeudi 20 mai 2010

[Drupal][Admin_menu] Missing argument system_clear_cache_submit

I was getting this warning message

warning: Missing argument 1 for system_clear_cache_submit(), called in My_website_path\sites\all\modules\admin_menu\admin_menu.inc on line 522 and defined in My_website_path\modules\system\system.admin.inc on line 1367.


since a while. I was feeling lazy to check the cause of it, all i have to do is to reload the home page of the drupal project.

Finally I fixed it by defining an empty array in the admin_menu.inc file:

$form_state = array();
$form_array = array();
system_clear_cache_submit($form_state, $form_array);

mercredi 21 avril 2010

Firefox - Une présentation

Une présentation sur Firefox en cours de préparation http://atull.tg/?q=node/61 ;-)

samedi 10 avril 2010

Drupal: node_import (module)

I am using for the 2nd project the module node_import for data migration ; the main issue is how special characters are handled. Another issue is the relation between nodes and taxonomies. I need to write a proper blog post asap ....

lundi 11 janvier 2010

Un réseau social togo - logiciels libres

Je viens de m'inscrire sur ce réseau social : http://linux-togo.ning.com
Très bonne initiative je trouve.
Beaucoup d'affaires à suivre sur ce réseau ... ;-)

[ATULL] Rencontre -Systèmes d'aide à la décision (Aperçu)-

Plus d'infos ici : http://atull.tg/?q=node/58

mardi 22 décembre 2009

[Firefox] Déménager avec ses plugins

J'ai souvent eu à faire des cauchemars à l'idée de devoir toujours télécharger mes plugins à chaque installation ou quand je dois utiliser le navigateur de quelqu'un d'autre ou dans un cyber ;-D

Mais depuis un baille, j'ai trouvé le truc et je me suis dit aujourd'hui pourquoi ne pas le dire (ça peut toujours servir je crois ;-)).


1- Aller sur le site de firefox

2- Aller sur la page du plugin

3- Aller sur la page des différentes versions du plugin (au lieu de cliquer sur "Installer")

4- Choisir 'Enregistrer sous' pour télécharger le fichier "xpi"

5- Pour l'installer il suffit de "Cliquer & Déplacer" (Drag and Drop) le fichier xpi sur le navigateur; confirmer l'installation et redémarrer.

* Il peut y avoir le risque d'incompatibilité de version.

NB: Si vous voulez copier un plugin déjà installé vous pouvez rechercher 'le nom du plugin' et copier le dossier ou trouver le répertoire "ext" (variable) où les extensions de firefox sont sauvegardées.

Have fun ;-)