Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1261 2012-11-26 19:33:48
Re: zem_contact_reborn 4.0.3.20
@gallex, edit the plugin, replace “split” with “explode” where you find it in the plugin code. Yeah, I should fix this.
Last edited by ruud (2012-11-26 19:34:00)
Offline
#1262 2012-11-27 08:16:23
- Gallex
- Member
- Registered: 2006-10-08
- Posts: 1,308
Re: zem_contact_reborn 4.0.3.20
ruud wrote:
edit the plugin, replace “split” with “explode” where you find it in the plugin code. Yeah, I should fix this.
found it in one place, and it helped. thank’s!
Offline
#1263 2012-11-27 09:18:06
- hildebruns
- Member
- Registered: 2009-03-10
- Posts: 35
Re: zem_contact_reborn 4.0.3.20
Hello,
this thread is very long! I haven´t found a solution for my problem. I have a combolist filled with php. It works on site, but in the Mail there is nothing. The PHP select the next five days without Saturday and Sunday.
<txp:zem_contact_select name="rDate" label="Rückruf Datum: *" list='<txp:php>setlocale(LC_ALL, "de_DE", "de_DE@euro", "de_DE.UTF-8", "german");
$days = array();
$i = 0;
while(count($days) < 6){
$timestamp = strtotime(date("Y-m-d +$i") . "day" . ($i > 1 ? 's' : ''));
if(!in_array(date('w', $timestamp), array(0,6))){
$days[] = strftime('%A %d.%m.%Y', $timestamp);
}
$i++;
}
echo implode(', ', $days);</txp:php>' required="1" />
{Edited to add bc.
for better code display. – Uli}
Last edited by uli (2012-11-27 12:03:23)
Offline
#1264 2012-11-27 12:04:27
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,311
Re: zem_contact_reborn 4.0.3.20
Looks to me like an apostrophe problem: read from the left side into your PHP part inside the list value, which you open with a single apostrophe. There are several single ones before the final, closing, one.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#1265 2012-11-27 17:16:07
- hildebruns
- Member
- Registered: 2009-03-10
- Posts: 35
Re: zem_contact_reborn 4.0.3.20
Thank you Uli,
that´s it!
Last edited by hildebruns (2012-11-27 17:16:22)
Offline
#1266 2012-12-02 14:01:43
- masa
- Member
- From: Asturias, Spain
- Registered: 2005-11-25
- Posts: 1,091
Re: zem_contact_reborn 4.0.3.20
ruud wrote:
Try this:
Thanks Ruud – that does the trick!
Offline
#1267 2012-12-05 22:07:08
Re: zem_contact_reborn 4.0.3.20
Hello,
I need to send a zem contact form through the google smtp. I really didn’t understand why the smtp defined in the php.ini cannot do that, but the sysadmin passed me a php function with the correct data, so that I shoud hook it with zem contact reborn. Sort of mymail = new PhpMailer()
etc.
Anyone has any hint on how to do that?
Thank you very much.
Offline
#1268 2012-12-05 22:23:06
Re: zem_contact_reborn 4.0.3.20
hint :)
Offline
#1269 2012-12-06 18:35:44
Re: zem_contact_reborn 4.0.3.20
Someone code this sucker up. Puh-lese!
I would very much like to send with smtp, as I suspect it will get by spam servers more betta.
Offline
#1270 2012-12-06 19:55:11
Re: zem_contact_reborn 4.0.3.20
TXP 4.6 will have a new “send_mail” function (look at recent commits). It’s still buggy (not all headers are encoded properly and the “<address>” style insn’t enforced on the To addresse), but it that function had a call-back option, you could plugin alternate mail methods. That would make it easier to use things like PHPmailer. Easier than patching both TXP and plugins that want to send mail.
Offline
#1271 2012-12-06 19:59:32
Re: zem_contact_reborn 4.0.3.20
postmaster?
Offline
#1272 2012-12-06 21:28:04
Re: zem_contact_reborn 4.0.3.20
ruud wrote:
TXP 4.6 will have a new “send_mail” function (look at recent commits). It’s still buggy (not all headers are encoded properly and the “<address>” style insn’t enforced on the To addresse), but it that function had a call-back option, you could plugin alternate mail methods. That would make it easier to use things like PHPmailer. Easier than patching both TXP and plugins that want to send mail.
If you don’t mind me asking, what bugs specifically? The basis of the send_email() function is the same as txpMail(), and it does same type of encoding. It’s the same function, but with configurable options meant for sending generic email.
By wrong encoding do you mean multibyte handling (which supposedly is correct as long as Textpattern’s header encoder function works as supposed) or injections? As far as I know, the function does strip out any newlines and validates email addresses – both which should prevent actual injections. One thing it doesn’t do is stripping NULL bytes. Do you mean that?
Adding callback functionality is on my to-do list and so is additional argument for receiver’s name.
Offline