Example #1
0
while (false !== ($file = readdir($handle))) {
    if (is_dir($file) && $file != "." && $file != ".." && $file != "CVS" && $file != ".svn") {
        array_push($languages, $file);
    }
}
closedir($handle);
echo "<br><b>Portlet: topic</b>";
//Parse all templates
foreach ($languages as $language) {
    //check whether language dir existents
    @mkdir("{$topic_doc_root}/templates/{$language}");
    //get language file
    $tpl = new Template("{$topic_doc_root}/language/{$language}", "keep");
    $tpl->set_file("language", "language.ihtml");
    //get blueprint for dialog
    $tpl->set_root("{$portal_doc_root}/language");
    $tpl->set_file("blueprint", "dialog_blueprint.ihtml");
    $tpl->set_var("DOC_ROOT", $config_webserver_ip);
    //set template root dir back to the general design
    $tpl->set_root("{$topic_doc_root}/language");
    echo "<br><br>Sprache: {$language}<br>";
    //*******************************************************************
    //* category_edit.ihtml
    //*******************************************************************
    $current_file = "category_edit";
    $tpl->set_file($current_file, "{$current_file}.ihtml");
    $tpl->set_block("language", "category_edit_feedback_headline_null");
    $tpl->set_block("language", "category_edit_title");
    $tpl->set_block("language", "category_edit_description");
    $tpl->set_block("language", "category_edit_ubb");
    $tpl->set_block("language", "category_edit_button_ok");
Example #2
0
 public function testSetRootTestpackageFiles()
 {
     $this->assertTrue($this->tp->set_root(Tst::$tests . 'files/templates'));
 }
Example #3
0
    exit;
}

if ($file_path) {
    $initial_path = preg_replace('#/[^/]*$#', '', $subsection_path[$current_sid][$current_ssid]);
    if (!preg_match('/\.html?$/i', $file_path)) {
        send_file_by_url_file_path($file_path, $initial_path);
    } else {
        $path_components = explode('/', str_replace('//', chr(1), $file_path));
        $file_info = public_path_to_disk_path($path_components, $initial_path);
        $subsection_path[$current_sid][$current_ssid] = $file_info->path;
    }
}

$t = new Template();
$t->set_root($webDir . '/template/' . $theme);
$t->set_file('page', 'ebook_fullscreen.html');
$t->set_var('URL_PATH', $urlAppend);
$t->set_var('langBack', $langLeave);
$t->set_var('page_title', q($currentCourseName . ': ' . $pageName));
$t->set_var('course_title', q($currentCourseName));
$t->set_var('course_title_short', q(ellipsize($currentCourseName, 35)));
$t->set_var('course_home_link', $urlAppend . 'courses/' . $course_code . '/');
$t->set_var('course_ebook', $langEBook);
$t->set_var('course_ebook_link', $urlAppend . 'modules/ebook/index.php?course=' . $course_code);
$t->set_var('exit_fullscreen_link', $exit_fullscreen_link);
$t->set_var('unit_parameter', $unit_parameter);
$t->set_var('template_base', $urlAppend . 'template/' . $theme . '/');
$t->set_var('img_base', $themeimg);
$t->set_var('js_base', $urlAppend . 'js');
 public function testSetRoot()
 {
     $tp2 = new Template();
     $this->assertTrue($tp2->set_root('.'));
 }
Example #5
0
while (false !== ($file = readdir($handle))) {
    if (is_dir($file) && $file != "." && $file != ".." && $file != "CVS" && $file != ".svn") {
        array_push($languages, $file);
    }
}
closedir($handle);
echo "<h1>Main Templates</h1>";
//Parse all templates
foreach ($languages as $language) {
    //check whether language dir existents
    @mkdir("{$templateoutputdir}/{$language}");
    //get language file
    $tpl = new Template("./{$language}", "keep");
    $tpl->set_file("language", "language.ihtml");
    //set template root dir back to the general design
    $tpl->set_root(".");
    //get dialog blueprint
    $tpl->set_file("blueprint", "dialog_blueprint.ihtml");
    $tpl->set_block("blueprint", "buttons", "BUTTONS");
    echo "<h3>Sprache: {$language}</h3>";
    //*******************************************************************
    //* cluster.ihtml
    //*******************************************************************
    $current_file = "cluster";
    $tpl->set_file($current_file, "{$current_file}.ihtml");
    $tpl->set_var(array("DUMMY" => "", "DOC_ROOT" => $config_webserver_ip));
    $tpl->parse("OUT", $current_file);
    $out = $tpl->get_var("OUT");
    $fp = fopen("{$templateoutputdir}/{$language}/{$current_file}.ihtml", "w");
    fwrite($fp, $out);
    fclose($fp);
Example #6
0
while (false !== ($file = readdir($handle))) {
    if (is_dir($file) && $file != "." && $file != ".." && $file != "CVS" && $file != ".svn") {
        array_push($languages, $file);
    }
}
closedir($handle);
echo "<br><b>Portlet: headline</b>";
//Parse all templates
foreach ($languages as $language) {
    //check whether language dir existents
    @mkdir("{$portal_doc_root}/portlets/headline/templates/{$language}");
    //get language file
    $tpl = new Template("{$portlet_doc_root}/language/{$language}", "keep");
    $tpl->set_file("language", "language.ihtml");
    //get blueprint for dialog
    $tpl->set_root("{$portal_doc_root}/language");
    $tpl->set_file("blueprint", "dialog_blueprint.ihtml");
    $tpl->set_var("DOC_ROOT", $config_webserver_ip);
    //set template root dir back to the general design
    $tpl->set_root("{$portlet_doc_root}/language");
    echo "<br><br>Sprache: {$language}<br>";
    //*******************************************************************
    //* edit.ihtml
    //*******************************************************************
    $current_file = "edit";
    $tpl->set_file($current_file, "{$current_file}.ihtml");
    $tpl->set_block("language", "edit_title");
    $tpl->set_block("language", "edit_feedback_poll_topic_null");
    $tpl->set_block("language", "edit_poll_topic");
    $tpl->set_block("language", "edit_poll_options");
    $tpl->set_block("language", "edit_startdate");
Example #7
0
while (false !== ($file = readdir($handle))) {
    if (is_dir($file) && $file != "." && $file != ".." && $file != "CVS" && $file != ".svn") {
        array_push($languages, $file);
    }
}
closedir($handle);
echo "<br><b>Portlet: appointment</b>";
//Parse all templates
foreach ($languages as $language) {
    //check whether language dir existents
    @mkdir("{$appointment_doc_root}/templates/{$language}");
    //get language file
    $tpl = new Template("{$appointment_doc_root}/language/{$language}", "keep");
    $tpl->set_file("language", "language.ihtml");
    //get blueprint for dialog
    $tpl->set_root("{$portal_doc_root}/language");
    $tpl->set_file("blueprint", "dialog_blueprint.ihtml");
    $tpl->set_var("DOC_ROOT", $config_webserver_ip);
    //set template root dir back to the general design
    $tpl->set_root("{$appointment_doc_root}/language");
    echo "<br><br>Sprache: {$language}<br>";
    //*******************************************************************
    //* appointment_edit.ihtml
    //*******************************************************************
    $current_file = "appointment_edit";
    $tpl->set_file($current_file, "{$current_file}.ihtml");
    $tpl->set_block("language", "appointment_edit_title");
    $tpl->set_block("language", "appointment_edit_feedback_headline_null");
    $tpl->set_block("language", "appointment_edit_feedback_startdate_wrong");
    $tpl->set_block("language", "appointment_edit_feedback_enddate_wrong");
    $tpl->set_block("language", "appointment_edit_feedback_time_wrong");
Example #8
0
while (false !== ($file = readdir($handle))) {
    if (is_dir($file) && $file != "." && $file != ".." && $file != "CVS" && $file != ".svn") {
        array_push($languages, $file);
    }
}
closedir($handle);
echo "<br><br><hr><b>MODULE: Suche</b><hr>";
//Parse all templates
foreach ($languages as $language) {
    //check whether language dir existents
    @mkdir("{$tmp_doc_root}/templates/{$language}");
    //get language file
    $tpl = new Template("{$tmp_doc_root}/language/{$language}", "keep");
    $tpl->set_file("language", "language.ihtml");
    //get blueprint for dialog
    $tpl->set_root("{$tmp_doc_root}/language");
    $tpl->set_var("DOC_ROOT", $config_webserver_ip);
    $tpl->set_var("CONFIG_DOC_ROOT", $config_doc_root);
    //set template root dir back to the general design
    $tpl->set_root("{$tmp_doc_root}/language");
    echo "<br><br>Sprache: {$language}<br>";
    //*******************************************************************
    //* search_mask.ihtml
    //*******************************************************************
    $current_file = "search_mask";
    $tpl->set_file($current_file, "{$current_file}.ihtml");
    $tpl->set_block("language", "search_search");
    $tpl->set_block("language", "search_commitsearch");
    $tpl->set_block("language", "search_cancel");
    $tpl->set_block("language", "search_keyword");
    $tpl->set_block("language", "search_fulltext");
Example #9
0
while (false !== ($file = readdir($handle))) {
    if (is_dir($file) && $file != "." && $file != ".." && $file != "CVS" && $file != ".svn") {
        array_push($languages, $file);
    }
}
closedir($handle);
echo "<br><b>Portlet: msg</b>";
//Parse all templates
foreach ($languages as $language) {
    //check whether language dir existents
    @mkdir("{$messages_doc_root}/templates/{$language}");
    //get language file
    $tpl = new Template("{$messages_doc_root}/language/{$language}", "keep");
    $tpl->set_file("language", "language.ihtml");
    //get blueprint for dialog
    $tpl->set_root("{$portal_doc_root}/language");
    $tpl->set_file("blueprint", "dialog_blueprint.ihtml");
    $tpl->set_var("DOC_ROOT", $config_webserver_ip);
    //set template root dir back to the general design
    $tpl->set_root("{$messages_doc_root}/language");
    echo "<br><br>Sprache: {$language}<br>";
    //*******************************************************************
    //* edit.ihtml
    //*******************************************************************
    $current_file = "edit";
    $tpl->set_file($current_file, "{$current_file}.ihtml");
    $tpl->set_block("language", "edit_title");
    $tpl->set_block("language", "edit_script_confirm_1");
    $tpl->set_block("language", "edit_script_confirm_2");
    $tpl->set_block("language", "edit_no_message");
    $tpl->set_block("language", "edit_alt_delete");