plugin.tx_t3extblog {
	view {
		# "Email/" is appended to the final template path when rendering emails
		templateRootPaths.0 = EXT:t3extblog/Resources/Private/Templates/
		templateRootPaths.10 = {$plugin.tx_t3extblog.view.templateRootPath}

		partialRootPaths.0 = EXT:t3extblog/Resources/Private/Partials/
		partialRootPaths.10 = {$plugin.tx_t3extblog.view.partialRootPath}

		layoutRootPaths.0 = EXT:t3extblog/Resources/Private/Layouts/
		layoutRootPaths.10 = {$plugin.tx_t3extblog.view.layoutRootPath}

		widget.TYPO3\T3extblog\ViewHelpers\Widget\PaginateViewHelper.templateRootPaths.0 = EXT:t3extblog/Resources/Private/Templates/
		widget.TYPO3\T3extblog\ViewHelpers\Widget\PaginateViewHelper.templateRootPaths.10 = {$plugin.tx_t3extblog.view.templateRootPath}
	}

	persistence {
		storagePid = {$plugin.tx_t3extblog.persistence.storagePid}
		enableAutomaticCacheClearing = 1
	}

	features {
		skipDefaultArguments = 1
	}

	settings {
		overrideFlexformSettingsIfEmpty = latestPosts.categoryUid

		# used for mails
		blogName = {$plugin.tx_t3extblog.settings.blogName}

		blogsystem {
			pid = {$plugin.tx_t3extblog.settings.blogsystem.pid}

			posts {
				viewCount {
					# NOT IMPLEMENTED YET
					# views: Amount of seconds which have to pass by until an returning visitor is recounted.
					# if you want to have counted each view just put a negative number.
					# timePeriod = 10000
					# countBackendUsers = 1
				}

				# Post list pagination
				paginate {
					itemsPerPage = 10
					insertAbove = 0
					insertBelow = 1
					maximumNumberOfLinks = 100
					addQueryStringMethod = GET
				}

				metadata {
					# Add description and keyword meta tags
					enable = 1

					twitterCards {
						enable = 1

						# Your Twitter username
						site = {$plugin.tx_t3extblog.settings.twitterName}
					}

					openGraph {
						enable = 1
					}
				}

				author {
					avatar.size = 32
				}
			}
			comments {
				allowed = 1
				# auto close comments, 0 = disabled
				# use http://www.php.net/manual/en/datetime.formats.relative.php
				allowedUntil = +6 months

				# comments are approved by default
				approvedByDefault = 0

				# subscribe for new comment allowed
				subscribeForComments = 1

				# Allow tags in comment text
				# example config: <em>, <strong>, <code>
				# uses: http://www.php.net/manual/en/function.strip-tags.php
				allowTags =
				# Allow attributes for allowed tags
				# Disable to force removing of all attributes (recommended)
				allowSomeTagAttributes = 0

				spamCheck {
					enable = 1

					# limit of spam points
					threshold {
						# saved but marked as spam
						markAsSpam = 6
						# to block comment (user could  try again), 0 = disable
						block = 10
						# to block comment and redirect user, 0 = disable
						redirect = 16
					}
					redirect {
						pid =
						arguments {
						}
					}

					### spam points by check, 0 = disabled
					# simple checkbox which needs to be enabled
					isHumanCheckbox = 10
					# hidden honeypot fields
					honeypot = 3
					# checks for useragent
					userAgent = 5
					# checks if client accepts cookies
					cookie = 2
				}

				paginate {
					itemsPerPage = 500
					insertAbove = 0
					insertBelow = 0
					maximumNumberOfLinks = 100
				}
			}
		}

		subscriptionManager {
			pid = {$plugin.tx_t3extblog.settings.subscriptionManager.pid}

			# Subscription for new comments
			comment {
				admin {
					enableNotifications = 1

					# Configure email template file (txt or html)
					# Path is controlled by plugin.tx_t3extblog.view.email[]
					template = AdminNewCommentMail.txt

					mailTo {
						email = {$plugin.tx_t3extblog.settings.emailTo}
						name =
					}
					mailFrom {
						email = {$plugin.tx_t3extblog.settings.emailFrom}
						name = {$plugin.tx_t3extblog.settings.blogName}
					}
				}
				subscriber {
					enableNotifications = 1

					template {
						confirm = SubscriberOptinMail.txt
						notification = SubscriberNewCommentMail.txt
					}

					# email link invalid after
					emailHashTimeout = +48 hours
				    mailFrom {
				        email = {$plugin.tx_t3extblog.settings.emailFrom}
					    name = {$plugin.tx_t3extblog.settings.blogName}
				    }
				}
			}

			# Subscription for new posts
			blog {
				subscriber {
					enableNotifications = 1

					template {
						confirm = BlogSubscriberOptinMail.txt
						notification = SubscriberNewPostMail.txt
					}

					# email link invalid after
					emailHashTimeout = +48 hours
				    mailFrom {
					    email = {$plugin.tx_t3extblog.settings.emailFrom}
					    name = {$plugin.tx_t3extblog.settings.blogName}
				    }
				}
			}
		}

		blogSubscription {
			# subscribe for new posts allowed
			subscribeForPosts = 1

			spamCheck {
				enable = 1

				# limit of spam points
				threshold {
					# to block comment (user could  try again), 0 = disable
					block = 6
					# to block comment and redirect user, 0 = disable
					redirect = 10
				}
				redirect {
					pid =
					arguments {
					}
				}

				### spam points by check, 0 = disabled
				# simple checkbox which needs to be enabled
				isHumanCheckbox = 10
				# hidden honeypot fields
				honeypot = 3
				# checks for useragent
				userAgent = 5
				# checks if client accepts cookies
				cookie = 2
			}
		}

		categories {
			paginate {
				itemsPerPage = 10
				insertAbove = 0
				insertBelow = 0
				maximumNumberOfLinks = 0
				addQueryStringMethod = GET
			}
		}

		latestPosts {
			categoryUid =

			paginate {
				itemsPerPage = 5
				insertAbove = 0
				insertBelow = 0
				maximumNumberOfLinks = 0
				addQueryStringMethod = GET
			}
		}

		latestComments {
			paginate {
				itemsPerPage = 5
				insertAbove = 0
				insertBelow = 0
				maximumNumberOfLinks = 0
			}
		}

		rss {
			paginate {
				itemsPerPage = 10

				# Do not change this!
				insertAbove = 0
				insertBelow = 0
				maximumNumberOfLinks = 0
			}
		}

		archive {
			# No config but you could add your own config!
		}

		# Backend
		backend {
			# Format for date time, see http://php.net/date
			# Fallback to TYPO3_CONF_VARS -> SYS -> ddmmyy and hhmm configuration
			dateTimeFormat =

			dashboard {
				postDrafts.paginate {
					itemsPerPage = 5
					insertAbove = 0
					insertBelow = 0
					maximumNumberOfLinks = 0
				}

				comments.paginate {
					itemsPerPage = 10
					insertAbove = 0
					insertBelow = 0
					maximumNumberOfLinks = 0
				}

				subscriber {
					post.paginate {
						itemsPerPage = 5
						insertAbove = 0
						insertBelow = 0
						maximumNumberOfLinks = 0
					}

					blog.paginate {
						itemsPerPage = 5
						insertAbove = 0
						insertBelow = 0
						maximumNumberOfLinks = 0
					}
				}
			}

			posts.paginate {
				itemsPerPage = 15
				insertAbove = 0
				insertBelow = 1
				maximumNumberOfLinks = 100
			}

			comments.paginate {
				itemsPerPage = 20
				insertAbove = 0
				insertBelow = 1
				maximumNumberOfLinks = 100
			}

			subscriber {
				post.paginate {
					itemsPerPage = 10
					insertAbove = 0
					insertBelow = 1
					maximumNumberOfLinks = 100
				}

				blog.paginate {
					itemsPerPage = 15
					insertAbove = 0
					insertBelow = 1
					maximumNumberOfLinks = 100
				}
			}
		}

		# some debug configs
		debug {
			disableEmailTransmission = 0
			logInDevlog = 0
			renderInFe = 0
		}
	}
}

# localize date format, used within the fluid templates
lib.tx_t3extblog.date = TEXT
lib.tx_t3extblog.date {
	current = 1
	strftime = %d. %B %Y
}
lib.tx_t3extblog.month < lib.tx_t3extblog.date
lib.tx_t3extblog.month.strftime = %B

# Post list preview: render images like CSC does
lib.tx_t3extblog.responsiveImage = IMAGE
lib.tx_t3extblog.responsiveImage {
	file.import.current = 1
	file.treatIdAsReference = 1

	file.width = {$plugin.tx_t3extblog.settings.previewImage.width}
	file.height = {$plugin.tx_t3extblog.settings.previewImage.height}

	params < tt_content.image.20.1.params
	layoutKey = {$styles.content.imgtext.layoutKey}
	layout < tt_content.image.20.1.layout
	sourceCollection < tt_content.image.20.1.sourceCollection

	altText = TEXT
	altText {
		field = alternative
		htmlSpecialChars = 1
	}

	titleText < .altText
	titleText.field = title
}

# Configure BE module
# Make sure to update the backend TS every time you change the TS!
module.tx_t3extblog < plugin.tx_t3extblog
