Added visible/real URL alias distinction

This commit is contained in:
Jaidyn Lev 2018-10-07 01:41:08 -05:00
parent 3cfdaf6eac
commit cea7abff34
2 changed files with 7 additions and 4 deletions

View File

@ -14,6 +14,7 @@ if (!empty($_POST["url_target"]) && !empty($_POST["url_alias"]))
$url_alias = $_POST["url_alias"]; $url_alias = $_POST["url_alias"];
$url_alias = sanitize_filename($url_alias); $url_alias = sanitize_filename($url_alias);
$visible_dest = $url_aliasize_dir . $url_alias . $url_aliasize_visible_suffix;
$dest_file = $url_aliasize_dir . $url_alias . $url_aliasize_suffix; $dest_file = $url_aliasize_dir . $url_alias . $url_aliasize_suffix;
$beaming_permitted = 0; $beaming_permitted = 0;
@ -55,7 +56,7 @@ switch ($beaming_permitted)
break; break;
case 0: case 0:
write_alias($dest_file, $url_target); write_alias($dest_file, $url_target);
celebrate($dest_file, $url_aliasize_item, celebrate($visible_dest, $url_aliasize_item,
$url_aliasize_win_img, $url_aliasize_win_alt); $url_aliasize_win_img, $url_aliasize_win_alt);
break; break;
} }

View File

@ -19,9 +19,11 @@ $url_aliasize_die_alt = "A whimsical mask on fire.";
$url_aliasize_item = "mask"; // what the alias is affectionately called $url_aliasize_item = "mask"; // what the alias is affectionately called
$url_aliasize_dir = "u/"; // where the redirects go $url_aliasize_dir = "u/"; // where the redirects go
$url_aliasize_suffix = ""; // suffix to redirect links; some web-servers $url_aliasize_visible_suffix = "php"; // suffix visible in redirect links
// only execute ".php" files, so if things $url_aliasize_suffix = "php"; // actual suffix in redirect links
// don't work, set as ".php" // (the distinction is important if you use
// URL rewriting for the /u/ folder or
//something
// vars related to file uploading // vars related to file uploading