Please hold on while the page is being downloaded (about 100KB).
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.
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.
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.
The Autosave function saves an item as a draft after 10 minutes editing. It should avoid that unsaved changes get lost. It is usefull for users that work for a long time on an item and often forget to save their work.
If you want to invoke Autosave before the 10 minutes are past, you can press the 'Auto save now' button at the end of the form.
The Autosave function can be enabled and disabled in the member options.
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.
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.
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(); ?>
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)
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.
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.
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.
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.
Nucleus 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 administrators have the following extra rights:
A blog can have multiple admins, but there must be at least one admin at all times.
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.
This is the blog that will be used when no other blog has been specified in the request.
The option tells Nucleus 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.
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:
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.
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.
You can setup Nucleus 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
You can choose a language to be used when nucleus creates content for you. The content generated by Nucleus 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)
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.
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.
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.
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.
It's possible to disable your entire Nucleus 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 ;-))
Using this option, you can switch between URL styles:
http://host/index.php?itemid=1234
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)
(3.40) Using this option, you can set the default size of lists in the Admin Area. Value should be an integer. 10 is a good default for most users.
(3.40) Using this option, you can set whether unresolved Vars (SkinVars, TemplateVars, ItemVars) are shown on the blog. Default is No
.
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.
Within these template, a series of so called template variables can be used to insert item data.
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:
There are three possible structures for a comments block.
comments header comments body (repeated) comments footer
no comments
too much comments
Inside these template-parts, some comments-related variables are available
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
Header:
<ul>
Body:
<li><%user%>: <%body%></li>
Footer
</ul>
Result
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.
<a href="<%itemlink%>">[Read More!]</a>
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.
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, self, catiscurrent, and currentcat 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 |
catiscurrent | yes if category is currently selected, no if it is not. Useful to style current category. |
currentcat | Synonym of catiscurrent |
<ul>
<li><a href="<blogurl%>">All</a></li>
<li><a href="<%catlink%>"><%catname%></a></li>
</ul>
The blog lists are formatted as listed below:
bloglist header bloglist listitem (repeated) bloglist footer
Available variables in list item field:
Name | Description |
---|---|
bloglink | URL of the blog (as generated by createBlogIdLink() function) |
blogurl | URL of the blog (as defined in blogsettings) |
blogdesc | Description of the blog |
blogname | Name of the blog (either full or short, depending on skinvar parameter). |
Available variables in header and footer fields:
Name | Description |
---|---|
siteurl | URL of the site (as defined in global settings) |
sitename | Name of the site (as defined in global settings). |
<ul>
<li><a href="<siteurl%>"><sitename%></a></li>
<li><a href="<%bloglink%>"><%blogname%></a></li>
</ul>
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 Nucleus is running on. Some possible values are
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
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.
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>
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".
<span style='background-color:yellow'>\0</span>
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 |
No search results found for <b><%query%></b>
This is the part of the template used to display a single comment. In this template-part, comments-related templatevars are available.
<h2>Comment by <%userlink%>:</h2>
<p><%body%></p>
<div class="metadata">
(from <%host%> on <%date%> at <%time%>)
</div>
Result:
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
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) |
link | direct link to the image (URL) |
media | a non-popup A-tag to the image, ready to use. |
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 | an A-tag to the image, ready to use. |
Name | Description |
---|---|
media | an A-tag, ready to use |
link | direct link to the file (URL) |
text | the alternate text (link text) |
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.
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>
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.
This template defines how the edit-templatevar will be marked up. You can use any of the template variables here.
<a href="<%editlink%>"
onclick="<%editpopupcode%>">edit</a>
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.
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.
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
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
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.
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.
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.
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>
This skinpart is used to show special, non-blog, content on your site. It can be used to show static content, or to wrap other
dynamic applications, like forms, inside the skin of your blog. It is accessed by the name of the special skin part, in this way
(assuming the special skin part is named fred
):
http://www.yoursite.tld/index.php?special=fred
Further discussion of the use of this feature can be found on the support forum: Nucleus 3.31 and Static Pages
Very basic buildup for a special skin part:
<html> <head> <title>My Weblog</title> </head> <body> <h1>About My Site</h1> <p>This page was published in order to provide a platform to publicize the plight of the peeping-polly parrot whose present prognosis is perturbingly pessimistic.</p> </body> </html>
This will show the text of the body as indicated above. Also, many SkinVars work on special pages, so you can make the page look just like the other pages and use SkinVars to show an index of the whole site, or a list of members, etc...
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.
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.
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
When updating your weblog, you can choose to send an update notification (ping) to various weblog listing services. They 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.
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'
By default, Nucleus 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.
Nucleus allows you to upload media files (images, video, sound, ...) to your website
Some settings are needed to do this:
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.
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.
This setting is the base URL for plugin admin areas. Usually it will look like the following
http://hostname.com/nucleus/plugins/
This setting is the base URL for the Nucleus skins directory. Usually it will look like the following
http://hostname.com/skins/
This setting is the absolute URL of the action.php
script that comes with Nucleus. Usually it will look like the following
http://hostname.com/actions.php
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:
Usually, these tags are inserted by the 'insert media' button in the JavaScript toolbar
Inserts the refering URL (can be empty)
None
all
<a href="<%referer%>">back</a>
Inserts the ID of the currently selected item
None
item
<%itemid%>
Adds a permanent link for the item.
Optional
<a href...
tag will be outputted, rather than a raw linkitem
<%itemlink%>
Inserts the title of the item, with HTML-stripped off and entities encoded
None
item
<%itemtitle%>
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
Name | Value |
---|---|
Locale | Locale in which the date must be formatted |
Format | Date format (strftime variables) |
archive
Archive for <%archivedate%> Archive for <%archivedate(dutch)%> Archive for <%archivedate(en,%B %Y)%>
Inserts the most recently added items of the currently active blog (usually the default one) into the skin.
Required:
10(5)
shows 10 items starting from item 5index, item, archive, archivelist, search
<%blog(default,15)%> <%blog(default,5(15))%> <%blog(mytemplate)%> <%blog(mytemplate,5,mycategory)%>
Shows a list of all blogs that are defined in your Nucles CMS.
Required:
name
) or the Short Blog Name (shortname
) of the Blog is used. Default setting is the Blog name (name
).number
, name
, shortname
, description
. Default is number
.asc
for ascending order, or desc
for descending order. Default is asc
.
all
<%bloglist(default/index)%> <%bloglist(default/index,name)%> <%bloglist(default/index,shortname)%> <%bloglist(default/index,name,name,asc)%>
Inserts the most recently added items of a given blog into the skin.
Required:
10(5)
shows 10 items starting from item 5all
<%otherblog(myblog,default,15)%> <%otherblog(yourblog,mytemplate)%> <%otherblog(yourblog,mytemplate,15,mycategory)%> <%otherblog(yourblog,mytemplate,5(15),mycategory)%>
Shows the currently selected item (without comments) using a given template
item
<%item(mytemplate)%>
Shows the comments for the currently selected item using a given template.
item
<%comments(mytemplate)%>
Shows the archive for the selected month and the selected blog (usually the default one), using a given template
Required
archive
<%archive(mytemplate)%> <%archive(mytemplate,mycategory)%>
Shows the archive for the selected month, using the given blog and template
Required
archive
<%otherarchive(myblog,mytemplate)%> <%otherarchive(myblog,mytemplate,mycategory)%>
Shows the list of available archives for the currently selected blog (usually the default one), using a given template
Required
index, archive, archivelist, search, item
The same as the archivelist skinvar, but shows an entry for each day instead of for each month
Required
index, archive, archivelist, search, item
<%archivedaylist(mytemplate)%> <%archivedaylist(mytemplate,mycategory)%>
The same as the otherarchivelist skinvar, but shows an entry for each day instead of for each month
Required
all
<%otherarchivedaylist(yourblog,mytemplate)%> <%otherarchivedaylist(yourblog,mytemplate,mycategory)%>
The same as the archivelist skinvar, but shows an entry for each year instead of for each month
Required
index, archive, archivelist, search, item
<%archiveyearlist(mytemplate)%> <%archiveyearlist(mytemplate,mycategory)%>
The same as the otherarchivelist skinvar, but shows an entry for each year instead of for each month
Required
all
<%otherarchiveyearlist(yourblog,mytemplate)%> <%otherarchiveyearlist(yourblog,mytemplate,mycategory)%>
Shows the list of available archives for a given blog, using a given template
Required
all
<%otherarchivelist(yourblog,mytemplate)%> <%otherarchivelist(yourblog,mytemplate,mycategory)%>
Inserts a list of categories for a blog (defaults to the currently selected blog), using a given template
Required
index, archive, archivelist, search, item, [error, member, special if blogname parameter specified]
<%categorylist(mytemplate)%> <%categorylist(mytemplate,myweblog)%>
Inserts some information about the currently selected category. When no category is selected, does nothing.
Optional
all
<%category%> <%category(id)%> <%category(desc)%> <%category(name)%>
Deprecated as of Nucleus v2.0. Use <%if(category)%> instead.
None
all
<%ifcat(Current Category: )%><%category%>
Shows the searchresult for the current query
Required:
search
<%searchresults(mytemplate)%>
Shows the searchresult in a give blog for the current query, using the given template
Required:
search
<%othersearchresults(myblog,mytemplate)%>
Inserts the current Nucleus version.
None
all
<%version%>
Inserts the character set encoding used by the current language file.
None
all
<%charset%>
Inserts the ID of the previous item in the blog
None
item
<%previtem%>
Inserts the ID of the next item in the blog
None
item
<%nextitem%>
Inserts the title of the next item in the blog
None
item
<%nextitemtitle%>
Inserts the title of the previous item in the blog
None
item
<%previtemtitle%>
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.
YYYY-MM-DD
YYYY-MM
None
archive
<a href="index.php?archive=<%prevarchive%>>....
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.
YYYY-MM-DD
YYYY-MM
None
archive
<a href="index.php?archive=<%nextarchive%>>....
Either day or month, indicating which type of archive is currently being shown
None
archive
Inserts a link to the main page of the weblog. Takes into account the currently selected blog and category.
Optional
<a href...
tag will be outputted, rather than a raw linkall
<%todaylink%>
Inserts a link to the archive for the currently selected blog and category (or the default blog when no blog selected)
Optional
<a href...
tag will be outputted, rather than a raw linkall
<%archivelink%>
Inserts a link to the next item (on item pages) or to the next archive (on archive pages)
Optional
<a href...
tag will be outputted, rather than a raw linkitem, archive, search, index
<%nextlink%> <%nextlink(Next Page,10)%> <%nextlink(,10)%> <%nextlink(,10,yes)%>
Inserts a link to the previous item (on item pages) or to the previous archive (on archive pages). For search and index pages
Optional
<a href...
tag will be outputted, rather than a raw linkitem, archive, search, index
<%prevlink%>
Inserts the message corresponding to the error that occurred
None
error
<%errormessage%>
This skinvar is deprecated since Nucleus v2.0. You should use <%image(caption)%>
instead
Inserts the caption text for a popup image
None
imagepopup
<%imagetext%>
Inserts the selected image (for popup images)
Optional
imgtag (default) | Full XHTML <img ... /> tag |
url | Image file URL |
width | image width |
height | image height |
caption | image caption (text to go with image) |
imagepopup
<%image%>
This skinvar is deprecated since Nucleus 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" />
None
item
Includes a site variable
all
<%sitevar(name)%> <%sitevar(url)%> <a href="mailto:<%sitevar(email)%>">Admin</a>
Inserts a setting specific to the currently selected blog (usually the default one)
index, archive, archivelist, search, item, member
<%blogsetting(name)%> <%blogsetting(id)%> <%blogsetting(desc)%> <a href="<%blogsetting(url)%>">...</a>
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
Information on the logged in member:
Information on the requested member (only available on member detail pages):
all
<%if(loggedin)%>
you are <%member(yourrealname)%>
<%endif%>
Inserts an item-preview into the page, using a given template (to be used in conjunction with additemform)
index
<%preview(mytemplate)%>
Inserts the full URL to the Admin Area
None
all
<a href="<%adminurl%>">Admin Area</a>
Shows an add-item form for the currently selected blog (usually the default one). Mostly used in conjunction with preview
None
index
<%additemform%>
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)
IncludeMode
and IncludePrefix
all
<%include(filename.txt)%> <%include(/home/user/myself/filename.txt)%> <%include(http://mydomain.com/filename.html)%>
Includes a php-file into the output. The contents of the file is parsed by the PHP parser, so be careful. Nucleus skin/templatevars are not parsed! (see parsedinclude and include for other include options).
IncludeMode
and IncludePrefix
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 Nucleus itself.all
<%phpinclude(filename.php)%>
<%phpinclude(/home/user/myself/filename.php)%>
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
Includes a file into the output. The contents of the file is parsed by the Nucleus skin/template parser, so you can use skin/templatevars. (see phpinclude and include for other include options)
IncludeMode
and IncludePrefix
<%parsedinclude(filename)%>
again. To avoid endless loops, the maximum depth level you can go is 3.all
<%parsedinclude(filename.txt)%> <%parsedinclude(/home/user/myself/filename.txt)%>
Calls a plugin
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
<%PluginName(parameters)%>
all
<%plugin(Calendar)%> <%plugin(LastComments,myweblog)%> <%LastComments(myweblog)%>
Adds a loginform, or shows a "You are karma (Log out)" message
None
all
<%loginform%>
Adds a commentform to an item page.
Optional:
item
<%commentform%> <%commentform(http://host/thanks.html)%>
Sets a parser property.
all
<%set(IncludeMode,skindir)%> <%set(IncludePrefix,somedir/)%>
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
all
<%skinfile(mystyle.css)%>
Inserts the name of the skin that's currently being used.
None
all
<%skinname%>
Inserts a content block only when certain conditions are fullfilled. Can be used in the item and comment fields of templates as of 3.60, as well as in Item bodies (same as item template fields).
Only the if
, ifnot
, elseif
, and elseifnot
skinvars have options
all
<%if(loggedin)%> Welcome back! <%else%> Welcom guest! <%endif%>
<%if(category,catname,Off Topic)%> Welcome to the 'Off Topic' category. <%endif%>
<%ifnot(loggedin)%> Access Denied! <%elseif(admin)%> Welcome O Mighty Admin of this Blog! <%elseif(onteam)%> Welcome O Worthy Blog Team Member! <%else%> Welcome O Humble Site Member! <%endif%>
If you want something to be displayed only if a condition is not fullfilled, you can use a construct like this:
<%ifnot(skintype,error)%> <%blogsetting(name)%> <%endif%>
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)
Optional:
member
<%membermailform%>
Shows a search form for the current blog.
Optional:
index, archive, archivelist, search, item
<%searchform%> <%searchform(otherweblog)%>
Inserts a nucleus button, with link to the Nucleus website.
Optional:
IncludeMode
and IncludePrefix
all
<%nucleusbutton%> <%nucleusbutton(nucleus/nucleus.gif,46,43)%>
Inserts the filename of the page currently being displayed (index.php or whatever you changed it to)
None
all
<%self%>
Inserts a URL to the new item bookmarklet form. Only shown for members who have rights on the current blog.
None
all
<dd><a href="<%addlink%>" onclick="<%addpopupcode%>" title="Add an item to your blog">Add an item</a></dd>
Inserts javascript code to open a bookmarklet in an popup window. Use with <%addlink%>
None
all
<dd><a href="<%addlink%>" onclick="<%addpopupcode%>" title="Add an item to your blog">Add an item</a></dd>
Inserts the indicated item into the skin.
Required:
all
<%sticky(11,default/index)%>
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.
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.)
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:
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 |
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 |
if-ifnot-else-elseif-elseifnot-endif | performs condition statements in templates (3.60) |
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 |
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 |
useremail | the e-mail address of the user, empty if the e-mail address was not provided by the user |
userwebsite | the URL of the users website, empty if the URL was not provided by the user |
userwebsitelink | a smart link to 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, only the name of the member will be shown) |
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 |
blogurl | URL 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 |
excerpt | the body of the comment, cut at 60 characters and appended with '...' |
timestamp | time at which comment was added |
if-ifnot-else-elseif-elseifnot-endif | performs condition statements in templates (3.60) |
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 |
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
<%karma(posp)%> out of <%karma(votes)%> were positive
On comments-releated templateparts, inserts the title of the associated item.
Inserts the name of the author
<%author%>
<%author(realname)%>
<a href="<%author(url)%>"><%author%></a>
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 |
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.
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.
Inserts a date using the date format specified in the template. Optionally, a custom date format can be given as a parameter.
Four special parameters are possible:
rfc822
: RFC822 date in local timerfc822GMT
: RFC date in GMT timeiso8601
: ISO-8601 date (W3C Date and Time Format profile). Example: 2002-10-02T10:00:00-05:00utc
: Same as iso8601, but the date is expressed in UTC, using a "Z" for the timezone indicator.<%date%> <%date(%x)%> <%date(rfc822)%> <%date(rfc822GMT)%>
Inserts a time using the time format specified in the template. Optionally, a custom time format can be given as a parameter.
<%time%> <%time(%X)%>
Inserts a comments 'block'. More information about the structure of this block.
Optional:
Name | Contents |
---|---|
MaxToShow | Amount of comments to show (when set, this overrides the max. comments blogsetting) |
<%comments%> <%comments(5)%>
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 Nucleus, but can also be of use in other situations.
Optional:
Name | Contents |
---|---|
MaxChars | Maximum amount of characters to keep (defaults to 100) |
<%syndicate_title%> <%syndicate_title(25)%>
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 Nucleus, but can also be of use in other situations.
Optional:
Name | Contents |
---|---|
MaxChars | Maximum amount of characters to keep (defaults to 250) |
<%syndicate_description%> <%syndicate_description(25)%>
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.
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 |
<%image(myphoto.jpg|100|200|this is me)%> <%image(myphoto.jpg|50%|50%|this is me, but smaller)%>
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.
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 |
<%popup(myphoto.jpg|100|200|this is me)%> <%popup(myphoto.jpg|50%|50%|this is me, but smaller)%>
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.
Required:
Name | Contents |
---|---|
filename | Name of the image file (file gets) |
text | descriptive text for the media object |
<%media(mysong.mp3|listen to my new song)%>
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.
An example for the item body template
<h1><%title%></h1>
<p><%body%> <%morelink%></p>
<div class="metadata">
<%edit%> <%comments%>
</div>
Insert a link to the 'edit item' bookmarklet. This can be used in the editlink template for simplicity.
The 'edit link'-template could look like this:
<a href="<%editlink%>" onclick="<%editpopupcode%>">edit</a> -
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.
See the example for the editlink templatevar
Nucleus allows you to install custom plugins, adding extra functionality. Plugins can do different things:
Note that the responsibility for plugins is entirely with the plugin author. He should make sure that everything works fine.
There are two main repositories where you can find plugins for Nucleus CMS:
Neither or these repositories is entirely complete. You will find some plugins in one, but not in the other, and vice versa. Do not be scared off of one or the other on account of language, as there are a few free translation services on the Internet that will help you get by.
Another resource that will help you while working with plugins is the search function at the support forum. You will even find some smaller plugins on the forum that never made it to the wiki.
The available parser options are described below.
Option Name | Values |
---|---|
IncludeMode |
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.