Free-Conversant Support / Special Simple Macros
 Home   About Conversant   Free Sites   Hosting   Support   XML-RPC 

Search



Documentation >> Macros >> Special Simple Macros

Special Simple Macros

Some simple macros are linked to a particular feature and are meaningless outside of that feature.

Simple Macros for Topics Pages

These macro calls work only in a given template of the topics pages.

See the support site's topic page as an example of a topics page.

Also see this documentation page for more info about topics pages.

Page Template

These macro calls have to be used in the Topics' Page Template.

<!--#topicsPageContent-->

This will be replaced with the body of the page. You must include this macro call in the Page Template.

<!--#numOfFoundTopics-->

This will be replaced with the number of found topics.

<!--#topicsPerPage-->

This will be replaced with the number of topics displayed in the page (as defined in this page's properties).

<!--#topicPagesLinks-->

This will be replaced with links to next/prev topic pages.

Item Template

These macro calls have to be used in the Topics' Item Template.

<!--#topicSubject-->

This will be replaced with the subject of the message, linking to the message.

<!--#topicThread-->

This will be replaced with the subject too, but the link will point to the full thread page for this topic.

<!--#topicAuthor-->

This will be replaced with the author's name, linking to a new email for him or her.

<!--#topicDate-->

This will be replaced with the creation date of the topic.

<!--#topicRepliesNum-->

This will be replaced with the total number of messages in this topic.

<!--#topicClip-->

This will be replaced with a clip of the message's body, whose length depends on the corresponding page property.

<!--#topicLabel-->

This will be replaced with a colored block showing the label's color.

<!--#topicLabelCellStyle-->

This macro is assumed to be called from inside a <td> tag. It will be replaced with the <td>'s bgcolor attribute setting the whole cell to the label's color.

<!--#topicLabelColor-->

This will be simply replaced with the label's color. Use it if you don't want to use a HTML table and topicLabelCellStyle.

<!--#topicLabelTextColor-->

This will be simply replaced with the label's text color. You may call it from a <font> tag, for example.

<!--#topicLabelName-->

This will be replaced with the label's name.

<!--#topicLabelId-->

This will be replaced with the label's id (its unique, non-editable identifier).

FullThread Pages

These macro calls work only in a given template of the fullThread pages. See this thread page from the support site as an example of a fullThread page.

Also see this documentation page for more info about fullThread pages.

Page Template

These macro calls have to be used in the FullThread's Page template.

<!--#threadPageContent-->

This will be replaced with the body of the page. You must include this macro call in the Page Template.

<!--#numOfFoundMsg-->

This will be replaced with the number of messages in the thread.

Item Template

These macro calls have to be used in the FullThread's Item Template.

<!--#threadMsgIndentation-->

This will be replaced with the group of nonbreakable spaces that gives its indentation to each message in the thread view.

<!--#threadMsgReadFlag-->

This will be replaced with the read flag (if this Default DG preference is to set to display them, which is its default value).

<!--#threadMsgSubject-->

This will be replaced with the message subject, linking to the message itself.

<!--#threadMsgDate-->

This will be replaced with the creation date of the message.

<!--#threadMsgAuthor-->

This will be replaced with the author's name, linking to a new email for him or her.

<!--#threadMsgClip-->

This will be replaced with a clip of the message's body, whose length depends on the corresponding page property.

<!--#threadMsgLabel-->

This will be replaced with a colored block (colored with the label's color, of course). You may use it alone.

<!--#threadMsgLabelColor-->

This will be simply replaced with the label's color. Use it if you want to display the label's name on its background, for example.

<!--#threadMsgLabelTextColor-->

This will be simply replaced with the label's text color. You may call it from a <font> tag, for example.

<!--#threadMsgLabelName-->

This will be replaced with the label's name.

<!--#threadMsgLabelId-->

This will be replaced with the label's id (its unique, non-editable identifier).

Simple Macros for Query Pages

These macro calls work only in query (search) pages. An example of a query page is the support site's query page.

Also see this documentation page for more info about query pages.

Query Form Template

All these macro calls are required in the Query Form template.

<!--#queryFormTag-->

This will be replaced with the opening form tag.

<!--#queryHidden-->

This will be replaced with a hidden tag that will carry internal informations.

<!--#queryStartDate-->

This will be replaced with a text field allowing to enter the "starting date" criteria of the query.

<!--#queryEndDate-->

This will be replaced with a text field allowing to enter the "end date" criteria of the query.

<!--#querySubject-->

This will be replaced with a text field allowing to enter the "subject" criteria of the query.

<!--#queryBody-->

This will be replaced with a text field allowing to enter the "body" criteria of the query.

<!--#queryPostedBy-->

This will be replaced with a select box allowing to enter the "posted by" criteria of the query.

<!--#querySortedBy-->

This will be replaced with a popup menu allowing to select the sort order of the result.

<!--#queryLabel-->

This will be replaced with a label popup menu if the user is allowed to see the labels (see labels' preferences). The content of this menu will also depend on the labels' access properties and on the user's access rights (that is an "admin-only" label won't be in the menu when a simple member sees it).

<!--#querySubmitButton-->

This will be replaced with the submit button.

Search Result Page Template

All these macro calls have to be used in the Search Result Page Template.

<!--#searchResultNumLink-->

This will be replaced with the "#" link in the search result's header.

<!--#searchResultDateLink-->

This will be replaced with the "Date" link in the search result's header.

<!--#searchResultSubjectLink-->

This will be replaced with the "Subject" link in the search result's header.

<!--#searchResultPostedLink-->

This will be replaced with the "Posted By" link in the search result's header.

<!--#searchResultLabelLink-->

For users allowed to see the labels, this will be replaced with an opening <a> tag that will make a link allowing to sort the search result by label. For users not allowed to see the labels, this will be replaced with a fake link, pointing to the same page. Note that the template is assumed to contain the closing </a> tag. This allows you to localize "Label", for example.

<!--#searchResultFoundLine-->

This will be replaced with the line that indicates how many messages were found and how many are displayed.

<!--#searchResultPrevLink-->

This will be replaced with a link to the page that displays the previous found messages.

<!--#searchResultNextLink-->

This will be replaced with a link to the page that displays the next found messages.

<!--#searchResultPageLinks-->

This will be replaced with a link to each page of found messages.

<!--#searchResultBody-->

This will be replaced with the found messages, each one viewed thru the "Search Result Item Template". (Required)

Search Result Item Template

All these macro calls have to be used in the Search Result Item Template. Each message displayed in a search result passes thru this template.

<!--#searchResultMsgNum-->

This will be replaced with the number of the message (the unique msgNum identifier that each message has).

<!--#searchResultMsgDate-->

This will be replaced with the creation date of the message.

<!--#searchResultMsgSubject-->

This will be replaced with the subject of the message.

<!--#searchResultMsgAuthorName-->

This will be replaced with the author's name.

<!--#searchResultMsgAuthorAddress-->

This will be replaced with the author's email address (or fake email if he or she chose to remain anonymous).

<!--#searchResultMsgBody-->

This will be replaced with an excerpt of the message's body (the length of which may be defined from a page property).

<!--#searchResultMsgLabel-->

This will be replaced with a colored block (colored with the label's color, of course). You may use it alone.

<!--#searchResultMsgLabelColor-->

This will be simply replaced with the label's color. Use it if you want to display the label's name on its background, for example.

<!--#searchResultMsgLabelTextColor-->

This will be simply replaced with the label's text color. You may call it from a <font> tag, for example.

<!--#searchResultMsgLabelName-->

This will be replaced with the label's name.

<!--#searchResultMsgLabelId-->

This will be replaced with the label's id (its unique, non-editable identifier).

Simple Macros for Published Pages

These macro calls work only in published pages, which are also known as "messages bound to URL's". An example of a bound url, or published page, is the Simple Macros documentation page itself, which started in the discussion group but was then published.

<!--#viewAsMessage-->

Put this simple macro in your template. When you are viewing a published page, this simple macro will be replaced with a link to the original message in the discussion group (useful for linking to a discussion of the page's content). If you are not viewing a published page, then this macro will be ignored (nothing will appear in the page).

You can edit the link that is used, in your site prefs at yourSite/admin/conversations/yourSite/preferences$conversation=yourSite&plugin;=mainResponder%20Interface. Scroll down until you see the pref entry for View as Message Template. Change the text as you see fit, and then scroll to the bottom and click on Save Changes. (Note that you don't have to use text... you can use an <img> tag also.

You can see this macro in action by scrolling to the bottom of the Simple Macros docs, where you'll see a link to the Discusison Group version.

<!--#editPageProperties linktext="Edit Properties"-->

Put this simple macro call in your template. When you are viewing a published page, this simple macro call will be replaced with a link to the properties editor for this file in the structure editor of your site. If you are not viewing a published page, then this macro will be ignored (nothing will appear in the page).

This macro call has an optional parameter: linktext. If you don't use it (that is if you type "<!--#editPageProperties-->"), the link will read "Edit Page Properties". By using it, you may have the link read anything you want. For example, "<!--#editPageProperties linktext="Properties Editor"-->" would obviously make a link that reads "Properties Editor".

Note: If you use the parameter, you must enter the text inside double quotes, as in the example above.

Note: In addition to these specific macros, you may use in published pages the macros for DG Messages that are listed in Editing Message Templates.

Weblog Simple Macros

These macro calls work only in weblog templates. Further, they are evaluated only if they're in a given template, because they're are provided to allow you to edit the templates.

Main template

<!--#newmessageForm-->

This will be replaced with a form (visible to the weblog owner(s) only), that allows to create, from the weblog page, a new message in the weblog and in the conversation.

<!--#weblogCalendar-->

This will be replaced with the weblog's navigation calendar.

<!--#weblogEditButton-->

This will be replaced with a button (visible to the weblog owner(s) only), that allows to go to the weblog editor page, and back.

<!--#weblogTimestamp-->

This will be replaced with the date and time (in the reader's timezone) when the weblog was last edited, in short format (like "01/01/2000; 12:00:00 AM").

<!--#weblogTimestampDate-->

This will be replaced with the date (in the reader's timezone) when the weblog was last edited, in string format (like "Sat, Jan 1, 2000").

<!--#weblogTimestampTime-->

This will be replaced with the time (in the reader's timezone) when the weblog was last edited (like "12:00:00 AM").

<!--#weblogTimestampNST-->

This will be replaced with the date and time (in Net Standard Time) when the weblog was last edited (like "Sat, Jan 1, 2000 12:00:00 GMT").

dayTemplate

<!--#weblogDayHeader-->

This will be replaced with the date of the weblog day.

<!--#archiveUrl-->

This will be replaced with an opened <a> tag pointing to the corresponding weblog archive page. Use it like this: <!--#archiveurl-->archive</a>.

<!--#archiveDatePath-->

This will be replaced with the path of the corresponding weblog archive page.

<!--#weblogdaytext-->

This will be replaced with the contents of the weblog day (built using the itemTemplate).

itemTemplate

<!--#archiveUrl-->

This will be replaced with the URL of the archived page (unlike in the day template, where it is replaced with an open <a> tag). Use it like this: <a href="<!--#archiveurl-->">.

This macro can be used in conjunction with the #msgNum macro to create the URL that other sites should use to link to stories in your weblog.

<!--#msgNum-->

This will be replaced with the msgNum of the message.

<!--#subject-->

This will be replaced with the subject of the message.

<!--#body-->

This will be replaced with the full body text of the message.

<!--#link-->

This will be replaced with a link to the message in the conversation. Edit the anchor text or enter the url of an image in the "weblog" plugin preferences of your conversation (yourSite/admin/conversations/yourSite/preferences$conversation=yourSite&plugin;=weblog).

<!--#subjectlink-->

This will be replaced with a link to the message whose anchor text is the subject of the message.

<!--#messageUrl-->

This will be replaced with the URL of the original message in the discussion group.

<!--#modified-->

This will be replaced with the modification date and time of the message, converted to the reader's timezone if he or she is a member.

<!--#postedtime-->

This will be replaced with the time the message was added to the weblog (an important feature of weblogs), converted to the reader's timezone if he or she is a member.

<!--#author-->

This will be replaced with a mailto link to the author of the message, the anchor of which is the name of the author.

<!--#numberOfReplies-->

This will be replaced with the number of replies to the current message.

<!--#messagesInThread-->

This will be replaced with the total number of messages in the thread below the current message (that is replies to the message and replies to the replies).

<!--#label-->

This will be replaced with a colored block (colored with the label's color, of course). You may use it alone.

<!--#labelColor-->

This will be simply replaced with the label's color. Use it if you want to display the label's name on a background of its color, for example.

<!--#labelTextColor-->

This will be simply replaced with the label's text color. You may call it from a <font> tag, for example.

<!--#labelName-->

This will be simply replaced with the label's name.

<!--#labelId-->

This will be replaced with the label's id (the unique, non-editable identifier that each labels has).

Magic Navbar Simple Macros

These macro calls may be used in templates or in messages, to insert navigation bars built with the Magic Navbar tool.

<!--#magicNavbarN-->

N must be 1, 2 or 3. This will be replaced with a navigation bar, depending on the magicNavbar settings in the structure editor of your site (/yourSiteName/admin/structure/).
View in DG