Added option to switch themes.
Added standalone pages for: - Exhibitions - Events - Institutions - Collections Added option to limit display to only a given set of institutions.
This commit is contained in:
@ -22,7 +22,7 @@ $pages = loadPages(); // Load overview of pages.
|
||||
*/
|
||||
|
||||
// Check for vars.
|
||||
loadHttpToGlobals(["task", "startPage", "pageTitle", "logo", "url", "mdVersion", "mdImgFolder", "cacheRefreshInterval", "maxFileSize", "defaultLang"]);
|
||||
loadHttpToGlobals(["task", "startPage", "pageTitle", "logo", "url", "css", "hideInstitution", "mdVersion", "mdImgFolder", "cacheRefreshInterval", "limitToInstitutions", "maxFileSize", "defaultLang"]);
|
||||
|
||||
if (isset($task) and $task == "update") { // Adding new users.
|
||||
|
||||
@ -35,7 +35,8 @@ if (isset($task) and $task == "update") { // Adding new users.
|
||||
if (isset($mdVersion)) $mdVersion = rtrim($mdVersion, "/") . "/";
|
||||
if (isset($mdImgFolder)) $mdImgFolder = rtrim($mdImgFolder, "/") . "/";
|
||||
|
||||
foreach (["startPage", "pageTitle", "logo", "url", "mdVersion", "mdImgFolder", "cacheRefreshInterval", "maxFileSize", "defaultLang"] as $var) {
|
||||
if (isset($limitToInstitutions)) $settings['limitToInstitutions'] = array_diff(explode(',', $limitToInstitutions), ['']);
|
||||
foreach (["startPage", "pageTitle", "logo", "url", "css", "hideInstitution", "mdVersion", "mdImgFolder", "cacheRefreshInterval", "maxFileSize", "defaultLang"] as $var) {
|
||||
if (isset($$var)) $settings[$var] = $$var;
|
||||
}
|
||||
|
||||
@ -109,6 +110,32 @@ echo '
|
||||
<td>' . generateHelpToolTip("helpURL", $translations['url'], $translations['helpURL']) . '</td>
|
||||
</tr>
|
||||
|
||||
<!-- CSS -->
|
||||
<tr>
|
||||
<th><label for="settingsUsedCSS">' . $translations['settingsUsedCSS'] . '</label></th>
|
||||
<td>
|
||||
<select name="css" id="settingsUsedCSS">
|
||||
';
|
||||
foreach (scanDirConts(__DIR__ . "/../themes") as $cssOption) {
|
||||
echo '<option value="' . $cssOption . '"';
|
||||
if ($settings['css'] == $cssOption) echo ' selected';
|
||||
echo '>' . $cssOption . '</option>';
|
||||
}
|
||||
echo '
|
||||
</select>
|
||||
</td>
|
||||
<td>' . generateHelpToolTip("helpSettingsUsedCSS", $translations['settingsUsedCSS'], $translations['helpSettingsUsedCSS']) . '</td>
|
||||
</tr>
|
||||
|
||||
<!-- Hiding attribution (if the page is for only one museum) or not -->
|
||||
<tr>
|
||||
<th><label for="hideInstitution">' . $translations['hideInstitution'] . '</label></th>
|
||||
<td>
|
||||
<input name="hideInstitution" id="hideInstitution" type="range" min="0" max="1" value="' . (string)$settings['hideInstitution'] . '" />
|
||||
</td>
|
||||
<td>' . generateHelpToolTip("helpHideInstitution", $translations['hideInstitution'], $translations['helpHideInstitution']) . '</td>
|
||||
</tr>
|
||||
|
||||
<!-- MD Version -->
|
||||
<tr>
|
||||
<th><label for="mdVersion">' . $translations['mdVersion'] . '</label></th>
|
||||
@ -130,6 +157,13 @@ echo '
|
||||
<td>' . generateHelpToolTip("helpCacheRefreshInterval", $translations['cacheRefreshInterval'], $translations['helpCacheRefreshInterval']) . '</td>
|
||||
</tr>
|
||||
|
||||
<!-- Restricting inputs to given institutions -->
|
||||
<tr>
|
||||
<th><label for="limitToInstitutions">' . $translations['limitToInstitutions'] . '</label></th>
|
||||
<td><input type="text" id="limitToInstitutions" name="limitToInstitutions" placeholder="' . $translations['limitToInstitutions']. '" value="'.implode(',', $settings['limitToInstitutions']).'" /></td>
|
||||
<td>' . generateHelpToolTip("helpLimitToInstitutions", $translations['limitToInstitutions'], $translations['helpLimitToInstitutions']) . '</td>
|
||||
</tr>
|
||||
|
||||
<!-- Max Upload Size -->
|
||||
<tr>
|
||||
<th><label for="maxFileSize">' . $translations['maxFileSize'] . '</label></th>
|
||||
|
Reference in New Issue
Block a user