http://www.atutor.ca/atutor/mantis/view.php?id=2630
authorjoel kronenberg <joel.kronenberg@utoronto.ca>
Thu, 13 Jul 2006 20:05:56 +0000 (20:05 -0000)
committerjoel kronenberg <joel.kronenberg@utoronto.ca>
Thu, 13 Jul 2006 20:05:56 +0000 (20:05 -0000)
docs/documentation/admin/creating_themes.php
docs/documentation/admin/cron_setup.php
docs/documentation/admin/pages.inc.php
docs/documentation/common/fr/text.php
docs/documentation/common/frame_header.php
docs/documentation/common/print.php
docs/documentation/common/text.php
docs/documentation/general/pages.inc.php
docs/documentation/instructor/pages.inc.php

index 850ad2f..aedc396 100644 (file)
@@ -1,6 +1,6 @@
 <?php require('../common/body_header.inc.php'); $lm = '$LastChangedDate$'; ?>
 
 <h2>Creating Themes</h2>
-       <p>The process for creating a theme is basically to export an existing theme from ATutor, import it back into ATutor, then modify the files of the copied theme. Details about creating themes can be found in the <a href="../../themes/themes_readme.txt"><kbd>themes_readme.txt</kbd></a> file found in the <kbd>/themes</kbd> directory of your ATutor installation. Also see the comments included in the files of the Default ATutor theme for additional details.</p>
+       <p>The process for creating a theme is basically to export an existing theme from ATutor, import it back into ATutor, then modify the files of the copied theme. Details about creating themes can be found in the <kbd><a href="../../themes/themes_readme.txt">themes_readme.txt</a></kbd> file found in the <kbd>/themes</kbd> directory of your ATutor installation. Also see the comments included in the files of the Default ATutor theme for additional details.</p>
 
 <?php require('../common/body_footer.inc.php'); ?>
index 6bd159b..834642b 100644 (file)
@@ -8,7 +8,7 @@
 
        <p>Notice that the URL being used will be unique for each installation and that for security reasons the requested URL includes a secret six-character alpha-numerica authentication key. The cron will not run if the key is incorrect or missing.</p>
 
-       <p>The <a href="system_preferences.php"><em>Mail Queue</em></a> feature requires the cron to be set-up and running correctly before it can be enabled.</p>
+       <p>The <em><a href="system_preferences.php">Mail Queue</a></em> feature requires the cron to be set-up and running correctly before it can be enabled.</p>
 
        <h3>Unix Setup</h3>
                <ol>
index f976b83..5fb0645 100644 (file)
@@ -1,4 +1,5 @@
 <?php
+       $_pages = array();
        $_pages['introduction.php']                  = 'Introduction';
        $_pages['installation.php']                  = 'Installation';
        $_pages['requirements_recommendations.php']  = 'Requirements &amp; Recommendations';
@@ -9,9 +10,6 @@
        $_pages['system_preferences.php']            = 'System Preferences';
        $_pages['default_preferences.php']                       = 'Default Preferences';
        $_pages['languages.php']                     = 'Languages';
-       $_pages['importing_languages.php']                       = 'Importing Languages';
-       $_pages['managing_existing_languages.php']       = 'Managing Existing Languages';
-       $_pages['translating_atutor.php']                        = 'Translating ATutor';
        $_pages['themes.php']                        = 'Themes';
        $_pages['importing_themes.php']              = 'Importing/Exporting Themes';
        $_pages['managing_existing_themes.php']          = 'Managing Existing Themes';
index 2e0e663..5bb8930 100644 (file)
@@ -1,8 +1,9 @@
 <?php\r
 \r
+$text = array();\r
 $text['next_chapter'] = 'Prochain Chapitre';\r
 $text['previous_chapter'] = 'Chapitre Précédent';\r
-$text['page_not_translated'] = 'Cette page n\'a pas été encore traduite à cette langue.';\r
+$text['page_not_translated'] = 'Cette section n\'a pas été encore traduite à votre langue demandée.';\r
 $text['doc_user'] = 'User Documentatione';\r
 \r
 ?>
\ No newline at end of file
index 59a4d77..70fe61f 100644 (file)
@@ -61,7 +61,7 @@ if (top.name == 'popup') {
 \r
 <a href="../index/<?php echo $req_lang; ?>" target="_top"><?php get_text('return_to_handbook'); ?></a> | \r
 \r
-<input type="text" name="query" /> <input type="submit" name="search" value="<?php get_text('search'); ?>" /> |  <a href="print.php?<?php echo $section; ?>" target="_top"><?php get_text('print_version'); ?></a>\r
+<input type="text" name="query" /> <input type="submit" name="search" value="<?php get_text('search'); ?>" /> |  <a href="print.php?<?php echo $section; ?>&amp;<?php echo $req_lang; ?>" target="_top"><?php get_text('print_version'); ?></a>\r
                        <script type="text/javascript">\r
                        //<!--\r
                        document.writeln(' | ');\r
index 082b511..222e584 100644 (file)
@@ -1,45 +1,40 @@
-<?php
-/************************************************************************/
-/* ATutor                                                                                                                              */
-/************************************************************************/
-/* Copyright (c) 2002-2006 by Greg Gay, Joel Kronenberg & Heidi Hazelton*/
-/* Adaptive Technology Resource Centre / University of Toronto                 */
-/* http://atutor.ca                                                                                                            */
-/*                                                                                                                                             */
-/* This program is free software. You can redistribute it and/or               */
-/* modify it under the terms of the GNU General Public License                 */
-/* as published by the Free Software Foundation.                                               */
-/************************************************************************/
-// $Id: print.php 5866 2005-12-15 16:16:03Z joel $
-
-?>
-
+<?php require(dirname(__FILE__) . '/vitals.inc.php'); ?>
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict //EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html lang="en">
+<html lang="<?php echo $req_lang; ?>">
 <head>
-       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-       <title>ATutor Handbook</title>
+       <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+       <title><?php get_text('doc_title'); ?></title>
        <link rel="stylesheet" href="styles.css" type="text/css" />
 </head>
 <body>
 <?php
-if (isset($_GET['admin'])) {
-       $section = 'admin';
-} elseif (isset($_GET['instructor'])) {
-       $section = 'instructor';
-} elseif (isset($_GET['general'])){
-       $section = 'general';
-} else {
-       $section = 'general';
-}
-
 require('../'.$section.'/pages.inc.php');
 
-
-echo '<a href="../'.$section.'/index.php" target="_top">Back to Chapters</a>';
+echo '<a href="../'.$section.'/index.php?'.$req_lang.'" target="_top">';
+get_text('back_to_chapters');
+echo '</a>';
 
 foreach ($_pages as $file => $title) {
-       readfile('../'.$section.'/'.$file);
+       if (($req_lang != 'en') && (file_exists('../'.$section.'/'.$req_lang.'/'.$file))) {
+               $string = file_get_contents('../'.$section.'/'.$req_lang.'/'.$file);
+       } else if ($req_lang != 'en') {
+               ?>
+               <div style="margin: 20px auto; border: 1px solid #aaf; padding: 4px; text-align: center; background-color: #eef;">
+                       <?php get_text('page_not_translated'); ?>
+               </div>
+               <?php
+               $string = file_get_contents('../'.$section.'/'.$file);
+       } else {
+               $string = file_Get_contents('../'.$section.'/'.$file);
+       }
+       
+       $patterns = array('#<a href="(?!http)([[:alnum:].?/_-]+)"([^>]*)>([^<]+)</a>#is',
+                                         '#<a href="http://([[:alnum:]./_-]+)"([^>]*)>([^<]+)</a>#i');
+
+       $replacements = array('<strong><u>$3</u></strong>',
+                                                 '<strong><u>$3</u></strong> [$1]');
+
+       echo preg_replace($patterns, $replacements, $string);
 }
 ?>
 </body>
index 50e9c71..8db0355 100644 (file)
@@ -2,8 +2,8 @@
 $text = array();\r
 $text['next_chapter'] = 'Next Chapter';\r
 $text['previous_chapter'] = 'Previous Chapter';\r
-$text['page_not_translated'] = 'This page has not yet been translated to that language.';\r
-$text['atutor_documentation'] = 'ATutor Documentation';\r
+$text['page_not_translated'] = 'This section has not yet been translated to your requested language.';\r
+$text['atutor_documentation'] = 'ATutor Handbook';\r
 $text['handbook_toc'] = 'Handbook TOC';\r
 $text['close_popup'] = 'Close Pop-up';\r
 $text['return_to_handbook'] = 'Return to Handbook';\r
@@ -21,7 +21,7 @@ $text['doc_dev'] = 'Developer Documentation';
 $text['doc_instructor'] = 'Instructor Documentation';\r
 $text['doc_mods'] = 'Module Development Documentation';\r
 $text['doc_notes_enabled'] = 'User contributed notes is <em>enabled</em>. <a href="index.php?login">Administrator Login</a>.';\r
-$text['doc_title'] = 'ATutor 1.5.3 Documentation';\r
+$text['doc_title'] = 'ATutor Handbook';\r
 $text['doc_welcome'] = 'Welcome to the official ATutor Handbook!';\r
 $text['doc_unapproved_notes'] = 'Un-Approved User Contributed Notes';\r
 $text['doc_approved_confirm'] = 'Are you sure you want to approve this note?';\r
@@ -39,4 +39,5 @@ $text['add_note_blurb'] = 'If you ask a question, report a bug, or request a fea
 $text['email_name'] = 'Your email address (or name)';\r
 $text['your_note'] = 'Your note';\r
 $text['note_added'] = 'Your note has been saved. It will appear only after it has been approved by an administrator.';\r
+$text['back_to_chapters'] = 'Back to Chapters';\r
 ?>
\ No newline at end of file
index 173d005..22c4061 100644 (file)
@@ -1,17 +1,5 @@
 <?php
-/************************************************************************/
-/* ATutor                                                                                                                              */
-/************************************************************************/
-/* Copyright (c) 2002-2006 by Greg Gay, Joel Kronenberg & Heidi Hazelton*/
-/* Adaptive Technology Resource Centre / University of Toronto                 */
-/* http://atutor.ca                                                                                                            */
-/*                                                                                                                                             */
-/* This program is free software. You can redistribute it and/or               */
-/* modify it under the terms of the GNU General Public License                 */
-/* as published by the Free Software Foundation.                                               */
-/************************************************************************/
-// $Id: pages.inc.php 6137 2006-04-28 16:57:44Z heidi $
-
+       $_pages = array();
     $_pages['introduction.php']                                = 'Introduction';
     $_pages['login.php']                                       = 'Login';
     $_pages['register.php']                                    = 'Register';
index 31fa7fc..fc0f9fd 100644 (file)
@@ -1,17 +1,5 @@
 <?php
-/************************************************************************/
-/* ATutor                                                                                                                              */
-/************************************************************************/
-/* Copyright (c) 2002-2006 by Greg Gay, Joel Kronenberg & Heidi Hazelton*/
-/* Adaptive Technology Resource Centre / University of Toronto                 */
-/* http://atutor.ca                                                                                                            */
-/*                                                                                                                                             */
-/* This program is free software. You can redistribute it and/or               */
-/* modify it under the terms of the GNU General Public License                 */
-/* as published by the Free Software Foundation.                                               */
-/************************************************************************/
-// $Id: pages.inc.php 6150 2006-05-08 14:56:22Z heidi $
-
+       $_pages = array();
     $_pages['introduction.php']                  = 'Introduction';
     $_pages['creating_courses.php']                             = 'Creating Courses';
     $_pages['announcements.php']                 = 'Announcements';
@@ -38,7 +26,6 @@
     $_pages['enrollment_alumni.php']             = 'Alumni';
     $_pages['enrollment_course_list.php']        = 'Course Lists';
     $_pages['file_manager.php']                  = 'File Manager';
-    $_pages['creating_new_files.php']            = 'Creating New Files';
     $_pages['managing_files_folders.php']        = 'Managing Files &amp; Folders';
     $_pages['extracting_zip_archives.php']       = 'Extracting Zip Archives';
     $_pages['forums.php']                        = 'Forums';