Solutions Zeta Template TO JL_CONVERT_DATE GETPICTURE

This is the General Board for JoomLeague Questions!
volandri
Newbie
Posts: 5
Joined: Tue Jan 11, 2011 2:08 pm

Solutions Zeta Template TO JL_CONVERT_DATE GETPICTURE

Postby volandri » Wed Jan 12, 2011 7:23 am

Hi to all:

I write my experience with the module zeta template + JoomLeague zeta 0.93 + joomla 1.5. When installing the zeta template, I had 2 serious errors:

1.- The first was the fatal error jl_convert error "Fatal error: Call to undefined function jl_convert_date()" (line 1034)

2.- The second fatal error was getpicture. "Fatal error: Call to undefined function getpicture()" (line 3296)

Solution:

The first is find the file admin.joomleague.php of Zeta template and modify the code (I worked with the famous notepad)

In the case 1 (jl_convert_date):

The original sentence is:

$datum = jl_convert_date($result->round_date_first.' 00:00:00', '%d.%m.%Y', $project->serveroffset);
if ($result->round_date_last!='0000-00-00') $datum .= '-'.jl_convert_date($result->round_date_last.' 00:00:00', '%d.%m.%Y', $project->serveroffset);

The solution is change the function jl_convert_date by mosFormatDate

$datum = mosFormatDate($result->round_date_first.' 00:00:00', '%d.%m.%Y', $project->serveroffset);
if ($result->round_date_last!='0000-00-00') $datum .= '-'.mosFormatDate($result->round_date_last.' 00:00:00', '%d.%m.%Y', $project->serveroffset);

In the case 2 (getpicture)

The original sentence is:

// select list of images from placeholder folder
$images[] = mosHTML::makeOption( '', _JL_ADMIN_SELECT_PICTURE );
$list = getPictures(_JOOMLA_JL_PATH . '/images/joomleague/teams', true);
if ( count($list) )
{
sort( $list );
foreach ($list as $l) {
$images[] = mosHTML::makeOption( 'images/joomleague/teams/'.$l, $l );
}
}

$logo_big_list = mosHTML::selectList( $images, 'selbig',
'class="inputbox" size="1" onchange="src=document.getElementById(\'logo_big\');src.value=this.value;updateClubLogo(\'big\', src);"',
'value', 'text', $row->logo_big );
$logo_middle_list = mosHTML::selectList( $images, 'selmedium', 'class="inputbox" size="1" onchange="src=document.getElementById(\'logo_middle\');src.value=this.value;updateClubLogo(\'medium\', src);"', 'value', 'text', $row->logo_middle );
$logo_small_list = mosHTML::selectList( $images, 'selsmall', 'class="inputbox" size="1" onchange="src=document.getElementById(\'logo_small\');src.value=this.value;updateClubLogo(\'small\', src);"','value', 'text', $row->logo_small );
unset( $images );

$view = JL_ADMIN_TEMPLATE_PATH.'/edit_form_clubs.tpl.php';
require JL_ADMIN_TEMPLATE_PATH.'/view.tpl.php';
}


The solution is replace with this new sentence of file:


// select list of images from placeholder folder
$images[] = mosHTML::makeOption( '', _JL_ADMIN_SELECT_PICTURE );

if ( $dp = opendir( _JOOMLA_JL_PATH . '/images/joomleague/teams' ) )

{

$list = array();

while ( ( $file = readdir( $dp ) ) !== false )

{

if (preg_match('#^[^&\'"<>]+\.(?:gif|png|jpe?g)$#i', $file ) ) {

$list[] = $file;

}

}

if ( count($list) )

{

sort( $list );

foreach ($list as $l) {

$images[] = mosHTML::makeOption( '/images/joomleague/teams/'.$l, $l );

}

}

closedir($dp);

}

$logo_big_list = mosHTML::selectList( $images, 'selbig',

'class="inputbox" size="1" onchange="src=document.getElementById(\'logo_big\');src.value=this.value;updateClubLogo(\'big\', src);"',

'value', 'text', $row->logo_big );

$logo_middle_list = mosHTML::selectList( $images, 'selmedium', 'class="inputbox" size="1" onchange="src=document.getElementById(\'logo_middle\');src.value=this.value;updateClubLogo(\'medium\', src);"', 'value', 'text', $row->logo_middle );

$logo_small_list = mosHTML::selectList( $images, 'selsmall', 'class="inputbox" size="1" onchange="src=document.getElementById(\'logo_small\');src.value=this.value;updateClubLogo(\'small\', src);"','value', 'text', $row->logo_small );

unset( $images );



$view = JL_ADMIN_TEMPLATE_PATH.'/edit_form_clubs.tpl.php';

require JL_ADMIN_TEMPLATE_PATH.'/view.tpl.php';

}

Is my contribution to the forum and sorry for my poor english, but it is not my native language (I'm Latino, lol)

And_One
Joomleague Project Manager, Donator
Joomleague Project Manager, Donator
Posts: 3613
Joined: Fri Sep 11, 2009 4:00 pm
Joomleague version: 2.0.x
Location: Graz
Contact:

Re: Solutions Zeta Template TO JL_CONVERT_DATE GETPICTURE

Postby And_One » Wed Jan 12, 2011 10:57 am

thx, could you pls format your post to use the bbcode tags for php?


Return to “JoomLeague Component, Version <= 0.93b”

Who is online

Users browsing this forum: No registered users and 5 guests

cron