E-portfolio vertimas - blogai su data

Locked
niac
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Mon Mar 05, 2007 9:13 am
Location: Vilnius
Contact:

E-portfolio vertimas - blogai su data

Post by niac » Mon Jul 28, 2008 4:01 pm

Sveiki, pasidariau komponentui e-portfolio vertimuka, betgi jis man rodo 1999 lapkricio menesi :)
Konkreciau: ka dar pakeist LT.php faile - setlocale scripte:
<?php
global $mosConfig_live_site;
// Header language definitions

//locale
// See this link for details: http://en.wikipedia.org/wiki/Locale
setlocale (LC_TIME, 'en_GB'); // set english locale, change second constant('en_GB') according your language
Nesgi as vien pakeiciau i

setlocale (LC_TIME, 'lt_LT.utf-8'); // set english locale, change second constant('lt_LT.utf-8') according your language

p.s. Itariu reiks kazka keist eporfolio.php faile, nesgi ta data blogai rodo butent viduje itaisytas kalaendorius. Cia man visai batai :)

niac
Joomla! Apprentice
Joomla! Apprentice
Posts: 17
Joined: Mon Mar 05, 2007 9:13 am
Location: Vilnius
Contact:

Re: E-portfolio vertimas - blogai su data

Post by niac » Mon Jul 28, 2008 4:18 pm

Bijau kad eporfolio.php faile yra klaidele kokia????
function viewCalendar($userId)
{
global $my, $database, $myScreen, $mosConfig_offset, $Itemid;
$mode = mosGetParam( $_REQUEST, 'mode', '' );
$sort = mosGetParam($_REQUEST, 'ep_order' , '');
$filter = mosGetParam($_REQUEST, 'ep_filter' , '');

$id = mosGetParam($_REQUEST, 'id' , '0');

$where = '';
$sorts = '';
switch ($sort){
case 'asc':
$sorts = 'ASC'; break;
case 'desc':
$sorts = 'DESC'; break;
default:
if ($mode == ''){
$sorts = 'ASC';
} break;
}

switch ($filter){
case 'today':
$where = "AND a.date = '".date('Y-m-d')."'" ; break;
case 'upcoming':
$where = "AND a.date >= '".date('Y-m-d')."'" ; break;
}

if ($mode != 'add_avent' || $mode != 'edit_event'){
$query = "SELECT a.*, b.name AS author FROM #__eportfolio_calendar_post a LEFT JOIN #__users b ON a.userid = b.id WHERE 1=1 $where ORDER BY a.date $sorts";
$database -> setQuery($query);
$rows = $database->LoadObjectList();
}
if (isset($_REQUEST['date']) && ($_REQUEST['date'] != '') && (strtotime($_REQUEST['date']) != -1)) {
$now_date = mysql_escape_string($_REQUEST['date']);
$strDate = $now_date;
$isValid = false;
//proverka pravilnosti date
if (ereg('^(([0-9]{2})|([0-9]{4}))[-,/]([0-9]{1,2})[-,/]([0-9]{1,2})$', $strDate)) {
$dateArr = split('[-,/]', $strDate);
$y=$dateArr[0]; $m=$dateArr[1]; $d=$dateArr[2];
$isValid = checkdate($m, $d, $y);
}
if (!$isValid) {
$date = time() + $mosConfig_offset * 60 * 60;
$now_date = date( 'Y-m-d', $date );
}
}
else {
$date = time() + $mosConfig_offset * 60 * 60;
$now_date = date( 'Y-m-d', $date );
}
$date= strtotime ($now_date);
$option='com_eportfolio';
$myScreen->show_head_menu($id, $option );
switch ($mode){
case 'view_month':
//$date = strtotime(date("Y-m-01", $date));
$myScreen->show_calendar_month( $id, $option, $rows, $date ); break;

case 'view_week':
$myScreen->show_calendar_week( $id, $option, $rows, $date ); break;

case 'view_day':
$myScreen->show_calendar_day( $id, $option, $rows, $date ) ; break;

case 'add_event':
if ( GetUserType($my->id) == 'student' || GetUserType($my->id) == 'teacher' || $my->usertype == 'Super Administrator' )
$myScreen->show_add_event( '', $option, $agenda_item = '' );
else
mosRedirect(sefRelToAbs("index.php?option=$option&Itemid=$Itemid&task=calendar&id=$id") );
break;

case 'cancel_post':
mosRedirect(sefRelToAbs("index.php?option=$option&Itemid=$Itemid&task=calendar&id=$id") ); break;

case 'event_save':
EP_save_event( $option ); break;

case 'edit':
EP_edit_event ( $option , $id ); break;

case 'delete':
EP_delete_event ( $option , $id ); break;

default:
show_portfolio_items( $id, $option, $rows, $date );
break;
}
}


Locked

Return to “Vertimai ir Kalba”