Friday, November 14

Blog

Can You Feel Anything When I Do This?

Let's see what happens...

Well, it kind of works.  (See below.)  Say bye-bye to half my CSS settings, and at the same time, half the markup in the document itself, but other than that, it's readable enough.

That's the documentation for one active tag (albeit one of the more complex ones).  And it's pretty terse and short on examples.

As of 1.2b3, the current development version, Minx supports 1651 active tags.  (I have no idea how many data tags there are - closing on a hundred thousand, I expect.)

Of course, most of those tags are variations or combinations or or specialisations or refinements of other tags, because Minx has only about 23,000 lines of code.

But if each tag needed a paragraph of explanation, that would fill a phone book.

So I need to take what I've been writing in Word, parameterise it, and build it into a Wiki.

Fortunately, two of the features added in 1.2 are Wiki support and text macros, so I can do exactly that.

So, um, I will.

Do that.

Yes.

Posts

Quickly View posts.

Usage

[posts {paged|unpaged} {page=n} {count=n} {skip=n} {show=all|publish|draft|pending|expire|user|friend|foaf} {sticky|unsticky|nosticky|stickyonly} {type=post|page|podcast|photo|...} {sort=posted|updated|title|comments} {order=asc|desc} {status=publish|draft|hide|delete|...} {search=options} {filter=options} {default=options} {category=name} {site=address} {folder=path} {sites=list} {folders=list}]

[posts:here {template=type.name} {defaulttemplate=type.name} {options}]

Type block tag, here tag

Data Fields

(none)

Text Fields

title, subject, text, keywords, more, memo, meta, misc, abstract, excerpt, blurb, notes, custom, tags, reply, mod, warn
{.raw|.esc|.text|.clean}

Info Fields

data, xml
{.raw|.esc|.text|.clean}

Date Fields

date, time, datetime, shortdate, day, month, year

create.date, update.date, start.date, end.date, comment.date, ping.date
[.date|.time|.datetime|.shortdate|.day|.month|.year]

Status Fields

status, type, url, url.cdn, category, comments, pings, edits, reads, locked, allow.comments, allow.pings, allow.attach, sticky, hidden, defer, expire, flag, ip, ip.hash, filter, number, even, odd, mod.[3|4|5], bytes, kbytes, words, first, last, isauthor, edit, authorlink, name, mail, web

Display Fields

show.html, show.bbcode, show.smilies, show.macro, show.dict, show.sig

User Fields

author.name, author.nick, author.mail, author.web, author.aim, author.msn, author.yim, author.icq, author.location, author.occupation, author.interests, author.sig, author.hash

ID Fields

id, tid, pid, fid, etid, cfid

Category Fields

category.id, category.name, category.desc, category.path, category.nospace, category.tagline

Folder Fields

folder.id, folder.name, folder.desc, folder.path, folder.nospace, folder.tagline

Site Fields

site.id, site.name, site.desc, site.short, site.host, site.tagline

Sub-Tags

Sub-Posts

[post:subposts]
[post:comments]
[postrazz ings]
[post:chat]
[post:discuss]
[post:footnotes]
[post:items]
[post:notes]
[postrazz ages]
[post:remarks]
[post:replies]
[post:responses]
[post:talk]
[post:trackbacks]

Attachments

[post:attachments]
[post:apps]
[post:audio]
[post:files]
[post:flash]
[post:images]
[post:media]
[post:movies]
[post:music]
[postrazz rograms]
[post:songs]
[post:text]
[post:zips]

Other Details

[post:links]
[post:related]
[post:references]
[post:stats]
[post:categories]
[post:folders]
[post:sites]
[post:next]
[postrazz rev]
[post:first]
[post:last]
[author:friends]

Description

The [posts] tag selects a set of entries, which are the mainstay of many types of websites including blogs and journals. The entries selected are of type post. See the chapter Objects for an explanation of entries and related structures in Minx.

The tag can be used either in block form:

[posts]
template code
[/posts]

Or in here form:

[posts:here]

In this form, the Item.Post template is used to format each entry.

Options

paged, unpaged

Controls whether the listing of entries is broken up into pages. For this and other thread-level tags, the default is paged. For most other tags, the default is unpaged.

page=n

Defines a specific page of entries to be shown by the template. Typically, this would be selected by the user as they navigate through your site, but you are free to specify it if you find this useful.

count=n

Sets the number of entries to display, either in total or in a given page. If this is not specified, then for paged views the default page size will be used, and for unpaged views, all entries will be shown. The latter case may result in an extremely large page; it is typically only used when either it is known in advance that the number of entries is reasonable, or it is specifically desired that every item is shown, for example, when generating a backup file.

skip=n

Skip ahead a given number of entries. For example, if you wish to show the most recent post with a custom layout, followed by a standard listing of the next 20 posts, you could set count=20 skip=1.

show=all|publish|draft|pending|expire|user|friend|foaf

Selects which entries to show based on general criteria.

all

shows all available entries regardless of status.

publish

shows only entries marked as Publish.

draft

shows only entries marked as Draft.

pending

shows entries that have a start date that has not yet been reached.

expire

shows entries that have an end date that has passed.

user

shows entries posted by the current user.

friend

shows entries posted by friends of the current user.

foaf

shows entries posted by friends of friends of the current user.


The default setting is publish.

sticky, unsticky, nosticky, stickyonly

Controls the behaviour of posts marked as announce, sticky, or unsticky.

The default behaviour is sticky, in which case posts marked as announce appear first, followed by sticky posts, then normal posts, and finally unsticky posts.

If unsticky is specified, then the sticky settings on the posts are ignored, and the posts are shown in whatever order they would appear naturally.

If nosticky is set, only posts marked as normal as shown, i.e., no announce, sticky, or unsticky posts.

If stickyonly is set, only posts marked as announce, sticky, or unsticky are shown.

You cannot specify both sticky and unsticky, or both nosticky and stickyonly. Other combinations are allowed, though they may not make sense.

type=list

Selects entries of a specific type. By default, the posts tag will select entries of type post (naturally enough), but you can override this to select other types, or to select multiple types of item in a single stream.

To select multiple types, simply list the types separated by commas , or pipes |

[posts type=post|page] ... [/posts] will select both posts and pages and combine them together in whatever order you choose.

[posts type=post,page] ... [/posts] is exactly equivalent. You can't mix commas and pipes in the one list, though – use one or the other.

[posts type=all] will select all types of entries.

See also: Thread Types, Entry Types, Post Types

sort=option

Sort the list of entries in one of the following orders

date

The date of the entry. (Default descending.)

posted

Same as date.

blog

Same as date.

updated

The date the entry was lasted updated or commented. (Default descending.)

forum

Same as updated.

title

Alphabetically by title. (Default ascending.)

comments

By number of comments. (Default descending.)

order=option

Modifies the sort option, as follows:

asc Sort in ascending order.
desc Sort in descending order.

status=list

Selects entries marked with a specific status. The default is publish. As with the type option, you can select multiple statuses by separating them with commas or pipes.

[posts status=publish,draft] ... [/posts] will list both published entries and entries still in draft.

See also: Entry Statuses

template=type.name
defaulttemplate=type.name

In here form (i.e., when using [posts:here]), overrides the default template for the individual entries, normally Item.Post.

The defaulttemplate is used if the initial query returns no results and the default search options are used instead.

search=options
filter=options
default=options

The search, filter, and default options can be used the specify a search string to be applied when selecting entries. Search terms are separated by slashes / with the exact same syntax as when specified in a URL.

You can use either search or filter. If you use both, the search options may be combined in unpredictable ways.

The default search string will be applied if the initial query returns no entries.

The following search options are available:

search

Performs the (site-defined) default search.

filter

Performs the (site-defined) default filter.

archive

Searches for entries within a specified year, month, or day.

date

Searches for entries posted on a specific date.

author

Searches for entries by a specific author.

tag

Searches for entries labeled with a specific tag.

keyword

Searches for entries containing posts labeled with a specific keyword.

title

Searches for entries where the title contains the search term.

page

Specifies the page of results to return.


search and filter options may be further specified by the following attributes:

.a

Search by author name.

.b

Search text of both posts and comments (and any other sub-posts).

.c

Search text of comments only.

.i

Title search.

.j

Subject search.

.k

Keyword search.

.p

Search text of posts only.

.q

Quick search.

.s

Smart search – searches multiple fields.

.t

Tag search.

.w

Wiki search (exact title match).

.x

Extended search.

.z

Extra-extended search.


(See Searching and Filtering for more information on these options.)

category=name

Select entries in a specific category.


site=address
sites=list

Selects entries from another site (if that site has granted permission for this) by specifying the address of that site. You can optionally specify the path of a folder within that site as well, thus:

site=example.mee.nu
site=example.mee.nu/news

In the sites form of this option, you can specify a comma- or pipe-separated list of sites (and optionally folders):

sites=example.mee.nu/news,demo.mee.nu/features


folder=path
folders=list

Selects entries from another folder by specifying the path of that folder. If you have specified an alternate site, this will select or override the folder within that site; otherwise it selects a folder within your own site.

folder=news/local

In the folders form of this option, you can specify a comma- or pipe-separated list of folders (again, by the path of the folder). You can use this in conjunction with the site option, but not with the sites option.

folders=news,sport,weather
site=example.mee.nu folders=news/national|features|opinion/politics

Fields

When specifying a field, you generally need to use the form [item.field], thus, for example:

[post.title]
[post.create]

Some sub-fields are also made available directly, so you can use either of:

[post.author.name]
[author.name]

String and date sub-element options follow the field name:

[post.title.raw]
[post.create.shortdate]

See Tag Formatting for more information.

Text Fields

title

A title for the entry as a whole.

subject

A title for the individual post.

text

The main or introductory text of the post.

more

Extended or additional text.

memo

Additional text.

meta

Additional text.

misc

Additional text.

abstract

An overview of the content of the post.

excerpt

A short excerpt from the post.

blurb

A short, catchy introduction to the post.

notes

Notes for the author/editor.

custom

A custom text field for any purpose.

tags

A comma-separated list of tags.

keywords

A comma or space-separated list of keywords.

reply

A reply to the post. Typically used for author responses to comments.

warn

A response to the post. Typically used for official moderator action on comments.

mod

A response to the post. Typically used for moderator response to comments that does not rise to the level of an official warning.

Info Fields

data

Additional data.

xml

Additional data in XML format.

Text Sub-Elements

By default, text fields automatically have all applicable processing done for you, ready for use. This includes HTML sanitising, BBCode parsing, macro and dictionary processing, smilie (emoticon) handling, and optional text filters.

You can also easily access the text in alternate formats, either via the format option, or via a set of sub-element specifiers:

.raw

The raw, unprocessed content of the field.

.esc

The raw field, with XML escaping applied.

.text

The text only, stripped of all HTML and BBCode markup.

.clean

The field with any HTML sanitised.

Date Fields

date

The date of the entry.

time

The time of the entry.

datetime

Both the date and the time of the entry.

shortdate

The short-form date of the entry.

day

The day of the entry.

month

The month of the entry.

year

The year of the entry.

create.date

The date the entry was created, as recorded by the system.

update.date

The date the entry was last updated, either by editing, or by a comment, ping, or other related item

start.date

The start date of the entry.

end.date

The end date of the entry.

comment.date

The date of the most recent comment.

ping.date

The date of the most recent ping.

The .date sub-element in a date-related tag can be replaced with any of the following:

.date

Show only the date.

.time

Show only the time.

.datetime

Show the date and the time.

.shortdate

Show the short form of the date.

.day

Show the day only.

.month

Show the month only.

.year

Show the year only.


Status Fields

status

The status of the entry, typically either Publish or Draft. See entry statuses.

type

The type of the entry. See entry types.

category

The name of the primary category.

comments

The number of comments.

pings

The number of pings.

edits

The number of times the entry has been edited.

reads

The number of times the entry has been read.

locked

Indicates that the entry has been locked, preventing all changes.

allow.comments

Indicates whether comments are allowed.

allow.pings

Indicates whether pings are allowed.

allow.attach

Indicates whether attachments are allowed.

sticky

The (numeric) stickiness of entry, in a range of -10 to +10. Standard values are 2 for announcements, 1 for sticky posts, 0 for normal posts, and -1 for unsticky posts.

hidden

Indicates whether the entry has been hidden.

defer

Indicates whether publication has been deferred.

expire

Indicates whether the entry has expired.

flag

Indicates that the entry has been flagged

ip

The IP address of the author at the time he or she created the entry. The last part of the IP address is obscured for privacy reasons.

ip.hash

A 6-character base-64 hash of the IP address of the author. Useful in screening out "sock puppets" and fake commenters.

filter

An optional text filter to be applied automatically to the entry.

number

The sequence of the entry within the overall selection range.

even

The number is even.

odd

The number is odd.

mod.[3|4|5]

The number is evenly divisible by 3, 4, or 5 respectively.

bytes

Length of the entry in bytes.

kbytes

Length of the entry in kilobytes.

words

Length of the entry in words.

first

Indicates that this is the first entry in the current selection (page).

last

Indicates that this is the last entry in the current selection (page).

isauthor

Indicates that the current user is the author of this entry.

edit

A link to the edit screen for this entry, if the user is allowed to edit it.

authorlink

The author's name as a link back to his or her web site.

name

The name specified for this post.

mail

The email address specified for this post.

web

The web address specified for this post.


Display Fields

With the exception of show.sig, these fields indicate whether certain types of markup are to be applied to a post. This is handled automatically by the system, but the information is also made available for your own use.

show.html

Is HTML markup allowed?

show.bbcode

Is BBCode markup to be processed into HTML?

show.smilies

Are smilies to be converted into embedded images?

show.macro

Are macro tags to be processed?

show.dict

Are dictionary entries to be processed?

show.sig

Is the user's signature to be displayed.


User Fields

These are a subset of the user object, representing useful public information about the author of the entry.

author.name

The author's name.

author.nick

The author's nickname.

author.mail

The author's public email address.

author.web

The author's web page.

author.aim

The author's AIM name.

author.msn

The author's MSN name.

author.yim

The author's YIM name.

author.icq

The author's ICQ name.

author.location

The author's (geographic) location.

author.occupation

The author's occupation.

author.interests

The author's interests.

author.sig

The author's signature.

author.hash

A (mostly unique) 6-digit base-64 hash of the author's id.


ID Fields

You will rarely need to access ID fields directly; they are mostly used in edit and moderation screens. However, they are available should you wish to (for example) construct your own edit or moderation screens.

id

The id of this entry, which is the same as the thread id.

tid

The thread id of this entry.

pid

The post id of this entry.

fid

The id of the folder containing this entry.

etid

The effective thread id of this entry.

cfid

The id of the category containing this entry.


Category Fields

A subset of the fields for the Folder object, these represent useful public information about the category folder containing this entry.

category.id

The ID of the category.

category.name

The name of the category.

category.desc

The description of the category.

category.path

The path of the category.

category.nospace

The name of the category, with any spaces stripped out.

category.tagline

A tag line for the category, an alternate description or title.


Folder Fields

A subset of the fields for the Folder object, these represent useful public information about the folder containing this entry.

folder.id

The ID of the folder.

folder.name

The name of the folder.

folder.desc

The description of the folder.

folder.path

The path of the folder.

folder.nospace

The name of the folder, with any spaces stripped out.

folder.tagline

A tag line for the folder, an alternate description or title.

Site Fields

A subset of the fields for the Site object, these represent useful public information about the site containing this entry.

site.id

The ID of the site.

site.name

The name of the site.

site.desc

A description of the site.

site.short

A short name for the site.

site.host

The hostname (web address) of the site.

site.tagline

A tag line for the site.

Sub-Tags

Sub-Posts

These tags are used to lists the posts within an entry – comments, pings, and other similar items.

Options

[post:items {paged|unpaged} {page=n} {count=n} {skip=n} {show=all|junk} {type=comment|ping|page|...} {order=asc|desc} {search=options} {filter=options}]

[posts:items:here {template=type.name} {options}]

postrazz osts

Shows posts within the entry (typically there is just one post.)

post:subposts

Shows all subposts within the entry (everything except posts).

post:comments

Shows comments.

postrazz ings

Shows pings.

post:chat

Shows chat.

post:discuss

Shows discussions.

post:feedback

Shows feedback (comments, pings, and talk).

post:footnotes

Shows footnotes.

post:notes

Shows notes (this is different to the BBCode notes tag.)

post:items

Shows items.

postrazz ages

Shows pages. Pages can be used both as an entry type, or to break up a length post into smaller sections.

post:remarks

Shows remarks.

post:replies

Shows replies.

post:responses

Shows responses.

post:talk

Shows talk.

post:trackbacks

Shows trackbacks (pings).


Attachments

These tags list attachments – files uploaed the the server and inked to the entry. You can have any number of attachments of any type linked to a given entry.

Options

[post:attachments {paged|unpaged} {page=n} {count=n} {skip=n} {type=image|audio|movie|...} {sort=date|file|name|size|type} {order=asc|desc} {search=options} {filter=options}]

[posts:attachments:here {template=type.name} {options}]

post:attachments

List all attachments.

post:apps

List applications.

post:audio

List audio files.

post:files

List other files.

post:flash

List Flash files.

post:images

List images.

post:media

List media files (audio and movies).

post:movies

List movies.

post:music

List music (audio).

postrazz rograms

List programs.

post:songs

List songs (audio).

post:text

List text files.

post:zips

List zip files.

Other Details

post:links

Lists links attach to the entry.

post:related

Lists other related entries.

post:references

Lists references.

post:stats

Displays statistics for the entry.

post:categories

Lists categories the entry appears in.

post:folders

Lists folders the entry appears in.

post:sites

Lists sites the entry appears on. (Note: This only works if the entry is cross-posted. It doesn't reflect ad-hoc requests using site tag options or smart folders.)

post:next

The next entry in the sequence.

postrazz rev

The previous entry in the sequence.

post:first

The first entry in the sequence.

post:last

The last entry in the sequence.


Posted by: Pixy Misa at 12:22 AM | No Comments | Add Comment | Trackbacks (Suck)
Post contains 3117 words, total size 100 kb.

Comments are disabled. Post is locked.
145kb generated in CPU 0.02, elapsed 0.1412 seconds.
54 queries taking 0.1247 seconds, 336 records returned.
Powered by Minx 1.1.6c-pink.