Skip to content

Commit

Permalink
Replace hard-coded faq/*-referenced URLs
Browse files Browse the repository at this point in the history
Replace the hard-coded faq/* URLs with the dynamic ones that
redirect the user to the wiki.
  • Loading branch information
cpeel committed Mar 27, 2024
1 parent 06d8d61 commit 39be47b
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 15 deletions.
2 changes: 1 addition & 1 deletion activity_hub.php
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@ function activity_descriptions()
echo _("Providing Content");
echo "</dt>";
echo "<dd>";
echo sprintf(_("Want to help out the site by providing material for us to proofread? <a href='%s'>Find out how!</a>"), "$code_url/faq/cp.php");
echo sprintf(_("Want to help out the site by providing material for us to proofread? <a href='%s'>Find out how!</a>"), get_faq_url("cp.php"));
echo "</dd>\n";
}

Expand Down
6 changes: 4 additions & 2 deletions faq/prooffacehelp.php
Original file line number Diff line number Diff line change
Expand Up @@ -402,6 +402,8 @@ interface, click on the \"Quit\" button.
echo "</dl>\n";
echo "</form>\n";
} else {
$faq_url = get_faq_url("ProoferFAQ.php");
$guidelines_url = get_faq_url("proofreading_guidelines.php");
?>

<DIV ALIGN="CENTER"><TABLE
Expand All @@ -414,9 +416,9 @@ interface, click on the \"Quit\" button.
<p><A HREF="#proofing_toolbox"><B>Help for Proofreading Toolbox</B></A></p>
<p><B>Additional Help Files</B>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <A HREF="ProoferFAQ.php">Proofreader's Frequently Asked Questions</A>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <A HREF="<?php echo $faq_url; ?>">Proofreader's Frequently Asked Questions</A>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <A HREF="proofreading_guidelines.php">Proofreading Guidelines</A></p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <A HREF="<?php echo $guidelines_url; ?>">Proofreading Guidelines</A></p>
</TD></TR>
<TR><TD ALIGN="CENTER" COLSPAN="2">
<p class='large'><A NAME="ibtns"> </A>Button and Selection Menu</p></TD></TR>
Expand Down
9 changes: 5 additions & 4 deletions pinc/quizzes.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// This file creates quiz objects for each quiz with data in CVS
include_once($relPath."Quiz.inc");
include_once($relPath."forum_interface.inc");
include_once($relPath."faq.inc");

define('SIX_MONTHS_IN_SECONDS', 15778463);

Expand All @@ -25,7 +26,7 @@ new QuizLevel(
"P_BASIC",
_("Basic Proofreading Quizzes and Tutorials"),
"proof",
"<p>" . _("This section is designed as an overview of the most important and frequently used <a href='../faq/proofreading_guidelines.php'>proofreading guidelines</a>. The pages cover items that you are likely to see when proofreading BEGINNERS ONLY and EASY projects.") .
"<p>" . sprintf(_("This section is designed as an overview of the most important and frequently used <a href='%s'>proofreading guidelines</a>. The pages cover items that you are likely to see when proofreading BEGINNERS ONLY and EASY projects."), get_faq_url("proofreading_guidelines.php")) .
"</p>\n<p>" .
_("These tutorials and quizzes only address the standard guidelines. Some projects have special instructions, particularly for books in non-English languages or with unusual features, so be sure to read the Project Comments carefully on each project you proofread.") .
"</p>\n<p>" .
Expand Down Expand Up @@ -75,7 +76,7 @@ new QuizLevel(
"P_MOD",
_("Moderate Proofreading Quizzes and Tutorials"),
"proof",
"<p>" . _("This section covers other aspects of the <a href='../faq/proofreading_guidelines.php'>proofreading guidelines</a>, beyond what is in the Basic section. The pages include items that you are likely to see when proofreading Average projects.") . "</p>",
"<p>" . sprintf(_("This section covers other aspects of the <a href='%s'>proofreading guidelines</a>, beyond what is in the Basic section. The pages include items that you are likely to see when proofreading Average projects."), get_faq_url("proofreading_guidelines.php")) . "</p>",
[

new Quiz(
Expand Down Expand Up @@ -123,7 +124,7 @@ new QuizLevel(
"P_SPECIAL",
_("Specialized Proofreading Quizzes and Tutorials"),
"proof",
"<p>" . _("This section covers topics that are not addressed in the <a href='../faq/proofreading_guidelines.php'>proofreading guidelines</a>. The pages include items that you are likely to see when proofreading HARD (and some Average) projects.") .
"<p>" . sprintf(_("This section covers topics that are not addressed in the <a href='%s'>proofreading guidelines</a>. The pages include items that you are likely to see when proofreading HARD (and some Average) projects."), get_faq_url("proofreading_guidelines.php")) .
"</p>\n<p>" .
_("If you are not yet familiar with a topic, you can learn about it by using the tutorial mode or following the \"Information\" link for that topic.") .
"</p>",
Expand Down Expand Up @@ -190,7 +191,7 @@ new QuizLevel(
"F_ONLY",
_("Formatting Quizzes"),
"format",
"<p>" . _("The formatting quizzes cover topics addressed in the <a href='../faq/formatting_guidelines.php'>formatting guidelines</a>.") . "</p>",
"<p>" . sprintf(_("The formatting quizzes cover topics addressed in the <a href='%s'>formatting guidelines</a>."), get_faq_url("formatting_guidelines.php")) . "</p>",
[

new Quiz(
Expand Down
5 changes: 3 additions & 2 deletions pinc/stages.inc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ include_once($relPath.'Round.inc');
include_once($relPath.'Pool.inc');
include_once($relPath.'ProjectState.inc');
include_once($relPath.'forum_interface.inc'); // get_url_to_view_forum()
include_once($relPath.'faq.inc');

// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Expand Down Expand Up @@ -273,7 +274,7 @@ new Pool(
"<b>" . _("First Time Here?") . "</b>",
sprintf(
_("Please read the <a href='%s'>Post-Processing FAQ</a> as it covers all the steps needed to post-process an e-text."),
"$code_url/faq/post_proof.php"
get_faq_url("post_proof.php")
),
_("Select an easy work to get started on (usually fiction with a low page count is a good starter book; projects whose manager is BEGIN make excellent first projects for a new post-processor)."),
sprintf(_("Check out the <a href='%s'>Post-Processing Forum</a> to post all your questions."), get_url_to_view_forum($post_processing_forum_idx)),
Expand Down Expand Up @@ -321,7 +322,7 @@ new Pool(
_("In this pool, experienced volunteers verify texts that have already been Post-Processed, and mentor new Post-Processors."),
sprintf(
_("<b>Before working in this pool</b>, please make sure you read the <a href='%s'>Post-Processing Verification Guidelines</a>."),
"$code_url/faq/ppv.php"
get_faq_url("ppv.php")
),
sprintf(
_("The PPV reporting form is <a href='%s'>here</a>."),
Expand Down
8 changes: 7 additions & 1 deletion quiz/generic/wizard/messages.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
$relPath = '../../../pinc/';
include_once($relPath.'base.inc');
include_once($relPath.'theme.inc');
include_once($relPath."faq.inc");
include_once('../quiz_defaults.inc'); // $default_*

require_login();
Expand Down Expand Up @@ -137,7 +138,12 @@ function filltext($x)

echo "<p>" . _("Theoretically you can add more hints, but again you have to manually edit the final file for this.") . "</p>\n<hr>\n";

echo "<p>" . sprintf(_("If you want you can also provide a link to a relevant section of the guidelines. If you choose one of these, a sentence such as this will appear: \"See the <a href='%s' target='_blank'>Page Headers/Page Footers</a> section of the Proofreading Guidelines for details.\" (with a different section name and \"Proofreading\" or \"Formatting\" as appropriate)."), "../../../faq/proofreading_guidelines.php#page_hf") . "</p>\n";
echo "<p>";
echo sprintf(
_("If you want you can also provide a link to a relevant section of the guidelines. If you choose one of these, a sentence such as this will appear: \"See the <a href='%s' target='_blank'>Page Headers/Page Footers</a> section of the Proofreading Guidelines for details.\" (with a different section name and \"Proofreading\" or \"Formatting\" as appropriate)."),
get_faq_url("proofreading_guidelines.php") . "#page_hf"
);
echo "</p>\n";

echo "<p>" . _("Proofreading Guidelines section:") . "<br>\n";
echo "<select size='1' name='P_guideline'>\n<option></option>\n";
Expand Down
9 changes: 8 additions & 1 deletion quiz/tuts/tut_p_aeoe_1.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
$relPath = '../../pinc/';
include_once($relPath.'base.inc');
include_once($relPath.'theme.inc');
include_once($relPath."faq.inc");

require_login();

Expand All @@ -14,6 +15,12 @@
echo "<tr><td><img src='../generic/images/oelig_ital.png' alt='oe ligature' width='33' height='30'></td>\n";
echo "<td><img src='../generic/images/aelig_ital_teardrop.png' alt='ae ligature' width='34' height='32'></td>\n</tr></table>\n";

echo "<p>" . sprintf(_("You can insert each of these characters using the character picker in the proofreading interface or using keyboard shortcuts. Tables for <a href='%1\$s' target='_blank'>Windows</a> and <a href='%2\$s' target='_blank'>Macintosh</a> which list these shortcuts are in the Proofreading Guidelines."), "../../faq/proofreading_guidelines.php#a_chars_win", "../../faq/proofreading_guidelines.php#a_chars_mac") . "</p>\n";
echo "<p>";
echo sprintf(
_("You can insert each of these characters using the character picker in the proofreading interface or using keyboard shortcuts. Tables for <a href='%1\$s' target='_blank'>Windows</a> and <a href='%2\$s' target='_blank'>Macintosh</a> which list these shortcuts are in the Proofreading Guidelines."),
get_faq_url("proofreading_guidelines.php") . "#a_chars_win",
get_faq_url("proofreading_guidelines.php") . "#a_chars_mac"
);
echo "</p>\n";

echo "<p><a href='../generic/main.php?quiz_page_id=p_aeoe_1'>" . _("Continue to quiz page") . "</a></p>\n";
15 changes: 13 additions & 2 deletions quiz/tuts/tut_p_mod1_3.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
$relPath = '../../pinc/';
include_once($relPath.'base.inc');
include_once($relPath.'theme.inc');
include_once($relPath."faq.inc");

require_login();

Expand All @@ -16,8 +17,18 @@
echo "<ul>\n";
echo "<li>" . _("The character picker at the bottom of the proofreading interface.") . "</li>\n";
echo "<li>" . _("Keyboard shortcuts.") . "<br>\n";
echo sprintf(_("Tables for <a href='%1\$s' target='_blank'>Windows</a> and <a href='%2\$s' target='_blank'>Macintosh</a> which list these shortcuts are in the Proofreading Guidelines."), "../../faq/proofreading_guidelines.php#a_chars_win", "../../faq/proofreading_guidelines.php#a_chars_mac") . "</li>\n";
echo "<li>" . sprintf(_("Other methods described in the <a href='%s' target='_blank'>guidelines</a>."), "../../faq/proofreading_guidelines.php#insert_char") . "</li>\n";
echo sprintf(
_("Tables for <a href='%1\$s' target='_blank'>Windows</a> and <a href='%2\$s' target='_blank'>Macintosh</a> which list these shortcuts are in the Proofreading Guidelines."),
get_faq_url("proofreading_guidelines.php") . "#a_chars_win",
get_faq_url("proofreading_guidelines.php") . "#a_chars_mac"
);
echo "</li>\n";
echo "<li>";
echo sprintf(
_("Other methods described in the <a href='%s' target='_blank'>guidelines</a>."),
get_faq_url("proofreading_guidelines.php") . "#insert_char"
);
echo "</li>\n";
echo "</ul>\n";

echo "<h3>" . _("Fractions") . "</h3>\n";
Expand Down
7 changes: 5 additions & 2 deletions tools/project_manager/projectmgr.inc
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<?php
include_once($relPath.'user_is.inc');
include_once($relPath.'project_edit.inc');
include_once($relPath."faq.inc");

function abort_if_not_manager()
{
Expand Down Expand Up @@ -62,8 +63,10 @@ function echo_manager_links()
}
echo "<li><a href='$code_url/stats/release_queue.php'>"._("Show All Release Queues")."</a></li>\n";
echo "<li><a href='https://www.pgdp.net/wiki/DP_Official_Documentation:CP_and_PM'>"._("PM Official Documentation")."</a></li>\n";
echo "<li><a href='$code_url/faq/proofreading_guidelines.php'>"._("Proofreading Guidelines")."</a></li>\n";
echo "<li><a href='$code_url/faq/formatting_guidelines.php'>"._("Formatting Guidelines")."</a></li>\n";
$url = get_faq_url("proofreading_guidelines.php");
echo "<li><a href='$url'>"._("Proofreading Guidelines")."</a></li>\n";
$url = get_faq_url("formatting_guidelines.php");
echo "<li><a href='$url'>"._("Formatting Guidelines")."</a></li>\n";

echo "</ul>\n";
echo "</div>\n";
Expand Down

0 comments on commit 39be47b

Please sign in to comment.