@1,
# @2
and @3
.
#
# @example
# echo _M('@1 is a romance written by @2 in @3','foo','Tom Sawyer','Mark Twain','1890');
# // will result in:
# // "Tom Sawyer is a romance written by Mark Twain in 1890"
#
# echo _M('@2 escreveu o romance @1 em @3','foo','Tom Sawyer','Mark Twain','1890');
# //
# // will result in:
# // "Mark Twain escreveu o romance Tom Sawyer em 1890"
#---------------------------------------------------------------------
function _M($msg,$dom='miolo',$p1=null,$p2=null,$p3=null)
{ global $TEXTDOMAIN,$MIOLOCONF;
if ( $msg=='')
{
return $msg;
}
if ( function_exists('_') )
{
if ( $dom != $TEXTDOMAIN )
{
$TEXTDOMAIN = $dom;
bindtextdomain($TEXTDOMAIN, $MIOLOCONF['i18n']['locale']);
textdomain($TEXTDOMAIN);
}
$msg = _($msg);
}
if ( $p1 !== null )
{
$msg = str_replace('@1',$p1,$msg);
}
if ( $p2 !== null )
{
$msg = str_replace('@2',$p2,$msg);
}
if ( $p3 !== null )
{
$msg = str_replace('@3',$p3,$msg);
}
return $msg;
}
// keep login variable in session settings
session_start();
// create master instance of MIOLO object
$MIOLO = new MIOLO;
// reset MIOLO trace log (JEdit Plugin, MIOLO Trace)
$MIOLO->LogMessage('[RESET_LOG_MESSAGES]');
// globas used in all the modules
$theme =& $MIOLO->GetTheme();
$menu =& $theme->GetMainMenu();
$navbar =& $theme->GetNavigationBar();
// register default JavaScript source
$theme->AddScript("common.js");
// obtain request context object
$context = new Context();
// do initial access control
$MIOLO->CheckLogin();
?>