Mel's Joomla Blog Page
Getting a date field and picker working in Joomla 1.6+ PDF Print E-mail
Tuesday, 31 January 2012 00:00

Despite much searching on the web and on the Joomla forums, I was only slightly the wiser. Some experimentation inspired by what I read, however, allowed me to get it working:-

// output our date field and picker
$date_format_string='%Y-%m-%d'; // default YYYY-MM-DD
if ($date_format=='1') { // DD-MM-YYYY
$date_format_string='%d-%m-%Y';
$tmp2=explode('-', $enddate);
$enddate=$tmp2[2] . '-' . $tmp2[1] . '-' . $tmp2[0];
}
if ($date_format=='2') { // MM-DD-YYYY
$date_format_string='%m-%d-%Y';
$tmp2=explode('-', $enddate);
$enddate=$tmp2[1] . '-' . $tmp2[2] . '-' . $tmp2[0];
}
echo JHTML::_( 'calendar', "$enddate", "enddate", "enddate", $date_format_string, ' size="10" maxlength="10" title="Click on the icon to choose a date" READONLY ');

Last Updated on Friday, 10 February 2012 10:40
 
Converting components to be Joomla 1.6 / 1.7 / 2.5 compatible PDF Print E-mail
Monday, 02 January 2012 00:00

Below is a list of some of the things that need changing to do the conversions.

General:-

  • The installer XML manifest file needs numerous changes.
  • The frontend and backend language files need moving into a language folder. They also need placing in a language specific folder within that. (Eg:- language/en-GB/en-GB.com_whatever.ini.)
  • A special language file for use by the installer needs to be added to the same frontend folder. (Eg:- language/en-GB/en-GB.ini.)
  • The install, upgrade and uninstall scripts have been replaced by a single script called in all circumstances. It contains functions called before, after and during extension installation and removal.
  • global variables $mainframe and $option are no longer available.

Last Updated on Friday, 10 February 2012 10:41
Read more...