Permalink
Browse files

Altered public view link to be tinier.

Made links global ("/" instead of "./")
  • Loading branch information...
Alamantus committed Mar 9, 2016
1 parent b887e13 commit 956255bc00bec636de19b1375f210ebfa6d85e13
Showing with 21 additions and 18 deletions.
  1. +3 −0 .htaccess
  2. +2 −2 index.php
  3. +1 −1 js/ui.js
  4. +15 −15 view/index.php
View
@@ -0,0 +1,3 @@
RewriteEngine On # Turn on the rewriting engine
RewriteRule ^view/([0-9]+)/?$ view/index.php?dict=$1 [NC,L] # Handle dictionary ids.
RewriteRule ^([0-9]+)/?$ view/index.php?dict=$1 [NC,L] # Handle dictionary ids.
View
@@ -32,7 +32,7 @@
<body>
<header>
<div id="headerPadder">
<a href="./" id="siteLogo">Lexiconga Dictionary Builder</a>
<a href="/" id="siteLogo">Lexiconga Dictionary Builder</a>
<div style="float:right;margin: 16px 8px;font-size:12px;">
<span id="aboutButton" class="clickable" onclick="ShowInfo('aboutText')">About Lexiconga</span>
</div>
@@ -62,7 +62,7 @@
<label><span>Word</span>
<input type="text" id="word" />
</label>
<label><span>Pronunciation <a class="helperlink" href="./ipa_character_picker/" target="_blank" title="IPA Character Picker backed up from http://r12a.github.io/pickers/ipa/">IPA Characters</a></span>
<label><span>Pronunciation <a class="helperlink" href="/ipa_character_picker/" target="_blank" title="IPA Character Picker backed up from http://r12a.github.io/pickers/ipa/">IPA Characters</a></span>
<input type="text" id="pronunciation" />
</label>
<label><span>Part of Speech</span>
View
@@ -415,7 +415,7 @@ function ToggleCaseSensitiveOption() {
function TogglePublicLink() {
if (document.getElementById("dictionaryIsPublic").checked) {
var publicLink = "http://lexicon.ga/view/?dict=" + currentDictionary.externalID;
var publicLink = "http://lexicon.ga/" + currentDictionary.externalID;
document.getElementById("publicLink").innerHTML = "<strong>Public Link:</strong><br>" + publicLink;
} else {
document.getElementById("publicLink").innerHTML = "";
View
@@ -63,19 +63,19 @@
<meta property="og:description" content="A Lexiconga dictionary by <?php echo $dictionary_creator; ?>" />
<meta property="og:image" content="http://lexicon.ga/images/logo.svg" />
<link href="../css/styles.css" rel="stylesheet" />
<link href="../css/lexiconga.css" rel="stylesheet" />
<link href="/css/styles.css" rel="stylesheet" />
<link href="/css/lexiconga.css" rel="stylesheet" />
<script>var publicDictionary = <?php echo $the_public_dictionary; ?></script>
</head>
<body>
<header>
<div id="headerPadder">
<a href="./" id="siteLogo">Lexiconga Dictionary Builder</a>
<a href="/" id="siteLogo">Lexiconga Dictionary Builder</a>
<div style="float:right;margin: 16px 8px;font-size:12px;">
<span id="aboutButton" class="clickable" onclick="ShowInfo('aboutText')">About Lexiconga</span>
</div>
<div id="loginoutArea" style="font-size:12px;">
<a id="loginLink" class="clickable" href="../" title="Go home to log in or create an account.">Go Home</a>
<a id="loginLink" class="clickable" href="/" title="Go home to log in or create an account.">Go Home</a>
</div>
</div>
</header>
@@ -137,27 +137,27 @@
</footer>
<!-- Markdown Parser -->
<script src="../js/marked.js"></script>
<script src="/js/marked.js"></script>
<!-- JSON Search -->
<script src="../js/defiant.js"></script>
<script src="/js/defiant.js"></script>
<!-- Diacritics Removal for Exports -->
<script src="../js/removeDiacritics.js"></script>
<script src="/js/removeDiacritics.js"></script>
<!-- Main Script -->
<script src="../js/dictionaryBuilder.js"></script>
<script src="../js/ui.js"></script>
<script src="../js/publicView.js"></script>
<script src="/js/dictionaryBuilder.js"></script>
<script src="/js/ui.js"></script>
<script src="/js/publicView.js"></script>
<?php if ($_GET['adminoverride'] != "noadsortracking") { include_once("../php/google/analytics.php"); } ?>
<script>
var aboutText = termsText = privacyText = loginForm = forgotForm = "Loading...";
window.onload = function () {
ShowPublicDictionary();
SetPublicPartsOfSpeech();
GetTextFile("../README.md", "aboutText", true);
GetTextFile("../TERMS.md", "termsText", true);
GetTextFile("../PRIVACY.md", "privacyText", true);
GetTextFile("../LOGIN.form", "loginForm", false);
GetTextFile("../FORGOT.form", "forgotForm", false);
GetTextFile("/README.md", "aboutText", true);
GetTextFile("/TERMS.md", "termsText", true);
GetTextFile("/PRIVACY.md", "privacyText", true);
GetTextFile("/LOGIN.form", "loginForm", false);
GetTextFile("/FORGOT.form", "forgotForm", false);
}
</script>
</body>

0 comments on commit 956255b

Please sign in to comment.