Web: let projects customize their certificate

define CERT_FILENAME in your project.inc to whatever you want;
default is "cert1.php"
This commit is contained in:
David Anderson 2018-10-12 14:07:07 -07:00
parent 1af87de831
commit 1f6b7d4e9d
3 changed files with 6 additions and 2 deletions

View File

@ -195,7 +195,7 @@ function sample_navbar(
array(tra("Preferences"), $url_prefix."edit_forum_preferences_form.php"),
array(tra("User search"), $url_prefix."user_search.php"),
array(tra("User of the day"), $url_prefix."uotd.php"),
array(tra("Certificate"), $url_prefix."cert1.php", "", "_blank"),
array(tra("Certificate"), $url_prefix.cert_filename(), "", "_blank"),
));
navbar_menu(tra("Site"), array(
array(tra("Site search"), $url_prefix."site_search.php"),

View File

@ -184,7 +184,7 @@ function show_user_stats_private($user) {
}
$x .= "<br/><small>".tra("Cross-project ID").": $cpid</small>\n";
row2(tra("Cross-project statistics"), $x);
$x = '<a href="cert1.php">'.tra("Account").'</a>';
$x = sprintf('<a href="%s">%s</a>', cert_filename(), tra("Account"));
if ($user->teamid) {
$x .= ' &middot; <a href="cert_team.php">'.tra("Team").'</a>';
}

View File

@ -1117,6 +1117,10 @@ function text_end() {
echo "</div>\n";
}
function cert_filename() {
return defined("CERT_FILENAME")?CERT_FILENAME:"cert1.php";
}
$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit
?>