Given the flexibility of Drupal, a different page template depending on the Content Type is not very demanding. The good news is, it is very much possible. The bad news is you may have to struggle like me to find the simplest, neatest and working method to achieve it.
Reading the documentation and Googling would result in many methods – some are confusing, some are not so neat and others apply to earlier versions of Drupal. Following is my favourite method to setup different page templates, depending on the Content Type, in Drupal 6. Read the rest of this entry »
I ordered an Amazon Kindle for a friend of mine. Before ordering the Kindle, there were various doubts and apprehensions about it’s functionality, cost and shipping to India. It took me numerous Google searches to conclude that Kindle is a safe and good buy for someone in India.
Subsequently, I placed an order on behalf of my friend and the Kindle was shipped to New Delhi, India to my residence in about 2 days. I got to setup, configure and play with this nifty device, before I could hand it over to my friend. Read the rest of this entry »
Typical requirement this is. You want to display the breadcrumb on the top of every page but the home page – also called the default page or the frontpage in Joomla. This is because you don’t just want the text “HOME” hanging on the top of your Joomla’s home page.
The “Home” may be already highlighted in the main menu, visitors know that they are on the home page and the breadcrumb is not aiding any navigation. Unfortunately, the breadcrumb module (called mod_breadcrumbs) in Joomla 1.5 does not provide any option to hide it on home page and show it on other pages. Read the rest of this entry »
I do not recall backing up data over FTP (File Transfer Protocol) in the near past. Thanks to the SSH (Secure SHell) suite of programs like SCP (Secure Copy) and SFTP (Secure FTP), and RSync. But recently I had to setup a scheduled and unattended backup of data lying on a shared hosted server using FTP – the only available option at my disposal.
Wget is a popular and obvious choice to try out for FTP backups. But it didn’t work for me and threw an error saying cannot find .listing file. While I was about to dwell more into wget, I spotted the forgotten hero – lftp. Read the rest of this entry »
In Linux, you can view the statistics of incoming and outgoing E-mails by peeking into a log file called maillog (typically found in /var/log directory). Maillog provides the general information about the mails, for example, the sender and recipient(s), status – sent, rejected, bounced etc. I typically use maillog to check the destiny of mails. At times, it becomes difficult to spot a particular mail due to the sheer volume of mails being logged – especially on a production mail server.
For example: what if we need to check whether a particular mail sent by Person A has been delivered to Person B. Note that Person A might be sending lots of mails to Person B but we need to spot that one particular mail – say the one, which was sent by Person A but did not reach Person B. The only identifier, to identify a particular mail, in the maillog is the cryptic message ID. A better and more readable identifier would be the subject of an E-mail.Unfortunately, the subject of the mails is not logged, by default, in the maillog. But we can configure a mail server like Postfix to log the subject line. Read the rest of this entry »
FTP (File Transfer Protocol) is the de-facto but unsecure method to transfer files. SSH (Secure Shell) and its family of services like SCP (Secure Copy) and SFTP (Secure FTP) allows you shell (telnet like) access as well as file transfer via SCP and SFTP, securely. By “securely” I mean the data is that flows across is encrypted including the username and password. SSH is a popular protocol for shell access and file transfer in the Linux world.
So given a choice, SCP/SFTP is a better option in terms of “security”. But enabling SFTP/SCP enables, by default, shell access too. Recently for one of my clients, the requirement was to use SCP instead of FTP while blocking shell access so that no user is able to login, in curiosity, nor could execute any program/script on the server, even by mistake. All they could do is to copy files across – from their desktop to the server and vice versa. But, I could not find anything in SSH configuration that barred SSH, while still allowing SCP. Read the rest of this entry »
Recently, I carried out a Linux server upgrade for a client where I did a clean install of the latest operating system/distribution. Since it was a clean install I had to backup and note down the earlier configuration (of mail server, web server, database) and redo those changes. Mostly I preferred not to simply overwrite with the backed up configuration files. I rather documented and edited the configuration manually.
It all seemed to have gone smoothly and the new server has been up and running. But one not-so-fine day, the client started complaining that some HTML pages are not displaying properly. These were showing question marks (?) and some other weird characters. I figured out that these HTML pages were generated using Microsoft Word and had those special characters (closing quotes, double hyphens etc.). I discussed with the client that this could be a web browser problem because it is not able to use the correct character set. Read the rest of this entry »
Alfresco is an open source and free content management system (CMS) – kind of a MS Sharepoint alternative. I had deployed Alfresco for two clients of mine. Coincidently, both clients came up with a specific requirement stating:
“Once a user uploads the file into the content management system, he or anyone else (expect for admin) should not be able to edit/delete it.”
I came up with a simple solution to change the owner of the files when they are uploaded into the CMS. Hence, when the file is uploaded, if the owner of the file is set to admin, even the user who created/uploaded the file will not be able to delete it.
Today, a client of mine complained about mails not showing up. The system administrator (at the client’s place) claimed to see the mails in the mailq (mail queue). I logged into the server and indeed found the mails in the mailq. After checking the logs (/var/log/maillog) I saw messages, similar to the one below, repeating:
Jul 10 17:01:05 server postfix/qmgr[24347]: CB4F21928CBA: skipped, still being delivered
This message repeated for many (maybe all) messages held in the mailq. Googled and googled for a possible reason/solution or a hint to it. The reason which made most sense to me was “Postfix was restarted when qmgr (Queue Manager) was processing the mails”, found via Google.The system administrator also reported of restarting Postfix.
Flushing the queue (service postfix flush) did not work. The solution that finally worked was re-queuing the mails using the following command:
postsuper -r ALL
and I could see the queue clearing up!
The Linux desktop (GNOME/KDE) has a Trash Can. But what about the command line or the console ? Especially, while working with Linux servers we often work on the command line (typically connect to the server via SSH) and one may end up deleting files by accident.
That’s where libtrash comes to help. Download it from http://pages.stern.nyu.edu/~marriaga/software/libtrash/. I used to use it long time back when, once, I deleted some important files from my laptop and none of those wonderful undelete utilities worked. Today I again deleted a file by accident. Though this time I had a backup, I got reminded of this wonderful utility. It still seems to be updated and maintained, somewhat – it was last updated in Jan 08.
Installed it on my laptop running Fedora 9 following the instructions in the readme file (found after extracting the tar.gz archive). And it worked (again)!