r411 CONFIG has changed

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
User avatar
Jensensen
Posts: 3000
Joined: Tue 17. Oct 2006, 21:11
Location: auf der mlauer

r411 CONFIG has changed

Post 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
{so_much} | Knick-Knack. | GitHub
Umlaute im URL sind meistens immer Kacke.
User avatar
Oliver Georgi
Site Admin
Posts: 9888
Joined: Fri 3. Oct 2003, 22:22
Contact:

…and some more too

Post 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.
Oliver Georgi | phpwcms Developer | GitHub | LinkedIn | Систрон
User avatar
juergen
Moderator
Posts: 4556
Joined: Mon 10. Jan 2005, 18:10
Location: Weinheim
Contact:

Re: r411 CONFIG has changed

Post by juergen »

This is almost the aim of the game ;)

Perfect ! Thanks Oliver !
Post Reply