Installing SiteSupra  Configuring SiteSupra  Configuring .htedit

Configuring .htedit

The .htedit file should be located at the virtual host root directory if SiteSupra was copied to the server successfully. The .htedit file stores configuration of SiteSupra edit mode. The file is loaded once when you open SiteSupra. If you changed this file, then you have to reload SiteSupra.

The .htedit configuration file is PHP script that initializes the following arrays: $suEDIT, $suUSERMENU, $suEVENTS.

$suEDIT

<?
$suEDIT
= Array
(
/**
    alwaysReadBlocksConf specifies whether SiteSupra will read blocks'
    configuration files with every page load. While this option is
    switched off, SiteSupra stores current configuration in supra table
    and loads configuration files into supra table only if reread
    configuration is requested. Enabling this option may decrease web
    site productivity. Turn on this feature only if you are developing
    web site and don't want to reload configuration files manually.
*/
    
'alwaysReadBlocksConf'  => 0,

/**
    Disables JavaScript in edit mode.
*/
    
'jsEdit'                => 0,

/**
    Captions and drop-down menu items for SiteSupra console for userint and
    userstr fields. See "Using of userbit, userint, and userstr" article in
    Developer's manual for more details.
*/
    
'userint'               => 'Page type',
    
'userintList'           => Array(
                                    
0 => 'None',
                                    
1 => 'Press Release',
                                    
2 => 'News',
                                    
3 => 'Product'),
    
'userstr'               => '',
    
'userstrList'           => Array(),

/**
    Captions for userbit field. See "Using of userbit, userint, and userstr" article in
    Developer's manual for more details.
    
    userbitGroup defines how many userbit items you can create before SiteSupra will start grouping them.
*/
    
'userbit'               => 'Main menu|Public',
    
'userbitGroup'          => 5,

/**
    The below settings specify whether to allow SiteSupra user change <head>, <meta>,
    and <body> tags of a page.
*/
    
'showHead'              => 0,
    
'showMeta'              => 0,
    
'showBody'              => 0,

/**
    User interface language.
*/
    
'uiLang'                => 'english',

/**
    Specifies SiteSupra console postion.
*/
    
'leftMenu'              => 1,

/**
    Specifies idle time in seconds before SiteSupra will log out a user
    automaticaly.
*/
    
'idleTime'              => 3600,

/**

*/
    
'stylePrefix'           => '.',

/**
    The below settings specify permissions to set to a file after it has been
    uploaded and permissions to set to a folder after it has been created.
*/
    
'chmod'                 => 0640,
    
'chmoddir'              => 0750,

/**
    Date and time format for SiteSupra Date editor.
*/
    
'dateTimeFormat'        => 'd-M-y H:i',

/**
    Allows open multiple pages for editing.
*/
    
'enableMDI'             => 1,

/**
    Specifies folders names, which will not be shown in File Manager.
    By default SiteSupra doesn't show blocks and its own folders.
*/
    
'excludeDirs'           => 'layout|pic',
    
/**
    Specifies which version of sendData method to use. The second version is
    faster. Usage of this version may be limited by browser, proxy, or
    firewall settings.
*/
    
'sendDataII'            => 1,

);
?>

For more information on userint, userbit, and userstr refer to Using of userint, userbit, and userstr.

$suUSERMENU

Contains description of user modules available for SiteSupra user.

<?
$suUSERMENU
= Array(
    
'users'=>Array
    (
        
'dialog'  => '#users/um',       // path to the module file
        
'icon'    => 'users.gif',       // icon for the module button
        
'title'   => 'User Manager',    // module name
        
'key'     => 'CTRL+SHIFT+U',    // shortcut keys
    
),
    
'track' => Array(
        
'dialog'  => '#track/tracker',
        
'icon'    => 'track.gif',
        
'title'   => 'SupraTrack',
        
'key'     => 'CTRL+SHIFT+T'
    
),

);
?>

Modules configuration

If path to the module file starts with #, SiteSupra will search for the file under /supra/modules directory. In the above example SiteSupra will load file /supra/modules/users/um. If symbol # is omitted, then SiteSupra look for the file under the blocks directory.

$suEVENTS

This section allows you to replace default event handlers with yours. The format is: console_application_name:[function_name]. See Writing SiteSupra Console Application for more information on how to build console application.

<?
$suEVENTS
= Array
(
/**
    You may replace default SiteSupra search engine, when you need to define
    your own way to store search data. Fires after saving a page and after
    reindex search was requested.
*/
    
'onGenerateSearch'  => '_mysearch:mySearch',

/**
    Fires if SiteSupra was unable to authorize user. Using this event you may
    add tracking of incorrect logins and lock users.
*/
    
'onAuth'            => '',
  
/**
    Fires before authorization screen. You may use this event to show message
    to users attempting to logon.
*/
    
'onBeforeLogin'     => '',
  
/**
    Fires right after user passed authorization. At this moment you may tell
    SiteSupra to load any script you may need.
*/
    
'onLoadSupra'       => '',

/**
    The below events fire when somebody requests approval, approves, declines
    request, or cancels his request. You may use these events to notify
    editors and publishers when page status is changed.
*/
    
'onRequestApproval' => 'events:userRequestApproval',
    
'onApprove'         => '',
    
'onApproveRequest'  => 'events:userApproveRequest',
    
'onCancelRequest'   => 'events:userCancelApproval',
    
'onDeclineRequest'  => 'events:userDeclineApproval'
);
?>
Please login to add comments.