BlogIt-CoreTemplate

WARNING: Do not change this file.

  • You can make skin specific changes by including the any of the sections below in {$Site}.BlogIt-SkinTemplate-skinname.
  • Copy only specific sections you need to override. Do not copy the entire file, as you will not get the benefits of future releases of BlogIt.

LAYOUT TEMPLATES


These will typically be over-ridden by skins in order to change layout.

Note:
  • Unjoined (:if:) on meta-data-head prevents (:div9999end:) being displayed. Unknown why!
  • {*$FullName}: Site.BlogIt-CoreTemplate: The page in the URL for non-pagelists
  • {=$FullName}: {=$FullName}: The page being managed in a pagelist
  • {$FullName}: Site.BlogIt-CoreTemplate: Usually the name of this file Site.BlogIt-CoreTemplate

Blogs

#single-entry-view

(:if false:)[[#single-entry-view]](:if:)
(:div9990 class="blogit-post":)
(:div9999 class="blogit-meta-data-head":)
!!!!! (:blogit-skin author pre_text='$[By] ' post_text=', $[on] ':){*$:entryauthor}(:blogit-skinend:)\
%blogit-date%(:blogit-skin date fmt='long':){*$:entrydate}(:blogit-skinend:)%%(:if:) \
(:blogit-skin edit pre_text='%item accesskey="$[ak_edit]"%' post_text='%%' page='{*$FullName}':)$[edit](:blogit-skinend:)
(:div9999end:)
(:div9991 class="blogit-post-body":)
{*$:entrybody}
(:div9991end:)
(:div9999 class="blogit-meta-data-footer":)
(:blogit-skin tags pre_text='!!!!!%block blogit-tags%$[Tags:] ' page='{*$FullName}' post_text='%%':){*$:entrytags}(:blogit-skinend:)
(:blogit-skin commentcount status='{*$:entrycomments}' pre_text='!!!!!%block blogit-comment-count%' post_text='%%' group='{*$Group}' name='{*$Name}':) $[comment(s)](:blogit-skinend:)
(:div9999end:)
(:div9990end:)
(:includesection "#comments-pagelist pagename={*$Name} group={*$Group} entrycomments={*$:entrycomments} divid=commentblock":)
[[#single-entry-viewend]]

#print-view

NB: Unjoined on meta-data-head prevents (:div9999end:) being displayed. Unknown why!
(:if false:)[[#print-view]](:if:)
(:div9990 class="blogit-post":)
(:div9999 class="blogit-meta-data-head":)
!!!!! (:blogit-skin author pre_text='$[By] ' post_text=', $[on] ':){*$:entryauthor}(:blogit-skinend:)\
%blogit-date%(:blogit-skin date fmt='long':){*$:entrydate}(:blogit-skinend:)%%(:if:) \
(:div9999end:)
(:div9991 class="blogit-post-body":)
{*$:entrybody}
(:div9991end:)
(:div9999 class="blogit-meta-data-footer":)
(:blogit-skin tags pre_text='!!!!!%block blogit-tags%$[Tags:] ' page='{*$FullName}' post_text='%%':){*$:entrytags}(:blogit-skinend:)
(:blogit-skin commentcount status='{*$:entrycomments}' pre_text='!!!!!%block blogit-comment-count%' post_text='%%' group='{*$Group}' name='{*$Name}':) $[comment(s)](:blogit-skinend:)
(:div9999end:)
(:div9990end:)
(:includesection "#comments-pagelist pagename={*$Name} group={*$Group} entrycomments={*$:entrycomments} divid=commentblock":)
[[#print-viewend]]

#multi-entry-view

Parameters: [pagenav], [perpage]
(:if false:)[[#multi-entry-view]](:if:)
(:template defaults order=-$:entrydate:)
(:template each:)
(:div9990 class="blogit-post-summary":)
!! [[{=$FullName} | {=$Title}]]
(:div9999 class="blogit-meta-data-head":)
!!!!! (:blogit-skin author pre_text='$[By] ' post_text=', $[on] ':){=$:entryauthor}(:blogit-skinend:)\
%blogit-date%(:blogit-skin date fmt='long':){=$:entrydate}(:blogit-skinend:)%% \
(:blogit-skin edit pre_text='%item accesskey="$[ak_edit]"%' post_text='%%' page='{=$FullName}':)$[edit](:blogit-skinend:)
(:div9999end:)
(:blogit-skin intro class=blogit-post-intro page={=$FullName}:)
{=$:entrybody}(:blogit-skinend:)
(:div9990end:)
(:template last:)
(:includesection "#page-navigation itemsonpage={$$PageCount} pagenav={$$pagenav} perpage={$$perpage}":)
[[#multi-entry-viewend]]

#blog-list-view

Parameters: pagenav, perpage, fullname (for single row)
(:if false:)[[#blog-list-view]](:if:)
(:template defaults wrap=inline:)
(:template first:)
(:if bi_isnull {$$fullname}:)
(:div class="blogit-blog-list":)
(:table class="blog-list":)
(:cellnr class="blogit-blog-list-header":)$[Actions]
(:cell:)$[Title]
(:cell:)$[Author]
(:cell:)$[Date]
(:cell:)$[Tags]
(:template first {=$:entrystatus}:)
(:cellnr class="blog-list-header" colspan=5:)'''$[{=$:entrystatus}]'''
(:if:)
(:template each:)
(:cellnr class="blogit-actions":) %apply=row class="blogit-blog-list-row" id="(:blogit-skin commentid:){=$FullName}(:blogit-skinend:)"%
* %apply=list class="blogit-admin-links"%(:blogit-skin edit page='{=$FullName}' post_text=" ":)$[edit](:blogit-skinend:)
* (:blogit-skin delete page='{=$FullName}':)$[delete](:blogit-skinend:)
(:cell class="blogit-title":)[[{=$FullName}|{=$Title}]]
(:cell class="blogit-author":)(:blogit-skin author:){=$:entryauthor}(:blogit-skinend:)
(:cell class="blogit-date":)(:blogit-skin date fmt='entry':){=$:entrydate}(:blogit-skinend:)
(:cell class="blogit-tags":)(:blogit-skin tags  page='{=$FullName}':){=$:entrytags}(:blogit-skinend:)
(:cell class="blogit-commentcount":)\
(:blogit-skin commentcount status='true' group='{=$Group}' name='{=$Name}':)/(:blogit-skinend:)\
(:blogit-skin commentcount status='false' group='{=$Group}' name='{=$Name}':)(:blogit-skinend:)
(:template last:)
(:if bi_isnull {$$fullname}:)
(:tableend:)
(:includesection "#page-navigation itemsonpage={$$PageCount} pagenav={$$pagenav} perpage={$$perpage}":)
(:divend:)
(:if:)
[[#blog-list-viewend]]

#blog-summary-list

Simple bullet list of blog titles.

Parameters: more, blogid
(:if false:)[[#blog-summary-list]](:if:)
(:template each:)
* %apply list class="blogit-blog-summary-list"%[[{=$FullName} | {=$Title}]]%%
(:template last:)
(:if !equal "{$$more}" false:)(:div class="blogit-listmore":)[[Site.BlogList?blogid={$$blogid} | $[more...]]]
(:divend:)(:if:)
[[#blog-summary-listend]]

#blog-yearly-archive

List of all pages grouped by year, ordered by date

Parameters: none
(:if false:)[[#blog-yearly-archive]](:if:)
(:template each:)
(:if !equal {(ftime fmt='$[%Y]' @{=$:entrydate})} {(ftime fmt='$[%Y]' @{<$:entrydate})}:)
!! %block blogit-archive-year%{(ftime fmt='$[%Y]' @{=$:entrydate})}(:if:)
* %apply list class="blogit-yearly-archive"%[[{=$FullName} | {=$Title}]] %blogit-entry-date%(:blogit-skin date fmt='short':){=$:entrydate}(:blogit-skinend:)%%
[[#blog-yearly-archiveend]]

Comments


#comment-view-all

Displays a list of comments as part of the single entry view. Approved comments are visible to all. Unapproved comments are only shown to admins, and include an 'approve' link. {=$FullName} refers to the comment page.

Parameters: name (refers to a comment page), base, commenttid (not from pagelist, only when called from bi_AjaxRedirect)
(:if false:)[[#comment-view-all]](:if:)
(:template first:)
(:div9990 class="blogit-commentblock":)
!! (:if [ bi_auth comment-edit,comment-approve && !equal '{$Action}' 'print' ] :)%apply=block class=blogit-admin%(:if:)$[Comments]
(:template each:)
(:if9990 [ bi_isnull {$$commentid} || ( !bi_isnull {$$commentid} && equal '{=$Name}' '{$$commentid}' ) ] :)\
# %apply=list class="blogit-comment-list"% %apply=item id="(:blogit-skin commentid:){=$FullName}(:blogit-skinend:)" class="comment blogit-comment-(:if9991 equal 'false' '{=$:commentapproved}':)un(:if9991end:)approved" (:if9991 bi_auth comment-edit,comment-approve:)blogit-admin(:if9991end:)% %blogit-comment-header%\
$[By] (:blogit-skin commentauthor website='{=$:website}' author='{=$:commentauthor}':)(:blogit-skinend:), \
$[on] (:blogit-skin date fmt='long':){=$:commentdate}(:blogit-skinend:)\
  (:includesection "#admin-links commentstatus='{=$:commentapproved}' commentpage='{=$FullName}' base='{(bi_ifnull "{$$base}" "{*$FullName}")}'":)\
  %commenttext%(:blogit-skin commenttext page='{=$FullName}':){=$:commenttext}(:blogit-skinend:)%%
(:if9990end:)
(:template last:)
(:div9990end:)

[[#comment-view-allend]]

#comment-view-admin

Displays a list of comments as part of the comment-view-pagelist.
Ensure title is only printed first time, not for each comment: if !equal {=$FullName} {<$FullName}

Parameters: name (commentid), base
(:if false:)[[#comment-view-admin]](:if:)
(:template each:)
(:if !equal {(bi_base {=$FullName})} {(bi_base {<$FullName})} :)
!!! [[{(bi_base {=$FullName})} | {{(bi_base {=$FullName})}$Title}]](:if:)
# %apply=list class="blogit-comment-list blogit-comment-admin-list"% %apply=item id="(:blogit-skin commentid:){=$FullName}(:blogit-skinend:)" class="comment blogit-comment-(:if9991 equal 'false' '{=$:commentapproved}':)un(:if9991end:)approved" blogit-admin% %blogit-comment-header%\
$[By] (:blogit-skin commentauthor website='{=$:website}' author='{=$:commentauthor}':)(:blogit-skinend:), \
$[on] (:blogit-skin date fmt='long':){=$:commentdate}(:blogit-skinend:)\
  (:includesection "#admin-links commentstatus='{=$:commentapproved}' commentpage='{=$FullName}' base='{(bi_ifnull "{$$base}" "{*$FullName}")}'":)\
  %commenttext%(:blogit-skin commenttext page='{=$FullName}':){=$:commenttext}(:blogit-skinend:)%%
[[#comment-view-adminend]]

#comment-summary-list

Parameters: datestamp (true/false)
(:if false:)[[#comment-summary-list]](:if:)
* %apply list class="blogit-comment-summary-list"%[[{(bi_base {=$FullName})}#(:blogit-skin commentid:){=$FullName}(:blogit-skinend:) | (:blogit cleantext:){=$:commenttext}(:blogitend:)$[...]]]%%
  (:if equal '{$$datestamp}' true:)%blogit-comment-timestamp%(:blogit-skin date fmt='entry':){=$:commentdate}(:blogit-skinend:)%%(:if:)
[[#comment-summary-listend]]

General


#no-results-found

(:if false:)[[#no-results-found]](:if:)
!! $[No more pages found.]
[[{*$FullName} | $[Return to first page.]]].
[[#no-results-foundend]]

#page-navigation

Parameters: itemsonpage (entries on this particular page set), [pagenav] (show page nav links? Default TRUE), [perpage] (override entries-per-page)
(:if false:)[[#page-navigation]](:if:)
(:if1 !equal "{$$pagenav}" false:)(:div class="blogit-page-navigation force_contain":)\
(:if2 !bi_isnull {$bi_PagePrev}:)\
%blogit-newer-entries%[[{(bi_url {*$FullName} page {$bi_PagePrev})} | $[newer posts]]]\
(:if2:)\
(:if2 !bi_lt '{$$itemsonpage}' {(bi_ifnull "{$$perpage}" "{$bi_EntriesPerPage}")} :)\
%blogit-older-entries%[[{(bi_url {*$FullName} page {$bi_PageNext})} | $[older posts]]]\
(:if2:)
(:divend:)
(:div class="blogit-clear":)
(:divend:)
(:if1:)
[[#page-navigationend]]

Admin


Control Panel

Parameters: blogid
(:if false:)[[#control-panel]](:if:)
(:blogid:blog1:)
* %apply=item class="blogit-unapproved-comment-count"%[[{$bi_Pages_ADMIN}?action=bi_admin&s=unapproved-comments&blogid={(bi_ifnull "{$$blogid}" {$:blogid})} | $[Unapproved Comments:] (:includesection "#comments-count-pagelist commentstatus=false blogid={(bi_ifnull '{$$blogid}' {$:blogid})}":)]]
(:blogit-skin newentry pre_text='* ':)$[New Entry](:blogit-skinend:)
* [[{$bi_Pages_ADMIN}?action=bi_admin&s=blog-grid&blogid={(bi_ifnull "{$$blogid}" {$:blogid})}&status=draft | $[Drafts]]]
* [[{$bi_Pages_ADMIN}?action=bi_admin&s=blog-grid&blogid={(bi_ifnull "{$$blogid}" {$:blogid})}&status=publish | $[Published]]]
* [[{$bi_Pages_ADMIN}?action=bi_admin&s=blog-grid&blogid={(bi_ifnull "{$$blogid}" {$:blogid})}&status=sticky | $[Stickies]]]
(:if !bi_isnull {$bi_StatAction}:)* [[{*$FullName}?action={$bi_StatAction} | $[Statistics]]](:if:)
* [[{*$FullName}?action=logout | $[logout](:if !bi_isnull {$AuthId}:) [-''({$AuthId})''-](:if:)]]
[[#control-panelend]]

#admin-links

Parameters: commentstatus (current status), commentpage (name of the comment page), base (name of the basepage).
NOTE: Classes are auto applied, which also adds
 at end of line. If this section is in HTML list ensure '  ' (as below) is at start of line to prevent PRE tag being inserted by PmWiki. 
NOTE: basepage will be incorrect both when starting from BlogIt-Admin, and also when responding to ajax, with single comment. bi_Basepage() works this out.
(:if false:)[[#admin-links]](:if:)
(:if9 [ bi_auth comment-edit,comment-approve && !equal '{$Action}' 'print' ] :)
** %apply=list class="blogit-admin-links"%(:blogit-skin commentapprove post_text=' - ' status='{$$commentstatus}':){$$commentpage}(:blogit-skinend:)
** (:blogit-skin commentedit post_text=' - ' base='{$$base}':){$$commentpage}(:blogit-skinend:)
** (:blogit-skin commentreply post_text=' - ' base='{$$base}':){$$commentpage}(:blogit-skinend:)
** (:blogit-skin commentdelete:){$$commentpage}(:blogit-skinend:)
** (:blogit-skin commentblock pre_text=' - ':){$$commentpage}(:blogit-skinend:)\
(:if9:)
[[#admin-linksend]]

Pagelists


BLOGS

#blog-summary-pagelist

Parameters: blogid, status, pagenav (true/false -- default is true), count (0 for default all; null for default defined in config), daterange, [group and name (if included, then returns only the specific page, no other parameters are needed)].
(:if false:)[[#blog-summary-pagelist]](:if:)
(:pagelist list="blogit" wrap=none fmt=#multi-entry-view\
  order=-$:entrydate\
  $:entrytype=blog\
  {(bi_param $:blogid "{$$blogid}")}\
  {(bi_param $:entrystatus "{$$status}")}\
  {(bi_param link "{$$link}")}\
  {(bi_param perpage "{$$count}")}\
  {(bi_param group "{$$group}")}\
  {(bi_param name "{$$name}")}\
  (:if !bi_isnull {$$daterange}:)if='date {$$daterange} @{=$:entrydate}' \
  (:elseif equal {$bi_DisplayFuture} false:)if='date ..@{$Now} @{=$:entrydate}'(:if:)\
  (:if !equal '{$$count}' 0:){(bi_param pagenav "{$$pagenav}")}\
  count={(bi_ifnull '{$$count}' "{$bi_EntryStart}..{$bi_EntryEnd}")}(:if:)\
  {(bi_param cols "{$$cols}")}\
:)
[[#blog-summary-pagelistend]]

#blog-summary-list-pagelist

Parameters: blogid, count, status, more (include more link)
(:if false:)[[#blog-summary-list-pagelist]](:if:)
(:pagelist list="blogit" wrap=none fmt=#blog-summary-list {(bi_param count "{$$count}")}\
  order=-$:entrydate\
  $:entrytype=blog\
  {(bi_param $:blogid "{$$blogid}")}\
  {(bi_param $:entrystatus "{$$status}")}\
  (:if equal {$bi_DisplayFuture} false:)if='date ..@{$Now} @{=$:entrydate}'(:if:)\
  {(bi_param blogid "{$$blogid}")}\
  {(bi_param more "{$$more}")}\
:)
[[#blog-summary-list-pagelistend]]

#blog-grid

Accepts parameters of status, count (really perpage), blogid, pagenav, OR group and name, in which case only a single row is returned, with no header (for ajax updates)

(:if false:)[[#blog-grid]](:if:)
(:pagelist list="blogit" wrap=none fmt=#blog-list-view \
  order=$[$:entrystatus],-$:entrydate\
  $:entrytype=blog\
  {(bi_param $:blogid "{$$blogid}")}\
  {(bi_param $:entrystatus "{$$status}")}\
  {(bi_param perpage "{$$count}")}\
  {(bi_param group "{$$group}")}\
  {(bi_param name "{$$name}")}\
  (:if !bi_isnull {$$group}:)fullname={$$group}.{$$name}(:if:)\
  (:if [ equal "{$$count}" "0" || !bi_isnull {$$group} ] :)pagenav=false\
  (:else:){(bi_param pagenav "{$$pagenav}")}\
  count={$bi_EntryStart}..{$bi_EntryEnd}\
  (:if:)\
:)
[[#blog-gridend]]

#blog-yearly-archive-pagelist

Parameters: blogid, status, year
(:if false:)[[#blog-yearly-archive-pagelist]](:if:)
(:pagelist list="blogit" wrap=none fmt=#blog-yearly-archive\
  order=-$:entrydate\
  $:entrytype=blog\
  {(bi_param $:blogid "{$$blogid}")}\
  {(bi_param $:entrystatus "{$$status}")}\
  (:if1 bi_isnull {$$year}:)(:if2 equal '{$bi_DisplayFuture}' false :)if='date ..@{$Now} @{=$:entrydate}'(:if2:)\
  (:else1:)if=' [ date {$$year}-01-01..{$$year}-12-31 @{=$:entrydate} (:if2 equal {$bi_DisplayFuture} false:)&& date ..@{$Now} @{=$:entrydate}(:if2:) ] '\
  (:if1:)\
:)
[[#blog-yearly-archive-pagelistend]]

COMMENTS

#comments-pagelist

Displays comments on the blog entry single-page view.

Parameters: pagename, group, entrycomments, divid, commentid (to display a single comment, on ajax edit), base if displaying a single comment

If providing a commentid (the $Name of the comment page, excluding the $Group), then pagename and group parameters are not needed.

(:if false:)[[#comments-pagelist]](:if:)\
(:if9990 [ !bi_isnull {$$commentid} || ( !equal "{$$entrycomments}" "none" && !equal "{$bi_CommentsEnabled}" "none" ) ] :)
(:if9991 bi_isnull {$$commentid}:)
(:if9992 !bi_isnull {$$divid}:)(:div9970 id="{$$divid}":)(:if9992:)
(:div9971 id="blogit-comment-list":)\
(:if9991:)
(:pagelist list="blogit-comments" wrap=none fmt=#comment-view-all\
  order=ctime\
  name=(:if9981 bi_isnull {$$commentid}:){$$group}-{$$pagename}-* (:else9981:){$$commentid}(:if9981:) \
  $:entrytype=comment\
  {(bi_param base "{$$base}")}\
  if="[ equal '{=$:commentapproved}' 'true' || !bi_isnull {$$commentid} || bi_auth comment-edit,comment-approve {$bi_Pages_AUTH} ]" \
:)
(:if9991 bi_isnull {$$commentid}:)
(:div9971end:)
(:if [ equal "{$$entrycomments}" "open" && equal "{$bi_CommentsEnabled}" "open" ] :)\
(:pmform blogit-comments:)(:if:)
(:if9992 !bi_isnull {$$divid}:)(:div9970end:)(:if9992:)\
(:if9991:)
(:if9990:)
[[#comments-pagelistend]]

#comment-summary-list-pagelist

Parameters: blogid, count
(:if false:)[[#comment-summary-list-pagelist]](:if:)
(:pagelist list="blogit-comments" wrap=none fmt=#comment-summary-list {(bi_param count "{$$count}")}\
  order=-ctime\
  group={$bi_CommentGroup}\
  $:entrytype=comment\
  {(bi_param $:blogid "{$$blogid}")}\
  $:commentapproved=true\
  if="!bi_baseptv {=$FullName} draft"\
:)
[[#comment-summary-list-pagelistend]]

#unapproved-comments

List of all unapproved comments, for admins.

Parameters: blogid, commentid (to list a single comment), base if single comment
NB: If commentid is supplied a row is always returned regardless of approval status. This is so that if user edits an unapproved comment, and changes the status, we display the update on the page (even though the row should now not be displayed since status has changed).
(:if false:)[[#unapproved-comments]](:if:)
(:if9 [ !equal "{$bi_CommentsEnabled}" "none" && bi_auth comment-edit,comment-approve {$bi_Pages_AUTH} ] :)
(:div9998 class="blogit-comment-summary":)
(:pagelist list="blogit-comments" wrap=none fmt=#comment-view-admin\
  order=name,-ctime\
  group={$bi_CommentGroup}\
  $:entrytype=comment\
  {(bi_param name "{$$commentid}")}\
  {(bi_param base "{$$base}")}\
  {(bi_param $:blogid "{$$blogid}")}\
  (:if10 bi_isnull {$$commentid}:)$:commentapproved=false(:if10:)\
:)
(:div9998end:)
(:if9:)
[[#unapproved-commentsend]]

#comments-count-pagelist

Parameters: commentstatus: true/false, [entrygroup, entryname], [blogid]
(:if false:)[[#comments-count-pagelist]](:if:)\
(:if1 !equal "{$bi_CommentsEnabled}" "none":)\
(:pagelist list="blogit-comments" wrap=none fmt=count \
  group={$bi_CommentGroup}\
  $:entrytype=comment\
  {(bi_param $:blogid "{$$blogid}")}\
  (:if2 [ !bi_isnull {$$entrygroup} && !bi_isnull {$$entryname} ] :)name={$$entrygroup}-{$$entryname}-* (:if2:)\
  {(bi_param $:commentapproved "{$$commentstatus}")}\
:)(:if1:)\
[[#comments-count-pagelistend]]

TAGS

#tag-pagelist

Parameters: count, tag (if not provided, uses the current page name, which would be the tag)

Included as part of $GroupFooterFmt, so when browsing a page in the Tag group, the pagelist shows up.

(:if false:)[[#tag-pagelist]](:if:)
(:pagelist list="blogit" wrap=none fmt=#blog-yearly-archive\
  order=-$:entrydate\
  link={$CategoryGroup}.{(bi_ifnull "{$$tag}" "{*$Name}")} \
  $:entrystatus=-draft\
  $:entrytype=blog\
  (:if equal '{$bi_DisplayFuture}' 'false':)if='date ..@{$Now} @{=$:entrydate}'(:if:)\
  {(bi_param count "{$$count}")}\
:)
[[#tag-pagelistend]]

#tag-list-pagelist

Parameters: count

Used to generate the list of categories usually seen in the sidebar.

(:if false:)[[#tag-list-pagelist]](:if:)
(:pagelist wrap=none fmt=#titlespaced group={$CategoryGroup} {(bi_param count "{$$count}")} :) 
[[#tag-list-pagelistend]]

#tag-commalist-pagelist

Parameters: links

Used to generate the list of categories usually seen in the sidebar.

(:if false:)[[#tag-commalist-pagelist]](:if:)\
(:pagelist name={$$links} list=all fmt=#tag-commalist wrap=inline:)
[[#tag-commalist-pagelistend]]

#tag-commalist

Parameters: count

Used to generate the comma-separated list of categories usually seen in the blog footer.

(:if false:)[[#tag-commalist]](:if:)\
(:template each:)[[{=$FullName}|{=$Titlespaced}]]\
(:template ! last ...:), \
[[#tag-commalistend]]

Forms


#blog-form

(:if false:)[[#blog-form]](:if:)
(:messages:)
$[Blog Title:] (:input text $:entrytitle size=70 class="inputbox blogit-title" id="entrytitle" focus=1 tabindex=1:)\
(:blogit list "$:entrytype":)bi_PageType/$[Type:] (:blogitend:)[==]\
(:blogit list "$:blogid":)bi_BlogList/$[BlogID:] (:blogitend:)\\
$[Tags:] (:input text $:entrytags size=20 id="entrytags" tabindex=1:)\
(:blogit list "$:entrystatus":)bi_StatusType/$[Status:] (:blogitend:)\
[==](:blogit list "$:entrycomments":)bi_CommentType/$[Comments:] (:blogitend:)\\

(:div9989 class="blogit-guibuttons":)(:e_guibuttons:)
(:div9989end:)
(:input textarea $:entrybody rows=(:if9981 equal "{$bi_Mode}" ajax:){$bi_SkinSettings_AJAX_TEXTAREA_ROWS}(:else9981:)23(:if9981:) cols=80 id="text" tabindex=1:)\
$[Pagename (Group.Name):] (:input text $:entryurl size=70 id="entryurl" tabindex=1:)\\
$[Author:] (:input text $:entryauthor size=25 id="entryauthor" tabindex=1:)\
$[Date:] (:input text $:entrydate size=17 id="entrydate" value=(:if !bi_isnull {$bi_Default_ptv_entrydate}:)"{$bi_Default_ptv_entrydate}"(:else:)"{(ftime fmt='$[%d-%m-%Y %H:%M]' @(bi_ifnull {*$:entrydate} {$Now}) )}"(:if:)  tabindex=1:)\\
(:includesection "#blog-form-buttons":)
[[#blog-formend]]

#comment-form

(:if false:)[[#comment-form]](:if:)
!! $[Leave a comment]
$[All comments are reviewed before being displayed.]
(:messages:)\\
'''$[Name]''' $[(required):]\\
(:input text $:commentauthor id="comment-author" tabindex=1 class="blogit-required":)\\
'''$[E-mail]''' $[(required, will not be published):]\\
(:input text $:email id="comment-email" tabindex=1 class="blogit-required":)\\
$[Website:]\\
(:input text $:website id="comment-website" tabindex=1:)\\
(:input textarea $:commenttext rows=10 cols=50 id="comment-text" tabindex=1:)
(:includesection "#comment-form-buttons":)
[[#comment-formend]]

CORE TEMPLATES


You probably don't want to be changing these as they determine how blogit functions, rather than having anything to do with layout.

BLOGS

#blog-form-control

(:if false:)[[#blog-form-control]](:if:)
(:div1 id="wikiedit" class="blogit-blog-form":)
(:input pmform target="blogit-entry":)\
(:input default source="{*$FullName}" request=1:)\
(:input default $:entrystatus "draft":)\
(:input default $:entryauthor "{$Author}":)\
(:input default $:entrydate "{(ftime fmt='$[%d-%m-%Y %H:%M]' @{$Now} )}":)\
(:input default $:entryurl "(:if equal '{$Action}' 'bi_ne':){$bi_DefaultGroup}.(:else:){*$FullName}(:if:)":)\
(:includesection "#blog-form":)
(:input end:)
(:div1end:)
(:include {$SiteGroup}.EditQuickReference:)
[[#blog-form-controlend]]

#blog-post-control

Note: Validation is performed here to trigger PmForms error, and stop processing. However, when the use enters an invalid date, it gets converted to a valid Unix timestamp, and thus the user sees a date they didn't enter. So, additional validation is performed in blogit.php. If the user enters an invalid date we pass pack the actual string they entered.

In this case don't use the 'if' condition to hide the anchor, because the closing if gets included as the first line in the blog-entry post.

[[#blog-post-control]]
(:template defaults saveto="{$$ptv_entryurl}":)
(:template defaults successpage="{$$saveto}":)
(:template require $:entrytitle errmsg="$[Title is required.]":) 
(:template require $:entryurl errmsg="$[Pagename is required.]":) 
(:template require $:entryurl if="!bi_ispage {$$ptv_entryurl}" errmsg="$[Pagename already exists, or is invalid/blank.]":)
(:template require $:entrydate if="bi_isdate {$$ptv_entrydate}" errmsg="$[Invalid date.]":)
(:template defaults savevars=$:pmmarkup,$:blogid,$:entrytype,$:entrydate,$:entryauthor,$:entrytitle,$:entrystatus,$:entrycomments,$:entrytags,$:entrybody:)
[[#blog-post-controlend]]

#blog-edit

(:if false:)[[#blog-edit]](:if:)
(:pmform blogit-entry:)
[[#blog-editend]]

#blog-form-buttons

(:if false:)[[#blog-form-buttons]](:if:)
(:div9991 class="blogit-submit-row":)\
(:if9991 !equal 'ajax' '{$bi_Mode}':)\
(:input submit value="$[Save]" name="save" accesskey="s" id="blogit-save" tabindex=1:)\
(:input submit value="$[Cancel]" name="cancel" id="blogit-cancel" tabindex=1:)\
(:if9991end:)
(:div9991end:)
[[#blog-form-buttons]]

COMMENTS

#comment-form-control

(:if false:)[[#comment-form-control]](:if:)
(:input pmform target="blogit-comments":)\
(:input default source="{*$FullName}" request=1:)\
(:input default $:commentauthor "{$Author}":)\
(:input hidden class="blogit-required" $:blogid value="{*$:blogid}":)\
(:input hidden class="blogit-required" $:blogit_basepage value="{*$:blogit_basepage}":)\
(:if9 [ equal '{$Action}' 'bi_ce' && bi_auth comment-edit,comment-approve ] :)\
(:input hidden class="blogit-required" $:commentdate value="{*$:commentdate}":)\
(:if9:)
(:div9980 class='blogit-comment-form':)\
(:includesection "#comment-form":)
(:div9980end:)
(:if9 [ equal '{$Action}' 'bi_ce' && bi_auth comment-approve ] :)\
(:div9980 class='blogit-comment-status':)\
(:blogit list "$:commentapproved":)bi_CommentApprovalType/$[Comment Approved?] (:blogitend:)
(:div9980end:)
(:if9:)
(:input end:)
[[#comment-form-controlend]]

#comment-post-control

In this case don't use the 'if' condition to hide the anchor, because the closing if gets included as the first line in the blog-entry post.

[[#comment-post-control]]
(:template require $:blogid errmsg="$[BlogID is required.]":)
(:template require $:blogit_basepage errmsg="$[Basepage is required.]":)
(:template require $:commentauthor errmsg="$[Name is required.]":)
(:template require $:email errmsg="$[Email is required.]":)
(:template defaults savevars=$:blogit_basepage,$:blogid,$:entrytype,$:commentauthor,$:email,$:website,$:commenttext,$:commentapproved,$:commentdate:)
[[#comment-post-controlend]]

#comment-edit

(:if false:)[[#comment-edit]](:if:)
(:pmform blogit-comments:)
[[#comment-editend]]

#comment-form-buttons

(:if false:)[[#comment-form-buttons]](:if:)
(:div9991 class="blogit-submit-row":)\
(:if9991 !equal 'ajax' '{$bi_Mode}':)\\
(:if9992 [ equal '{$bi_ReCaptchaEnabled}' '1' && ( !bi_auth comment-edit,comment-approve || bi_dev ) ] :)(:recaptcha:)\\(:if9992end:)
(:if9992 [ equal '{$EnablePostCaptchaRequired}' '1' && ( !bi_auth comment-edit,comment-approve || bi_dev ) ] :)$[Enter value:] {$Captcha} (:input captcha tabindex=1:) (:if9992end:)\
(:input submit name=post value="$[Post]" id="comment-post" tabindex=1:)\
(:if9 [ equal '{$Action}' 'bi_ce' || equal '{$Action}' 'bi_cr' ] && bi_auth comment-edit :)\
(:input submit value="$[Cancel]" name="cancel" id="blogit-cancel" tabindex=1:)(:if9:)\\
(:if9991end:)
(:div9991end:)
[[#comment-form-buttons]]