If your custom module requires an additional table in the Drupal database, you have to create the .install file and define the schema inside it. In Drupal 7, the datetime field is no longer support by the Drupal Schema API. If you want to create a datetime field, you have to use the mysql_type or pgsql_type. Here is an example. Continue reading Drupal 7 – Create a Datetime field in hook_schema() @ 1→
Taxonomy is a must have tool for grouping relevant content together. On the other hand, with the help of Views and exposed filter, user could easily list out the content with specific taxonomy.
But when a taxonomy has more than 1 levels, the filter option list may get too long and become less user friendly. In the past, i tried to make a multiple selection lists by applying some Javascript and jQuery on the exposed filter. It turns out that the result is quite bad.
In Chrome, the displayed text has a minimum font-size 12px even thought you set a smaller value in CSS. This is because the Chrome browser has a auto font adjustment.
So if you want to style a text with font-size smaller than 12px, include the following line in your CSS file.
We can hide and show any HTML elements by the fadeIn() and fadeOut() jQuery functions. Those elements will be set to display: none in CSS. Unlike setting visibility: hidden which the hidden element will still occupied some spaces in the rendered web page, the faded out element will disappear.
I want to create a URL which will redirect to the latest node of a specific content type so i write a custom module. In this example, the content type car is used.
latest_car.info
name = Latest car
description = Create a URL which will redirect to the latest car node.
package = Eureka;
version = 7.x-1.0
core = 7.x