459c086857bcaa39df6507386c7f301d4fe78988
fenris foo

fenris authored 8 years ago

source/structure/word_functions.html.php  1) <?php
source/structure/word_functions.html.php  2) 	global $configuration;
bfadmin-master advanced

bfadmin-master authored 8 years ago

source/structure/word_functions.html.php  3) 	include_once("source/logic/server/misc.php");
fenris foo

fenris authored 8 years ago

source/structure/word_functions.html.php  4) 	include_once("source/logic/server/data.php");
source/structure/word_functions.html.php  5) 	include_once("source/logic/server/table.php");
source/structure/word_functions.html.php  6)  ?>
bfadmin-master advanced

bfadmin-master authored 8 years ago

source/structure/word_functions.html.php  7) <section class="section" id="word_functions">
fenris foo

fenris authored 8 years ago

source/structure/word_functions.html.php  8) 	<header>Word Functions</header>
Christian Fraß personal pronouns and infin...

Christian Fraß authored 8 years ago

source/content/word_functions.html.php    9) 	<?php proposal(); ?>
fenris foo

fenris authored 8 years ago

source/structure/word_functions.html.php 10) <?php
source/structure/word_functions.html.php 11) 	$table = new class_table
source/structure/word_functions.html.php 12) 	(
source/structure/word_functions.html.php 13) 		[
source/structure/word_functions.html.php 14) 			new class_column
source/structure/word_functions.html.php 15) 			(
source/structure/word_functions.html.php 16) 				"Affix",
Christian Fraß repaired tables in content

Christian Fraß authored 8 years ago

source/content/word_functions.html.php   17) 				"affix",
fenris foo

fenris authored 8 years ago

source/structure/word_functions.html.php 18) 				function ($value)
source/structure/word_functions.html.php 19) 				{
source/structure/word_functions.html.php 20) 					return mark($value, ["word", "lang_fs"]);
source/structure/word_functions.html.php 21) 				}
source/structure/word_functions.html.php 22) 			),
source/structure/word_functions.html.php 23) 			new class_column
source/structure/word_functions.html.php 24) 			(
source/structure/word_functions.html.php 25) 				"Type",
Christian Fraß repaired tables in content

Christian Fraß authored 8 years ago

source/content/word_functions.html.php   26) 				"type_",
fenris foo

fenris authored 8 years ago

source/structure/word_functions.html.php 27) 				function ($value)
source/structure/word_functions.html.php 28) 				{
source/structure/word_functions.html.php 29) 					return (
source/structure/word_functions.html.php 30) 						implode
source/structure/word_functions.html.php 31) 						(
source/structure/word_functions.html.php 32) 							" → ",
source/structure/word_functions.html.php 33) 							array_map
source/structure/word_functions.html.php 34) 							(
source/structure/word_functions.html.php 35) 								function ($group)
source/structure/word_functions.html.php 36) 								{
source/structure/word_functions.html.php 37) 				 					return ("{" . implode(",", $group) . "}");
source/structure/word_functions.html.php 38) 								},
source/structure/word_functions.html.php 39) 								$value
source/structure/word_functions.html.php 40) 							)
source/structure/word_functions.html.php 41) 						)
source/structure/word_functions.html.php 42) 					);
source/structure/word_functions.html.php 43) 				}
source/structure/word_functions.html.php 44) 			),
source/structure/word_functions.html.php 45) 			new class_column
source/structure/word_functions.html.php 46) 			(
source/structure/word_functions.html.php 47) 				"Description",
Christian Fraß repaired tables in content

Christian Fraß authored 8 years ago

source/content/word_functions.html.php   48) 				"description_",
fenris foo

fenris authored 8 years ago

source/structure/word_functions.html.php 49) 				function ($value)
source/structure/word_functions.html.php 50) 				{
source/structure/word_functions.html.php 51) 					$output = "";
source/structure/word_functions.html.php 52) 					if ($value["name"] != null) $output .= (mark($value["name"], ["grammarterm"]) . ": ");
source/structure/word_functions.html.php 53) 					if ($value["description"] != null) $output .= ($value["description"]);
source/structure/word_functions.html.php 54) 					return $output;
source/structure/word_functions.html.php 55) 				}
source/structure/word_functions.html.php 56) 			),
source/structure/word_functions.html.php 57) 			/*
source/structure/word_functions.html.php 58) 			new class_column
source/structure/word_functions.html.php 59) 			(
source/structure/word_functions.html.php 60) 				"Cognates",
Christian Fraß repaired tables in content

Christian Fraß authored 8 years ago

source/content/word_functions.html.php   61) 				"cognates",
fenris foo

fenris authored 8 years ago

source/structure/word_functions.html.php 62) 				function ($value)
source/structure/word_functions.html.php 63) 				{
source/structure/word_functions.html.php 64) 					return implode(", ", array_map(function ($entry) {return ($entry["language"] . ": " . mark($entry["affix"], ["word", "lang_" . $entry["language"]]));}, $value));
source/structure/word_functions.html.php 65) 				}
source/structure/word_functions.html.php 66) 			),
source/structure/word_functions.html.php 67) 			 */
source/structure/word_functions.html.php 68) 			new class_column
source/structure/word_functions.html.php 69) 			(
source/structure/word_functions.html.php 70) 				"Example",
Christian Fraß repaired tables in content

Christian Fraß authored 8 years ago

source/content/word_functions.html.php   71) 				"example_",
bfadmin-master advanced

bfadmin-master authored 8 years ago

source/structure/word_functions.html.php 72) 				_bar("word")
fenris foo

fenris authored 8 years ago

source/structure/word_functions.html.php 73) 			),
source/structure/word_functions.html.php 74) 		],
Christian Fraß repaired tables in content

Christian Fraß authored 8 years ago

source/content/word_functions.html.php   75) 		sql_condense
source/content/word_functions.html.php   76) 		(
source/content/word_functions.html.php   77) 			read_json("source/data/word_functions.json"),
source/content/word_functions.html.php   78) 			["type_from","type_to","name","description","example"],
source/content/word_functions.html.php   79) 			["type_","description_","example_"],
source/content/word_functions.html.php   80) 			[
source/content/word_functions.html.php   81) 				"type_" => function ($values) {return [$values["type_from"], $values["type_to"]];},
source/content/word_functions.html.php   82) 				"description_" => function ($values) {return ["name" => $values["name"], "description" => $values["description"]];},
source/content/word_functions.html.php   83) 				"example_" => function ($values) {global $configuration; return ["original" => [$values["example"]["word"]], "translated" => $values["example"]["translations"][$configuration["target"]]];},
source/content/word_functions.html.php   84) 			]
source/content/word_functions.html.php   85) 		)
fenris foo

fenris authored 8 years ago

source/structure/word_functions.html.php 86) 	);
source/structure/word_functions.html.php 87) 	$table->generate();
source/structure/word_functions.html.php 88)  ?>
source/structure/word_functions.html.php 89) <p>
source/structure/word_functions.html.php 90) 	Some complex examples:
source/structure/word_functions.html.php 91) 	<ul>
bfadmin-master advanced

bfadmin-master authored 8 years ago

source/structure/word_functions.html.php 92) 		<?php $fun = _bar("word"); ?>
source/structure/word_functions.html.php 93) 		<li><?php echo($fun(["original" => ["unmanlikhed"], "translated" => ["inhumanity"]])); ?></li>
source/structure/word_functions.html.php 94) 		<li><?php echo($fun(["original" => ["seberenung"], "translated" => ["visualization"]])); ?></li>
source/structure/word_functions.html.php 95) 		<li><?php echo($fun(["original" => ["kraftigenar"], "translated" => ["fortifier"]])); ?></li>