• 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.

Generate full path of web directory in PHP

I know this is a simple script that probably everyone already know, but I would like to keep it as a reminder for myself and everyone out there who doesn't know about it yet. For some reason, there are times when we need to know the full path of our web directory.

So, let's say you installed zen cart on your web root directory. Generally, you will have something like httpdocs/includes as one of your installation folder. If someone asks you, what's the full path of that folder ?

  1. echo $_SERVER['DOCUMENT_ROOT'];

The script above once executed will print out the full path of your current directory location. That alone should do it.

Free HTML Image Map Editor

I have searched for countless freeware out there that can provide a quick image map capability, cuz for some reason I need that for my web projects. Quite recently I found one that's simple, easy to use, and most importantly it's FREE !!

Please welcome Handy Image Mapper from silveragesoftware.com, i'm not by all means affiliated with this company/website, but i'm just amazed with its simplicity and yet it's capable to deliver quite an amazing result.

You can download it here , look for 'Handy Image Mapper' title, and there you go.

Forcing your checkout process to default currency in Zen Cart

Sometimes, the owners of ecommerce system would like to force the customers to choose store's default/chosen currency and why is that? Because, the instability of worldwide economy may cause the storeowners to loss profits during currency converting. Therefore, the storeowners have to ensure that it doesn't affect them by forcing their customers to select default currency (normally, it's the currency where the storeowner resides) during checkout process.

The easy way is to hide the currency converter pulldown menu once the customer entered the checkout process and set the current currency to your chosen/default currency. The steps explained here assume that currency converter is placed on the header instead of sidebar menu as it's way neater and you have to use the override system to have your own theme:

1. Put the code below on your /includes/templates/your_own_theme/common/tpl.header.php

  1. $checkout_shipping = '/index.php?main_page=checkout_shipping';
  2. $checkout_payment= '/index.php?main_page=checkout_payment';
  3. $checkout_confirm= '/index.php?main_page=checkout_confirmation';
  4. $request_url=$_SERVER['REQUEST_URI'];
  5.  
  6. if ($request_url == $checkout_shipping || $request_url == $checkout_payment || $request_url == $checkout_confirm)
  7. {
  8. $_SESSION['currency'] = 'AUD';
  9. }

Temporary folder in php not accessible

This was an unforgettable experience that i knew when i was developing a website that's hosted on a web server. If you're planning to use php mail function with attachment then you'll certainly upload those attachments temporarily to the web server before sending it to the recipient.

These attachments will be stored into the folder specified in 'upload_tmp_dir' directive in php.ini. So, unless you specified another value for the temporary folder, it always point to '/tmp/php_upload' by default.

Example:
When i wrote a code like this (for mail attachment):  

  1. $_FILES["yourfile"]["tmp_name"]

The error message comes up : fopen() [function.fopen]: open_basedir restriction in effect. File(/tmp/php_upload/phpk3qSgH) is not within the allowed path(s).

How to display image and its location in Drupal

Normally, you would place your own modified theme on 'sites/all/themes/your_own_theme' and all customized buttons and images should be located on 'sites/all/themes/your_own_theme/images'. This is an exception for logo image because it has to be placed on 'sites/all/theme/your_own_theme/'

The code below will display your image located on images folder:

  1. $my_static_image= base_path().path_to_theme().'/images/your_image.png';
  2. <img src="<?php print $my_static_image ?>" alt="" />

Meanwhile, to display logo image use the code as following:

  1. <img src="<?php print $logo ?>" alt="" />

The logo variable will automatically spot logo image placed on 'sites/all/themes/your_own_theme/logo.png'.

Syndicate content