• strict warning: Non-static method view::load() should not be called statically in /home1/eangkasa/public_html/sites/all/modules/views/views.module on line 879.
  • strict warning: Declaration of views_handler_filter::options_validate() should be compatible with views_handler::options_validate($form, &$form_state) in /home1/eangkasa/public_html/sites/all/modules/views/handlers/views_handler_filter.inc on line 589.
  • strict warning: Declaration of views_handler_filter::options_submit() should be compatible with views_handler::options_submit($form, &$form_state) in /home1/eangkasa/public_html/sites/all/modules/views/handlers/views_handler_filter.inc on line 589.
  • strict warning: Declaration of views_handler_filter_boolean_operator::value_validate() should be compatible with views_handler_filter::value_validate($form, &$form_state) in /home1/eangkasa/public_html/sites/all/modules/views/handlers/views_handler_filter_boolean_operator.inc on line 149.
  • strict warning: Declaration of views_plugin_style_default::options() should be compatible with views_object::options() in /home1/eangkasa/public_html/sites/all/modules/views/plugins/views_plugin_style_default.inc on line 25.
  • strict warning: Declaration of views_plugin_row::options_validate() should be compatible with views_plugin::options_validate(&$form, &$form_state) in /home1/eangkasa/public_html/sites/all/modules/views/plugins/views_plugin_row.inc on line 135.
  • strict warning: Declaration of views_plugin_row::options_submit() should be compatible with views_plugin::options_submit(&$form, &$form_state) in /home1/eangkasa/public_html/sites/all/modules/views/plugins/views_plugin_row.inc on line 135.
  • strict warning: Non-static method view::load() should not be called statically in /home1/eangkasa/public_html/sites/all/modules/views/views.module on line 879.
  • strict warning: Declaration of views_handler_argument::init() should be compatible with views_handler::init(&$view, $options) in /home1/eangkasa/public_html/sites/all/modules/views/handlers/views_handler_argument.inc on line 745.
  • strict warning: Declaration of views_handler_filter_node_status::operator_form() should be compatible with views_handler_filter::operator_form(&$form, &$form_state) in /home1/eangkasa/public_html/sites/all/modules/views/modules/node/views_handler_filter_node_status.inc on line 14.
  • strict warning: Non-static method view::load() should not be called statically in /home1/eangkasa/public_html/sites/all/modules/views/views.module on line 879.
  • warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home1/eangkasa/public_html/sites/all/modules/counter/counter.module on line 136.
  • warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home1/eangkasa/public_html/sites/all/modules/counter/counter.module on line 159.
  • warning: strtotime(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home1/eangkasa/public_html/sites/all/modules/counter/counter.module on line 159.
  • strict warning: Non-static method view::load() should not be called statically in /home1/eangkasa/public_html/sites/all/modules/views/views.module on line 879.
  • strict warning: Declaration of views_handler_field_comment::init() should be compatible with views_handler_field::init(&$view, $options) in /home1/eangkasa/public_html/sites/all/modules/views/modules/comment/views_handler_field_comment.inc on line 50.
  • strict warning: Declaration of views_handler_field_comment_username::init() should be compatible with views_handler_field::init(&$view, $options) in /home1/eangkasa/public_html/sites/all/modules/views/modules/comment/views_handler_field_comment_username.inc on line 48.
  • strict warning: Non-static method view::load() should not be called statically in /home1/eangkasa/public_html/sites/all/modules/views/views.module on line 879.
  • strict warning: Non-static method view::load() should not be called statically in /home1/eangkasa/public_html/sites/all/modules/views/views.module on line 879.

Lack of array support for listbox, checkbox in CodeIgniter version 1.6.3

For those people still having one of your sites using CodeIgniter version 1.6.3 and below, you will certainly informed that CI doesn't support validation of listbox (select with multiple enabled) and checkbox for reselecting multiple values chosen. However, there is a decent hack available to enable such requirement, elaborated as below:

You should apply this patch ONLY IF you're using CI version 1.6.3 and below, CI version 1.7.0 and above uses a new form validation class and it does support array as field names.

1. Modify the core Validation.php located under system/libraries/Validation.php, then replace 2 sets of function called as "set_checkbox" and "set_select".

  1. function set_checkbox($field = '', $value = '')
  2. {
  3. if ($field == '' OR $value == '' OR ! isset($_POST[$field]))
  4. {
  5. return '';
  6. }
  7.  
  8. if(is_array($_POST[$field]))
  9. {
  10. if(in_array($value,$_POST[$field]))
  11. {
  12. return ' checked="checked"';
  13. }
  14. }
  15. elseif ($_POST[$field] == $value)
  16. {
  17. return ' checked="checked"';
  18. }
  19. }

How validation works and its callback function in Code Igniter

Validation framework in the Code Igniter is pretty powerful, i have to admit that once you get around to use it, eventually it can save lots of web development time, and it's much more secure rather than building it up yourself. CI provides a number of commonly used validation rules such as "required fields", "numeric fields", "alpha fields", and many others. Additionally, you can build up your own custom validation function by using callback. A comprehensive user guide from Code Igniter in regard to form validation is available here.

Notice: This Code Igniter is using version 1.6.3, there is currently a much newer version 1.7.2, and it's using a new form validation class instead, just a warning that the below code is dedicated solely for CI version 1.6.3 and below.

The sample code below will elaborate how CI validation works around the clock:

Usage of EXIF data for fast gallery module on Drupal

For those of you have been using the fast gallery module, i reckon you know what's the purpose of EXIF data. It is primarily being used to display image caption and title display for custom folder thumbnail. You can customize how the EXIF data would be displayed through Fast Gallery setting depicted below:

Meanwhile, the screenshots below are the actual result of using EXIF data:

- Title display for Custom folder thumbnail using EXIF data

- Image caption using EXIF data

There are plenty of EXIF editors available out there for free, personally i would strongly recommended the EXIF Manager, it is simple and easy to use for starter as opposed to other EXIF editors. With EXIF Manager, you can modify information of a picture such as its image description, user comment, artist, and date. Bear in mind, only .JPG picture has the EXIF data.

Embed Google Map into your Drupal's contact form

This article on adding a google map to Drupal's contact form is based on Norio's blog, however i shall attempt to create my own version as a backup tutorial, plus adding extra notes for those users having difficulties to embed the map.

1. Download and install the GMap module.

2. Go to your admin modules page and activate the contact, gmap and gmap macro builder module as depicted below:

3. Request a Google Map API Key, afterwards paste the key to your GMap config page and save the configuration.

4. Go to your input formats config, then configure the Full HTML "input format", and tick on "GMap macro expander" on "Filters" tab, failure to do so will output the GMap macro text instead of the actual Google Map.

5. Start designing your own map using the "Build a GMap Macro" located under admin "site configuration".

6. After finished, copy and paste the GMap generated macro text to site-wide contact form setting ("Additional Information" field under "Settings" tab).

Access denied: not authorized to access this page on Drupal forum

I have had this issue with Drupal forum, specifically with Advanced Forum module & Forum access module. I keep getting this access denied: you are not authorized to access this page whenever i'm accessing one of my forum section IF i'm not login as an administrator (user id #1). My guess would be a permission problem either on forum access module and/or user permission depicted as below:

From the above, both anonymous user & authenticated user should be able to view the forum, but the fact is the contrary. So, why only the user id #1 can access the forum while other cannot, that's odd. The main problem lies on the bug within forum access module.

After ticked off the anonymous user and press save, then tick on anonymous user again and press save. Both anonymous & authenticated user can access the forum without any permission issue. My conclusion would be the forum access permission isn't being saved properly. Therefore, i posted this article as my personal reference in case such event occured again, so next time i won't get a headache.

Syndicate content