1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-14 10:34:23 +02:00

Issue #6 URLs should not be inside language files.

This commit is contained in:
camer0n
2025-04-09 14:18:37 -07:00
parent 23933885ca
commit 9de234324c
3 changed files with 15 additions and 8 deletions

View File

@@ -3999,6 +3999,17 @@ class e_parse
return str_replace($search, $replace, $lan);
}
public function lanLink($lan, $url, $options=[])
{
$srch =["[", "]"];
$repl = ["<a target='_blank' href='" .$url . "'>", "</a>"];
$text = defset($lan, $lan);
return str_replace($srch, $repl, $text);
}
/**
* Return an Array of all specific tags found in an HTML document and their attributes.
*

View File

@@ -2305,7 +2305,7 @@ $columnInfo = array(
</tr>
<tbody id='nginx-secure_link_md5' ".($pref['download_security_mode'] === 'nginx-secure_link_md5' ? "" : "style='display:none'").">
<tr>
<td>".LAN_DL_SECURITY_NGINX_SECURELINKMD5_EXPRESSION."</td>
<td>".e107::getParser()->lanLink('LAN_DL_SECURITY_NGINX_SECURELINKMD5_EXPRESSION','https://nginx.org/en/docs/http/ngx_http_secure_link_module.html#secure_link_md5')."</td>
<td>
".$frm->text('download_security_expression', $pref['download_security_expression'], 1024)."
<div class='field-help'>".LAN_DL_SECURITY_NGINX_SECURELINKMD5_EXPRESSION_HELP."</div>

View File

@@ -233,16 +233,12 @@ define("DOWLAN_HELP_11", "Click the 'delete' button to delete the report.[br][br
// define("DOWLAN_DESCRIPTION", "This plugin is a fully featured Download system");
// define("DOWLAN_CAPTION", "Configure Download");
define("LAN_DL_SECURITY_DESCRIPTION", "Downloads can make use of server-side URL protection features to prevent hotlinking and/or enforce link expiry. " .
"This section should be configured before the download server is configured to reduce the chance of disruption to downloaders.");
define("LAN_DL_SECURITY_DESCRIPTION", "Downloads can make use of server-side URL protection features to prevent hotlinking and/or enforce link expiry. This section should be configured before the download server is configured to reduce the chance of disruption to downloaders.");
define("LAN_DL_SECURITY_MODE", "URL protection mode");
define("LAN_DL_SECURITY_MODE_NONE", "None (Default)");
define("LAN_DL_SECURITY_MODE_NGINX_SECURELINKMD5", "NGINX secure_link_md5");
define("LAN_DL_SECURITY_NGINX_SUPPORTED_VARIABLES_TOGGLE", "Click to toggle list of supported NGINX variables");
define("LAN_DL_SECURITY_NGINX_SECURELINKMD5_EXPRESSION",
"<a target='_blank' href='https://nginx.org/en/docs/http/ngx_http_secure_link_module.html#secure_link_md5'>NGINX secure_link_md5 expression</a>");
define("LAN_DL_SECURITY_NGINX_SECURELINKMD5_EXPRESSION", "[NGINX secure_link_md5 expression]");
define("LAN_DL_SECURITY_NGINX_SECURELINKMD5_EXPRESSION_HELP", "Same expression as configured on the server");
define("LAN_DL_SECURITY_LINK_EXPIRY", "Duration of validity in seconds");
define("LAN_DL_SECURITY_LINK_EXPIRY_HELP", "Number of seconds the download link should last after being generated. " .
"Only effective if the expression supports expiry time. " .
"Defaults to a very long time if this field is left blank.");
define("LAN_DL_SECURITY_LINK_EXPIRY_HELP", "Number of seconds the download link should last after being generated. Only effective if the expression supports expiry time. Defaults to a very long time if this field is left blank.");