Drupal : Override strings without touching the code

What’s up ?
I was trying to implement the “wall to wall” feature using the guestbook drupal module when i noticed that it will be more funny if the user can see wall instead of ‘guestbook’.

So the question now is how do I change the string without touching the module code ? 😕 (i don’t know if this smiley exists :-))

The vision …
Then i got a vision :-). Promise me that you won’t laugh.

I remembered that when you are using another language in drupal the string displayed is in english only if the language is not enabled or if the string is not translated. Thus if i create a language, enable it, and translate only “guestbook” to “wall” then every where a string should be displayed only guestbook will change to wall and the rest will be in english !!! Isn’t that cool ? My mum said that i’ll be a good drupaler hehehehe (even though she doesn’t know what drupal is :-D).

Don’t worry my mum said also that you can be a good drupaler!

How can you do the same thing ?

1- Enable the “locale” and “Content translation” modules
2- Create a fake language (mine is called fake with the code fk-fake) on /admin/settings/language/add
3- Make the fake language the default one on /admin/settings/language/
4- Search and translate the ‘guestbook’ (or the string you want) on /admin/build/translate/search
5- Be happy.

PS: In case you can’t find the string when searching check if the t() function is used in the module.

Firefox : Can 2 profiles share one history file ?

I was wondering if it was possible to have many profiles with one history file ? In case this is possible I can have the same autocompletion in all my profiles.

So let’s start the investigation (Sherlock Holmes…)

1- I searched what was related to ‘history’ in one of my profile folder.
I found that:

– Firefox is using ‘sqlite’ as DBMS (hmmm interesting)
– There are many databases : places.sqlite, and many other sqlite files (content-prefs.sqlite, cookies.sqlite, downloads.sqlite, formhistory.sqlite, permissions.sqlite, places.sqlite, search.sqlite, urlclassifier3.sqlite, webappsstore.sqlite).

2- I started opening some of them and I focused on places.sqlite.

3- I created a link of profileA/places.sqlite in profileB/places.sqlite and rename profileB/places.sqlite. So now i have only profileA/places.sqlite. But I was surprise to see that when I start the 2 profiles, B is working fine but A has lost its memory. There is no autocompletion available for A even when i go to an address that i opened in another tab.

4- After some magick manipulations 🙂 what I understood is that when a profile is accessing a database, the file is locked so that another profile can’t access it at the same time.

So the answer to my question is right now no (because you may never know), 2 profiles can’t share the same history file.

BUT I was thinking that a small script (shell or firefox add-on) can update the history (or other databases) on the event ‘close firefox’ or ‘… event’ 🙂

Maybe I’ll try it a friday night … (friday is said to be the inspiration day :-))

See you next time for euuhhh i don’t know, we’ll see 🙂

Drupal : Change the installation language

Here are the steps to follow when you want to translate the installation interface of drupal.

1- Download the language package from http://drupal.org/project/translations.

2- Copy from the extracted folder of the translation package (french in my case) the ‘translations‘ folder “fr-6.x-1.0\profiles\default\translations” .

3- Paste the folder in “mydrupal\profiles\default”.

4- Go and select your language on the installation page.

and here are the installation screens.

Twitter updates on Drupal

I integrated Twitter in Drupal today !!

Nothing special maybe but it was funny how easy it was. You can also do it in 15min.

All you need is to
– go to this page http://twitter.com/badges/which_badge (you’ll need a twitter account even if the updates will be for another account).
– follow the instructions :
+ choose the flash or html widget,
+ choose the number
+ choose the title of the posts’ area

– copy the code generated and put it in the content of your block or wherever you want to display it.


Hot tip! To ensure loading of your page even in the case of twitter.com non-loading, move the two lines that start with to the bottom of your page (just
above the closing ‘body’ tag )

— Use the “full html” for your block content in case you are using one to display the updates.

And that’s it 🙂

Weird message regarding the Firefox ‘Friendbar’ add-on

I have noticed something funny and weird today.

Friendbar (https://addons.update.mozilla.org/en-US/firefox/addon/10223), the cool add-on for firefox ‘seems not available for linux’ when you try to install it on your firefox using Linux(Ubuntu).

But when i download the extension on windows and copy it in my firefox profile on Linux it works like a charm :-).

So my doubt now is about the message I read; is the add-on really available for linux or not (or maybe sometimes it’s available and sometimes not) ?

Can you tell me ? yes you why are you smiling, if you know just answer …

Combine Friendbar with Firefox Profile

Hello folks,
One more funny tip for today .

This add-on will display all updates of your twitter and facebook accounts. You can search on twitter from the same toolbar. You can also change settings like (the update time, the number of latest updates, etc.).

The link with Firefox profile Manager ?

You may not want to always see updates when working or maybe the currrent firefox profile (we use the default profile when none is created) has too much extensions.

So what you can do is to create a new firefox profile before installing the add-on.

Don’t cry i’ll show you how to do it ok 🙂 ?

1- Start firefox with the ‘-ProfileManager -no-remote’ option

(windows) “C:\Program Files\Mozilla Firefox\firefox.exe” -ProfileManager -no-remote
(Linux) > firefox -ProfileManager -no-remote

2- Create a new profile (mine is called the social_boy :-))

3- Go to the add-on page and install it. You’ll need to restart the browser.

4- Create a shortcut to your new profile
(windows) “C:\Program Files\Mozilla Firefox\firefox.exe” -P social_boy -no-remote
(linux) > firefox -P social_boy -no-remote

(change social_boy with your new profile name).

Now that you know how to do it you can cry 🙂