Författare:
Per Stenebo
Skapad:
2011-10-01 16:35:57
Ändrad:
2017-04-16 12:59:38
sv

Sidkonfiguration

Alla sidor har en innehållsfil och en konfigurationsfil.

Konfigurationsfilerna ligger i mappen ~/content/pageConfig_xxx/

Filnamet på aktuell konfiguration består av sidans id-nummer samt ändelsen .php, tex 327.php.

Varje gång en sidas konfiguration redigeras skapas en kopia av aktuell version (med vissa undantag).

Filnamet på kopiorna består av sidans id-nummer, ett understrykningsstreck ( _ ), tidsstämpel samt ändelsen .php.
Exempel: 327_20111012T162304.php.

Tidstämpeln anger datum och tid separerade med ett T, enligt ISO 8601 (XMLRPC Compact).
Exempel: 20110910T152305.
Detta formatet passar bättre i ett filnamn än det annars (av europeér) mer
lättlästa 2011-09-10 15:23:05.

id

$pConf[0] betyder att vi tittar på konfigurationen till sidan med id 0 (noll).
Alla sidor har ett unikt id-nummer som tilldelas automatiskt när en ny sida skapas.
Id-nummret används av den underliggande koden och är betydelselöst för den vanliga användaren.

Id-nummret används som nyckel när en sidreferens anges.
Denna nyckel återkommer i filnamn för sidornas konfiguration, innehåll och relaterad siddata som tex kommentarer.

Variabler som tillhör sidornas konfiguration

Config items that are left out will inherit default values from id 0.
id 0, give default values for new pages and for pages where lines have been left out.
Array of address strings that should point to this page.
Extensions (like .htm, .html or .php) are automatically ignored.
If it is configured to be a menu item, the first address will be picked for menu linking.
I recomend that the first string reflects the hierarchy of parent pages.

$pConf[0]['address'] = array('main/home', 'home');

Metatags to be inserted in head section of page template

$pConf[0]['generator'] = 'BendCMS by Bends';
$pConf[0]['robots'] = 'index, follow';
$pConf[0]['author'] = 'Per Stenebo';
$pConf[0]['keywords'] = 'Bends, bends.se, datakonsult, internet, automation';
$pConf[0]['description'] = 'Bends är ett konsultföretag inom IT och automation.';
$pConf[0]['created'] = '2010-07-06 07:00:00';

Page title. Used as text on menu link and in head section of page template

$pConf[0]['page_title'] = 'Default';

Minimum user level to access page:
Zero means anynomous guest have access.
Integer 0-255.

$pConf[0]['access_level'] = 0;

Required user group to access page.
Empty string = anynomous guest.
String must be present in site config: $sConf['usergroups'] if not empty.

$pConf[0]['access_group'] = '';

Minimum user level to edit page.
Integer between 0-255.
Set to 255 if page should be closed for online editing

$pConf[0]['edit_level'] = 100;

Minimum user level to do custom action (optional), can be used in page logic file.

$pConf[0]['custom_level'] = 100;

Password to use in url if page is shared via link

$pConf[0]['sharePagePass'] = '';

Minimum user level to do page commenting (write new posts).
Set to 255 to disable page commenting on this page.
If this page will be used as blog or forum this should be at least 10 to allow only members to write new posts.

$pConf[0]['commentLevel'] = 1;

Minimum user level to reply to page comments.
Set to 255 to disable comment reply on this page
Set to 1 to block blacklisted users from commenting
If this page will be used as blog or forum this should be 1 to allow only not blacklisted guests to write replys.

$pConf[0]['commentReplyLevel'] = 1;

Encrypted content on the server side. Decrypted with javascript on the client.
This value must be configured in site config $sConf['contEncrypt'] if not false.
0 = not encrypted (zero)
gibberish-aes = Gibberish AES

$pConf[0]['content_encrypted'] = 0;

Path to template file (from folder templates/)
String.

$pConf[0]['template'] = 'bends.php';

Path to page logic file (from folder ~/pageLogic) to be included before output to screen. String.
Example 1: myLogic.php
Example 2 (file in subdir): sysLogic/mailForm.php

$pConf[0]['logic'] = '';

Path to CSS files from ~/cssFiles folder. This is included in page header if not empty, depending on template.
Array of strings.

$pConf[0]['css_files'] = array('bends.css');

Path to Javascript files from ~/jsFiles/ folder. This is included in page header if not empty, depending on template.
Array of strings.

$pConf[0]['js_files'] = array();

Path to files from ~/headFiles/ folder. This is included in page header, right before the closing head-tag, if not empty, depending on template. This is suitable for javascript that get values from php variables.
Array of strings.

$pConf[0]['head_files'] = array();

On-line web editor for content. wysiwyg/code/text/no_edit
This value must be configured in editor config $edit_contentList if not false.  ~/pageLogic/edit_config.php

$pConf[0]['edit_content'] = 'wysiwyg';

id of parent page, zero means no parent id.
Give hierarchy order (in menues) where zero are the top level.
Integer.

$pConf[0]['parentid'] = 0;

Menu name as index number in the array $menues (defined in site config), will not be automatically linked if empty.
Integer.

$pConf[0]['menu_index'] = 1;

Menu order, will be listed in the selected menue in ascending order (zero comes first).
Usually incremented in steps of 10, beginning with 10 (10, 20, 30) to give room for rearrangements.
Integer.

$pConf[0]['menuorder'] = 10;

Sets the name of div element to place the content in. Used in template.
String

$pConf[0]['placement'] = 'content';

Array of page id-s to include in page process stack as fragments
0 (zero) must be present, it will be replaced with the requested page
The array should be in order to execute/include files for this page
The files in the first item are executed/included before the files in the next item
Array of integers.

$pConf[0]['pageStack'] = array(17,12,14,0,39,16,13,15);

Kommentarer till sidan Page config