1. Go to <drupal>/admin/build/views/tools
2. Select – Any – for Label for “Any” value on optional single-select exposed filters: Continue reading Drupal – Translate Views Exposed Filter Label
1. Go to <drupal>/admin/build/views/tools
2. Select – Any – for Label for “Any” value on optional single-select exposed filters: Continue reading Drupal – Translate Views Exposed Filter Label
If you encounter this error in Drupal
It is caused by PHP settings, you can either modify the max_execution_time in php.ini or add the following lines in the Drupal settings.php. Continue reading Drupal – Maximum execution time of 30 seconds exceeded
During the Drupal development, sometimes you may find the white screen of death(WSOD) and you have no idea what’s happening. To tackle the WSOD, add the following lines in the index.php located in the Drupal webroot. Continue reading Drupal – Tackle the White Screen of Death WSOD
We could get the flagged items by making the flag_get_user_flags() call. Assume we have setup a user flag called connect, the following example will return a list of a “connected” users which are flagged by a specific user (uid = 29). Continue reading Drupal – Get flagged items of a specific user by PHP
Sometimes we may want to render a data without the theme page template. This is useful when we want to retrieve data through asynchronous call such as Ajax.
So let’s create a page content only .tpl.php in the theme folder called page-ajax.tpl.php. Continue reading Drupal – Render a page without page template for Ajax
You can convert the content type which you created manually into a Drupal module using Features. First, download and enable the module.
1. Go to Administer -> Site building -> Features and click Create feature. Continue reading Drupal – Create a Content Type Programmatically by Features
Here is another way to add the external .js file.
$external_js = 'http://www.example.com/a.js';
drupal_add_js('document.write(unescape("%3Cscript src=\''. $external_js . '\' type=\'text/javascript\'%3E%3C/script%3E"));', 'inline');
Done =)
Previous Post: Drupal – Load External Javascript using drupal_add_js() @ 1
Reference: Web Design by Tim Wooten – Load external js file in Drupal 6
If you want to include external .js file in your custom module, create the following file.
external.js
(function ($) {
Drupal.behaviors.myModule = function(context) {
var externalScript = $('<script></script>').attr('type','text/javascript').attr('src', 'http://example.org/example.js');
$('body').append(externalScript);
}
}(jQuery));
Continue reading Drupal – Load External Javascript using drupal_add_js() @ 1
Again, i will use the custom module i have created in
Drupal – Introduction to Drupal Theming @ 3
This time we add a custom form called ykyuen_greeting_form in the preprocess function.
Continue reading Drupal – Call Javascript after form submission
Previously, we talked about how to get the number of nodes of a specific term.
Drupal – Get Number of node of Taxonomy Term by Term ID
How about if i want to get the number of nodes under a specific parent term? Unfortunately, there is no such function. so i try to get that number by SQL. Here is the PHP code.
Continue reading Drupal – Get the Number of nodes under a Parent Term