foss

Blank page while installing drupal from cvs

I downloaded the latest drupal from the cvs using the command below.

cvs -z6 -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal checkout drupal

When I tried to install the drupal it gave me a blank page when I clicked on "Install drupal in english". I tried everything from re-downloading the code to commeting some lines in the install.inc file but all in vain but finaly I have fixed it. I know it is kinda dirty way of fixing things. I saw this page http://drupal.org/node/298391 while searching for solution. Though I did not apply the patch. I made the change in the includes/install.inc file manually.

In the function "function drupal_detect_database_types()" Replace this portion of the code.

 

Read more

Table view with rows/columns switched

These days I am working on my other site www.ggsipu.info to build the database of all the colleges affiliated to GGSIPU. I created a Custom Content Type to have various fields like college address, phone, fax, email, rating, etc. During the counselling time the students wants to compare various colleges based on various parameters like infrastructure, campus and other things. Now I wanted to create a view where a table is shown with the names of the colleges in the header and these parameters on rows.

This views snippet allows you to render a tableview with columns and rows switched. Suppose you have the following output:

Title   | Price 1 | Price 2
----------------------------
Node #1 | $10     | $20
Node #2 | $15     | $25

but what you really want is the node titles displayed in the header, and the prices as the rows:
        | Node #1 | Node #2
----------------------------
Price 1 | $10     | $15
Price 2 | $20     | $25

I created a view table, but obviously it showed the college names in the rows as it is the dynamic part. I searched around a lot on drupal and google and found this amazing piece of code that transpose the rows/columns.

You just need to replace YOURTHEME with the name of the theme and VIEWNAME with the view name and that's it!

Read more

Flash in Firefox 3

I know I am late. I installed firefor3 on my fedora 8 just three weeks back. I have been using FF3 on windows workstation in office ever since it was launched.

When I installed FF3 I noticed that the flash content is not working in it, though I have it installed on my system. I searched around the internet and found this way around.


ln -s  /usr/lib/firefox-2.0.0.8/plugins/libflashplayer.so /usr/lib/firefox3/plugins/libflasplayer.so

You just need to link the flash module from your old firefox folder to the new folder.

How drupal got its name?

Drupal is an English rendering of the Dutch word “druppel”, which means “drop” (as in “a water droplet”). The choice of “drop” was merely coincidental, Dries Buytaert the original writer wanted to register dorp.org (meaning “village” in Dutch, in reference to his program’s community aspect) Dries made a typo when checking the domain name and thought it sounded better.

Source: http://hehe2.net/apps/etymology-of-an-open-source-appproject/

Delhi Drupal Meetup

Drupal Delhi meetup is a gathering of drupal enthusiasts in Delhi. This meetup is focused at getting together and coding for drupal. The event will focus on module development and theme development for drupal. There will be two talks, one focused on drupal module development and another one focused at drupal theme development. Following the talks we will have hacking session for coding a module and a theme.

Read more

Convert .cue/.bin to .iso format

Today I was installing something on Windows using Sun VirtualBox but the package was in the form of .cue and .bin files. I was not aware of these two format and didn't know how to mount them in Virtual Machine. I had two ways, first is to write a CD and second is to somehow convert the .cue and .bin files into .iso.

Well I am lazy person so I decided why take so much pain in converting them into .iso, I though of writing the .cue/.bin files on CD and them mount the CD on VirtualBox. I don't have blank CD and was getting ready to buy some from the nearby market. Suddenly I realized that it is election day today in Delhi and all the shops must be closed. So now I had only one option left, to convert the .cue and .bin files into .iso.

Read more

Blank admin page in Drupal 6

I installed Drupal 6 today on my windows machine in office. After creating the first user I tried to access the Administration Page, but a blank page was returned. I searched google to fix this problem and got this link.

http://www.tmsnetwork.org/blog/content/2008/08/22/drupal-6-slow-administ...

Go to system table and change the value of 'status', 'bootstrap' and 'throttle' to 0

update system s
set s.status=0, s.throttle=0, s.bootstrap=0
where filename = 'modules/update/update.module'

Now you should be able to access the ./admin area :)

Display Random images

Yesterday I came across this excellent tutorial to display Random Images. I also tried it and implemented it on this site.

1. I use bluemarine theme for this site. I created a folder "images" and uploaded three images in there.

themes/bluemarine/images
header_1.jpg
header_2.jpg
header_3.jpg

2. Modified "page.tpl.php" and added the following code

<img src="/themes/bluemarine/images/header_<?php echo(rand(1,3)); ?>.jpg" alt="Ravi Sagar" / id="random_header">

3. Modified "style.css" and add section to handle "random_header"

#random_header {
  float: left;
  width: 900px;
  height: 170px;
}

Read more

Syndicate content