[wp-hackers] Plugin custom page

Chris Taylor - stillbreathing.co.uk chris at stillbreathing.co.uk
Wed Nov 21 12:59:05 UTC 2012


Hi Mike,

Sorry for not making it clear. The steps to produce a voucher and
insert a shortcode into a post linking to that voucher are entirely
separate (I was simplifying to get the overal gist of the system
across). More details on how vouchers are created is here:
http://wordpress.org/extend/plugins/voucherpress/screenshots/

I'll give your suggestion a try, hopefully if I look at this again I
can figure out what I'm doing wrong.

Many thanks,

Chris


On Wed, Nov 21, 2012 at 9:16 AM, Mike Little <wordpress at zed1.com> wrote:
> On 21 November 2012 08:42, Chris Taylor - stillbreathing.co.uk <
> chris at stillbreathing.co.uk> wrote:
>
>> Hi Mike,
>>
>> Many thanks, but that isn't going to solve my problem either! Here's a
>> basic workflow for a "open" voucher:
>>
>> 1) The user creates a voucher that is available to anyone (i.e. it
>> doesn't require email registration to download)
>> 2) The user puts the shortcode for that voucher on a page
>> 3) A visitor clicks the link the shortcode generates (/?voucher=abc123)
>> 4) The visitor downloads the resulting PDF file
>>
>>
> Why are all these steps together? You are combining three different things
> now:
> * Admin/User creation of the voucher;
> * distribution of the voucher URL; and
> * visitor retrieval of the voucher.
>
> They are three separate process that occur non-sequentially, and even by
> different people.
>
> If you split those three very separate processes you will find my solution
> addresses all cases for visitor voucher retrieval.
>
> If you need to respond with the pdf itself in the case of a open voucher,
> you could do so on the template_redirect hook looking ahead into the
> content of the already retrieved post/page for the shortcode. Though that's
> always awkward because the visitor is left at an empty browser tab with
> your url in the address bar after they have downloaded the file.
>
>
> Mike
> --
> Mike Little
> http://zed1.com/
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers


More information about the wp-hackers mailing list