Page 1 of 1

r411 CONFIG has changed

Posted: Sun 19. Dec 2010, 01:02
by Jensensen
[don't forget] The new version has two changes of the configuration file.

SEE /config/phpwcms/dist.conf.inc.php

OPEN conf.inc.php

ADD

Code: Select all

$phpwcms['db_timezone']		  = ''; // set MySQL session time zone http://dev.mysql.com/doc/refman/5.5/en/time-zone-support.html
and REPLACE

Code: Select all

$phpwcms['timezone_GMT']  	  = '+1';
with

Code: Select all

$phpwcms['php_timezone']  	  = ''; // overwrite PHP default time zone http://php.net/manual/en/timezones.php

…and some more too

Posted: Sun 19. Dec 2010, 07:35
by Oliver Georgi
Some more information related to the update:

Code: Select all

$phpwcms['timezone_GMT']
was never in use.

There is also a change for

Code: Select all

<!-- JS: … -->
It was a single line replacement tag where you were able to use it as this to leave a comment here

Code: Select all

<!-- JS: my.js // Custom JS -->
This is no longer supported to be able to identify JavaScript files from other usage.

All ending with

Code: Select all

.js
results in <srcipt src="" /> in head.

Code: Select all

<!-- JS: my.js -->
Initialize the JavaScript libarry/framework which has selected in template by default. Try to put this at the topmost section of your template.

Code: Select all

<!-- JS: initJSLib -->
Load Plugin or More as described and based on current JavaScript framework/library. It will also render <srcipt src="" /> in head.

Code: Select all

<!-- JS: myplugin -->
<!-- JS: MORE:Fx/Fx.Elements,Fx/Fx.Accordion -->
And the best now is multi line JavaScript put as <script /> in head section. Be aware – every equal JavaScript section like used in looped Content Parts is rendered only once. To be detected as JavaScript it will need ;, // and/or /*.Just end your JavaScript line by ; is the safest way:

Code: Select all

<!-- JS: 
  // My Custom JS
  alert('hey dude it works as expected');
-->
The same techniques are used for CSS, but just inline/external CSS. You can use {TEMPLATE} to get your current relative template path.

Code: Select all

<!-- CSS: body {background:yellow;} -->
<!-- CSS:
  body {
    background:yellow;
  }
  a {
    text-decoration: none;
    background: transparent url({TEMPLATE}img/link.png) no-repeat left center;
    padding-left: 25px;
  }
-->
<!-- CSS: {TEMPLATE}inc_css/my.css -->
<!-- CSS: my.css -->
Also for CSS: equal CSS used this way is rendered only once and also always put into the <head> section.

Re: r411 CONFIG has changed

Posted: Sun 19. Dec 2010, 12:50
by juergen
This is almost the aim of the game ;)

Perfect ! Thanks Oliver !