Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
220 lines (189 sloc) 10.3 KB
* Foafpress Configuration Template
* @category FOAFPRESS
* @package Foafpress-Configuration
* @author Michael Haschke,
* @license The GNU General Public License (GPL)
* @link
* Please use this template to configure Foafpress, save your changes to
* fp-config.php, what is inluded automatically by Foafpress as user config file.
* You need to uncomment the #lines you want to change. This file give some
* examples and an indication about the default values.
* You probably can directly go to the Foafpress section.
/* -- Is Foafpress in production use? ------------------------------------------
* Please change this to 'true' on your running public server/webspace. Otherwise
* all error messages and warnings will be printed out what might be helpful on
* your local development machine. In development mode Foafpress additionally
* echoes an array with debug log messages.
# $production = true; // default: false
/* -- Template folders ---------------------------------------------------------
* Add all the folders which should be checked for template files you want to
* use as Foafpress views (like foaf/Person.html.php). As Foafpress is
* technically a plugin of Sandbox Publisher CMS, all paths have to be relative
* to foafpressapp/libraries/spcms or you use absolute path declarations what is
* recommended (and used at the example below).
* For example if you add your 'mytemplates' folder, Foafpress would use
* 'mytemplates/foaf/Person.html.php' for foaf:Person resources. If Foafpress
* cannot find the necessary template in your personal template folders it will
* fall back to its own default templates.
* You can add more than one template folder, they will be checked in order of
* your configuration stack.
# $c['template']['folder'][] = dirname(__FILE__).'/mytemplates/'; // absolute path names or relative to sandbox.php path
# $c['template']['folder'][] = dirname(__FILE__).'/mytemplates2/'; // absolute path names or relative to sandbox.php path
/* -- Global layout template ---------------------------------------------------
* This defines the template what is used to envelope all views. It must be
* located in one of your configured template folders. Your template file name
* must end with the .php extension but it will added automatically by
* Foafpress/SPCMS. Foafpress will add another suffix for the various content
* types: for example, configure 'Layout' to use 'Layout.html.php' or
* 'Layout.rss.php'
# $c['template']['layout'] = 'MyLayout.tpl'; // must be in your mytemplates folder
/* -- Plugin folders -----------------------------------------------------------
* You can define paths which should be checked for plugin files. It follows
* the same rules like the definitions of the template folders. They must be
* defined relative to the 'foafpressapp/libraries/spcms' path, or you use
* absolute path declarations.
* You also can specify the folder of your own Foafpress controllers here
* because technically they are just SPCMS plugins like Foafpress itself.
# $c['plugin']['folder'][] = dirname(__FILE__).'/myplugins/'; // absolute directory names or relative to sandbox.php path
# $c['plugin']['folder'][] = dirname(__FILE__).'/myplugins2/subfolder/'; // absolute directory names or relative to sandbox.php path
/* -- Plugin loader ------------------------------------------------------------
* All plugins of this configuration stack are instanciated automatically with
* the start of Foafpress/SPCMS. Path declarations must be the plugin file
* location without the .php file extension, and they must be relative to one of
* the defined plugin folders.
* For example your 'myplugins/renderer/Markdown.php' plugin should be declared
* here as './renderer/Markdown'.
# $c['plugin']['load'][] = './MyPlugin';
# $c['plugin']['load'][] = './subfolder/My2ndPlugin';
/* -- Caching ------------------------------------------------------------------
* Foafpress uses the Cache API from SPCMS, and it is recommended to use caching
* because Foafpress is gathering a lot of data in the background via Linked Data
* and it needs a lot of time for all the requests. Foafpress can be speeded up
* by saving outputs and data (see below) for a defined amount of time.
* This configuration of the cache invalidation time is the global SPCMS cache
* definition, used by Foafpress to invalidate saved outputs rendered before
* within Foafpress views/templates.
* As for the cache folder the same rules like for template and plugin folders
* are applied. It's recommended to use absolute path definitions. The cache
* folder must be readable and writeable by the user what runs your server,
* so you must grant read/write access for the cache folder to this user or
* its usergroup.
* Cache invalidation times must be defined in seconds, with following special
* cases: 0 = do not cache anything, -1 = cache it once and use it forever as
* long as the cache file exists.
* Configuration of the data cache is below at the Foafpress plugin configuration.
# if ($production) $c['cache']['age'] = 60 * 60; // cache invalidation time in seconds, default: 60*60 (1h)
# $c['cache']['displacement'] = 0.25; // timeshift factor to randomize range of invalidation time, default: 0.5 (with 1h cache it means 0.5h to 1.5h)
# $c['cache']['folder'] = dirname(__FILE__).'/mycache/'; // overwrite standard cache folder, default: cache/
/* == Overwrite Foafpress standard configuration ============================ */
/* You can overwrite all default values of the Foafpress configuration found in
'foafpressapp/core/Foafpress.config.php'. Just prefix the array IDs by
['Foafpress'], e.g. $c['types'] becomes to $c['Foafpress']['types']. */
/* -- Foafpress index files ----------------------------------------------------
* Apache's DirectoryIndex (what you can define via .htaccess) configuration
* only works with existing files what conflicts with the .htaccess server
* configuration of Foafpress. So we need to 'fake' it, e.g. to describe the
* resource 'http://localhost/foafpress/resource/' in 'http://localhost/foafpress/resource/index.rdf'
* You may need this to use Foafpress with your resource ''
* what may be desribed in ''
* Like Apache, Foafpress is checking for existing files by combining the index
* name with the allowed file extensions (like .rdf, .nt, .tt).
# $c['Foafpress']['DirectoryIndex'] = 'myindex'; // default: 'index', extension will be added from supported file types
/* -- Foafpress data caches ----------------------------------------------------
* Beside caching the rendered outputs, its recommended to cache data what is
* aggregated by Foafpress via Linked Data. Foafpress uses two different cache
* invalidation times, one for Linked Data resources, and one for RSS/Atom feeds.
* It's recommended to keep Linked Data caches valid for a long time, we just
* assume here that those data is stable for longer periods and it's not often
* changed. Foafpress comes with a default invalidation time of 7 days, you may
* change this to longer periods or even to a one time cache (-1) for
* performance issues.
* The RSS/Atom feeds describe your activities (or updates of other resources),
* they should be checked frequently. Foafpress comes with a default value of
* 6 hours what means to check them around 4 times a day. You may add other PHP
* code, e.g. to define different invalidation times for the day/night.
* On both cache invalidation times, for Linked Data and the Activity, are
* randomized in range defined by the SPCMS displacement factor what is
* configured above at the SPCMS standard cache, e.g. if you define a
* displacement of 0.5 and 6 days for Linked Data, your cache invalidation time
* may be between 3 and 9 days.
# $c['Foafpress']['LinkedData']['cachetime'] = -1; // one time cache, no invalidation, default: 7 days
# $c['Foafpress']['Activity']['cachetime'] = 2 * 60 * 60; // 2 hours, default: 6 hours
/* -- Enable post output processing --------------------------------------------
* If you enable this, Faofpress will use old output caches to serve the request
* instantly, but keeps running to do all the time-consuming data aggregations
* after this output, and creating a new cache what can served to the next user.
* This is done for performance issues because without post output processing
* the user must wait until Foafpress updated all data caches.
* Be aware that this process experimental, usually it should work in most
* browsers but it could have problems with some other (older) browser clients.
# $c['Foafpress']['enableOutputPostprocessing'] = false; // default: true
/* -- Ignore resources ---------------------------------------------------------
* You may want Foafpress to ignore some resources because you want to use them
* in your RDF but don't want data gathering via Foafpress. This may have
* several reasons like bad or too big data, or using distinctly rendered
* Foafpress views of sameAs resources (e.g. using two different resources to
* describe you as private and business person).
# $c['Foafpress']['LinkedData']['ignoreResources'] = array(
# '',
# ''
# );
/* -- Show support ribbon ------------------------------------------------------
* You can turn this off if you want. Otherwise a small ribbon will is shown
* at the top right edge of the viewport, showing the currently shown resource
* type and some Semantic Web pride.
# $c['Foafpress']['Ribbon'] = false; // default: true
/* == Overwrite LanguageChecker standard configuration ====================== */
/* The I18N LanguageChacker is another SPCMS plugin what is used in Foafpress by
default to check language preferences of the user agent, as well as to define
an own stack of supported languages. E.g. Foafpress takes the language stack
to check what literals should been used if they available in different
languages. */
# $c['LanguageChecker']['enabled'] = array('en', 'de');