gpt4 book ai didi

php - TYPO3:powermail 使用错别字从自己的扩展名中选择数据

转载 作者:可可西里 更新时间:2023-10-31 23:38:02 25 4
gpt4 key购买 nike


这是我在 Stack Overflow 上的第一篇文章。我在互联网上搜索了大约 2 天来解决我的问题。希望你能帮助我。

我正在使用 Typo3 7.6.2 并使用 Extension Builder 7.6Powermail 2.24.0 创建了一个扩展

所以我想生成一个选择框来获取该学校的联系人的电子邮件地址,该学校是用数据库关系定义的。

如果我尝试通过从我的或其他扩展表 (tx_wtschools_domain_model_schools) 中选择错别字来获取数据,我不会得到答案。

但是如果我使用 fe_user 或 fe_group 我会得到预期的答案。

所有记录都存储在id 22的页面上

我使用了这段代码 http://www.typo3.net/forum/thematik/zeige/thema/112554/特别是 2014 年 9 月 19 日 12:42 的帖子(向下滚动)

从 WT-Schools 生成接收者列表

lib.receiver = COA
lib.receiver {
10 = TEXT
10.value = Bitte wählen|[\n]

20 = CONTENT
20 {
table = tx_wtschools_domain_model_schools
select.pidInList = 22
#select.recursive = 100000

renderObj = COA
renderObj {
10 = TEXT
10.field = name
10.wrap = |[\n]
}
}
30 = TEXT
30.value = Ende
}

所以我还没有去过第二部分,我会得到联系方式的邮件。

感谢您的帮助,如果您需要更多信息,我会在此处发布!

问候一月

这是学校表的 SQL 转储:

-- phpMyAdmin SQL Dump
-- version 4.5.5
-- http://www.phpmyadmin.net
--
-- Host: localhost:3306
-- Erstellungszeit: 07. Apr 2016 um 09:06
-- Server-Version: 5.5.47-0+deb7u1
-- PHP-Version: 5.6.14

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Datenbank: `wt-kampfkunstschule`
--

-- --------------------------------------------------------

--
-- Tabellenstruktur für Tabelle `tx_wtschools_domain_model_schools`
--

CREATE TABLE `tx_wtschools_domain_model_schools` (
`uid` int(11) NOT NULL,
`pid` int(11) NOT NULL DEFAULT '0',
`name` varchar(255) NOT NULL DEFAULT '',
`address` varchar(255) NOT NULL DEFAULT '',
`address_info` varchar(255) NOT NULL DEFAULT '',
`postcode` varchar(255) NOT NULL DEFAULT '',
`city` varchar(255) NOT NULL DEFAULT '',
`city_label` varchar(255) NOT NULL DEFAULT '',
`latitude` varchar(255) NOT NULL DEFAULT '',
`longitude` varchar(255) NOT NULL DEFAULT '',
`info` varchar(255) NOT NULL DEFAULT '',
`active` tinyint(1) UNSIGNED NOT NULL DEFAULT '0',
`gallery` int(11) UNSIGNED NOT NULL DEFAULT '0',
`profile_image` int(11) UNSIGNED NOT NULL DEFAULT '0',
`activate_alt_training` tinyint(1) UNSIGNED NOT NULL DEFAULT '0',
`owner` int(11) UNSIGNED NOT NULL DEFAULT '0',
`contact` int(11) UNSIGNED DEFAULT '0',
`trainer` int(11) UNSIGNED NOT NULL DEFAULT '0',
`categories` int(11) UNSIGNED NOT NULL DEFAULT '0',
`training_time` int(11) UNSIGNED NOT NULL DEFAULT '0',
`training_time_alt` int(11) UNSIGNED NOT NULL DEFAULT '0',
`tstamp` int(11) UNSIGNED NOT NULL DEFAULT '0',
`crdate` int(11) UNSIGNED NOT NULL DEFAULT '0',
`cruser_id` int(11) UNSIGNED NOT NULL DEFAULT '0',
`deleted` tinyint(4) UNSIGNED NOT NULL DEFAULT '0',
`hidden` tinyint(4) UNSIGNED NOT NULL DEFAULT '0',
`t3ver_oid` int(11) NOT NULL DEFAULT '0',
`t3ver_id` int(11) NOT NULL DEFAULT '0',
`t3ver_wsid` int(11) NOT NULL DEFAULT '0',
`t3ver_label` varchar(255) NOT NULL DEFAULT '',
`t3ver_state` tinyint(4) NOT NULL DEFAULT '0',
`t3ver_stage` int(11) NOT NULL DEFAULT '0',
`t3ver_count` int(11) NOT NULL DEFAULT '0',
`t3ver_tstamp` int(11) NOT NULL DEFAULT '0',
`t3ver_move_id` int(11) NOT NULL DEFAULT '0',
`sys_language_uid` int(11) NOT NULL DEFAULT '0',
`l10n_parent` int(11) NOT NULL DEFAULT '0',
`l10n_diffsource` mediumblob
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Daten für Tabelle `tx_wtschools_domain_model_schools`
--

INSERT INTO `tx_wtschools_domain_model_schools` (`uid`, `pid`, `name`, `address`, `address_info`, `postcode`, `city`, `city_label`, `latitude`, `longitude`, `info`, `active`, `gallery`, `profile_image`, `activate_alt_training`, `owner`, `contact`, `trainer`, `categories`, `training_time`, `training_time_alt`, `tstamp`, `crdate`, `cruser_id`, `deleted`, `hidden`, `t3ver_oid`, `t3ver_id`, `t3ver_wsid`, `t3ver_label`, `t3ver_state`, `t3ver_stage`, `t3ver_count`, `t3ver_tstamp`, `t3ver_move_id`, `sys_language_uid`, `l10n_parent`, `l10n_diffsource`) VALUES
(1, 22, 'WT-Zentrum Radevormwald', 'Kaiserstraße 69', 'direkt am Markt', '42477', 'Radevormwald', '', '51.203107', '7.356229', 'Ihre Selbstverteidigungschule in Radevormwald', 1, 4, 1, 0, 1, 7, 31, 3, 8, 0, 1458657850, 1458208785, 1, 0, 0, 0, 0, 0, '', 0, 0, 0, 0, 0, -1, 0, 0x613a32313a7b733a31363a227379735f6c616e67756167655f756964223b4e3b733a363a2268696464656e223b4e3b733a343a226e616d65223b4e3b733a373a2261646472657373223b4e3b733a31323a22616464726573735f696e666f223b4e3b733a383a22706f7374636f6465223b4e3b733a343a2263697479223b4e3b733a31303a22636974795f6c6162656c223b4e3b733a383a226c61746974756465223b4e3b733a393a226c6f6e676974756465223b4e3b733a343a22696e666f223b4e3b733a363a22616374697665223b4e3b733a373a2267616c6c657279223b4e3b733a31333a2270726f66696c655f696d616765223b4e3b733a32313a2261637469766174655f616c745f747261696e696e67223b4e3b733a353a226f776e6572223b4e3b733a373a22636f6e74616374223b4e3b733a373a22747261696e6572223b4e3b733a31303a2263617465676f72696573223b4e3b733a31333a22747261696e696e675f74696d65223b4e3b733a31373a22747261696e696e675f74696d655f616c74223b4e3b7d),
(2, 22, 'WingTsun-Schule Remscheid-Lennep', 'Robert-Schumacher-Str. 6', 'Im Sportstudio Fit & Fun (über Rewe)', '42897', 'Remscheid', 'Remscheid-Lennep', '51.189055', '7.253708', 'Jeden Montag nach dem WingTsun: Selbstverteidigung mit und gegen Waffen. Fuer alle Teilnehmer des Erwachsenen WingTsun kostenlos!', 1, 3, 1, 0, 2, 6, 1, 3, 3, 3, 1458655705, 1458218192, 1, 0, 0, 0, 0, 0, '', 0, 0, 0, 0, 0, -1, 0, 0x613a32313a7b733a31363a227379735f6c616e67756167655f756964223b4e3b733a363a2268696464656e223b4e3b733a343a226e616d65223b4e3b733a373a2261646472657373223b4e3b733a31323a22616464726573735f696e666f223b4e3b733a383a22706f7374636f6465223b4e3b733a343a2263697479223b4e3b733a31303a22636974795f6c6162656c223b4e3b733a383a226c61746974756465223b4e3b733a393a226c6f6e676974756465223b4e3b733a343a22696e666f223b4e3b733a363a22616374697665223b4e3b733a373a2267616c6c657279223b4e3b733a31333a2270726f66696c655f696d616765223b4e3b733a32313a2261637469766174655f616c745f747261696e696e67223b4e3b733a353a226f776e6572223b4e3b733a373a22636f6e74616374223b4e3b733a373a22747261696e6572223b4e3b733a31303a2263617465676f72696573223b4e3b733a31333a22747261696e696e675f74696d65223b4e3b733a31373a22747261696e696e675f74696d655f616c74223b4e3b7d);

--
-- Indizes der exportierten Tabellen
--

--
-- Indizes für die Tabelle `tx_wtschools_domain_model_schools`
--
ALTER TABLE `tx_wtschools_domain_model_schools`
ADD PRIMARY KEY (`uid`),
ADD KEY `parent` (`pid`),
ADD KEY `t3ver_oid` (`t3ver_oid`,`t3ver_wsid`),
ADD KEY `language` (`l10n_parent`,`sys_language_uid`);

--
-- AUTO_INCREMENT für exportierte Tabellen
--

--
-- AUTO_INCREMENT für Tabelle `tx_wtschools_domain_model_schools`
--
ALTER TABLE `tx_wtschools_domain_model_schools`
MODIFY `uid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

最佳答案

手册https://docs.typo3.org/typo3cms/extensions/powermail/2.24.0/ForAdministrators/GoodToKnow/PrefillField/Index.html您的 Powermail 版本说明了如何创建选择列表。示例 3 显示了如何从表中读取。在您的情况下,您可以使用名称和 uid(该字段将显示名称并存储 uid 的值)。

设置接收器手册也有例子https://docs.typo3.org/typo3cms/extensions/powermail/2.24.0/ForAdministrators/GoodToKnow/DynamicReceiver/Index.html .在您的用例中,我将使用 CONTENT 查询而不是示例中的 CASE 并查找所选 uid 的电子邮件地址。确保在 CONTENT 对象中使用 标记 来注入(inject)选定的 uid,以防止 SQL 注入(inject)!

关于php - TYPO3:powermail 使用错别字从自己的扩展名中选择数据,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36200694/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com