Не могу установить компонент: Ошибка - Нужна помощь

Тема в разделе "Установка и обновление расширений Joomla", создана пользователем rsd-cool, 24.12.2012.

  1. Offline

    rsd-cool Недавно здесь

    Регистрация:
    24.12.2012
    Сообщения:
    1
    Симпатии:
    0
    Пол:
    Мужской
    Не могу установить компонент. Выдает ошибку.

    Код (CODE):
    1. Install error: DB function failed with error number 1064
    2. You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'type=MyISAM' at line 22 SQL=CREATE TABLE `jos_comment` ( `id` INT(10) NOT NULL auto_increment, `contentid` INT(10) NOT NULL default '0', `component` VARCHAR(50) NOT NULL default '', `ip` VARCHAR(15) NOT NULL default '', `userid` int(11), `usertype` VARCHAR(25) NOT NULL default 'Unregistered', `date` DATETIME NOT NULL default '0000-00-00 00:00:00', `name` VARCHAR(30) NOT NULL default '', `email` VARCHAR(50) NOT NULL default '', `website` VARCHAR(100) NOT NULL default '', `notify` TINYINT(1) NOT NULL default '0', `title` VARCHAR(50) NOT NULL default '', `comment` TEXT NOT NULL, `published` TINYINT(1) NOT NULL default '0', `voting_yes` INT(10) NOT NULL default '0', `voting_no` INT(10) NOT NULL default '0', `parentid` INT(10) NOT NULL default '-1', `importtable` VARCHAR(30) NOT NULL default '', `importid` INT(10) NOT NULL default '0', `importparentid` INT(10) NOT NULL default '-1', PRIMARY KEY (`id`)) type=MyISAM;


    Почитав информацию в интернете, понял что нужно искать install.sql. Но у меня такого файла нету. Есть только install.comment.php с таким содержимым:

    Код (CODE):
    1. <?php defined('_VALID_MOS') or die('Direct Access to this location is not allowed.');
    2.  
    3. /*
    4.  * Copyright (C) 2008 Compojoom.com. All rights reserved.
    5.  * Copyright Copyright (C) 2007 Alain Georgette. All rights reserved.
    6.  * Copyright Copyright (C) 2006 Frantisek Hliva. All rights reserved.
    7.  * License http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
    8.  *
    9.  * !JoomlaComment is free software; you can redistribute it and/or modify
    10.  * it under the terms of the GNU General Public License as published by
    11.  * the Free Software Foundation; either version 2 of the License, or
    12.  * (at your option) any later version.
    13.  *
    14.  * !JoomlaComment is distributed in the hope that it will be useful,
    15.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    16.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    17.  * GNU General Public License for more details.
    18.  *
    19.  * You should have received a copy of the GNU General Public License
    20.  * along with this program; if not, write to the Free Software
    21.  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
    22.  * MA  02110-1301, USA.
    23.  */
    24.  
    25. function com_install()
    26. {
    27.     global $mosConfig_absolute_path, $mosConfig_live_site, $database;
    28.  
    29.     /*
    30.      * set the release compatibility
    31.     */
    32.     if (!defined('_JOSC_J10') && !defined('_JOSC_J15')) {
    33.         if (version_compare($GLOBALS['_VERSION']->RELEASE, '1.5', '>='))
    34.             DEFINE('_JOSC_J15', true);
    35.         else
    36.             DEFINE('_JOSC_J10', true);
    37.     }
    38.  
    39.     if (defined('_JOSC_J15'))
    40.         $mambots = 'plugins';
    41.     else
    42.         $mambots = 'mambots';    
    43.        
    44.     $adminDir = dirname(__FILE__);
    45.     require_once("$mosConfig_absolute_path/administrator/components/com_comment/library.comment.php");
    46.     require_once("$mosConfig_absolute_path/components/com_comment/joscomment/utils.php");
    47.     require_once("$mosConfig_absolute_path/administrator/components/com_comment/class.config.comment.php");
    48. ?>
    49.     <table class="adminheading" cellpadding="4" cellspacing="0" border="0">
    50.       <tr>
    51.         <td>
    52. <?php
    53.     $msgstart = "<h2><p style='color:red;'>There was a problem with your installation</p></h2>";
    54.     $msgend = "<h2>Please, contact the <a target=\"_blank\" href=\"http://joomlacode.org/gf/project/joomagecomment\">support</a>."
    55.             . "<br/>Thanks.</h2>";
    56.  
    57.     if (!JOSC_TableUtils::existsTable('#__comment')) {
    58.         /* one day, when param will be in database we could set here or not complete_uninstall param */
    59.     }
    60.        
    61.     /*
    62.      * check mambot path is writable
    63.      */      
    64.     if (!is_writable("$mosConfig_absolute_path/$mambots/content/")) {
    65.         $msgend = "<h2><p>Please:</p>" .
    66.                 "<ul>" .
    67.                 "   <li>Uninstall !JoomlaComment</li>" .
    68.                 "   <li>Modify the file permissions if needed</li>" .
    69.                 "   <li>Reinstall</li>" .
    70.                 "</ul>" .
    71.                 "<br/>Thanks.</p>" .
    72.                 "</h2>";
    73.         echo $msgstart . "<p>The directory \"$mosConfig_absolute_path/$mambots/content/\" is not writeable</p>". $msgend;
    74.         return false;
    75.     }
    76.  
    77.     $install_log = "";
    78.     if (!JOSC_install::checkDatabase($install_log)) {
    79.         echo $msgstart ."<p>". $install_log ."</p>". $msgend;
    80.         return false;
    81.     }
    82.  
    83.     $install_log = "<p>Installation of joscomment & josccacheclean bots</p>";
    84.     /* joscomment.php */
    85.     $movefrom   = $adminDir."/plugin/joscomment.php";
    86.     $moveto     = "$mosConfig_absolute_path/$mambots/content/joscomment.php";
    87.     if (!@rename($movefrom, $moveto)) {
    88.         echo $msgstart."<p style='color:red;'><b>error when moving</b> $movefrom <br /><b>TO</b> $moveto</p>".$msgend;
    89.         $msgstart = $msgend = "";
    90.     }
    91.     /* joscomment.xml */
    92.     $movefrom   = $adminDir."/plugin/joscomment.xml";
    93.     $moveto     = "$mosConfig_absolute_path/$mambots/content/joscomment.xml";
    94.     if (!@rename($movefrom, $moveto)) {
    95.         echo $msgstart."<p style='color:red;'><b>error when moving</b> $movefrom <br /><b>TO</b> $moveto</p>".$msgend;
    96.         $msgstart = $msgend = "";
    97.     }
    98.     /* josccleancache.php */
    99.     $movefrom   = $adminDir."/plugin/josccleancache.php";
    100.     $moveto     = "$mosConfig_absolute_path/$mambots/system/josccleancache.php";
    101.     if (!@rename($movefrom, $moveto)) {
    102.         echo $msgstart."<p style='color:red;'><b>error when moving</b> $movefrom <br /><b>TO</b> $moveto</p>".$msgend;
    103.         $msgstart = $msgend = "";
    104.     }
    105.     /* josccleancache.xml */
    106.     $movefrom   = $adminDir."/plugin/josccleancache.xml";
    107.     $moveto     = "$mosConfig_absolute_path/$mambots/system/josccleancache.xml";
    108.     if (!@rename($movefrom, $moveto)) {
    109.         echo $msgstart."<p><b>error when moving</b> $movefrom <br /><b>TO</b> $moveto</p>".$msgend;
    110.         $msgstart = $msgend = "";
    111.     }
    112.  
    113.     /*
    114.      * joscomment
    115.      */
    116.      /*
    117.       * better to place after pagebreak
    118.       */
    119.     $database->setQuery("SELECT ordering"
    120.             . "\n FROM #__$mambots"
    121.             . "\n WHERE element LIKE 'pagebreak'"
    122.             . "\n AND folder = 'content'"
    123.             );
    124.     $ordering = (int) $database->loadResult();
    125.     $database->setQuery("SELECT COUNT(*)"
    126.             . "\n FROM #__$mambots"
    127.             . "\n WHERE element LIKE 'joscomment%'"
    128.             . "\n AND folder = 'content'"
    129.             . "\n AND published = 1 ");    
    130.     $total = $database->loadResult();
    131.     $published = $total ? '0' : '1'; // if joscomment% (example : joscomment_expert bot ) exists and published : do not publish
    132.     $ordering++;
    133.     $database->setQuery(  "INSERT INTO `#__$mambots` "
    134.                         . "        (`name`, `element`, `folder`, `access`, `ordering`, `published`, `iscore`, `client_id`, `checked_out`, `checked_out_time`, `params`) "
    135.                         . " VALUES ('Content - !JoomlaComment', 'joscomment', 'content', 0, ".$ordering.", ".$published.", 0, 0, 0, '0000-00-00 00:00:00', '');");
    136.     $result = $database->query();
    137.     if($result) {
    138.         /*
    139.          * josccleancache
    140.          */
    141.         $ordering = 0;
    142.         if (defined('_JOSC_J15')) {
    143.              /*
    144.               * get legacy place and if published
    145.               * (normally should be published because it is obligatory to install joomlacomment 3.25)
    146.               */
    147.             $database->setQuery("SELECT ordering"
    148.                     . "\n FROM #__$mambots"
    149.                     . "\n WHERE element LIKE 'legacy'"
    150.                     . "\n AND folder = 'system'"
    151.                     . "\n AND published = 1 "      
    152.                     );
    153.             $ordering = (int) $database->loadResult();
    154.         }
    155.         $database->setQuery("SELECT COUNT(*)"
    156.                 . "\n FROM #__$mambots"
    157.                 . "\n WHERE element LIKE 'josccleancache%'"
    158.                 . "\n AND folder = 'system'"
    159.                 . "\n AND published = 1 ");    
    160.         $total = $database->loadResult();
    161.         $published = ($total || (defined('_JOSC_J15') && $ordering<1)) ? '0' : '1'; // if joscomment% (example : joscomment_expert bot ) exists and published : do not publish
    162.         $ordering++;
    163.         $database->setQuery(  "INSERT INTO `#__$mambots` "
    164.                             . "        (`name`,               `element`, `folder`, `access`, `ordering`, `published`, `iscore`, `client_id`, `checked_out`, `checked_out_time`, `params`) "
    165.                             . " VALUES ('System - !JoomlaComment CleanCache', 'josccleancache', 'system', 0, ".$ordering.", ".$published.", 0, 0, 0, '0000-00-00 00:00:00', '');");
    166.         $result = $database->query();
    167.     }
    168.     if(!$result) {
    169.         $install_log .= "$mambots install error: " . $database->stderr() . "<br /><br />";
    170.         echo $msgstart ."<p>". $install_log ."</p>". $msgend;
    171.         return false;
    172.     }  
    173.  
    174.    //add new admin menu images
    175.     $database->setQuery("UPDATE #__components SET admin_menu_img='../components/com_comment/joscomment/images/logoicon.png' " .
    176.                         "  WHERE admin_menu_link='option=com_comment'");
    177.     $database->query();
    178.  
    179.     $database->setQuery("UPDATE #__components SET admin_menu_img='../includes/js/ThemeOffice/edit.png' " .
    180.                         "  WHERE admin_menu_link='option=com_comment&task=comments'");
    181.     $database->query();
    182.  
    183.     $database->setQuery("UPDATE #__components SET admin_menu_img='../includes/js/ThemeOffice/config.png' " .
    184.                         "  WHERE admin_menu_link='option=com_comment&task=settingssimple'");
    185.     $database->query();
    186.  
    187.     $database->setQuery("UPDATE #__components SET admin_menu_img='../includes/js/ThemeOffice/config.png' " .
    188.                         "  WHERE admin_menu_link='option=com_comment&task=settings'");
    189.     $database->query();
    190.  
    191.     $database->setQuery("UPDATE #__components SET admin_menu_img='../includes/js/ThemeOffice/config.png' " .
    192.                         "  WHERE admin_menu_link='option=com_comment&task=settingsexpert'");
    193.     $database->query();
    194.  
    195.     $database->setQuery("UPDATE #__components SET admin_menu_img='../includes/js/ThemeOffice/controlpanel.png' " .
    196.                         "  WHERE admin_menu_link='option=com_comment&task=importcomment'");
    197.     $database->query();
    198.  
    199.     $database->setQuery("UPDATE #__components SET admin_menu_img='../includes/js/ThemeOffice/credits.png' " .
    200.                         "   WHERE admin_menu_link='option=com_comment&task=about'");
    201.     $database->query();
    202. ?>
    203.        </td>
    204.       </tr>
    205.       </table>
    206. <?php
    207.    
    208.     JOSC_library::viewAbout();
    209. }
    210. ?>


    В нем я TYPE=MyISAM не нашол. Вот и не знаю что делать. Помогите.

    Вот сам компонент.

    Посмотреть вложение com JoomlaComment.zip
     
  2.  

Поделиться этой страницей

Загрузка...