Sunday, May 27, 2012

Started a new PR1 branch

My Question on Support site for LampCMS project

I started working on a new PR1 version.
I created a new branch on github for this.
All new development is done in PR1 branch for now.

New features I am working on:

Support for multi-site. Running more than on site from single Lampcms library. This is already done.
A simple 'define' of the path to Lampcms/lib directory is all that is needed in the new bootstrap.php file

Moved all configuration files to config folder. Got rid of Points.php and Mycollections.php. All these are now in the !config.ini file. Yes !config.ini got bigger in size but I think its better than having too many configuration files.

Also the config directory can be moved to custom location to prevent it from being overridden during the upgrade (this is already pretty well protected because the !config.ini is not even included in distribution and must be created by renaming or copying !config.ini.dist file, same for acl.ini file)
The language translations directory is now a subfolder in the config directory, so moving config directory to a custom location will protect the translations directory from being overridden.

What I'm really working on now, and this may take decent amount of time is to use url routes concept so that rewrite rules will not be necessary. This will be somewhat similar to CodeIgneter's way, but not the same. It will also be a 2-way mapping - if you rename the route the urls will all be updated dynamically in the site. For example, if you want to access your unanswered questions using /noanswer/ then just changing the route name from 'unanswered' to 'noanswer' will do the trick - the links everywhere in the site will be pointing to '/noanswer/'
while the route will point to the same controller.

Also it will be possible and quite easy to install Lampcms in a subfolder of an existing website. For example, maybe in the '/forum/' directory of your site.

So this new url routing feature will take some time to complete and test. Many templates will have to be updated to use placeholders instead of hard-coding the links.

I'm working on it now.

You can still use the master branch for the previous more stable version or wait for the PR1 with all the good features.

I also changed the coding style a bit in a new version, it's more in line with Symfony2 coding style. Not a big change at all, but class and function opening brackets are in the new line now.

I also got this new IDE - PHPStorm. I like it a lot. Thanks to the good people of JetBrains I got a free license for this open source project. It's the best IDE I worked with so far, and I tried many: Eclipse (still using it for some Java coding and for Android code. What I really hate about Eclipse is that so many times I would install some new plugin and suddenly some old feature stops working and I really need that old feature more than the new plugin but uninstalling plugin does not fix the problem), Aptana (crap), NetBeans (not bad), PHPEd (crap)

Debugging with XDebug works right out of the box with PHPStorm, good support for PHPUnit, and for viewing cachegrind files right in the IDE. Also a nice support for Phing - it recognises the Phing's xml file and you can right-click right in the xml to build a target. And lastly nice support for php codesniffer. This is a less important but still a nice feature. Or, and it has a really good support for all the Git features like creating, switching branches, merging, comparing branches and very good tool to resolve occasional merge conflicts.


Earlier this week I attended the MongoDB NYC conference. It was great - their busiest even even - over 900 attendees. It was really crowded but it was worth it, especially since the company paid for the ticket. I lleared a new new tricks, got some new ideas on using Mongo. Also we starting to use MongoDB at work, got a pretty serious multi-server install with sharding and replica sets.

By the way I work for the ADP now. It's a pretty big company, you probably heard of it.

Anyway, I have alot for work to do.


Click here to post your reply


Saturday, May 19, 2012

Updates and new features

My Question on Support site for LampCMS project

I just pushed the latest updates to github

First of all, the category feature is here, as you may have already noticed you now can select a category when posting a question.

Categories can have sub-categories, and the level of nesting is unlimited.

You can already try the admin page for category editing here:

http://support.lampcms.com/editcategory/

Since you are not admin you can only play with the editor but the changes will not be saved.

The rendering of categories page is not very good yet, I have to work on a template and css for displaying categories better.

2 - I added support for multi-site setup. You can have multiple sites using lampcms on the same server and they all can use a single copy of the lampcms library.

For this to work you just have to uncomment the line in !inc.php
//define('LAMPCMS_LIB_DIR', '/var/lampcms/lib');

and put a full path to location of Lampcms/lib directory
That's all you have to do.

You can even move the Lampcms/lib directory (the directory that contains 3 folders: Lampcms, Pear and fonts folder as well as autoload.php file (which I moved there from the root directory so that autoload can also be reused between sites)

3 - Added Time Zone selection to Edit Profile page so user can select own timezone now. This is just a first step, I still have to go over the rest of the program and update all the places where timezone can be used in order to display correct times in user's timezone.

So download and test these new features.

Next I am starting to work on some refactoring of how site settings are stored. I want to create a single 'settings' directory where we will keep all editable files like !config.ini, !acl.ini, Points.php, Mycollections.php and also soon another editable file to make urls flexible by using 'routes' - something similar to Codeigneter's routes.
The idea is that you will be able to define your own url structure and will no longer need rewrite rules on the web server.

Also there will be the option to define the root web folder so you can add lampcms to existing website and just access in like yoursite.com/commutity/ or yousite.com/community/forum
Basically you will just define a root folder and links will be created dynamically. You can even update this web folder setting any time and all links will be updated since they will be created dynamically now.

Not sure when I will be done with all this, I'm thinking about 8 weeks (I work only couple evenings a week on this site plus 2 days on weekend)

The good news is that I recently started a new job which is 5 days a week, unlike my last job which was 6 day/week. So now I have more time to work on Lampcms.




Click here to post your reply


My answer to "Is there a way to do multiple choice questions in lampcms?"

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


That would be a totally different type of website. Some type of opinion poll site or even a quiz website.

I like the idea but I don't have any plans on adding this feature any time soon.

Wednesday, May 16, 2012

My answer to "Multisite functionality - when?"

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


I have a pretty good idea how to do this multi-site setup. I'm going to try it this weekend.

If it works then I'll release the update next Monday, May 21

Monday, May 14, 2012

My answer to "Post times are incorrect"

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


Thank you for this bug report. It definetely has to be fixed. You are correct that time zone is set to user's time zone. I don't remember if user was able to set own time zone in "settings", but I'm sure that was the idea - to let user set own time zone.

I will investigate all these issues soon.

Friday, May 4, 2012

My answer to "Can we use lampcms in production ?"

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


About AOL, Google, Yahoo and OpenID login - these no longer work. They used to be a part of a Google Friend Connect service. Unfortunately Google discontinued this service recently.
I have just removed these buttons from this site, I will also remove all the Friend Connect related code from the program soon.

So now we are left with Facebook, Twitter and LinkedIn login.

I will have to add Login with Google using Google's API. I have not decided on Yahoo login support. I don't think I will be adding OpenID support.

The categories links do not work because I have not added rewrite rules for category urls. Category support is very new, just added recently. Originally Lampcms had support only for tags and I was not even planning on categories but because many people requested it, I have added categories which also support unlimited sub-categories.

You can use the program in production if you want, but at least wait for me to add rewrite rules and update css files to better support categories. I plan on doing it in the next 3 days.

Also this is still a beta version. For a pre-release I plan on changing the url model and it will not use rewrite rules, will instead use url routing model similar to how it's done in CodeIgniter or Symfony frameworks

The Pre-release will also fully support multi-site installation and also support for installation in non-root web directory, so people will be able to just add Lampcms to existing site in own sub-directory