The Joomla! Forum ™





Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Community Builder
PostPosted: Thu Feb 09, 2006 8:55 am 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Thu Aug 18, 2005 8:53 am
Posts: 831
Location: Switzerland
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

_________________
Beat 8)
www.joomlapolis.com <= Community Builder + CBSubs Joomla membership payment system - team
hosting.joomlapolis.com <= Joomla! Hosting, by the CB Team


Last edited by Jinx on Wed Feb 22, 2006 3:15 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Fri Feb 10, 2006 2:15 pm 
User avatar
Joomla! Champion
Joomla! Champion

Joined: Fri Aug 19, 2005 10:46 am
Posts: 5786
Location: Roma
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


Top
 Profile  
 
PostPosted: Fri Feb 10, 2006 3:41 pm 
Joomla! Explorer
Joomla! Explorer

Joined: Wed Aug 17, 2005 11:22 pm
Posts: 397
Location: Southern California
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


Top
 Profile  
 
PostPosted: Fri Feb 10, 2006 6:50 pm 
User avatar
Joomla! Virtuoso
Joomla! Virtuoso

Joined: Fri Sep 16, 2005 8:41 pm
Posts: 3742
Location: NRW - Germany
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.


Top
 Profile  
 
PostPosted: Mon Feb 13, 2006 12:05 am 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Thu Aug 18, 2005 8:53 am
Posts: 831
Location: Switzerland
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


Top
 Profile  
 
PostPosted: Mon Feb 13, 2006 9:31 am 
User avatar
Joomla! Virtuoso
Joomla! Virtuoso

Joined: Fri Sep 16, 2005 8:41 pm
Posts: 3742
Location: NRW - Germany
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:
/*
 * 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.


Top
 Profile  
 
PostPosted: Mon Feb 13, 2006 9:35 am 
User avatar
Joomla! Virtuoso
Joomla! Virtuoso

Joined: Fri Sep 16, 2005 8:41 pm
Posts: 3742
Location: NRW - Germany
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.


Top
 Profile  
 
PostPosted: Mon Feb 13, 2006 9:49 am 
User avatar
Joomla! Guru
Joomla! Guru

Joined: Thu Aug 18, 2005 8:53 am
Posts: 831
Location: Switzerland
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:
/*
 * 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


Top
 Profile  
 
PostPosted: Mon Feb 13, 2006 10:11 am 
User avatar
Joomla! Virtuoso
Joomla! Virtuoso

Joined: Fri Sep 16, 2005 8:41 pm
Posts: 3742
Location: NRW - Germany
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.


Top
 Profile  
 
 Post subject: Re: Community Builder
PostPosted: Sat Oct 21, 2006 8:12 am 
Joomla! Enthusiast
Joomla! Enthusiast

Joined: Mon Jul 31, 2006 9:33 pm
Posts: 242
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


Top
 Profile  
 
 Post subject: Re: Community Builder
PostPosted: Sat Oct 21, 2006 8:16 am 
User avatar
Joomla! Master
Joomla! Master
Online

Joined: Thu Aug 18, 2005 7:13 am
Posts: 16548
Please read this.

_________________
Joomla forum global moderator.

Have fun


Top
 Profile  
 
 Post subject: Re: Community Builder
PostPosted: Sun Oct 14, 2007 3:51 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Thu Jun 07, 2007 7:10 pm
Posts: 21
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.


Top
 Profile  
 
 Post subject: Re: Community Builder
PostPosted: Sun Oct 14, 2007 10:35 am 
User avatar
Joomla! Master
Joomla! Master
Online

Joined: Thu Aug 18, 2005 7:13 am
Posts: 16548
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.

_________________
Joomla forum global moderator.

Have fun


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 



Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group