Skip to content

Commit

Permalink
Merge pull request #13 from slub/typoscript-cleanup
Browse files Browse the repository at this point in the history
Fix some TypoScript settings
  • Loading branch information
Alexander Bigga authored Aug 13, 2021
2 parents efc3b4f + 5559290 commit 90486c5
Show file tree
Hide file tree
Showing 7 changed files with 108 additions and 58 deletions.
66 changes: 66 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# EditorConfig is awesome: http://EditorConfig.org

# top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

# CSS-Files
[*.css]
indent_style = space
indent_size = 4

# HTML-Files
[*.html]
indent_style = space
indent_size = 4

# TMPL-Files
[*.tmpl]
indent_style = space
indent_size = 4

# LESS-Files
[*.less]
indent_style = space
indent_size = 4

# JS-Files
[*.js]
indent_style = space
indent_size = 4

# PHP-Files
[*.php]
indent_style = space
indent_size = 4

# MD-Files
[*.md]
indent_style = space
indent_size = 4

# ReST-Files
[*.rst]
indent_style = space
indent_size = 3

# TypoScript
[*.typoscript]
indent_style = space
indent_size = 4

# YML-Files
[{*.yml,*.yaml}]
indent_style = space
indent_size = 4

# package.json, composer.json or .travis.yml
[{package.json,composer.json,.travis.yml}]
indent_style = space
indent_size = 2
2 changes: 1 addition & 1 deletion Build/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "dfg-viewer",
"version": "4.0.1",
"description": "This TYPO3 extension provides the configuration and setup for the DFG-Viewer",
"description": "This TYPO3 extension provides the configuration and setup for the DZB-Viewer",
"main": "gruntfile.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
Expand Down
21 changes: 9 additions & 12 deletions Configuration/TypoScript/Config/setup.typoscript
Original file line number Diff line number Diff line change
@@ -1,35 +1,32 @@
config {
doctype = html5
disableAllHeaderCode = 1

removeDefaultCss = 1
removePageCss = 1
removeDefaultJS = 1
concatenateJs = 1

no_cache = 0
cache_clearAtMidnight = 0
sendCacheHeaders = 1

spamProtectEmailAddresses = ascii
spamProtectEmailAddresses_atSubst = @


prefixLocalAnchors = all
absRefPrefix = {$constant.baseUrl}
linkVars = html(1)
}

[globalVar = GP:html > 0]
[traverse(request.getQueryParams(), 'html') > 0]
config {
disableAllHeaderCode = 0
concatenateJs = 0
}
[global]
[globalVar = GP:debug > 0]
[END]

[traverse(request.getQueryParams(), 'debug') > 0]
config {
disableAllHeaderCode = 0
concatenateJs = 0
compressJs = 0
no_cache = 1
}
[global]
[END]
5 changes: 2 additions & 3 deletions Configuration/TypoScript/Page/setup.typoscript
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,14 @@ page {
robots = noindex,nofollow
viewport = width=device-width, initial-scale=1
}
config.contentObjectExceptionHandler = 0
}

[globalVar = GP:debug > 0]
[traverse(request.getQueryParams(), 'debug') > 0]
page {
includeJSLibs {
jQuery = EXT:dlf/Resources/Public/Javascript/jQuery/jquery-3.5.1.min.js
jQuery.forceOnTop = 1
jqueryUiMouseSlider = EXT:dlf/Resources/Public/Javascript/jQueryUI/jquery-ui-mouse-slider-resizable-autocomplete.js
}
}
[global]
[END]
40 changes: 18 additions & 22 deletions Configuration/TypoScript/Plugins/setup.typoscript
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
plugin {
tx_dlf.useragent = DDB/Zeitungsportal

tx_dlf_navigation {
pages = {$constant.configPid}
pageStep = 5
targetPid = {$constant.viewerPid}
templateFile = EXT:ddb_kitodo_zeitungsportal/Resources/Private/Templates/Navigation.html
}

tx_dlf_pagegrid {
pages = {$constant.configPid}
limit = 1000
placeholder =
targetPid = {$constant.viewerPid}
templateFile = EXT:ddb_kitodo_zeitungsportal/Resources/Private/Templates/PageGrid.html
}

tx_dlf_pageview {
pages = {$constant.configPid}
excludeOther = 0
Expand All @@ -25,39 +25,39 @@ plugin {
useInternalProxy = 1
templateFile = EXT:ddb_kitodo_zeitungsportal/Resources/Private/Templates/PageView.html
}

tx_dlf_search {
pages = {$constant.configPid}
fulltext = 1
solrcore = 1
solrcore = {$constant.solrCore}
searchIn = document
suggest = 0
targetPid = {$constant.viewerPid}
targetPidPageView = {$constant.viewerPid}
}

tx_dlf_tableofcontents {
pages = {$constant.configPid}
excludeOther = 0
targetPid = {$constant.viewerPid}
templateFile =
}

tx_dlf_toolbox {
pages = {$constant.configPid}
tools =
solrcore = 1
solrcore = {$constant.solrCore}
fileGrpsImageDownload = DEFAULT,MAX
templateFile =
}

tx_dlf_fulltexttool {
activateFullTextInitially = 1
fullTextScrollElement = div#tx-dlf-fulltextselection
searchHlParameters = hl,tx_dlf[highlight_word]
templateFile = EXT:dlf/Resources/Private/Templates/FulltextTool.tmpl
}

tx_dlf_searchindocumenttool {
searchUrl = https://dev-ddb.fiz-karlsruhe.de/ddb-current/newspaper/item
documentIdUrlSchema = https://api-q1.deutsche-digitale-bibliothek.de/items/*id*/source/record
Expand All @@ -70,46 +70,42 @@ plugin {
templateFile = EXT:dlf/Resources/Private/Templates/SearchInDocumentTool.tmpl
}
}
lib.fulltext = USER

lib.fulltext < plugin.tx_dlf_toolbox
lib.fulltext {
userFunc = Kitodo\Dlf\Plugin\Toolbox->main
pages = 1
tools = tx_dlf_fulltexttool
solrcore = 1
solrcore = {$constant.solrCore}
fileGrpsImageDownload = DEFAULT,MAX
templateFile =
}
lib.fulltext < plugin.tx_dlf_toolbox

lib.download = USER
lib.download < plugin.tx_dlf_toolbox
lib.download {
userFunc = Kitodo\Dlf\Plugin\Toolbox->main
pages = 1
tools = tx_dlf_imagedownloadtool,tx_dlf_pdfdownloadtool,tx_dlf_fulltextdownloadtool
solrcore = 1
solrcore = {$constant.solrCore}
fileGrpsImageDownload = DEFAULT,MAX
templateFile =
}
lib.download < plugin.tx_dlf_toolbox

lib.imagemanipulation = USER
lib.imagemanipulation < plugin.tx_dlf_toolbox
lib.imagemanipulation {
userFunc = Kitodo\Dlf\Plugin\Toolbox->main
pages = 1
tools = tx_dlf_imagemanipulationtool
solrcore = 1
solrcore = {$constant.solrCore}
fileGrpsImageDownload = DEFAULT,MAX
templateFile =
}
lib.imagemanipulation < plugin.tx_dlf_toolbox

lib.search = USER
lib.search < plugin.tx_dlf_toolbox
lib.search {
userFunc = Kitodo\Dlf\Plugin\Toolbox->main
pages = 5
tools = tx_dlf_searchindocumenttool
fileGrpsImageDownload = DEFAULT,MAX
templateFile =
}
lib.search < plugin.tx_dlf_toolbox
26 changes: 9 additions & 17 deletions Configuration/TypoScript/constants.typoscript
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
# Constants
config {


}

#
# Generic constants
# ------------------------------------------------------------------------------------
#

config {
ddb_kitodo_zeitungsportal {
compressJs = 0
compressCss = 0
concatenateJs = 0
concatenateCss = 0
}
constant {
# cat=plugin.ddb_kitodo_zeitungsportal/links/0100; type=int+; label=UID of the Viewer Page
viewerPid = 1
# cat=plugin.ddb_kitodo_zeitungsportal/links/0100; type=int+; label=UID of the Kitodo.Presentation Configuration Page
configPid = 2
# cat=plugin.ddb_kitodo_zeitungsportal/links/0100; type=int+; label=UID of the Kitodo.Presentation Solr Core
solrCore = 1
# cat=plugin.ddb_kitodo_zeitungsportal/links/0100; type=string; label=Page URL on which viewer will be visible incl. trailing slash.
baseUrl = http://example.com/
}
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "slub/ddb-kitodo-zeitungsportal",
"type": "typo3-cms-extension",
"description": "Templates, Styles and Configuration for DDB Zeitungsportal",
"description": "Templates, Styles and Configuration for DDB Zeitungsportal Viewer",
"homepage": "https://github.com/slub/ddb-kitodo-zeitungsportal",
"keywords": [
"TYPO3",
Expand All @@ -22,8 +22,8 @@
],
"license": "GPL-3.0-or-later",
"require": {
"typo3/cms-core": "~9.5.24",
"kitodo/presentation": "*"
"typo3/cms-core": "~9.5.29",
"kitodo/presentation": "^3.3|dev-master|dev-ddb-changes"
},
"autoload": {
"psr-4": {
Expand Down

0 comments on commit 90486c5

Please sign in to comment.