Check system preferences from template.
From 4.3.2 (or PR-902) it's possible to get system preference values inside the templates. The function getSystemPreference(preferenceName
, defaultValue) will do the trick. The preferenceName is the machine name (the value stored in the database) for the system preference. The defaultValue is a value that will be returned if the system preference could not be found or is not set to any value.
For a list of all default preferences see below. Plugins can add their own system preferences, please read the plugin documentation to find our their machine names.
Usage example:
{{ if $gimme->getSystemPreference('MediaRichTextCaptions', 'N') == 'Y' }}
{{ $htmlCaption }}
{{ else }}
{{ $htmlCaption|strip_tags }}
{{ /if }}
Default system preferences:
System preference machine name | Default value |
ExternalSubscriptionManagement | N |
KeywordSeparator | , |
LoginFailedAttemptsNum | 3 |
MaxUploadFileSize | 2M |
UseDBReplication | N |
DBReplicationHost | |
DBReplicationUser | |
DBReplicationPass | |
DBReplicationPort | 3306 |
CollectStatistics | Y |
SiteOnline | Y |
SiteCharset | utf-8 |
SiteLocale | en-US |
SiteCacheEnabled | Y |
SiteMetaKeywords | Newscoop, Sourcefabric, enterprise content management, open source, media, journalism |
SiteSecretKey | 4b506c2968184be185f6282f5dcac832 |
SiteSessionLifeTime | 1400 |
SiteTitle | Newscoop |
SiteMetaDescription | Newscoop - The open content management system for professional journalists. |
SMTPHost | localhost |
SMTPPort | 25 |
DBCacheEngine | NULL |
EditorImageRatio | 100 |
TemplateFilter | .*, CVS |
ImagecacheLifetime | 86400 |
EditorImageResizeWidth | |
EditorImageResizeHeight | |
EditorImageZoom | N |
TimeZone | NULL |
TemplateCacheHandler | NULL |
PasswordRecovery | Y |
MapCenterLongitudeDefault | 14.424133 |
MapCenterLatitudeDefault | 50.089926 |
MapDisplayResolutionDefault | 4 |
MapViewWidthDefault | 600 |
MapViewHeightDefault | 400 |
MapProviderAvailableGoogleV3 | 1 |
MapProviderAvailableMapQuest | 1 |
MapProviderAvailableOSM | 1 |
MapProviderDefault | GoogleV3 |
MapMarkerDirectory | /js/geocoding/markers/ |
MapMarkerSourceDefault | marker-gold.png |
MapPopupWidthMin | 200 |
MapPopupHeightMin | 150 |
MapVideoWidthYouTube | 320 |
MapVideoHeightYouTube | 240 |
MapVideoWidthVimeo | 320 |
MapVideoHeightVimeo | 180 |
MapVideoWidthFlash | 320 |
MapVideoHeightFlash | 240 |
MapVideoWidthFlv | 320 |
MapVideoHeightFlv | 240 |
FlashServer | |
FlashDirectory | videos/ |
MapAutoFocusDefault | 1 |
MapAutoFocusMaxZoom | 10 |
MapAutoFocusBorder | 50 |
MapAutoCSSFile | /js/geocoding/styles/map-info.css |
GeoSearchLocalGeonames | 1 |
GeoSearchMapquestNominatim | 1 |
EmailFromAddress | null |
EmailContact | null |
SmartyUseProtocol | Y |
MediaRichTextCaptions | N |
MediaCaptionLength | 255 |