【问题标题】:Drupal newsletter module and restricted access categoryDrupal 通讯模块和受限访问类别
【发布时间】:2014-03-07 00:19:10
【问题描述】:

我正在使用带有时事通讯模块 (https://drupal.org/project/newsletter) 的 Drupal 7。 我使用相关列表创建了模板。 不幸的是,我无法看到该类别的真实名称,我只看到每个“限制访问”。

无论如何,如果我尝试检查 ID 类别是正确的元素,并且所有内容都在处理该类别的错误电子邮件。

谢谢

【问题讨论】:

    标签: php drupal drupal-7


    【解决方案1】:

    我也遇到过这个问题。显然,hook_entity_info 的时事通讯实现缺少“访问回调”。

    我将这段代码放在我的模块中,并定义了我自己的访问回调,但如果你愿意,你也可以使用现有的回调。

    function mymodule_entity_info_alter(&$entity_info){
        $entity_info["newsletter_template"]["access callback"] = "mymodule_template_access";
    }
    
    function mymodule_template_access($op, $entity, $account, $entity_type){
        return true;
    }
    

    【讨论】:

      猜你喜欢
      • 2014-04-12
      • 2011-03-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-16
      • 1970-01-01
      • 1970-01-01
      • 2011-02-13
      相关资源
      最近更新 更多