Community Builder

Post Reply
User avatar
Beat
Joomla! Guru
Joomla! Guru
Posts: 844
Joined: Thu Aug 18, 2005 8:53 am
Location: Switzerland
Contact:

Community Builder

Post by Beat » Thu Feb 09, 2006 8:55 am

as my postings in:
http://forum.joomla.org/index.php/topic ... #msg200520
belong more to this thread, i'm "moving" my post here:

The backwards compatibility is indeed fabulous, considering that the whole engine running  Joomla! has been re-factored.

There are very few fundamental changes, most of which that I welcome warmly, which will need slight adaptations on some components. These changes are backwards-compatible with Joomla 1.0/Mambo 4.5.

Here are the ones that we have spotted (and chosen not to correct for backwards compatibility at this stage):
  • Global scope: For security enhancement reasons and better encapsulation reasons, the components are not anymore just included from the main index.php, but called from a function. Thus their variables scope is not the global scope anymore.
    This means that variables created in the main part of a component, which are not declared as "global" before creation belong to the component's main execution, and are not accessible as global from the components functions.
    The adaptation is trivial: just add one line in the begin of the component: "global ...." enumerating the global variables of the component, and the ones of Joomla it is using.
  • Global parameters in variables: By default URL parameters are not translated anymore into globals of same name, but should be accessed the standard way.
    Here too, the change is trivial: instead of looking directly at for instance at $form, do first a $form=mosGetParam( $_REQUEST, 'reportform'); .
    This will prevent SQL injection attacks by the way, as mosGetParam does escaping even with magicquotes off.
  • Start of changes in ACL: The tables structure of the used phpGACL has changed slightly, due to an update to latest phpGACL.
    The $acl->.... methods remain backwards compatible, so components which do not access ACL tables wildly are ok.
  • Modules path: Each module is installed in its own sub-directory, like components, meaning if they have images or other files, the path changes.
  • Plugins: The mambots have been renamed to joomla plugins, as well as the directory, so same remark applies there.
This list is probably not complete, might need adjustments, and should probably go into the new http://dev.joomla.org portal.

So overall, the backwards compatibility is excellent, but not granted without small changes for all existing components, modules and mambots. 3PD are encouraged to download Joomla! 1.1 alpha 2 now, and to adapt their extensions to Joomla! 1.1 now. These adaptations can keep them backwards compatible to Joomla! 1.0, avoiding to have to mange two versions :).

Hope these indications will help other 3PDs ;)

If you see other things, please add them to my list, and/or add these to the official list :P
Last edited by Jinx on Wed Feb 22, 2006 3:15 pm, edited 1 time in total.
Beat 8)
www.joomlapolis.com <= Community Builder + CBSubs Joomla membership payment system - team
hosting.joomlapolis.com <= Joomla! Hosting, by the CB Team

User avatar
alikon
Joomla! Champion
Joomla! Champion
Posts: 5941
Joined: Fri Aug 19, 2005 10:46 am
Location: Roma
Contact:

Re: BC findings during Community Builder testing and adaptation

Post by alikon » Fri Feb 10, 2006 2:15 pm

Thank's for this very intersting and usefull reading , let me read more proof....
Nicola Galgano
i know that i don't know
www.alikonweb.it

gram
Joomla! Explorer
Joomla! Explorer
Posts: 397
Joined: Wed Aug 17, 2005 11:22 pm
Location: Southern California
Contact:

Re: BC findings during Community Builder testing and adaptation

Post by gram » Fri Feb 10, 2006 3:41 pm

Good post Beat, very useful.

I will see if I can encapsulate the session differences and add them to this thread. 

GRAM
GRAM
http://coders.mlshomequest.com/ < -- Developer of samSiteMap component

User avatar
Hackwar
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3788
Joined: Fri Sep 16, 2005 8:41 pm
Location: NRW - Germany
Contact:

Re: BC findings during Community Builder testing and adaptation

Post by Hackwar » Fri Feb 10, 2006 6:50 pm

Hi Beat,
I wrote you about the changes in ACL with the different function call. Since I'm extremely short on time, could you copy the information over to this thread? BTW: You could put this in an article in the wiki
god doesn't play dice with the universe. not after that drunken night with the devil where he lost classical mechanics in a game of craps.

Since the creation of the Internet, the Earth's rotation has been fueled, primarily, by the collective spinning of English teachers in their graves.

User avatar
Beat
Joomla! Guru
Joomla! Guru
Posts: 844
Joined: Thu Aug 18, 2005 8:53 am
Location: Switzerland
Contact:

Re: BC findings during Community Builder testing and adaptation

Post by Beat » Mon Feb 13, 2006 12:05 am

I've added the changes to the dev wiki into chapter 7.1 here:

http://dev.joomla.org/index.php?option= ... nsions_fit

Please reply here in similar formating if things need to be added (if you can't directly edit the wiki).

I saw once a post regarding WYSIWYG editor usage changes, but just can't find it again. Anyone has the link ?
Beat 8)
www.joomlapolis.com <= Community Builder + CBSubs Joomla membership payment system - team
hosting.joomlapolis.com <= Joomla! Hosting, by the CB Team

User avatar
Hackwar
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3788
Joined: Fri Sep 16, 2005 8:41 pm
Location: NRW - Germany
Contact:

Re: BC findings during Community Builder testing and adaptation

Post by Hackwar » Mon Feb 13, 2006 9:31 am

Hi Beat,
you wrote that ACL didn't really change, but:
1. The ACL system didn't change from its "roots"
2. There was no update to the phpGACL-API that affects the system.
3. There is a change to the acl_check-function to make transition in the future easier. Since the check is at the moment dependend on $my->usertype and it will change in future versions to $my->id, Louis created a wrapper. The new call would look like this:

Code: Select all

/*
 * Make sure the user is authorized to view this page
 */
$user = & $mainframe->getUser();
if (!$user->authorize( 'com_config', 'manage' ))
{
	josRedirect('index2.php?', JText :: _('ALERTNOTAUTH'));
}
More advanced acl-functions will come in Joomla 1.2.

Hannes
god doesn't play dice with the universe. not after that drunken night with the devil where he lost classical mechanics in a game of craps.

Since the creation of the Internet, the Earth's rotation has been fueled, primarily, by the collective spinning of English teachers in their graves.

User avatar
Hackwar
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3788
Joined: Fri Sep 16, 2005 8:41 pm
Location: NRW - Germany
Contact:

Re: BC findings during Community Builder testing and adaptation

Post by Hackwar » Mon Feb 13, 2006 9:35 am

I forgot:
mosgetparam changed, too. Its now wrapped in JRequest::getVar. Don't know any more about this, Johan just told me.
god doesn't play dice with the universe. not after that drunken night with the devil where he lost classical mechanics in a game of craps.

Since the creation of the Internet, the Earth's rotation has been fueled, primarily, by the collective spinning of English teachers in their graves.

User avatar
Beat
Joomla! Guru
Joomla! Guru
Posts: 844
Joined: Thu Aug 18, 2005 8:53 am
Location: Switzerland
Contact:

Re: BC findings during Community Builder testing and adaptation

Post by Beat » Mon Feb 13, 2006 9:49 am

Hackwar wrote: Hi Beat,
you wrote that ACL didn't really change, but:
1. The ACL system didn't change from its "roots"
2. There was no update to the phpGACL-API that affects the system.
3. There is a change to the acl_check-function to make transition in the future easier. Since the check is at the moment dependend on $my->usertype and it will change in future versions to $my->id, Louis created a wrapper. The new call would look like this:

Code: Select all

/*
 * Make sure the user is authorized to view this page
 */
$user = & $mainframe->getUser();
if (!$user->authorize( 'com_config', 'manage' ))
{
	josRedirect('index2.php?', JText :: _('ALERTNOTAUTH'));
}
More advanced acl-functions will come in Joomla 1.2.

Hannes
Well, the ACL changed slightly, but sufficiently to break any direct access to the acl tables (as is needed for BC with mambo 4.5.0 API, yes we are stretching far from 4.5.0 up to 1.1)...as some "group_id" and others "xxx_id" columns changed into "id" naming, for reasons unknown to Johan at BC-tests-time. We supposed during our BC-tests that this was due to update to latest phpGACL by Andrew, but we might be wrong. Maybe you have a better explanation of a good reason why the columns changed name between 1.0 and 1.1.

Yes, we noticed also the changes in acl_check, but Louis made them better backwards-compliant during BC-tests.

Yes, I'm noticing and appreciating highly your work on ACL, and also highly appreciating the fact that it's updating will be concentrated into 1 release (1.2).

My wiki article is a first draft... better a start than nothing. ;)

Thanks also for the pointer to mosGetParam, i will recheck. It didn't bother me as it looked BC-compliant :D
Beat 8)
www.joomlapolis.com <= Community Builder + CBSubs Joomla membership payment system - team
hosting.joomlapolis.com <= Joomla! Hosting, by the CB Team

User avatar
Hackwar
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3788
Joined: Fri Sep 16, 2005 8:41 pm
Location: NRW - Germany
Contact:

Re: BC findings during Community Builder testing and adaptation

Post by Hackwar » Mon Feb 13, 2006 10:11 am

When the tables were created, Andrew used the scheme of phpGACL, but changed it a bit, so that it was group_id instead of id. Now, since we want to use the original phpGACL-API without changing, we had to change it back. Those are preparations for the future system. In 1.2, we will delete #__groups and #__usertypes. Most likely we will change #__users and remove the field gid. What we will do with usertype, I don't know. We could remove it or we could use it to store a group-name that is shown for a user in the forum or elsewhere. Besides these changes, we will only add new tables, no further alterations. At least not for user-authentication and access managment.
god doesn't play dice with the universe. not after that drunken night with the devil where he lost classical mechanics in a game of craps.

Since the creation of the Internet, the Earth's rotation has been fueled, primarily, by the collective spinning of English teachers in their graves.

MJH
Joomla! Enthusiast
Joomla! Enthusiast
Posts: 242
Joined: Mon Jul 31, 2006 9:33 pm
Contact:

Re: Community Builder

Post by MJH » Sat Oct 21, 2006 8:12 am

Any ideas when CB will be working with 1.5 again?
FREE Joomla Hosting
1st month hosting free!
Free installation, Support, and Security checks.
http://myjoomlahosting.com

User avatar
Tonie
Joomla! Master
Joomla! Master
Posts: 16553
Joined: Thu Aug 18, 2005 7:13 am

Re: Community Builder

Post by Tonie » Sat Oct 21, 2006 8:16 am

Please read this.

modemlooper
Joomla! Apprentice
Joomla! Apprentice
Posts: 21
Joined: Thu Jun 07, 2007 7:10 pm

Re: Community Builder

Post by modemlooper » Sun Oct 14, 2007 3:51 am

I have been testing 1.5 and 98% of the old extensions do not work so I can't understand why you would praise its backwards compatibility.

User avatar
Tonie
Joomla! Master
Joomla! Master
Posts: 16553
Joined: Thu Aug 18, 2005 7:13 am

Re: Community Builder

Post by Tonie » Sun Oct 14, 2007 10:35 am

The code that has been in Mambo/Joomla is old. Through the years, several coding practices came into being. All of these are currently running under Joomla 1.0.x. When creating the legacy layer, some of the older (and less correct) methods do not work any more. It's true that most extensions need a little bit of tweaking to get them running on 1.5. The changes are not big in a lot of cases. My first ever written extension worked in half an hour of tweaking a few minor issues. My first template written worked out of the box. These were written in a time I was learning Mambo and had no prior knowledge in coding for it.


Post Reply

Return to “Third Party Testing for Joomla! 1.5”