Site Infrastructure Dictionary Variant
[view modes: view]
[edit modes: edit]
[direct modes: delete]

[

	var hl = (strpos($_title, "<!>") > "-1");
	var $t = "";

	if(hl)
		$t = substr($_title, 0, strpos($_title, "<!>"))
	else
		$t = $_title;

	]
	<a href="/?id=[_id]">[info_display($t)]</a>[
	if(hl)
		{ <b>([ substr($_title, strpos($_title, "<!>") + 3) ])</b>};



[begin mode abbr][
var word = iif(strpos($_title, "<!>") > "-1",
		substr($_title, 0, strpos($_title, "<!>")),
		$_title);

	word = _title;
	if(strpos(_title, "<!>") != "-1")
		word = substr(_title, 0, strpos(_title, "<!>"));
"[style:font-weight:500; font-size: 100%][/?id=" & $_id & "|" & info_display(word) & "][/style]";

	if(strpos($_title, "<!>") > "-1") " (" & substr($_title, strpos($_title, "<!>") + 3) & ")";

	var headword = search("id", "parent", _parent, "title", _subtitle);
	if(headword > 0) {[
		var hw_body = get_body(headword);
		
		var pro = getva("pro", hw_body);
		if(pro != "") ", " & pro;
		" [i]" & getva("part", hw_body) & "[/i]. ";

		var $d = "[i]" & _body & " [/?id=" & headword & "|" & _subtitle & "][/i]";
		$d;
	]} else ("[i]no headword " & _subtitle & "[/i]");
]
[end mode abbr]
[begin mode tag_query][
	var headword = search("id", "parent", _parent, "title", _subtitle);
	if(headword > 0) {[
		var hw_body = get_body(headword);
		][$_id]:.[replace(replace(getva("categories", hw_body), __cr, ""), __lf, ".")].
} else "";
][end mode tag_query]
[begin mode view][
	_wiki_format(page("abbr", _id));
][end mode view]
[begin mode edit]
<form method="post" action="/" width="100%">
<input type="hidden" name="id" value="[$_id]">
<input type="hidden" name="mode" value="submit">
<table width="100%">
<tr><th>Variant:</th><td><input type="text" class="textbox" name="title" value="[edit_display(_title)]" placeholder="(lemma)"></td></tr>
<tr><th>Description:</th><td><input type="text" class="textbox" name="body" value="[edit_display(_body)]" placeholder="(e.g. 'variant spelling of')"> <input type="text" class="textbox" name="subtitle" value="[edit_display(_subtitle)]" placeholder="(headword)"></td></tr>
<tr><th></th><td>
<span class="buttonbox"><input name="submitButton" class="submit" type="submit" value="Update"></span> <i>your permissions</i>: [summarize_permissions($_viewer.permissions)]<br>
Variants are references to other words that appear in the main dictionary. They are ideal for ensuring special lemmata, alternative spellings, and chronomorphs are properly represented. They do not appear in flash cards or the reverse index.<br>
To add a homonym, add <tt><b>&lt;!&gt;</b><i>number</i></tt> to the end of either the variant or headword fields.</td></tr></table>
</form> 
[end mode edit]
[begin mode submit][
	_title = _params.title;
	_subtitle = _params.subtitle;
	_body = _params.body;
	refresh_to("./?id=" & _id, 1);
]<a href="./?id=[_id]">Updated! Proceed.</a>[end mode submit]
THE MEMORY OF THE CITY
TSHENTWIDHILDA IL TSHELVANÍ DOISSEIA
CENTRAL DISSEAN ARCHIVES