1

Тема: Проблема при установке pun poll на PostgreSQL

Всем доброго времени суток. Такая проблемка:
Жму "установка расширения" и получаю

An error was encountered

The error occurred on line 94 in /home/s/smolguru/ex_game/public_html/forum/public_html/admin/extensions.php(176) : eval()'d code

Database reported: ERROR: column "p_pun_poll_enable_read" does not exist .

В чём проблема?
Заранее спасибо...

Отредактировано ikartunin (04.03.2009 06:56)


2

Re: Проблема при установке pun poll на PostgreSQL

Почисти базу, удали таблицы pun poll и попытайся установить снова.

3

Re: Проблема при установке pun poll на PostgreSQL

padizar пишет:

Почисти базу, удали таблицы pun poll и попытайся установить снова.

таблиц нет. Может быть косяк из-за того, что база Postgres?

4

Re: Проблема при установке pun poll на PostgreSQL

Разобрался сам. Отпишу, может быть кому в будущем пригодится.

В manifest.xml необходимо заменить все " на \' в строчках касаемых таблицы config.

///////////

Оказалось, что рано радовался. Пришлось много чего ещё править. Вот манифест:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE extension SYSTEM "ext-1.0.dtd">

<!--
/**
 * Allows users to quote posts without a page reloading
 *
 * @copyright Copyright (C) 2008 PunBB
 * @license http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
 * @package pun_quote
 */
-->

<extension engine="1.0">
    <id>pun_quote</id>
    <title>JS post quote</title>
    <version>2.1</version>
    <description>Select the text you want to quote right in the topic view. Click "Quote" for multiple quotes in quick reply form.</description>
    <author>PunBB Development Team</author>

    <minversion>1.3</minversion>
    <maxtestedon>1.3.2</maxtestedon>

    <note type="install" timing="pre">Tested in Internet Explorer 7, FireFox 3, Opera 9.63 and Google Chrome 1.0.</note>

    <hooks>
        <hook id="vt_end"><![CDATA[
            ?>
            <form id="pun_quote_form" action="post.php" method="post">
                <div class="hidden">
                    <input type="hidden" value="" id="post_msg" name="post_msg"/>
                    <input type="hidden" value="<?php echo forum_link($forum_url['quote'], array($id, $cur_post['id'])) ?>" id="pun_quote_url" name="pun_quote_url" />
                </div>
            </form>
            <?php
        ]]></hook>

        <hook id="po_qr_get_quote"><![CDATA[
            if(isset($_POST['post_msg']))
                $query['SELECT'] = 'p.poster, \''.$forum_db->escape($_POST['post_msg']).'\'';
        ]]></hook>

        <hook id="vt_qr_get_posts"><![CDATA[
            $pun_quote_js_arrays = '';
        ]]></hook>

        <hook id="vt_row_new_post_entry_data"><![CDATA[
            $pun_quote_js_arrays .= 'pun_quote_posts['.$cur_post['id'].'] = "'.str_replace("\n", '\n', htmlspecialchars($cur_post['message'])).'";';
            $pun_quote_js_arrays .= ' pun_quote_authors['.$cur_post['id'].'] = "'.$cur_post['username'].'";'."\n";
        ]]></hook>

        <hook id="ft_about_pre_copyright"><![CDATA[
            if (FORUM_PAGE == 'viewtopic' && !empty($pun_quote_js_arrays))
                echo '<script type="text/javascript"><!--'."\n".'var pun_quote_posts = new Array('.$forum_page['item_count'].');'."\n".'var pun_quote_authors = new Array('.$forum_page['item_count'].');'."\n".$pun_quote_js_arrays.'--></script>'."\n";
        ]]></hook>

        <hook id="hd_head"><![CDATA[
            if (FORUM_PAGE == 'viewtopic')
                $forum_head['quote_js'] = '<script type="text/javascript" src="'.$ext_info['url'].'/scripts.js"></script>';
        ]]></hook>

        <hook id="vt_row_pre_post_actions_merge"><![CDATA[
            if (file_exists($ext_info['path'].'/lang/'.$forum_user['language'].'/'.$ext_info['id'].'.php'))
                require $ext_info['path'].'/lang/'.$forum_user['language'].'/'.$ext_info['id'].'.php';
            else
                require $ext_info['path'].'/lang/English/'.$ext_info['id'].'.php';

            if (!$forum_user['is_guest'])
            {
                $quote_link = forum_link($forum_url['quote'], array($id, $cur_post['id']));
                $forum_page['post_actions']['reply'] = '<span class="edit-post first-item"><a href="'.$quote_link.'" onclick="Reply('.$cur_post['id'].', this); return false;">'.$lang_pun_quote['Reply'].'<span>&#160;'.$lang_topic['Post'].' '.($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>';
                //If quick post is enabled generate Quick Quote link
                if ($forum_config['o_quickpost'] == '1')
                {
                    unset($forum_page['post_actions']['quote']);
                    $forum_page['post_actions']['quote'] = '<span class="edit-post first-item"><a href="'.$quote_link.'" onclick="QuickQuote('.$cur_post['id'].'); return false;">'.$lang_pun_quote['Quote'].'<span>&#160;'.$lang_topic['Post'].' '.($forum_page['start_from'] + $forum_page['item_count']).'</span></a></span>';
                }
                unset($quote_link);
            }
        ]]></hook>

        <hook id="co_common"><![CDATA[
            $pun_extensions_used = array_merge(isset($pun_extensions_used) ? $pun_extensions_used : array(), array($ext_info['id']));
        ]]></hook>

        <hook id="ft_about_end" priority="10"><![CDATA[
            if (!defined('PUN_EXTENSIONS_USED') && !empty($pun_extensions_used))
            {
                define('PUN_EXTENSIONS_USED', 1);
                echo '<p id="extensions-used">Currently used extensions: '.implode(', ', $pun_extensions_used).'. Copyright &copy; 2008 <a href="http://punbb.informer.com/">PunBB</a></p>';
            }
        ]]></hook>
    </hooks>
</extension>

Отредактировано ikartunin (04.03.2009 07:49)