Файл: InstantSocial/uploud/components/photoblog/install.php
Строк: 77
<?php
/******************************************************************************/
// //
// InstantCMS v1.8 //
// http://www.instantcms.ru/ //
// //
// written by InstantCMS Team, 2007-2010 //
// produced by InstantSoft, (www.instantsoft.ru) //
// //
// LICENSED BY GNU/GPL v2 //
// //
/******************************************************************************/
// ========================================================================== //
function info_component_photoblog(){
//Описание компонента
$_component['title'] = 'Фотоблоги';
$_component['description'] = 'Компонент Фотоблоги / Фотоотчеты';
$_component['link'] = 'photoblog';
$_component['author'] = 'deltas';
$_component['internal'] = '0';
$_component['version'] = '1.0';
//Настройки по-умолчанию
$_component['config'] = array(
'height' =>650,
'width' =>650,
'premod' =>0,
'perpage' =>3,
'maxup' =>10
);
return $_component;
}
// ===================================v======================================= //
function install_component_photoblog(){
$inCore = cmsCore::getInstance(); //подключаем ядро
$inDB = cmsDatabase::getInstance(); //подключаем базу данных
include($_SERVER['DOCUMENT_ROOT'].'/includes/dbimport.inc.php');
dbRunSQL($_SERVER['DOCUMENT_ROOT'].'/components/photoblog/install.sql', $inConf->db_prefix);
$is_comment_target = $inDB->get_field('cms_comment_targets', "target = 'photoblog'", 'id');
if(!$is_comment_target){
$inCore->registerCommentsTarget('photoblog', 'photoblog', 'Фотоблог');
}
if(!cmsActions::getAction('add_photoblog')){
cmsActions::registerAction('photoblog',
array(
'name'=>'add_photoblog',
'title'=>'Добавление фотоблога',
'message'=>'добавляет %s|'
)
);
}
return true;
}
// ========================================================================== //
function upgrade_component_photoblog(){
return true;
}
// ========================================================================== //
?>