dreljie602951 2012-04-03 08:36
浏览 39
已采纳

Typo3:如何在带有powermail的钩子中将数据插入数据库

I need to insert data into a column in the database.

Which hook should I use?

How can I insert the data?

I'm very confused over how powermail works with hooks.

  • 写回答

2条回答 默认 最新

  • douyiavxxh02727 2012-04-03 08:46
    关注

    For example, You could use this hook : PM_SubmitBeforeMarkerHook, it contains $sessionData, with submitted data.

    ext_localconf.php

    $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['powermail']['PM_SubmitBeforeMarkerHook'][$_EXTKEY] = 'EXT:'.$_EXTKEY.'/Ressources/Private/PHP/Hooks/powermail/class.user_PM_SubmitBeforeMarkerHook.php:&user_PM_SubmitBeforeMarkerHook';
    

    class.user_PM_SubmitBeforeMarkerHook.php

    <?php
    
    class user_PM_SubmitBeforeMarkerHook {
        public function PM_SubmitBeforeMarkerHook (tx_powermail_submit &$pObj, &$markerArray, &$sessionData) {
             // Save data
        }
    }
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 如何通过交互分析得出某高危患者对放疗获益更多
  • ¥15 相关性分析中,p<0.05, r=0.29,怎么评价相关性呢
  • ¥15 docker部署Mongodb后输入命令报错?
  • ¥15 将下列流程图转变成python程序代码
  • ¥15 我需要全国每个城市的最新小区名字等数据。
  • ¥15 开发一个小区生态的小程序
  • ¥15 如何解决Excel中dependent dropdown list 的问题
  • ¥15 MddBootstrapInitialize2失败
  • ¥15 LCD Flicker
  • ¥15 esp32在micropython环境下使用ssl/tls连接mqtt服务器出现以下报错Connected on 192.168.154.223发生意外错误: 5无法连接到 MQTT 代理,如何解决?