O


online

Plugin type

Block type

Importance

**

Synopsis
#online
&online;
Description

Display the approximate number of the current visitors to the wiki.

The visitors are determined by recording the IP addresses and timestamps, and counting the number of unique accesses within the past 5 minutes (by default).

Constants

  • PLUGIN_ONLINE_TIMEOUT - timeout threshold (in seconds)
  • PLUGIN_ONLINE_USER_LIST - the file name storing visitor info
  • PLUGIN_ONLINE_LIST_REGEX - the regular expression for recording visitors
Note

The visitors are counted throughout the entire wiki, not per page, so it makes more sense to place this plugin in the MenuBar, the skin, etc.



P


paint

Plugin type

Block type

Importance

*

Synopsis
#paint( [width][, height )
Description

Upload and display the image drawn by the Java applet. This plugin requires BBSPainter.jar distributed at this website. (The site is written in Japanese only. Just look for the link to bbspainter_120.zip and download it. Put the BBSPainter.jar file in the directory where PukiWiki is installed.)
width and height are the default campus size. By default, (80,60) is used.

Constatns

  • PAINT_INSERT_INS - whether to insert the image at the top or bottom
  • PAINT_DEFAULT_WIDTH - the default width of the campus
  • PAINT_DEFAULT_HEIGHT - the default height of the campus
  • PAINT_MAX_WIDTH - the maximum width of the campus
  • PAINT_MAX_HEIGHT - the maximum height of the campus
  • PAINT_APPLET_WIDTH - the width of the Applet
  • PAINT_APPLET_HEIGHT - the height of the Applet
  • PAINT_NAME_FORMAT - the format of the name form
  • PAINT_MSG_FORMAT - the format of the comment form
  • PAINT_NOW_FORMAT - the format of timestamp
  • PAINT_FORMAT - the format with messages
  • PAINT_FORMAT_NOMSG - the format without message
Note

Put the BBSPainter.jar file in the directory where PukiWiki is installed. Otherwise this plugin does not work.

pcomment

Plugin type

(Command type)

Block type

Importance

***

Synopsis
#pcomment({[ CommentPage], [num_items], [noname], [nodate], [above], [below], [reply]} )
Description

Record comments on a separate page. It can display only the recent comments on the place the plugin is placed, or it can display a radio button to specify where to display the comment.

Parameters

CommentPage - the page to record comments. If omitted, the page specified by the PLUGIN_PCOMMENT_PAGE constant is used. The default value is [Comment/(current page name)]. If the specified page does not exist, it will be created when the first comment is posted.

num_items - the number of top-level items to be displayed. If omitted, the default value specified by the PLUGIN_PCOMMENT_NUM_COMMENTS constant is used. This parameter must be placed after the comment page name. If you don't want to specify CommentPage?, just put a camma before num_items (e.g., #pcomment(,15))

noname,nodate,above,below,reply - parameters to specify how to enter/display the comments

  • noname - Do not display the name input form
  • nodate - Do not display the timestamp
  • above - Display the comments above the form, in the chronological order (the oldest at the top)
  • below - Display the comments below the form, in the reverse chronological order (the newest at the top)
  • reply - Display radio buttons to specify which comment to reply to
Constants

  • PLUGIN_PCOMMENT_PAGE - the default comment page name (%s is replaced by the value of $vars['page'])
  • PLUGIN_PCOMMENT_NUM_COMMENTS - the default number of recent comments to be displayed
  • PLUGIN_PCOMMENT_SIZE_NAME - the width of the name form
  • PLUGIN_PCOMMENT_SIZE_MSG - the width of the comment form
  • PLUGIN_PCOMMENT_DIRECTION_DEFAULT - whether to display the posted comments abov or below the form
  • PLUGIN_PCOMMENT_FORMAT_NAME - the format of the name form
  • PLUGIN_PCOMMENT_FORMAT_MSG - the format of the comment form
  • PLUGIN_PCOMMENT_FORMAT_NOW - the format of the timestamp
  • PLUGIN_PCOMMENT_FORMAT_STRING - the format of the entire comment
  • PLUGIN_PCOMMENT_AUTO_LOG - the number of comments per page when recording old comments (setting this value to 0 will disable the logging.)
  • PLUGIN_PCOMMENT_TIMESTAMP - whether to keep the timestamp of the comment page unchanged and instead update the page where the plugin is placed
Note

When there is a conflict (i.e., multiple comments were posted at the same time), the comment is displayed at the top or at the bottom (according to the setting) even if the radio button is checked. This is to prevent the comment from being inserted to a strange place.

When a comment is posted, the plugin displays the message indicating that the page where the plugin is placed has been updated. However, it is the comment page that has been actually updated.

Since the page containing #pcomment is not updated, it doesn't show up on the "recent changes" page.

Avoid using a relative reference (e.g. [ [../] ]) in comments, as it may not be converted as expected. (Keep in mind that the page in which you are writing comment is different from the page that will display it.)

The logging of the old comments is invoked when the number of comments reached to (PLUGIN_PCOMMENT_AUTO_LOG + PLUGIN_PCOMMENT_NUM_COMMENTS).


popular

Plugin type

Block type

Importance

**

Synopsis

#popular( [[num_pages][,[ ExcludedPage?][, true| false] ]] )

Description

The list of frequently visited pages

Parameters

num_pages - the number of pages to be displayed. The default value is defined as the PLUGIN_POPULAR_DEFAULT constant.

ExcludedPage? - the regular expression that definees the pages which should be excluded from the list. The typical examples are FrontPage, MenuBar, etc.

true, false - whether to use the number of today's visitors only. The default is false.

  • true - use the number of visitors of today only
  • false - use the total number of visitors
Constants

  • PLUGIN_POPULAR_DEFAULT - the default number of pages to be displayed
Note

Since this plugin depends on the information recorded by the counter plugin, the page without the counter plugin is excluded from the list. A simple way to ensure that all pages are counted is to put the plugin in the Menubar or the skin.



R


random

Plugin type

(Command type)

Block type

Importance

*

Synopsis

#random( [ string] )

Description

Display the link to a randomly selected page.

The pages to be selected from are those under the page where the plugin is placed.

Parameters

string - the message string displayed on the link. The default value is 'press here.'

Note

When the page is reloaded, a different random link is displayed.


read

Plugin type

Command type

Importance

*****

Synopsis

?cmd=read&page=PageName?

Description

Display the specified page. If the page doesn't exist, it will be opened in the edit mode. If the page name is an InterWiki, the plugin will resolve it.

This plugin is internally used when plugin= and cmd= are not specified. Users usually don't have to use it explicitly.

Parameters

PageName? - the page name to be displayed. This must be URL-encoded.


recent

Plugin type

Block type

Importance

*****

Synopsis

#recent([ n] )

Description
Display the latest n pages among those recently updated.
Parameters

n represents the number of pages to be displayed. The default value is specified by Constatnts.

Constants

  • PLUGIN_RECENT_DEFAULT_LINES - the default number of pages
  • PLUGIN_RECENT_CACHE - the location of cache for RecentChanges
  • PLUGIN_RECENT_USAGE - the messsage for usage

ref

Plugin type

Block type

Inline type

Importance

****

Synopsis

#ref( AttachedFileName| PageName/AttachedFileName| URL[, PageName] {, [ left| center| right], [ wrap| nowrap], [ around], [ noicon], [ noimg], [ nolink], [ zoom], [ 999x999], [ 999%] } [, title] )

&ref( AttachedFileName| PageName/AttachedFileName| URL [, PageName] {, [ noicon], [ noimg], [ nolink], [ zoom], [ 999x999], [ 999%] } [, title] );

Description

Expand the attached file (uploaded by '#attach') in the line. If the file is an image file, the image is displayed in the page. Otherwise, display the link to download the file.

Parameters

添付ファイル名にはページに添付したファイル名を指定します(省略時はエラーとなります)。別PageName?/添付ファイル名とする事で別ページの添付ファイルも指定できます。

PageName?にはファイルを添付したページをWikiNameかBracketNameで指定します。このオプションは最初(添付ファイル名の次)に記述してください。省略時は設置したページです。

パラメータにはファイルの展開方法を指定できます。

  • left|center|right - 表示時の位置を指定します。省略時はleft(変更可)です。
  • wrap|nowrap - テーブルタグで囲む/囲まないの指定を行います。省略時はnowrap(変更可)です。
  • around - テキストの回り込みを可能とします。省略時は回り込みを行いません。
  • noicon - ファイルが画像以外の場合に表示されるアイコンを表示しません。省略時は表示します。
  • noimg - ファイルが画像の場合に画像を展開しないようにします。省略時は展開します。
  • nolink - 元ファイルへのリンクを張らないようにします。省略時はリンクします。
  • zoom - 縦横比を保持します。省略時はサイズ指定に従います。
  • 999x999 - サイズを指定します(幅x高さ)。省略時は拡大率あるいは対象画像のサイズに従います。
  • 999% - サイズを指定(拡大率)します。省略時は100%です、 タイトル - 上記以外のパラメータは画像の代替文字列、リンクのタイトル属性として使用されます。PageName?やパラメータに見える文字列を使用するときは、#ref(hoge.png,,zoom)のようにタイトルの前にカンマを余分に入れます。
Constants

  • PLUGIN_REF_USAGE Parameters未指定時に表示されるヘルプ
  • PLUGIN_REF_IMAGE マッチ時に指定ファイルを画像とみなす正規表現
  • FILE_ICON アイコンイメージのファイル
  • PLUGIN_REF_DEFAULT_ALIGN left,center,right省略時の表示位置
  • PLUGIN_REF_WRAP_TABLE wrap,nowrap省略時にテーブルタグで囲むか
  • PLUGIN_REF_URL_GET_IMAGE_SIZE URL指定時に画像サイズを取得するか
  • PLUGIN_REF_DIRECT_ACCESS 添付ファイルの画像表示で UPLOAD_DIR のデータに直接アクセスするか
Note

aroundで行った回り込み指定を解除するには clearプラグイン、あるいはimgプラグインを使用して下さい。

"ほげ"という別ページの添付ファイル"fuga.jpg"をインラインプラグイン形式で参照する場合、下記2通りの記述方法が存在します。

(1) &ref(ほげ/fuga.jpg);
(2) &ref(fuga.jpg,[[ほげ]]);

上記2通りの記述のうち、(2)の記述方式は旧バージョンと互換性を維持するために用意されたもので、推奨される記述方式は(1)です。 いずれの記述方法であっても一般的な動作は同じですが、いわゆるバナー画像のように表示した画像が別ページへのリンクとなるよう以下の指定をした場合、

(1)  [[&ref(ほげ/fuga.jpg,nolink,ウェブ名);>ウェブのURL]] 
(2)  [[&ref(fuga.jpg,[[ほげ]],nolink,ウェブ名);>ウェブのURL]]

(1)の記述方法は期待通りの動作をしますが、(2)の記述方法ではうまくリンクされません。 また、ほげというページに添付された画像を、そのページ内でパラメータを指定して(例えば半分の比率で)表示する場合、

(3)  &ref(./fuga.jpg,50%);
(4)  &ref(ほげ/fuga.jpg,50%);
(5)  &ref(fuga.jpg,[[ほげ]],50%);
(6)  &ref(fuga.jpg,50%);

(3)~(5)は期待通りに同じ結果をしますが、(6)はエラーとなります。これは(6)のSynopsisが(2)の記述方式であるため、添付ファイル名fuga.jpgの次のParametersにPageName?を期待するためです。

(7)  &ref(fuga.jpg);

(7)は(6)と似た記述ですが、添付ファイル名の次のParametersが省略されているため、エラーにはなりません。



Front page   Edit Freeze Diff Backup Upload Copy Rename Reload   New List of pages Search Recent changes   Help   RSS of recent changes
Last-modified: 2008-06-03 (Tue) 03:53:25 (3851d)