本文整理汇总了PHP中Cabinet::convertImagesToFileAssoc方法的典型用法代码示例。如果您正苦于以下问题:PHP Cabinet::convertImagesToFileAssoc方法的具体用法?PHP Cabinet::convertImagesToFileAssoc怎么用?PHP Cabinet::convertImagesToFileAssoc使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cabinet
的用法示例。
在下文中一共展示了Cabinet::convertImagesToFileAssoc方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: blog_update
//.........这里部分代码省略.........
$content[] = file_get_contents(PHPWS_SOURCE_DIR . 'mod/blog/boost/changes/1_6_0.txt');
}
$content[] = '</pre>';
case version_compare($currentVersion, '1.6.1', '<'):
$content[] = '<pre>';
blogUpdateFiles(array('templates/settings.tpl'), $content);
if (!PHPWS_Boost::inBranch()) {
$content[] = file_get_contents(PHPWS_SOURCE_DIR . 'mod/blog/boost/changes/1_6_1.txt');
}
$content[] = '</pre>';
case version_compare($currentVersion, '1.6.2', '<'):
$content[] = '<pre>';
blogUpdateFiles(array('templates/view.tpl', 'templates/settings.tpl', 'templates/style.css'), $content);
if (!PHPWS_Boost::inBranch()) {
$content[] = file_get_contents(PHPWS_SOURCE_DIR . 'mod/blog/boost/changes/1_6_2.txt');
}
$content[] = '</pre>';
case version_compare($currentVersion, '1.6.3', '<'):
$content[] = '<pre>
1.6.3 changes
----------------
+ Small fix to allow linkable images on cached pages.
</pre>';
case version_compare($currentVersion, '1.7.0', '<'):
$content[] = '<pre>';
$db = new PHPWS_DB('blog_entries');
if (PHPWS_Error::logIfError($db->addTableColumn('image_link', "varchar(255) NOT NULL default 'default'"))) {
$content[] = '--- Unable to create image_link column on blog_entries table.</pre>';
return false;
} else {
$content[] = '--- Created image_link column on blog_entries table';
}
PHPWS_Core::initModClass('filecabinet', 'Cabinet.php');
if (Cabinet::convertImagesToFileAssoc('blog_entries', 'image_id')) {
$content[] = '--- Converted images to new File Cabinet format.';
} else {
$content[] = '--- Could not convert images to new File Cabinet format.</pre>';
return false;
}
blogUpdateFiles(array('templates/edit.tpl'), $content);
if (!PHPWS_Boost::inBranch()) {
$content[] = file_get_contents(PHPWS_SOURCE_DIR . 'mod/blog/boost/changes/1_7_0.txt');
}
$content[] = '</pre>';
case version_compare($currentVersion, '1.7.1', '<'):
if (!PHPWS_Boost::inBranch()) {
$content[] = '<pre>' . file_get_contents(PHPWS_SOURCE_DIR . 'mod/blog/boost/changes/1_7_1.txt') . '</pre>';
}
case version_compare($currentVersion, '1.7.2', '<'):
$db = new PHPWS_DB('blog_entries');
if (PHPWS_Error::logIfError($db->addTableColumn('thumbnail', 'smallint not null default 0'))) {
$content[] = 'Unable to create thumbnail column on blog_entries table.';
}
$content[] = '<pre>';
blogUpdatefiles(array('templates/edit.tpl', 'templates/style.css', 'templates/view.tpl', 'templates/list.tpl', 'templates/settings.tpl'), $content);
$content[] = '1.7.2 changes
-------------
+ Can use media or image thumbnails on blog listing page.
+ Blog uses new key datetime terminators.
+ File Cabinet style sheet called regardless of cache.
+ Indicators added for published status.
+ Fixed notice warning.
+ Re-added ability to limit folder view by module.
+ Blog uses new dbpager sorting headers.
+ Lets you use new comments approval.
+ Fixed bug with setting allow anonymous submissions.
示例2: pagesmith_update
//.........这里部分代码省略.........
$content[] = 'Updated phpws_key table.';
}
$content[] = '1.0.4 changes
------------------
+ Fixed pagesmith edit permission.
+ PageSmith home pages were missing edit link.</pre>';
case version_compare($currentVersion, '1.0.5', '<'):
$content[] = '<pre>';
pagesmithUpdateFiles(array('templates/page_templates/text_only/page.tpl'), $content);
$content[] = '1.0.5 changes
----------------
+ Changed wording on move to front functionality
+ Added move to front to miniadmin
+ Fixed text_only template. Missing closing div tag.
</pre>';
case version_compare($currentVersion, '1.0.6', '<'):
$content[] = '<pre>
1.0.6 changes
-------------
+ Small fix to allow linkable images on cached pages.
</pre>';
case version_compare($currentVersion, '1.0.7', '<'):
$content[] = '<pre>';
pagesmithUpdateFiles(array('templates/settings.tpl'), $content);
$content[] = '1.0.7 changes
-------------
+ PageSmith can be set to automatically create a link when a new page
is created.
+ Changing a page title now updates the menu link.
</pre>';
case version_compare($currentVersion, '1.1.0', '<'):
PHPWS_Core::initModClass('filecabinet', 'Cabinet.php');
$content[] = '<pre>';
Cabinet::convertImagesToFileAssoc('ps_block', 'type_id');
$content[] = '--- Images converted for File Cabinet 2.0.0.';
pagesmithUpdateFiles(array('javascript/passinfo/head.js', 'templates/page_templates/threesec/page.css', 'templates/page_templates/threesec/page.tpl', 'templates/page_templates/threesec/structure.xml', 'templates/page_templates/threesec/threesec.png'), $content);
$content[] = '1.1.0 changes (unreleased)
-------------
+ PageSmith conforms to new File Cabinet update.
+ Added url parser to passinfo script to allow images to work with fck better.
</pre>';
case version_compare($currentVersion, '1.2.1', '<'):
$content[] = '<pre>';
$source_tpl = PHPWS_SOURCE_DIR . 'mod/pagesmith/templates/page_templates/';
$local_tpl = $home_dir . 'templates/pagesmith/page_templates/';
$backup = $home_dir . 'templates/pagesmith/_page_templates/';
$source_img = PHPWS_SOURCE_DIR . 'mod/pagesmith/img/folder_icons/';
$local_img = $home_dir . 'images/mod/pagesmith/folder_icons/';
if (is_dir($backup) || @PHPWS_File::copy_directory($local_tpl, $backup)) {
$content[] = '--- Local page templates backed up to: ' . $backup;
} else {
$content[] = sprintf('--- Could not backup directory "%s" to "%s"</pre>', $local_tpl, $backup);
return false;
}
if (PHPWS_File::copy_directory($source_tpl, $local_tpl)) {
$content[] = '--- Local page templates updated.';
} else {
$content[] = sprintf('--- Could not copy directory "%s" to "%s"</pre>', $source_tpl, $local_tpl);
return false;
}
if (PHPWS_File::copy_directory($source_img, $local_img)) {
$content[] = '--- New page template icons copied locally.';
} else {
$content[] = sprintf('--- Could not copy directory "%s" to "%s"</pre>', $source_img, $local_img);
return false;
}