小编use*_*351的帖子

Drupal 7架构中的日期时间类型

我正在编写一个新的Drupal 7模块(Drupal 7.10,安装了Date 7.x-2.0-rc1,安装了Schema 7.x-1.0-beta3)我在mymodule.install中定义了一个表:

$schema['museums_tickets']= array(
    'fields' => array(
        'nid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
    ),
    'day' => array(
        'type' => 'datetime', 
        'mysql_type' => 'DATETIME',
        'not null' => TRUE,
    ),
    'tickets' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        ),
    'ticket_code' => array(
            'type' => 'varchar',
            'length' => 32,
            'not null' => TRUE, 
            'default' => '',
        ),
    ),
    'primary key' => array('nid', 'day','ticket_code'),
);
Run Code Online (Sandbox Code Playgroud)

但我得到以下错误:

Field museums_tickets.day: no …
Run Code Online (Sandbox Code Playgroud)

php drupal drupal-7

5
推荐指数
2
解决办法
1万
查看次数

主动\被动模式下 FTP 服务器的适当 iptables 规则

我在 CentOS6 上安装了 ProFTPD 服务器。如果我使 ftp 本地主机,我可以正确连接,但如果我从外部尝试,我会收到消息“没有到主机的路由”。但有一条到主机的路由,因为我是通过 SSH 连接的。

我尝试添加以下 iptable 规则:

iptables -A INPUT  -p tcp -m tcp --dport 21 -m conntrack --ctstate ESTABLISHED -j ACCEPT -m comment --comment "Allow ftp connections on port 21"
iptables -A OUTPUT -p tcp -m tcp --dport 21 -m conntrack --ctstate NEW,ESTABLISHED -j ACCEPT -m comment --comment "Allow ftp connections on port 21"

iptables -A INPUT  -p tcp -m tcp --dport 20 -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT -m comment --comment "Allow ftp …
Run Code Online (Sandbox Code Playgroud)

linux ftp iptables centos6 proftpd

4
推荐指数
1
解决办法
8634
查看次数

如何主题Ubercart Checkout Complete页面

我想主题页面/购物车/结帐/完成

我已经看到了admin/store/settings/checkout/settings中的设置,但它们还不够.我想添加一些HTML,即在页面顶部添加一个打印按钮.

我想将.tpl.php文件用作模板,或者使用备用结帐页面,如何插入结帐设置中定义的文本.

我试图创建一个uc_cart_complete_sale.tpl.php,但它没有被调用.

先感谢您.

php drupal ubercart drupal-7 drupal-theming

3
推荐指数
1
解决办法
5918
查看次数

标签 统计

drupal ×2

drupal-7 ×2

php ×2

centos6 ×1

drupal-theming ×1

ftp ×1

iptables ×1

linux ×1

proftpd ×1

ubercart ×1