PDA

View Full Version : How to Determine if a Newthread or Newpost is in Preview Mode


arlarson
03-01-2013, 08:17 PM
Is there a variable or mechanism that identifies a newthread or newpost that is in preview mode?

I am trying to create a conditional such that the output of a custom template appears when somebody initially starts to post a new thread, but does not appear if they click "preview".

nhawk
03-01-2013, 08:49 PM
You could check for the 'postpreview' value in the templates.

Or the $newpost['preview'] value in the newpost_preview hook.

arlarson
03-02-2013, 08:37 PM
Perhaps I'm missing something; I don't see a way to use postpreview as part of a conditional from within a template. Thanks for your help.

nhawk
03-02-2013, 08:47 PM
This way..

<vb:if condition="!$postpreview">
YOUR CODE
</vb:if>

arlarson
03-03-2013, 02:30 AM
Thanks .