📄 install.odtindexer.php
字号:
<?php/*** @package ODT_Indexer* @copyright (C) 2006 Websmurf* @author Websmurf* * --------------------------------------------------------------------------------* All rights reserved. ODT Indexer is a component for Joomla and Mambo. * You can use it to search through ODT files** This program is free software; you can redistribute it and/or* modify it under the terms of the Creative Commons - Attribution-NoDerivs 2.5 * license as published by the Creative Commons Organisation* http://creativecommons.org/licenses/by-nd/2.5/.** This program is distributed in the hope that it will be useful,* but WITHOUT ANY WARRANTY; without even the implied warranty of* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * --------------------------------------------------------------------------------**/function com_install(){ global $mainframe, $database; //Updates menu option $query = "UPDATE #__components SET admin_menu_img='../administrator/components/com_odtindexer/icons/16x16_ooo_writer.png' WHERE admin_menu_link='option=com_odtindexer'"; $database->setQuery($query); if(!$database->query()){ echo $database->getErrorMsg() . '<br />'; } //create mambot if(!copy($mainframe->getCfg('absolute_path') . '/administrator/components/com_odtindexer/mambot/odt.searchbot.xm', $mainframe->getCfg('absolute_path') . '/mambots/search/odt.searchbot.xml')){ echo '<b>Failed</b> to copy mambot xml file<br />'; } if(!copy($mainframe->getCfg('absolute_path') . '/administrator/components/com_odtindexer/mambot/odt.searchbot.php', $mainframe->getCfg('absolute_path') . '/mambots/search/odt.searchbot.php')){ echo '<b>Failed</b> to copy mambot php file<br />'; } $mambot = new mosMambot($database); $mambot->name = 'ODT searchbot'; $mambot->element = 'odt.searchbot'; $mambot->folder = 'search'; $mambot->ordering = 1; $mambot->published = 1; if (!$mambot->store()) { echo 'Mambot install failed: ' .$mambot->getError().'<br />'; } }?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -