# BLOG:CMS Popup Help

Please hold on while the page is being downloaded (about 100KB).

# Add Later/Earlier

## Add Later

The 'Add Later' option on add-item forms allows you to mark an item to become visible only at the exact time you've specified. Before that time has come, the item will not be viewable anywhere in the public part of your site.

This date must be in the future, unless the 'Allow posting to the past' option is enabled for the blog to which you want to add the item.

## Allow posting to the past

When enabled, you'll be allowed to specify the date on which an item should be added, and to edit the timestamp of already existing items.

# Change post date/time

The 'Update Timestamp' option allows you to change the posting date and/or time of an item. If you changed the content of an item, this is a way bring the story back to the top of your front page.

But, the unique id connected to the item will not change, so your visitors can still find out that the item was originally posted later than items with a lower id.

# Drafts

Draft items are not yet viewable in the public blog. They might come in handy when you are working on a story, and something comes in between. Your draft items will be listed on the main page, so you can continue your work when you have the time to do so.

When editing drafts, choose the 'Add now' radiobutton and hit the 'Edit item' button to make them visible.

# Extended part

Items have an optional extended part that you can use for continued stories. e.g. when a story is too long to put on the main page of your blog, you can write an introduction in the body part and the rest in the extended part. When viewing your main blog page, you will then see 'read more' links (as defined by the templates).

If you want to write an introduction only for some of your items, you could use the smartbody template variable to make a selection out of the body text and the extended text.

# Short Blog Name

The short blog name is used mainly in the admin area to indicate which items are associated with which blog.

It can also be used in alternative index files, to make a second weblog available:

    <?
    	include('./config.php');
    	selectBlog('myshortblogname');
    	selector();
    ?>

# Default Skin

The default skin selected in the blog settings is the skin that should be used when the blog is displayed, and there is no other skin selected (through arguments in the URL)

# Notify Address

This option contains one or multiple e-mail addresses to which notification e-mails should be sent when new comments are added. Leave empty if you don't want notification. The given e-mail addresses must, of course, be valid.

If you're using multiple addresses, you should use a semicolon (;) as a separator.

Note: As the maximum length of the settings fields is 128 characters, there's only a limited amount of e-mail addresses you can list.
Note: When you set up your own e-mail address as notification address, you won't get notified of the items/comments that you wrote yourself. Assuming that you know what you wrote, that shouldn't be a problem.

# Max Amount of Comments

This is the maximum number of comments that will be shown on the main page. This is NOT a restriction on the total number of comments that can be made. On the detail pages, all comments will be shown, even if there are more than the maximum amount chosen.

Note: Inside templates, this variable can be overridden by an optional parameter of the comments templatevar.

# Time Offset

If the time on your server is not equal to the time where you live, you might want to add an offset to the server time in order to get the correct time. Use negative values to subtract (negation sign). The current server time is listed as a reference.

## Example

If your local time is 20:35 and the server time is listed as 14:35, you'll need to set the time offset equal to 6 in order to get your blog time to 20:35

Note: Fractional offsets can be used as well, for people living in half time zones. e.g. an offset of 1.5 equals an offset of 1 hour and 30 minutes.

# Update File

BLOG:CMS can edit a file for you whenever a new item is added to the blog. The contents of that file will be a timestamp of the last change. The use of such a file could be useful for services which check a file on your server once in a while to see if there were updates, and generate 'updated weblogs' from that. Pointing them to your main blog could cause false update warnings to be sent out when visitors add comments or when you change something to the skins or templates.

When you don't need an update file, just leave the field empty.

Please note that the location of the update file is relative to the admin-area, so you might want to use an absolute path (something like `/path/to/your/website/update.txt`). Also make sure the update file already exists and is writable (chmod it to 666 if you want to be sure).

# Blog Admin

Blog administrators have the following extra rights:

- They can manage the team
- They can edit blog settings
- They can edit/delete all items by all authors (from the blog of which they are admin)
- They can delete the blog

A blog can have multiple admins, but there must be at least one admin at all times.

# Administrator Privileges

A so called super-admin has full access to all functions and all weblogs, even if she is not on the blog team.

On top of that: a super-admin has the right to create new weblogs, to change general settings, to change templates, to change skins and to manage the members (creation/ manipulation/ deletion of members).

Usually, there will be only one super-admin, the site administrator.

# Can Login?

As a superadmin, you can disallow individual members to login to the admin area.

# Default Blog

This is the blog that will be used when no other blog has been specified in the request.

# Base Skin

The option tells BLOG:CMS which skin to fall back to when no such decision can be automatically made. This happens when skin parts are empty, when no blog or skin is implicitly/explicitly selected.

Most users don't need to worry about this setting.

# Cookies

## Cookie Lifetime

When a member logs in, a cookie is stored in his browser, so she doesn't need to log in again when she comes back the next day. The lifetime of this cookie decided when it will become invalid:

- Session cookies get deleted when you exit the browser
- Cookies with a lifetime of one month will stay on the computer until you don't use/visit the site for a month. Using this option, you'll never have to login again (unless you've logged out yourself, or logged in from another computer)

## Cookie Path & Cookie Domain

These settings are advanced settings. Normally, you shouldn't change them at all. In that case, cookie path is a simple slash ('/') and cookie domain is empty.

## Secure Cookies

Normally, this should be set to 'no'. You should only set it to 'yes' when you have a HTTPS url and want cookies only to be sent over such a https connection.

## 'Last Visit' Cookie

You can setup BLOG:CMS to store a cookie in which the time of the visitors last visit is stored. This can be used to put indications next to new items

# Language

You can choose a language to be used when BLOG:CMS creates content for you. The content generated by BLOG:CMS includes the admin-area, the error messages, forms in skins, ...

There are two places where a language can be chosen: the global site settings include a language option. Next to that, logged in members can override this setting if they want to.

When both of these settings are invalid, 'english' is used as the default language.

Note: Extra language files can be downloaded from the Nucleus Website. (opens a new window)

# Account Creation

You can either allow or disallow your visitors to create their own 'member' account. They won't be allowed to add items to a blog (unless the admin adds them to a team), but they can login to the administration area and change their settings, and even delete or modify the comments they made.

# New Member: can login ?

When you allow creation of member accounts by your visitors, this setting defines whether or not accounts created in that way will have the ability to login to the administration area.

# Message Service

For the privacy of your members, you can hide all e-mail addresses and allow members to send an e-mail message to each other through the script. The message that will be sent out will however contain the e-mail addresses of both users, so they can then do continued communication through regular e-mail. This service can be disabled.

## Non-members

By default, non members cannot use the message service (because there's no way to check the validity of the e-mail address they enter). You can relax this restriction by allowing non-members to use the message service too. When submitting a message, they will be asked to enter their e-mail address, which will show up in the `From:` headers of the e-mail you receive.

# Disable Site

It's possible to disable your entire BLOG:CMS site. You might want to do this when you are doing some configuration, or when something went horribly wrong :-)

The URL that needs to be configured is an URL to which the visitor will be redirected.

Exceptions: the admin-area is still available, and super-admins can still see the entire site. (don't forget to re-enable your site afterwards ;-))

# URL Mode

Using this option, you can switch between URL styles:

- Normal: URLs looking like `http://host/index.php?itemid=1234`
- Fancy: URLs looking like `http://host/item/1234`

Note: In order to get the 'Fancy URL' mode working, some extra actions are required. They're described in the Tips & Suggestions (opens in new window)

# Templates: Items

When items are shown, the following setup is repeated for each item:

    item header
    item body
    item footer

These three blocks all refer to a template-part, which define what the result looks like.

## Variables

Within these template, a series of so called template variables can be used to insert item data.

## Example

An example

# Templates: Items

An example for the item body template:

    <h1><%title%></h1>

    <p><%body%></p>

    <div class="metadata">
     <a href="<%itemlink%>">link</a> -
     <%date%> <%time%> -
     <a href="<%authorlink%>"><%author%></a> -
     <%comments%>
    </div>

The result would become something like this:

#### This is an item

This is the text for the item

link - August 8th 2002 18:51 - karma - no comments

# Templates: comments

There are three possible structures for a comments block.

1. When comments are displayed (like on detail pages, or on the main page when there are less than the maximum allowed amount of comments)

       comments header
         comments body (repeated)
       comments footer

2. When there are no comments at all

       no comments

3. When there are comments, but there are more than the maximum allowed number. (only applies when not on a detailed item page)

       too much comments

Inside these template-parts, some comments-related variables are available

# Templates: Comment headers/footers

## Description

While the comments-body is repeated for each comment, the header and footer are only displayed once. A typicall structure would look like this:

    comments header
      comments body 1
      comments body 2
      comments body 3
    comments footer

In these template-parts, comments-related templatevars are available

## Examples

Header:

    <ul>

Body:

    <li><%user%>: <%body%></li>

Footer

    </ul>

Result

- karma: nice!
- xiffy: yes indeed!

# Templates: Link to extended entry

This is the template that will be used to format the morelink templatevar that is available in the item templates. Available variables are the same as in the item templates.

When there's no extended part of the item, the `<%morelink%>` templatevar will have no effect.

## Example

    <a href="<%itemlink%>">[Read More!]</a>

# Templates: Archive Lists

The archive lists are formatted as listed below:

    archivelist header
      archivelist listitem (repeated for each archive)
    archivelist footer

Available variables: (in the header and footer, only `blogid` is allowed)

Name | Description
--- | ---
blogid | ID of the weblog
archivelink | link to the archive, which you can embed in a `<a href="..">` tag.
month | Number of the month (2 digits: 01-12)
year | Year (4 digits)
day | Day of month (2 digits; only when in day mode)

A more flexible way to add the date of the archive to the listitem, is to use strftime variables. If you find this too complicated, use the following:

    <a href="<%archivelink%>">%B, %Y</a><br />

To change the language to your local settings, change the locale.

# Templates: Category Lists

The category lists are formatted as listed below:

    categorylist header
      categorylist listitem (repeated)
    categorylist footer

Available variables: (in the header and footer, only `blogid`, `blogurl` and `self` are allowed)

Name | Description
--- | ---
blogid | ID of the weblog
blogurl | URL of the blog (as defined in blogsettings)
self | Current page, without parameters (e.g. `index.php`)
catlink | a link to the most recent items for a category, which you can embed in a <a href=".."> tag.
catid | Category ID
catname | Category name
catdesc | Category description

View an example

# Templates: Category Lists Example

(go back)

## Header

    <ul>
      <li><a href="<blogurl%>">All</a></li>

## List Item

    <li><a href="<%catlink%>"><%catname%></a></li>

## Footer

    </ul>

## Results in:

- All
- myCategory
- yourCategory

# Templates: Locale

This is actually not a template-part, it's a setting. Setting it allows the date and time preferences when to be localized. Names of months and days will be in the desired language, etc.

The possible values depend according to which machine BLOG:CMS is running on. Some possible values are

- en: English
- dutch: Dutch
- ...

More info in the Open Group Specification for strftime. (opens a new window)

The locale is used for the date and time format, for the dateheaders, and for the archivelist items

# Templates: Date and Time formats

These are used to format dates and times into the `<%date%>` and `<%time%>` vars (see template vars). The formatting is done according to the locale

More info on the available vars. If want to get started quickly, use "%x" to format the date and "%X" to format the time.

# Template: Date headers/footers

The date header and date footer can contain date and time vars. More info on the available vars. If you want to get started quickly, use "%x" to format the date. The language which is used to format the date, is determined by the locale-setting in the template.

In the date header, the template variable <%%daylink%%> is allowed to insert a link to the archive for that day. Note the double '%'! It's necessary to avoid %d to be expanded as the current day of the month. Also, if you just want to add a '%' character somewhere, you should also put it twice ('%%') or it will be gone on your website.

Sample for date header:

    <div class="day">
    <h1>%d %B</h1>

Sample for date footer:

    </div>

And another example for the date head using daylink

    <div class="day">
    <h1>%d %B</h1>
    <a href="<%%daylink%%>">(archive)</a>

# Templates: Highlight

The highlighting is used when performing searches. This is actually used in a regular expression, so you might want to escape some characters by putting a backslash before them. The place where the highlighted word will come, is indicated by "\0".

## Example

    <span style='background-color:yellow'>\0</span>

# Templates: nothing found

Shown when a search has been performed and no results were found.

Available variables:

Name | Description
--- | ---
blogid | ID of the weblog
query | the query that was used in the search

## Example

    No search results found for <b><%query%></b>

# Templates: Comment body

This is the part of the template used to display a single comment. In this template-part, comments-related templatevars are available.

## Example

    <h2>Comment by <%userlink%>:</h2>

    <p><%body%></p>

    <div class="metadata">
     (from <%host%> on <%date%> at <%time%>)
    </div>

Result:

#### Comment by karma:

Nice!

(from host.example.org on 2003-03-02 at 13:30)

# Templates: Media & Popups

These templates are used to format links to popup image windows and media objects (non-pictures). The available variables for each of the templates are described below

## Popup Link Code

Name | Description
--- | ---
popuplink | an <a href... link ready to use
rawpopuplink | only the url inside href="..."
popupcode | javascript code to open window
text | the alternate text (link text)
width | image width
height | image width
popuptext | (=same as text)

## Inline Image Code

Name | Description
--- | ---
image | an IMG-tag, ready to use
link | direct link to the image (URL)
text | the alternate text (link text)
width | image width
height | image width

## Media Object Link Code

Name | Description
--- | ---
media | an A-tag, ready to use
link | direct link to the file (URL)
text | the alternate text (link text)

# Templates: Member Extra

This is a template you can use to add an extra indication that a comment-author is a member. It ends up in the `<%authtext%>` variable for use in the comment body

Inside this template-part, some comments-related variables are available.

# Templates: Comments Read More

This is the format of the link that will be added at the end of `<%short%>`, which is a variable for use in the comment body

Inside this template-part, some comments-related variables are available (except for the `<%short%>` variable).

Example:

     <a href="<%itemlink%>">[more]</a>

# Templates: commentword

Most likely, you'll rather want to write "1 comment" than "1 comment(s)". The "One comment" and "Many comments" template parts can be used for this purpose. They will be used to fill the `<%commentword%>` variable that you can use elsewhere.

If there is only 1 comment, `<%commentword%>` will be equal to the contents of the "one comment" part. If there are many comments (more than one), `<%commentword%>` will be equal to the contents of the "two (or more) comments" part.

Typical values are "comment" and "comments". No special variables can be used here.

# Templates: Edit Link

This template defines how the edit-templatevar will be marked up. You can use any of the template variables here.

## Example:

    <a href="<%editlink%>"
       onclick="<%editpopupcode%>">edit</a>

# Skins: Main Index

This skinpart is used to show the most recent entries of your weblog. It's usually the home page of your site.

Very basic buildup for a main index:

    <html>
      <head>
        <title>My Weblog</title>
      </head>
      <body>

        <h1>My Weblog</h1>
        <%blog(mytemplate,20)%>

      </body>
    </html>

This will show the 20 most recent items of the default weblog (unless overridden), using the 'mytemplate' template.

# Skins: Detail Pages

These pages are used to show the full items, all comments that were made and a form to add comments.

Very basic buildup for a detailed item page:

    <html>
      <head>
        <title>My Weblog :: Item</title>
      </head>
      <body>

        <h1>Item</h1>
        <%item(detailed)%>

        <h1>Comments</h1>
        <%comments(detailed)%>

        <h1>Add Comment</h1>
        <%commentform%>

      </body>
    </html>

This will show the item and comments using the 'detailed' template, and add a standard commentform.

# Skins: Archive List

An overview of all the months for which archives are available, and links to those archives

Very basic buildup for an archive list:

    <html>
      <head>
        <title>My Weblog :: Archives</title>
      </head>
      <body>

        <h1>Archives</h1>
        <%archivelist(default)%>

      </body>
    </html>

This will show the list of all available archive files, using the 'default' template

# Skins: Archive

An archive for one month. Behaves like a main index, but shows all the items from a certain month.

Very basic buildup for an archive page:

    <html>
      <head>
        <title>My Weblog :: Archive</title>
      </head>
      <body>

        <h1>Archive</h1>
        <%archive(default)%>

      </body>
    </html>

This will show the requested archive using the 'default' template

# Skins: Search

Used to show search results.

Very basic buildup for a searchresults page:

    <html>
      <head>
        <title>My Weblog :: Search</title>
      </head>
      <body>

        <h1>Search</h1>
        <%searchform%>

        <h1>Searchresults</h1>
        <%searchresults(default)%>

      </body>
    </html>

This will show search results using the 'default' template.

# Skins: Errors

Used when there is an error

    <html>
      <head>
        <title>My Weblog :: Error</title>
      </head>
      <body>

        <h1>Error!</h1>
        <%errormessage%>

        <br /><br />

        <a href="javascript:history.back();">Back</a>

      </body>
    </html>

This will show the error message, plus a link to go back.

# Skins: Member

Used to show member details.

Very basic buildup for a member-detail page:

    <html>
      <head>
        <title>My Weblog :: Member details</title>
      </head>
      <body>

        <h1>Info about <%member(name)%></h1>
        Website:
        <a href="<%member(url)%>"><%member(url)%></a>

        <h1>Send Message</h1>
        <%membermailform%>

      </body>
    </html>

This will show the members name, website address and a mailform.

# Skins: Image Popup

Used when a media file (image) needs to be shown in a popup window. This skin defines the layout that will be used in that case.

Very basic buildup for an imagepopup page:

    <html>
    <head>
      <title><%imagetext%></title>
      <style type="text/css">
       img { border: none; }
      </style>
    </head>
    <body>
      <a href="javascript:window.close();"><%image%></a>
    </body>
    </html>

# Shortnames & Display Names

Weblogs, templates and skin should all have a short name next to the full name or description.

A short name consists of only the characters a-z and 0-9, and cannot contain spaces

Display names are used for members. They can contain a-z, A-Z, 0-9 and spaces, but the spaces cannot be placed at the beginning or end of the name.

# Template: 'New' indication

When the 'last visit' cookie option is activated, the contents of the 'Indication of new item'-template is copied into the <%new%> variable for items that have been added since the last visit. The `<%new%>` variable can e.g. be used in the item body-template.

When the 'last visit' cookie is disabled, or the item is not 'new', this template part will not be used.

# Time variables overview

The following conversion specifiers are recognized in the format string (taken from the PHP documentation for the strftime function). More info in the Open Group Specification

- %a - abbreviated weekday name according to the current locale
- %A - full weekday name according to the current locale
- %b - abbreviated month name according to the current locale
- %B - full month name according to the current locale
- %c - preferred date and time representation for the current locale
- %d - day of the month as a decimal number (range 00 to 31)
- %H - hour as a decimal number using a 24-hour clock (range 00 to 23)
- %I - hour as a decimal number using a 12-hour clock (range 01 to 12)
- %j - day of the year as a decimal number (range 001 to 366)
- %m - month as a decimal number (range 1 to 12)
- %M - minute as a decimal number
- %p - either `am' or `pm' according to the given time value, or the corresponding strings for the current locale
- %S - second as a decimal number
- %U - week number of the current year as a decimal number, starting with the first Sunday as the first day of the first week
- %W - week number of the current year as a decimal number, starting with the first Monday as the first day of the first week
- %w - day of the week as a decimal, Sunday being 0
- %x - preferred date representation for the current locale without the time
- %X - preferred time representation for the current locale without the date
- %y - year as a decimal number without a century (range 00 to 99)
- %Y - year as a decimal number including the century
- %Z - time zone or name or abbreviation
- %% - a literal `%' character

# Ping Weblogs.com

When updating your weblog, you can choose to send an update notification (ping) to weblogs.com. This website provides a list of recently updated weblogs to everyone who requests it. Lots of websites are using this data, so you might receive some extra hits when enabling the ping.

Note: For this feature to work correctly, you need to fill out both the weblog URL and the weblog name in the blogsettings.

# Always include in search

When the 'include in search' option is selected, the weblog will always be included in searches, even if the search is done on another weblog.

As an example, suppose you have two blogs called 'lifelog' and 'linkdump', with the 'include in search' enabled for 'linkdump'. Now, a search query on 'lifelog' will also search through 'linkdump', while a search query on 'linkdump' will only search entries in 'linkdump'

# Convert Linebreaks

By default, BLOG:CMS converts linebreaks in your items to `<br />` tags, so a linebreak will also show up in your (X)HTML output

Advanced users, or users striving for the semantic web (`br` tags don't add any information, they're just used for markup), might find this feature annoying, and turn this feature off.

# Media

BLOG:CMS allows you to upload media files (images, video, sound, ...) to your website

Some settings are needed to do this:

- Media dir: location on the server where the media files will be saved (local filesystem)
- Media URL: location of the media files
- Allow upload: It's possible to disable file upload
- Allowed filetypes for upload: a bunch of extensions uploaded files can have (seperated by commas, case insensitive)
- Max. upload file size: Puts a limit on the size of uploaded files
- Prefix Media Files: When this option is turned on, uploaded file will be prefixed with the current date. Uploading a file named 'bunny.jpg' on April 8, 2003 will then result in a file named 20030408-bunny.jpg. The reason why you might want to do this, is when you're uploading tons of files, and don't want problems with duplicate names.

Each member has his own private collection of media files. Next to that, subdirectories that are under the media dir are seen as global collections (shared between members).

Uploading is only possible when a member is on the team of at least one of the blogs, to prevent abuse./p>

# Protect Member Names

When this option is enabled, non-logged in members cannot add comments using the same name as registered members. The reason to do this would be to avoid guest impersonating members.

# Plugin URL

This setting is the base URL for plugin admin areas. Usually it will look like the following

    http://hostname.com/nucleus/plugins/

# Skins URL

This setting is the base URL for the BLOG:CMS skins directory. Usually it will look like the following

    http://hostname.com/skins/

# Action URL

This setting is the absolute URL of the `action.php` script that comes with BLOG:CMS. Usually it will look like the following

    http://hostname.com/actions.php

# Adding items

When adding items to a weblog, there are four kinds of template variables that you can use in the body text, title or extended part:

- <%popup(...)%> to insert a popup image
- <%image(...)%> to insert an inline image
- <%media(...)%> to insert a media object

Usually, these tags are inserted by the 'insert media' button in the JavaScript toolbar

# Skinvar: referer

Inserts the refering URL (can be empty)

## Arguments

None

## Skintypes

all

## Examples

    <a href="<%referer%>">back</a>

# Skinvar: itemid

Inserts the ID of the currently selected item

## Arguments

None

## Skintypes

item

## Examples

    <%itemid%>

# Skinvar: itemlink

Adds a permanent link for the item.

## Arguments

Optional

- linktext: when present, a full `<a href...` tag will be outputted, rather than a raw link

## Skintypes

item

## Examples

    <%itemlink%>

# Skinvar: itemtitle

Inserts the title of the item, with HTML-stripped off and entities encoded

## Arguments

None

## Skintypes

item

## Examples

    <%itemtitle%>

# Skinvar: archivedate

Inserts a formatted date for an archive date. Using no parameters, this will either insert '15 august 2002' or 'august 2002' if the archive is for august 2002

## Arguments

- Optional

  Name | Value
  --- | ---
  Locale | Locale in which the date must be formatted
  Format | Date format (strftime variables)

## Skintypes

archive

## Examples

    Archive for <%archivedate%>
    Archive for <%archivedate(dutch)%>
    Archive for <%archivedate(en,%B %Y)%>

# Skinvar: blog

Inserts the most recently added items of the currently active blog (usually the default one) into the skin.

## Arguments

Required:

- template: name of the template to use

Optional:

- amount: the amount of items to show (default = 10). Can also contain an offset telling BLOG:CMS to start only from the given item. e.g. `10(5)` shows 10 items starting from item 5
- category: name of the category to show

## Skintypes

index, item, archive, archivelist, search

## Examples

    <%blog(default,15)%>
    <%blog(default,5(15))%>
    <%blog(mytemplate)%>
    <%blog(mytemplate,5,mycategory)%>

# Skinvar: otherblog

Inserts the most recently added items of a given blog into the skin.

## Arguments

Required:

- blogname: name of the blog to show
- template: name of the template to use

Optional:

- amount: the amount of items to show (default = 10). Can also contain an offset telling BLOG:CMS to start only from the given item. e.g. `10(5)` shows 10 items starting from item 5
- category: name of the category to show

## Skintypes

all

## Examples

    <%otherblog(myblog,default,15)%>
    <%otherblog(yourblog,mytemplate)%>
    <%otherblog(yourblog,mytemplate,15,mycategory)%>
    <%otherblog(yourblog,mytemplate,5(15),mycategory)%>

# Skinvar: item

Shows the currently selected item (without comments) using a given template

## Arguments

- template: name of the template to use

## Skintypes

item

## Examples

    <%item(mytemplate)%>

# Skinvar: comments

Shows the comments for the currently selected item using a given template.

## Arguments

- template: name of the template to use

## Skintypes

item

## Examples

    <%comments(mytemplate)%>

# Skinvar: archive

Shows the archive for the selected month and the selected blog (usually the default one), using a given template

## Arguments

Required

- template: name of the template to use

Optional

- category: name of the category to show

## Skintypes

archive

## Examples

    <%archive(mytemplate)%>
    <%archive(mytemplate,mycategory)%>

# Skinvar: otherarchive

Shows the archive for the selected month, using the given blog and template

## Arguments

Required

- blogname: name of the blog to use
- template: name of the template to use

Optional

- category: name of the category to show

## Skintypes

archive

## Examples

    <%otherarchive(myblog,mytemplate)%>
    <%otherarchive(myblog,mytemplate,mycategory)%>

# Skinvar: archivelist

Shows the list of available archives for the currently selected blog (usually the default one), using a given template

## Arguments

Required

- template: name of the template to use

Optional

- category: name of the category to show
- limit: limits the amount of links shown (e.g. if you only want to show links to the past 3 months)

## Skintypes

index, archive, archivelist, search, item

# Skinvar: archivedaylist

The same as the archivelist skinvar, but shows an entry for each day instead of for each month

## Arguments

Required

- template: name of the template to use

Optional

- category name of the category to show
- limit: limits the amount of links shown (e.g. if you only want to show links to the past 3 months)

## Skintypes

index, archive, archivelist, search, item

## Examples

    <%archivedaylist(mytemplate)%>
    <%archivedaylist(mytemplate,mycategory)%>

# Skinvar: otherarchivedaylist

The same as the otherarchivelist skinvar, but shows an entry for each day instead of for each month

## Arguments

Required

- blogname: name of the blog
- template: name of the template to use

Optional

- category: name of the category to show

## Skintypes

all

## Examples

    <%otherarchivedaylist(yourblog,mytemplate)%>
    <%otherarchivedaylist(yourblog,mytemplate,mycategory)%>

# Skinvar: otherarchivelist

Shows the list of available archives for a given blog, using a given template

## Arguments

Required

- blogname: name of the blog
- template: name of the template to use

Optional

- category: name of the category to show

## Skintypes

all

## Examples

    <%otherarchivelist(yourblog,mytemplate)%>
    <%otherarchivelist(yourblog,mytemplate,mycategory)%>

# Skinvar: categorylist

Inserts a list of categories for a blog (defaults to the currently selected blog), using a given template

## Arguments

Required

- template: name of the template to use

Optional

- blogname: short name of the blog to use

## Skintypes

index, archive, archivelist, search, item

## Examples

    <%categorylist(mytemplate)%>
    <%categorylist(mytemplate,myweblog)%>

# Skinvar: category

Inserts some information about the currently selected category. When no category is selected, does nothing.

## Arguments

Optional

- type: What information to include. Can be name (default), desc or id

## Skintypes

all

## Examples

    <%category%>
    <%category(id)%>
    <%category(desc)%>
    <%category(name)%>

# Skinvar: ifcat

Deprecated as of BLOG:CMS v2.0. Use <%if(category)%> instead.

## Arguments

None

- text: Text to show

## Skintypes

all

## Examples

    <%ifcat(Current Category: )%><%category%>

# Skinvar: searchresults

Shows the searchresult for the current query

## Arguments

Required:

- template: name of the template to use

Optional:

- maxresults: maximum amount of results to show

## Skintypes

search

## Examples

    <%searchresults(mytemplate)%>

# Skinvar: othersearchresults

Shows the searchresult in a give blog for the current query, using the given template

## Arguments

Required:

- blogname: name of the blog to use
- template: name of the template to use

Optional:

- maxresults: maximum amount of results to show

## Skintypes

search

## Examples

    <%othersearchresults(myblog,mytemplate)%>

# Skinvar: query

Inserts the current search query.

## Arguments

None

## Skintypes

search

## Examples

    <%query%>

# Skinvar: version

Inserts the current BLOG:CMS version.

## Arguments

None

## Skintypes

all

## Examples

    <%version%>

# Skinvar: previtem

Inserts the ID of the previous item in the blog

## Arguments

None

## Skintypes

item

## Examples

    <%previtem%>

# Skinvar: nextitem

Inserts the ID of the next item in the blog

## Arguments

None

## Skintypes

item

## Examples

    <%nextitem%>

# Skinvar: nextitemtitle

Inserts the title of the next item in the blog

## Arguments

None

## Skintypes

item

## Examples

    <%nextitemtitle%>

# Skinvar: previtemtitle

Inserts the title of the previous item in the blog

## Arguments

None

## Skintypes

item

## Examples

    <%previtemtitle%>

# Skinvar: prevarchive

Inserts the `archive` attribute that corresponds to the archive of either 1 day or 1 month back. This value can be used inside URLs to select an archive.

- If the shown archive is for one specific day, the value has the form `YYYY-MM-DD`
- If the shown archive is for a full month, the value has the form `YYYY-MM`

## Arguments

None

## Skintypes

archive

## Examples

    <a href="index.php?archive=<%prevarchive%>>....

# Skinvar: nextarchive

Inserts the `archive` attribute that corresponds to the archive of either 1 day or 1 month further in time. This value can be used inside URLs to select an archive.

- If the shown archive is for one specific day, the value has the form `YYYY-MM-DD`
- If the shown archive is for a full month, the value has the form `YYYY-MM`

## Arguments

None

## Skintypes

archive

## Examples

    <a href="index.php?archive=<%nextarchive%>>....

# Skinvar: archivetype

Either `day` or `month`, indicating which type of archive is currently being shown

## Arguments

None

## Skintypes

archive

# Skinvar: todaylink

Inserts a link to the main page of the weblog. Takes into account the currently selected blog and category.

## Arguments

Optional

- linktext: when present, a full `<a href...` tag will be outputted, rather than a raw link

## Skintypes

all

## Examples

    <%todaylink%>

# Skinvar: archivelink

Inserts a link to the archive for the currently selected blog and category (or the default blog when no blog selected)

## Arguments

Optional

- linktext: when present, a full `<a href...` tag will be outputted, rather than a raw link

## Skintypes

all

## Examples

    <%archivelink%>

# Skinvar: nextlink

Inserts a link to the next item (on item pages) or to the next archive (on archive pages)

## Arguments

Optional

- linktext: when present, a full `<a href...` tag will be outputted, rather than a raw link
- amount: for search and index skins: the amount of items to go forward/backward

## Skintypes

item, archive, search, index

## Examples

    <%nextlink%>

# Skinvar: prevlink

Inserts a link to the previous item (on item pages) or to the previous archive (on archive pages). For search and index pages

## Arguments

Optional

- linktext: when present, a full `<a href...` tag will be outputted, rather than a raw link
- amount: for search and index skins: the amount of items to go forward/backward

## Skintypes

item, archive, search, index

## Examples

    <%prevlink%>

# Skinvar: errormessage

Inserts the message corresponding to the error that occurred

## Arguments

None

## Skintypes

error

## Examples

    <%errormessage%>

# Skinvar: imagetext

This skinvar is deprecated since BLOG:CMS v2.0. You should use `<%image(caption)%>` instead

Inserts the caption text for a popup image

## Arguments

None

## Skintypes

imagepopup

## Examples

    <%imagetext%>

# Skinvar: image

Inserts the selected image (for popup images)

## Arguments

Optional

- type

  imgtag (default) | Full XHTML `<img ... />` tag
  url | Image file URL
  width | image width
  height | image height
  caption | image caption (text to go with image)

## Skintypes

imagepopup

## Examples

    <%image%>

# Skinvar: vars

This skinvar is deprecated since BLOG:CMS v2.0. It's a small pain to insert this HTML yourself using the itemid skinvar

Inserts a hidden form-input field with the itemid.

`<input type="hidden" name="itemid" value="1234" />`

## Arguments

None

## Skintypes

item

# Skinvar: sitevar

Includes a site variable

## Arguments

- type: name of the variable to show:
  - url: URL of the site
  - name: Name of the site
  - admin: E-mail address of the administrator

## Skintypes

all

## Examples

    <%sitevar(name)%>
    <%sitevar(url)%>
    <a href="mailto:<%sitevar(email)%>">Admin</a>

# Skinvar: blogsetting

Inserts a setting specific to the currently selected blog (usually the default one)

## Arguments

- type: which setting to add
  - id: ID of the blog
  - url: URL of the blog
  - name: Name of the blog (long name)
  - desc: Description of the blog

## Skintypes

index, archive, archivelist, search, item, member

## Examples

    <%blogsetting(name)%>
    <%blogsetting(id)%>
    <%blogsetting(desc)%>
    <a href="<%blogsetting(url)%>">...</a>

# Skinvar: member

Inserts some info about on the currently logged in member. On member detail pages, extra options are available to show the same information for the requested member.

When the visitor is not logged in, the your... parameters will insert nothing

## Arguments

- type: which information to show.

  Information on the logged in member:

  - yourname: nickname of the member (the one used to login)
  - yourrealname: full name of the member
  - yournotes: extra information a member can set for him/herself
  - yoururl: URL of the members website
  - youremail: email address
  - yourid: ID

  Information on the requested member (only available on member detail pages):

  - name: nickname of the member (the one used to login)
  - realname: full name of the member
  - notes: extra information a member can set for him/herself
  - url: URL of the members website
  - email: email address of the member
  - id: ID

## Skintypes

all

## Examples

    <%if(loggedin)%>
    you are <%member(yourrealname)%>
    <%endif%>

# Skinvar: preview

Inserts an item-preview into the page, using a given template (to be used in conjunction with additemform)

## Arguments

- template: name of the template to be used

## Skintypes

index

## Examples

    <%preview(mytemplate)%>

# Skinvar: adminurl

Inserts the full URL to the Admin Area

## Arguments

None

## Skintypes

all

## Examples

    <a href="<%adminurl%>">Admin Area</a>

# Skinvar: additemform

Shows an add-item form for the currently selected blog (usually the default one). Mostly used in conjunction with preview

## Arguments

None

## Skintypes

index

## Examples

    <%additemform%>

# Skin/Templatevar: include

Includes a textfile into the output. The contents of the file is not parsed in any way, so you cannot use skin/templatevars or use PHP code (see parsedinclude and phpinclude if you want parsed includes)

## Arguments

- filename: the name of the file to be included (either relative to the position of index.php, or absolute). Note that an URL can also be used here.

## Notes

- This tag is affected by the parser settings `IncludeMode` and `IncludePrefix`

## Skintypes

all

## Examples

    <%include(filename.txt)%>
    <%include(/home/user/myself/filename.txt)%>
    <%include(http://mydomain.com/filename.html)%>

# Skin/Templatevar: phpinclude

Includes a php-file into the output. The contents of the file is parsed by the PHP parser, so be careful. BLOG:CMS skin/templatevars are not parsed! (see parsedinclude and include for other include options).

## Arguments

- filename: the name of the file to be included (either relative to the position of index.php, or absolute)

## Notes

- This tag is affected by the parser settings `IncludeMode` and `IncludePrefix`
- Your file will be included using the standard php `include()` command. This command will be called from inside a class method, so you'll need to declare which global variables you want to access yourself. Most of the standard variables are automatically declared global by BLOG:CMS itself.

## Skintypes

all

## Examples

    <%phpinclude(filename.php)%>
    <%phpinclude(/home/user/myself/filename.php)%>

# Skin/Templatevar: phpinclude : vars

The following global variables are accessible from within files included by the phpinclude skin/templatevar:

$GATEWAY_INTERFACE, $SERVER_NAME, $SERVER_SOFTWARE
$SERVER_PROTOCOL, $REQUEST_METHOD, $QUERY_STRING
$DOCUMENT_ROOT, $HTTP_ACCEPT, $HTTP_ACCEPT_CHARSET
$HTTP_ACCEPT_ENCODING, $HTTP_ACCEPT_LANGUAGE
$HTTP_CONNECTION, $HTTP_HOST, $HTTP_REFERER
$HTTP_USER_AGENT, $REMOTE_ADDR, $REMOTE_PORT
$SCRIPT_FILENAME, $SERVER_ADMIN, $SERVER_PORT
$SERVER_SIGNATURE, $PATH_TRANSLATED, $SCRIPT_NAME
$REQUEST_URI, $argv, $argc, $PHP_SELF
$HTTP_COOKIE_VARS, $HTTP_GET_VARS, $HTTP_POST_VARS
$HTTP_POST_FILES, $HTTP_ENV_VARS, $HTTP_SERVER_VARS
$HTTP_SESSION_VARS, $PATH_INFO, $HTTPS
$HTTP_RAW_POST_DATA, $HTTP_X_FORWARDED_FOR

For others variables, you'll need to add '`global $varname;`' explicitly in your code

# Skin/Templatevar: parsedinclude

Includes a file into the output. The contents of the file is parsed by the BLOG:CMS skin/template parser, so you can use skin/templatevars. (see phpinclude and include for other include options)

## Arguments

- filename: the name of the file to be included (either relative to the position of index.php, or absolute)

## Notes

- This tag is affected by the parser settings `IncludeMode` and `IncludePrefix`
- From inside the included file, you can call `<%parsedinclude(filename)%>` again. To avoid endless loops, the maximum depth level you can go is 3.

## Skintypes

all

## Examples

    <%parsedinclude(filename.txt)%>
    <%parsedinclude(/home/user/myself/filename.txt)%>

# Skin/Templatevar: plugin

Calls a plugin

## Arguments

- Required

  Name | Contents
  --- | ---
  PlugName | Name of the plugin that should be called. This name is case sensitive!

- Extra parameters can be added, depending on the plugin

## Notes

- When a plugin name does not conflict with existing variables, it can be called directly using `<%PluginName(parameters)%>`

## Skintypes

all

## Examples

    <%plugin(Calendar)%>
    <%plugin(LastComments,myweblog)%>
    <%LastComments(myweblog)%>

# Skinvar: loginform

Adds a loginform, or shows a "You are karma (Log out)" message

## Arguments

None

## Skintypes

all

## Examples

    <%loginform%>

# Skinvar: commentform

Adds a commentform to an item page.

## Arguments

Optional:

- destinationurl: sets the URL to where BLOG:CMS needs to redirect after adding the comment (by default, BLOG:CMS redirects to the item detail page for the item)

## Skintypes

item

## Examples

    <%commentform%>
    <%commentform(http://host/thanks.html)%>

# Skin/Templatevar: set

Sets a parser property.

## Arguments

- property: name of the property
- value: value of the property

## Skintypes

all

## Examples

    <%set(IncludeMode,skindir)%>
    <%set(IncludePrefix,somedir/)%>

# Skin/Templatevar: skinfile

Used by imported skins to put a link relative to the skins-URL. Use it in conjunction with the `IncludePrefix` parser property to get the best results

## Arguments

- filename: filename of which you want the correct URL

## Skintypes

all

## Examples

    <%skinfile(mystyle.css)%>

# Skin/Templatevar: skinname

Inserts the name of the skin that's currently being used.

## Arguments

None

## Skintypes

all

## Examples

    <%skinname%>

# Skinvars: if/else/endif

Inserts a content block only when certain conditions are fullfilled

## Arguments

Only the `if` skinvar has options

- type: type of condition
- name: name of option (optional)
- value: value to be checked (optional)

## Condition types

- category: condition is fullfilled when a category is selected
- blogsetting: checks if the value name blogsetting equals value (the name is the column name from the BLOG:CMS_blog sql table)
- loggedin: condition is fullfilled if visiting member is currently logged in
- onteam: condition is fullfilled if visiting member is currently logged in & member of the blog team of the current blog (or the blog given in the name parameter)
- nextitem: true if there is a more recent item available for the current weblog (item skintype)
- nextitem: true if there is an older item available for the current weblog (item skintype)
- skintype: checks if the current skin type is equal to value (index, search, item, archive, archivelist, ...)
- hasplugin: checks if the a plugin is installed, or if a plugin option has been set to a specific value
  - hasplugin,PluginName: Checks if plugin is available
  - hasplugin,PluginName,OptionName: Checks if a plugin option is not set to 'no'
  - hasplugin,PluginName,OptionName=value: Checks if a plugin option is set to a specific value

## Skintypes

all

## Examples

    <%if(loggedin)%>
    Welcome back!
    <%else%>
    Welcom guest!
    <%endif%>

# Skinvar: membermailform

Shows a form through which a logged-in member can send a message to the member which details are being shown (on member detail pages)

## Arguments

Optional:

- rows: Amount of rows in the box (default = 10)
- cols: Amount of columns in the box (default = 40)
- destination url: URL to where BLOG:CMS needs to redirection after sending the message

## Skintypes

member

## Examples

    <%membermailform%>

# Skinvar: searchform

Shows a search form for the current blog.

## Arguments

Optional:

- blogname: The name of the blog for which you want a search form (short blog name)

## Skintypes

index, archive, archivelist, search, item

## Examples

    <%searchform%>
    <%searchform(otherweblog)%>

# Skinvar: nucleusbutton

Inserts a BLOG:CMS button, with link to the BLOG:CMS website.

## Arguments

Optional:

- imgurl: URL of the image (if you don't want the default)
- imgwidth: width of the image (in pixels)
- imgheight: height of the image (in pixels)

## Notes

- This tag is affected by the parser settings `IncludeMode` and `IncludePrefix`

## Skintypes

all

## Examples

    <%nucleusbutton%>
    <%nucleusbutton(nucleus/nucleus.gif,46,43)%>

# Skinvar: self

Inserts the filename of the page currently being displayed (index.php or whatever you changed it to)

## Arguments

None

## Skintypes

all

## Examples

    <%self%>

# Template variables: Overview

## What?

Template variables largely work in exact the same way as skin variables, with the only difference that they are being used inside templates. The variables are called using `<%varname%>`, and include some text depending on the variable function. Some variables also have extra optional parameters.

## Available variables

These template variables be used in the following template-parts: `item header, item body, item footer, date header, date footer, morelink, editlink` (The variables `image`, `popup` and `media` can also be used inside weblog items.)

- Basic variables... (title, body, ...)
- Advanced variables... (include, plugin, ...)

Comments-related template-parts (`comments header, comments body, comments footer, one comment, two comments, comments read more, no comments, too much comments`) have a different set of available variables:

- Comments-related variables...

# Template variables: Basic variables

All these variables concern the item that's currently being parsed.

Name | Description
--- | ---
title | item title
body | body text
more | extended text
category | name of the category
categorylink | raw link to the category
karma | karma score
authorlink | raw link to the author
itemlink | raw permanent link for the item
author | name of the author
smartbody | either the body text or the extended text
morelink | 'read more'-link
date | Formatted date
time | Formatted time
daylink | raw link to the daily archive
comments | comments block or commentcount
itemid | ID of the item
blogurl | URL of the blog

Template variables overview...

# Template variables: Advanced variables

Name | Description
--- | ---
authorid | ID of the current items author
blogid | ID of the blog
catid | ID of the category for the current item
query | search query (if there is one)
syndicate_title | Syndicated title
syndicate_description | Syndicated body text
karmaposlink | raw vote link
karmaneglink | raw vote link
new | 'New Item!'-text
include | includes a file, whithout parsing
parsedinclude | includes a file, parsing it
phpinclude | includes a file, parsing by PHP
plugin | executes a plugin
edit | inserts an 'edit this item' link
editlink | raw 'edit item' link (links to bookmarklet)
editpopupcode | javascript code to open a popup window for editlink
skinfile | includes the correct URL for a file belonging to an imported skin
set | sets a parser property
image | inline image from media library
popup | popup image from media dir
media | other media object from media dir
relevance | Includes the 'search hit relevance' in templates that display search results

Template variables overview...

# Template variables: Comments

Name | Description
--- | ---
body | comment body
user | user name
userid | users URL or e-mail address
userlink | a smart link to either the e-mail or URL for non members, or the member detail page for members. Note: this link already includes the <a href="..."> and </a> tags ! (when no valid URL or e-mail is available, only the name of the member will be shown)
userlinkraw | same as above, but without the <a href.., empty when no valid URL or e-mail available
memberid | ID of the member (0 for non-members)
commentcount | total amount of comments for the item
commentword | 1 'comment', 2 'comments'
date | date on which comment was added
time | time at which comment was added
host | host from where comment was added
ip | IP-address from where comment was added
commentid | ID of the current comment
itemid | ID of the current item
itemlink | link to the detailed item page
itemtitle | Title of the current item
blogid | ID of the weblog
authtext | the extra text for members, empty for non members
short | a cut off version of the body, which truncates after the first line break. A link is added at the end according to the template
timestamp | time at which comment was added
include | includes a file, whithout parsing
parsedinclude | includes a file, parsing it
phpinclude | includes a file, parsing by PHP
plugin | executes a plugin
skinfile | includes the correct URL for a file belonging to an imported skin
set | sets a parser property

Template variables overview...

# Templatevar: karma

Inserts karma votes data. Karma votes are a method to vote the 'karma' of an item. With a single click, the visitor can vote either positive or negative. The total of all these votes gives an idea of how much an item is liked by the visitors

## Arguments

Optional:

- what: Choose a type of information to be displayed:
  - totalscore: the total karma vote score (=amount of positive votes minus the amount of negative votes) (default)
  - pos: total number of positive votes
  - neg: total number of negative votes
  - votes: total number of votes
  - posp: percentage of votes that is positive
  - negp: percentage of votes that is negative

## Examples

    <%karma(posp)%> out of <%votes%> were positive

# Templatevar: templateitemtitle

On comments-releated templateparts, inserts the title of the associated item.

## Arguments

Optional:

- maxlength: When provided, makes the itemtitle behave like the syndicate_title templatevar.

# Templatevar: author

Inserts the name of the author

## Arguments

Optional:

- what: Choose a type of information to be displayed:
  - name: display name (default)
  - realname: the real name of the author instead of the display name
  - id: BLOG:CMS membet ID
  - url: URL of members website
  - email: email address of member (use of this one should be avoided)

## Examples

    <%author%>
    <%author(realname)%>
    <a href="<%author(url)%>"><%author%></a>

# Templatevar: smartbody

Examines the current item and then decides to show either the body text or the expanded text.

When the extended part is empty, the body part is chosen. Otherwise the extended part is shown.

Part | Empty?
--- | ---
Body | No | No
| Extended | Yes | No | smartbody= | body part | extended part

## Example use

The body text could be interpreted as your full text, and the extended part could be interpreted as an 'introduction' or 'exerpt', which you want to show on the front page.

In the template used on the front page, you would use `<%smartbody%>` to insert an excerpt (if there is one), or the full text (if no excerpt). In the template for detailed items, `<%body%>` can then be used instead of the usual `<%body%>` + `<%more%>`, since `<%body%>` will contain the full item anyway.

# Templatevar: morelink

Inserts a link to the detail page for the item, as defined in the template (link to extended entry). This is empty when there is no extended part.

Note that the contents of the 'link to extended entry' templatepart is also parsed and can thus also contain templatevariables.

# Templatevar: date

Inserts a date using the date format specified in the template. Optionally, a custom date format can be given as a parameter.

## Arguments

Optional

- format: format to be used to format the date

## Specials

Four special parameters are possible:

1. `rfc822`: RFC822 date in local time
2. `rfc822GMT`: RFC date in GMT time
3. `iso8601`: ISO-8601 date (W3C Date and Time Format profile). Example: 2002-10-02T10:00:00-05:00
4. `utc`: Same as iso8601, but the date is expressed in UTC, using a "Z" for the timezone indicator.

## Examples

    <%date%>
    <%date(%x)%>
    <%date(rfc822)%>
    <%date(rfc822GMT)%>

# Templatevar: time

Inserts a time using the time format specified in the template. Optionally, a custom time format can be given as a parameter.

## Arguments

Optional

- format: format to be used to format the time

## Examples

    <%time%>
    <%time(%X)%>

# Templatevar: comments

Inserts a comments 'block'. More information about the structure of this block.

## Arguments

Optional:

Name | Contents
--- | ---
MaxToShow | Amount of comments to show (when set, this overrides the max. comments blogsetting)

## Examples

    <%comments%>
    <%comments(5)%>

# Templatevar: syndicate_title

Inserts the title of the item, with HTML tags-stripped off, and shortened to 100 characters. When the text needs to be shortened, "..." is added at the end of the text.

This variable was originally intended for use in the XML-RSS skin that comes with BLOG:CMS, but can also be of use in other situations.

## Arguments

- Optional:

  Name | Contents
  --- | ---
  MaxChars | Maximum amount of characters to keep (defaults to 100)

## Examples

    <%syndicate_title%>
    <%syndicate_title(25)%>

# Templatevar: syndicate_description

Inserts the body of the item, with HTML tags-stripped off, and shortened to 250 characters. When the text needs to be shortened, "..." is added at the end of the text.

This variable was originally intended for use in the XML-RSS skin that comes with BLOG:CMS, but can also be of use in other situations.

## Arguments

- Optional:

  Name | Contents
  --- | ---
  MaxChars | Maximum amount of characters to keep (defaults to 250)

## Examples

    <%syndicate_description%>
    <%syndicate_description(25)%>

# Templatevar: image

Inserts an inline image into an item body or template.

In normal use, the image-templatevar is generated automatically when adding images through the media library. You can call it from within templates too, though. Note that in this last case, the image will come out of the media dir of the current item's author.

## Arguments

- Required:

  Name | Contents
  --- | ---
  filename | Name of the image file (file gets)
  width | Width of the image (pixels or percentage)
  height | Height of the image
  text | alt-text for the image

- Note: for the image, popup and media tags, the parameters must be separated by the '|' character, not by a comma!

## Examples

    <%image(myphoto.jpg|100|200|this is me)%>
    <%image(myphoto.jpg|50%|50%|this is me, but smaller)%>

# Templatevar: popup

Inserts a popup image into an item body or template.

In normal use, the popup-templatevar is generated automatically when adding images through the media library. You can call it from within templates too, though. Note that in this last case, the image will come out of the media dir of the current item's author.

## Arguments

- Required:

  Name | Contents
  --- | ---
  filename | Name of the image file (file gets)
  width | Width of the image (pixels or percentage)
  height | Height of the image
  text | alt-text for the image

- Note: for the image, popup and media tags, the parameters must be separated by the '|' character, not by a comma!

## Examples

    <%popup(myphoto.jpg|100|200|this is me)%>
    <%popup(myphoto.jpg|50%|50%|this is me, but smaller)%>

# Templatevar: media

Inserts a media object into an item body or template.

In normal use, the media-templatevar is generated automatically when adding images through the media library. You can call it from within templates too, though. Note that in this last case, the object will come out of the media dir of the current item's author.

## Arguments

- Required:

  Name | Contents
  --- | ---
  filename | Name of the image file (file gets)
  text | descriptive text for the media object

- Note: for the image, popup and media tags, the parameters must be separated by the '|' character, not by a comma!

## Examples

    <%media(mysong.mp3|listen to my new song)%>

# Templatevar: edit

From within your template, you can add an 'edit item' link by using this template variable. By default, it will link to a popup-bookmarklet-window, but that behaviour can be changed through the editlink template.

Note: only logged in members that are allowed to edit the item will see this link. In other cases, the edit-templatevar does nothing at all.

## Example

An example for the item body template

    <h1><%title%></h1>
    <p><%body%> <%morelink%></p>
    <div class="metadata">
    	<%edit%> <%comments%>
    </div>

## Results in

#### Title

This is an item

edit - 5 comments

# Templatevar: editlink

Insert a link to the 'edit item' bookmarklet. This can be used in the editlink template for simplicity.

## Example

The 'edit link'-template could look like this:

    <a href="<%editlink%>"
       onclick="<%editpopupcode%>">edit</a> -

# Templatevar: editpopupcode

To open a popup window for the 'edit link' window, you'll need to add some javascript code to your link. To avoid having to enter this code in the 'edit link'-template, you can insert it using the editpopupcode-templatevar.

## Example

See the example for the editlink templatevar

# Plugins

BLOG:CMS allows you to install custom plugins, adding extra functionality. Plugins can do different things:

1. Act as a skin variable
2. Act as a template variable
3. Hook into events generated by BLOG:CMS. The 'move up' and 'move down' links in 'manage plugins' screen can be used to define the order in which plugins will be called when such an event occurs. The first plugin in the list will be called first, the last one will be called last.
4. Act as actors when called through `action.php`

Note that the responsibility for plugins is entirely with the plugin author. He should make sure that everything works fine.

# Parser Properties

The available parser options are described below.

Parser properties
Option Name | Values
--- | ---
IncludeMode | normal: normal behaviour; included files are taken relative to the directory/url of the .php file generating the page. skindir: included files are taken relative to the skindir/skinurl This property affects the following skinvars: include, phpinclude, parsedinclude, nucleusbutton
IncludePrefix | This property is a prefix that get's added in front of each filename you want to include. For example, if the prefix is `base/` and you want to include `somefile.txt`, you'll end up including `base/somefile.txt` This property is intended to be used in conjunction with the IncludeMode property. This way, a skin imported to `skindir/somename/` can set `IncludeMode` to `skindir` and `IncludePrefix` to `somename/` This property affects the following skinvars: include, phpinclude, parsedinclude, nucleusbutton

The `IncludePrefix` and `IncludeMode` properties can be set globally for a skin in the general settings of a skin. Also note that from the moment a property is set, it applies to all parsed data, thus also for templates.