VbzWiki:Forms/blog/post

From VbzWiki
Jump to navigation Jump to search

<hide> <let name=tpltpage>project:Forms/handling/blog/post</let> <let name=wtTplt>[[</let> <let name=wtTplt append copy=tpltpage /> <let name=wtTplt append>]]</let>

<let name=user val=@user.dbkey /> <if not flag=$title-prefix>

 <let name=title-prefix pre>User:</let>
 <let name=title-prefix append copy=user />
 <let name=title-prefix append>/blog/</let>

</if> <let name=tag1 chr=60 /> <let name=tag1 append>input type=hidden name=user value="</let> <let name=tag1 append copy=user /> <let name=tag1 append>"</let> <let name=tag1 append chr=62 /> <let name=tag2 chr=60 /> <let name=tag2 append>input type=hidden name=!TITLETPLT value="</let> <let name=tag2 append copy=title-prefix /> <let name=tag2 append>[$!TIMESTAMP$]/[$posttitle$]"</let> <let name=tag2 append chr=62 /> <let name=strURL parse>/Special:MakePage</let> </hide> <echo raw vars now>User: [$user$] | Prefix: [$title-prefix$] <form action="[$strURL$]" target=_blank method=POST> <input type=hidden name="!TPLTPAGE" value="[$tpltpage$]"> <input type=hidden name="!TIMEFMT" value="Y/m/d/Hi">

<input type=hidden name="!TPLTSTART" value="

">
<input type=hidden name="!TPLTSTOP"  value="

">

</echo> <get name=tag1 raw /><get name=tag2 raw />

Post title: <echo raw now><input name=posttitle size=60></echo>
Page title: <get name=title-prefix />[timestamp] [post title]
User topic list: <echo raw now><input name=topics-user size=80></echo>
Global topic list: <echo raw now><input name=topics-global size=80></echo>
Above the fold: <echo raw now><textarea name=text-above rows=3></textarea></echo>
Below the fold: <echo raw now><textarea name=text-below rows=20></textarea></echo>
<echo raw now><input type=submit value=Preview></echo><echo raw now><input type=reset value=-clear-></echo>

<echo raw vars now></form></echo>

  • "topic lists" should look like this: \a topic\another topic\third topic\and so on
    • You can use whatever character you want as a divider; the first character in the text becomes the divider.
    • Topics in the "user topic list" will be prefixed with your username, to distinguish them from global topics (which are common to the entire wiki)
  • "above the fold" text will appear in summaries/compilations and in the RSS feed; "below the fold" generally only appears when you look at the actual posting page.
  • If you want the post to replace the form window instead of showing up in a new window/tab, remove "target=_blank" from the form tag near the top
  • The intrinsic form variable !TIMEFMT uses the PHP date format, which is documented here.
  • The template for formatting the data in this form is: <get name=wtTplt />
  • Timestamp will be set to the time at which you first preview the post.