Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-08-21 18:36:22

morgant
Plugin Author
From: Vermont, United States
Registered: 2004-06-22
Posts: 63
Website

Un-encoded email plug-in debugging help needed

I whipped up the following Textpattern plug-in for a client (where we’re generating HTML & plain text versions of email newsletters using Textpattern) which spits back an raw/un-encoded email address for the author:

@function sde_author_raw_email($atts)
{ global $thisarticle;

assert_article();

return safe_field(“email”, “txp_users”, “name=’”.$thisarticle[‘author’].”’”);
}@

I’m compiling the plug-in using zem_tpl and PHP doesn’t give me any errors, assert_article() doesn’t throw any errors either, but when I use it in an article form it doesn’t spit anything back. I tried stripping it all the way back to just a return $thisarticle['author'] and even that doesn’t return anything.

I’ve verified the plug-in is enabled. Anything else that I could be missing?

Offline

#2 2008-08-21 18:53:01

jm
Plugin Author
From: Missoula, MT
Registered: 2005-11-27
Posts: 1,746
Website

Re: Un-encoded email plug-in debugging help needed

$thisarticle['authorid'] :).

Offline

#3 2008-08-21 18:57:49

morgant
Plugin Author
From: Vermont, United States
Registered: 2004-06-22
Posts: 63
Website

Re: Un-encoded email plug-in debugging help needed

Many thanks. I knew I just needed a fresh set of eyes!

Offline

Board footer

Powered by FluxBB