Thursday, August 23, 2012

My answer to "Incorrect email content"

This is my answer to a Question on Support site for LampCMS project


Have you added support for new languages to your site? Have those users selected the different languages in their profile than other users?

Basically this type of error points to translation problem - like when you have a new language but don't have translation for these strings.

Also have you changed DEFAULT_LOCALE and/or DEFAULT_LANG in !config.ini file?

My answer to "is mongodb better than mysql?"

This is my answer to a Question on Support site for LampCMS project


For this type of site (Q&A or forum) MongoDB is perfect. Especially if the site will grow to very large site. Also performance (speed) is better with Mongo because there are never table joins.

Lastly it's fairly easy to add extra servers when your think your site is outgrowing one-server installation.
Also from deveoper's point of view it's alot faster to develop programs with Mongo than with MySQL because you don't need to change table schema when you want to add new fields.

Wednesday, August 15, 2012

My answer to "charset problem"

This is my answer to a Question on Support site for LampCMS project


There could be a problem with charset. I have seem some strange charset issues occasionally. It has nothing to do with Mongo. Most likely it has to do with the script attempting to sanitize all input and not being able to detect the utf8 charset in some cases.

I will add an experimental option to skip charset detection and we'll see if that will fix the problem.

I'll release this new option soon.

Monday, August 13, 2012

Video questions and video answers

My Question on Support site for LampCMS project

Youbube is planning to release the new project for developers to allow discussion communities use
embedded youtube widget to solicit Answers/Answers by using webcam.

Take a look. I am interested in integrating this into Lampcms when it is released.

YouTube videoPlay

Click here to post your reply


Saturday, August 11, 2012

Phar based LampCMS package is ready

My Question on Support site for LampCMS project

I am happy to announce that phar based package of Lampcms library is now included in the distribution zip file.
Also this support forum runs from the phar archive now.

The lampcms.phar is included in the distribution zip file, it's not available on github because phar is created during the build process. Basically lampcms.phar included every file that resides under the /lib/ folder in the source tree. The comments and new lines are removed from all php files before they included in the phar archive, resulting in over 50% reduction in file sizes.

The bootstrap.dist.php in www folder included option to define LAMPCMS_PHAR - a full path to lampcms.phar file. If defined, the phar archive is used.

Basically if you using lampcms.phar you don't have to upload the contents of the /lib/ folder to your server, just upload lampcms.phar anywhere on your server then define a path to it in bootstrap.php and you good to go.

Upgrading to a new release of phar is easy - just upload a new version of phar. The only little extra step you need to take when upgrading a phar file is you also need to upload a newest version of the minified qa.js file.

This is because release version of the library is different in every phar archive and when page is rendered the script looks for a version of minified .js file that matches the release version.

For example, the current release is 0.1.77 so a path to js file is /js/min/qa_0.1.77.js

So when upgrading phar-based installation you need to: download a zip file, extract it locally on your PC. From the extracted archive upload lampcms.phar to your server and also from www/js/min/ upload the latest version of qa.js file to your www/js/min directory.

Who should use phar based installation?

Anyone who just wants to get the site up and running fast. If you plan making any changes to any of the php files then of cause phar based installation is not for you.

One last thing: with phar based installation it is not possible to add your own custom modules to lampcms. This is because the Modules directory is now packed inside the phar archive.
I have to make a change to include the 'Plugins' directory under the 'config' directly. Then you would could add your own plugins to that directory.

Anyway, give it a try. Download the latest zip from http://www.lampcms.com/download/

Click here to post your reply


Sunday, August 5, 2012

Updated to PR2 and PR3 branches. Working of phar based distribution.

My Question on Support site for LampCMS project

Just want to give you an update of what I'm working on now.
I am currently working on 2 branches: PR2 and PR3

The work in PR2 includes support for INTL library. Mainly the formatting of date/time based on user's selected locale. Also using the intl library it will be possible to show timezone's selection menu translated into user's language. The translated names of all timezones are available in the php's intl library which is great, so we don't have to add these translations manually to our xliff files.

That's the current work on the PR2 branch.

At the same time I am also working of the support for phar based distribution of Lampcms library.

The idea is to have just one lampcms.phar file that will replace all the files in the lib directory, including the PEAR and SWIFT mailer folders. I have just started working on it, I am not 100% sure if I will succeed in this but I'm optimistic.

I know that having an option to download a new version of a .phar file and upload to your server will be a much easier way to upgrade to the latest release.

Since I'm working on these 2 branches at the same time I'm not sure which one will be done first, but of cause I'm trying to complete PR2 tasks first.

Click here to post your reply


LampCMS Official distribution zip archive

My Question on Support site for LampCMS project

The Official distribution of Lampcms is finally available in the zip archive.
It can always be downloaded from the www.lampcms.com website from the "Download" link.

It's recommended to use this zip file for production installation.
The main difference between the zip based release and downloading a zip from gitbub is that
the source code on github does not include the minified versions of javascript and css files.

The minified version of qa.js is created during the build process. I use phing as a build tool.
The way minified version of qa.js is created is this:
First a release version number is incremented for each release.
For example if latest version of previous build was 0.1.60, then the build tool automatically increments the minor version to 0.1.61
This number '0.1.61' then replaces the placeholder @package_version@ in all source files.
The most important place where this placeholder is used is in Object.php
there is a line:
const VERSION_ID = '@package_version@';

The minified version of javascript is then created and save as qa_0.1.61.js (uses the build version as part of the file name)
By the way, I use YUI compressor java tool to minify javascript and css file.

So after the build is complete the program will have a constant VERSION_ID that holds the value of actual build version.

This VERSION_ID is then used when including a minified javascript file.
So now the value of javascript src in the generated html will look something like this:
<script type="text/javascript" src="http://support.lampcms.com/js/min/qa_0.1.65.js"></script>

You should configure your web server to send long-lived expiration header for all files served from the js/min directory so browser will cache the minified javascripts. This will significantly improve the load time of all you pages.

Click here to post your reply


Saturday, August 4, 2012

My answer to "How do i increase the auto log out time of user or turnoff altogether"

This is my answer to a Question on Support site for LampCMS project


The problem is that when you download from github you only have a development version and it runs in debug mode by default.

In debug mode the session is set for 5 or 10 minutes, I'm not sure.

To turn off the debug mode you must set DEBUG=false in !config.ini
The problem that in non-debug mode the program supposed to load a minified version of javascript and css files and currently they are not included on github.

The minified js and css files are generated during the 'build' process

I still have not resolved this issue but I will soon.

What will happend is that there will be an official distrubution zip file available for download from lampcms.com website. That zip will always include the minified css and js files.

It will be ready in a few days, maybe by tomorrow evening.