Tag Archives: Bon Jovi

Drupal – Customized Node Template with Exposed Filter in Panel Page

The following post shows you how to customize a node template.
Drupal – Customize Node Template with Panel

I would like to add a year filter in the above content pane. But the exposed filter would not work if you just expose the year filter. In this case, you will need to enable the Use Panel Path. Continue reading Drupal – Customized Node Template with Exposed Filter in Panel Page

Drupal – Customize Node Template with Panel

Panels is a very useful module for customizing page layout. You can either create you own page or edit the Drupal default templates such as Node View and Taxonomy View. Download the Panels and Chaos Tool Suite and enable the following options. Continue reading Drupal – Customize Node Template with Panel

Drupal – Add Configurable Values to Block

In previous posts, we created a custom module implement the hook_block() function.

 

We haven’t implemented the block configurable values. Let’s do it now.

We want the block to store a number and a string. so we add these 2 fields in the block configuration page. Here is the new custom.module. Continue reading Drupal – Add Configurable Values to Block

Drupal – Show Database Data in Block by SQL

Previous related posts:

 

The above posts show you how to create and customized the content of a block. Sometimes, we may need to show some database data in the block. So we need to write a SQL. For example, i want to show a list of node titles and the corresponding url links of the Song content type.

1. Modify the custom.module Continue reading Drupal – Show Database Data in Block by SQL

Drupal – Using Node Reference in View

Sometimes we may want to create mapping in content types. Say, i created an Artist and a Song content types. when i select an artist, i want it to select all the songs which belongs to that artist also. In that case, we need a node reference field in the Artist content type such that every song is mapped to an artist.

So first, create the Song content type with default fields. Then create some songs and fill in the lyrics as node body. Continue reading Drupal – Using Node Reference in View

iPhone – Wrap Text in UILabel

In UILabel, there is an adjustsFontSizeToFitWidth property which will automatically adjust the text font size to fit the UILabel width.

UILabel *aLabel = [[UILabel alloc] initWithFrame:CGRectMake(0.0, 0.0, 320.0, 20.0)];
aLabel.adjustsFontSizetoWidth = YES; // This is a must
aLabel.minimumFontSize = 8.0f; 
aLabel.numberOfLines = 1; // This is a must too =.=

But this only work for numberOfLines = 1Continue reading iPhone – Wrap Text in UILabel