There are some methods that allows you to change the timezone of the PHP (5.1+) scripts (ie, when the date is not shown due to a different timezone of the server).

The first one is by modifying the php.ini file of the web server (if you are allowed to). We just need to add the following line:

date.timezone = "America/Lima"

Other method is using the ini_set() function directly on your script (at the beginning of it), this way:

ini_set('date.timezone', 'America/Lima');

And the third method consist on the use of the function date_default_timezone_set() (also, directly on your script):

date_default_timezone_set('America/Lima');

The list of the available timezones is here.

Sources: SiteGround, The Electric Toolbox

Tags: ,

To be able to use base URL (server URL and subdirectory where Drupal is installed if any, like http://mydomain.com/drupal) on themes or content templates, $base_url scope must be modified before it can be used. Before your theme code, you should write:

< ?php
global $base_url;
(rest of theme/template code)
?>

Tags: , , ,

Reglas de codificación y lineamientos de diseño de CSS

Reglas de codificación y lineamientos de código PHP

phpBB Coding Guidelines

Tags: ,

  • Facebook
  • Google+
  • LinkedIn
  • Twitter
  • Flickr