I thought it might be helpful to start a discussion on changes developers and site builders find as we work with Joomla! 1.6. Sometimes, small changes in logic can create real opportunity we might miss and differences that might be a little challenging to overcome.
Please share any changes you see in the code or behavior of the application that might help others. Also, as with all things on ATAAW, this is not a support forum but rather a discussion by professionals on the code base. User questions should continue to go to the Forums.
Tags: Joomla! 1.6
Permalink Reply by Tuan Pham Ngoc on February 16, 2011 at 7:59pm Hi Arelowo
I just completed converting one of my extension to Joomla 1.6 and I got the same problems. Here are my solutions to these problems :
- For the "name changed to remove space issue", we can simply add a language file, en-GB.com_mycomponent.sys.ini and define the language items corresponding to the name, for example, in my extension, the language items which I need to define are :
JOOM DONATION="Joom Donation"
CONFIGURATION="Configuration"
CAMPAIGNS="Campaigns"
DONORS="Donors"
CUSTOM FIELDS="Custom Fields"
........
Please note that the key of the language item need to be in uppercase.
2. Regarding the sub-menu items doesn't display : It seems in Joomla 1.6, the sub-menu items are not displayed automatically, the solution is I defined a helper function :
function addSubMenus($vName = 'donors') {
JSubMenuHelper::addEntry(
JText::_('Configuration'),
'index.php?option=com_jdonation&view=configuration',
$vName == 'configuration'
);
JSubMenuHelper::addEntry(
JText::_('Campaigns management'),
'index.php?option=com_jdonation&view=campaigns',
$vName == 'campaigns'
);
JSubMenuHelper::addEntry(
JText::_('Fields management'),
'index.php?option=com_jdonation&view=fields',
$vName == 'fields'
);
JSubMenuHelper::addEntry(
JText::_('Donors management'),
'index.php?option=com_jdonation&view=donors',
$vName == 'donors'
);
JSubMenuHelper::addEntry(
JText::_('Payment Plugins'),
'index.php?option=com_jdonation&view=plugins',
$vName == 'plugins'
);
JSubMenuHelper::addEntry(
JText::_('Translation'),
'index.php?option=com_jdonation&view=language',
$vName == 'language'
);
JSubMenuHelper::addEntry(
JText::_('CSV Export'),
'index.php?option=com_jdonation&task=csv_export',
false
);
}
And then, call this function at the end of display() function in the controller :
$vName = JRequest::getCmd('view') ;
JoomDonationHelper::addSubmenus($vName);
Hope this help !
Regards,
Tuan
Permalink Reply by Arelowo Alao on February 18, 2011 at 9:03pm Thanks Tuan!!
I was coming back here to post the solution that I found but it seems that you beat me to it.
Tuan Pham Ngoc said:
Hi Arelowo
I just completed converting one of my extension to Joomla 1.6 and I got the same problems. Here are my solutions to these problems :
- For the "name changed to remove space issue", we can simply add a language file, en-GB.com_mycomponent.sys.ini and define the language items corresponding to the name, for example, in my extension, the language items which I need to define are :
JOOM DONATION="Joom Donation"
CONFIGURATION="Configuration"
CAMPAIGNS="Campaigns"
DONORS="Donors"
CUSTOM FIELDS="Custom Fields"
........
Please note that the key of the language item need to be in uppercase.
2. Regarding the sub-menu items doesn't display : It seems in Joomla 1.6, the sub-menu items are not displayed automatically, the solution is I defined a helper function :
function addSubMenus($vName = 'donors') {
JSubMenuHelper::addEntry(
JText::_('Configuration'),
'index.php?option=com_jdonation&view=configuration',
$vName == 'configuration'
);
JSubMenuHelper::addEntry(
JText::_('Campaigns management'),
'index.php?option=com_jdonation&view=campaigns',
$vName == 'campaigns'
);
JSubMenuHelper::addEntry(
JText::_('Fields management'),
'index.php?option=com_jdonation&view=fields',
$vName == 'fields'
);
JSubMenuHelper::addEntry(
JText::_('Donors management'),
'index.php?option=com_jdonation&view=donors',
$vName == 'donors'
);
JSubMenuHelper::addEntry(
JText::_('Payment Plugins'),
'index.php?option=com_jdonation&view=plugins',
$vName == 'plugins'
);
JSubMenuHelper::addEntry(
JText::_('Translation'),
'index.php?option=com_jdonation&view=language',
$vName == 'language'
);
JSubMenuHelper::addEntry(
JText::_('CSV Export'),
'index.php?option=com_jdonation&task=csv_export',
false
);
}
And then, call this function at the end of display() function in the controller :
$vName = JRequest::getCmd('view') ;
JoomDonationHelper::addSubmenus($vName);
Hope this help !
Regards,
Tuan
Permalink Reply by Tuan Pham Ngoc on February 18, 2011 at 9:08pm Hi Arelowo
I also thought that you founded the answers yourself. However, just wanted to post it here in case someone has same questions :) .
Regards,
Tuan
Permalink Reply by Tuan Pham Ngoc on April 18, 2011 at 4:21am In Joomla 1.6, the $format parametter in date method has changed. In Joomla 1.5, the $format parametter is for strftime function. In Joomla 1.6, the $format parametter is for date function . So for example, In Joomla 1.5, you write :
<?php echo JHTML::_('date', $row->item_date,'%m-%d-%Y' ); ?>
In Joomla 1.6, It must be changed to :
<?php echo JHTML::_('date', $row->item_date,'m-d-Y' ); ?>
(No longer need % in the format) .
Permalink Reply by Andrew J Holden on August 11, 2011 at 12:32pm Hi Everyone,
We've been working on user-interface improvements using JQuery, but ran into a difficulty bridging a gap between 1.5 and 1.6 language/translation usage; solution here: http://cartanova.ca/code-labs/item/120-bringing-jtext-translatable-...
@AmyStephens
When Berners-Lee created the WWW, he intended it to serve as a database, of sorts. He had already conceptualized the Semantic Web. The rest of us in our rush to publish online did not give this near as much consideration, and as a result, we have a mess on our hands. If we want Joomla! to participate in Semantic technologies then our Web sites must have detail content categorized in such a way that it can be retrieved the same way, every time.
I really like this point: the name for "Weever" was inspired by Sir. Tim's book 'Weaving the Web' and his article in Scientific American on threats to the 'open web'. One point in particular, the need to include URI's in app-formats, resonated with us: http://www.scientificamerican.com/article.cfm?id=long-live-the-web
One small point of disagreement we have with him though, is the need to essentially match/standardize databases in order to create semantic usability. Our feeling is that on balance of simplicity generating complexity, this may not be possible, so we've taken the approach that a better solution is use standardized feed formats in outputs, and look for usable symmetries in the data.
So, we're creating 'R3S" right now, or "RSS3" if you prefer. The idea is to create a new faster/smarter standard to allow different databases to 'speak' to each other, along common lines (sort of like GFTS for transportation routing, or some of the stuff Google's been doing lately.) The project is just in its infancy, but I'll post more here if you're interested.
Sorry if that's a bit of divergence from the 1.6 topics, but I really like talking about this stuff :) We're doing a JUG SWO meeting on Joomla/Mobile/Semantic/Ideas here in September.
- Andrew H.
© 2012 Created by Amy Stephen.