splitbody.inc.php

Top > Plugin > splitbody.inc.php
First Edition. 06/20/2006
Last Modified. 02/25/2007

文章を分割し、マルチカラムで表示するプラグイン

Table of Contents

概要

文章を分割しマルチカラムで表示することができます。複数行プラグイン形式を有効にしておいてください。

書式

#splitbody([オプション]){{
内容
#split
内容
}}

または

#splitbody([オプション]){{
#split([オプション])
内容
#split([オプション])
内容
}}

#split で分割位置を指定します。#split のオプションは次に続く領域に対してはたらしきます。 第一 #split はオプションを使用しないならば省略することもできます。

#splitbody オプション

  • tag=div|table
    • 使用する HTML タグ。デフォルトは table 式。
  • border
    • 各分割領域の間に線を表示する
  • width=幅
    • 全体の幅. 100% や 800px のように指定。
  • style=CSSスタイル
    • 全分割領域に使用される追加CSSスタイル。

#split オプション

  • width=幅
    • 続く領域の幅を 60% のように指定。デフォルトは等分割

#splitbody{{
The New Orleans Mint operated as a branch of the United States Mint from 1838 to 1861 and from 1879 to 1909. 
#split
General of the Army Dwight D. Eisenhower gives the order of the day, 
}}

The New Orleans Mint operated as a branch of the United States Mint from 1838 to 1861 and from 1879 to 1909.

General of the Army Dwight D. Eisenhower gives the order of the day,


#splitbody{{
#split(width=60%)
The New Orleans Mint operated as a branch of the United States Mint from 1838 to 1861 and from 1879 to 1909. 
#split(width=40%)
General of the Army Dwight D. Eisenhower gives the order of the day, 
}}

The New Orleans Mint operated as a branch of the United States Mint from 1838 to 1861 and from 1879 to 1909.

General of the Army Dwight D. Eisenhower gives the order of the day,

Download

Save from right-click, and put into plugin directory.

splitbody.inc.php

What's new viewcvs

Compatibility Check

Please join us to check compatibilities.

Compatible

Selection Vote
PHP4 9
PHP5 2
1.3.7 0
1.4.3 0
1.4.4 0
1.4.5_1 0
1.4.6 1
1.4.7 5
1.4.5plus-eucjp 0
1.4.6plus-u1-eucjp 0
1.4.6plus-u2-eucjp 0
1.4.5plus-u2-i18n 0
1.4.6plus-u1-i18n 0
1.4.6plus-u2-i18n 0
1.4.7plus-i18n 1
1.4.7plus-u2-i18n 3

Incompatible

Selection Vote
PHP4 0
PHP5 1
1.3.7 0
1.4.3 0
1.4.4 0
1.4.5_1 0
1.4.6 0
1.4.7 2
1.4.5plus-eucjp 0
1.4.6plus-u1-eucjp 0
1.4.6plus-u2-eucjp 0
1.4.5plus-u2-i18n 0
1.4.6plus-u1-i18n 0
1.4.6plus-u2-i18n 0
1.4.7plus-i18n 0
1.4.7plus-u2-i18n 0

技術的詳細

CSSデフォルト設定

必要ならば css クラス splitbody を利用してデフォルトの css スタイルを設定できます。

svn:plugin/splitbody.css

Related

Background

画面分割プラグインはいくつかありますが、複数行プラグイン形式で指定できるものがないので作成し直しました。

従来の

#block
内容
#block(next)
内容
#block(end)

のような形式では、#block(end) を忘れたら表示がおかしくなります。 複数行プラグインの形式を用いて、1つのプラグイン呼び出しで完結できるのがより好ましい形であると思います。

また、div float 形式で分割するものが多いようですが、例で示しているように、動作的には table 版のほうがより好ましい表示になります。table は表組のためにのみ使用すべきだ、という考えで div float 形式を用いるわけですが、そもそもレイアウト用タグが用意されていない現在のHTMLがおかしいという考え方もあり、プラグインという万人が使用する枠組みにおいて強制するほど意味のあるこだわりではないと考えて、デフォルトを table タグにしています。

元々は昔ボツにした ../Old/splitbody.inc.php? -- 2006-06-20 自動分割マルチカラムプラグインの微修正です。やはり自動は無理がありました。今まで修正してこなかったのは、特に自分で使用する用事が思い当たらなかったからです (^-^ -- 2007-02-25

動作詳細

This should be affected by the skin of pukiwiki itself whether it is using div float style or table style. Furthermore, this should affected by kinds of browsers. Please make sure with many browsers by doing narrowing or spreading browser window. By the way, the skin of this site is using div float style. I can not help you because this problems are because of browsers.


In the case of div float sytle, rounding happens after narrowing window size on IE, Firefox, Opera. This means rounding happens if there are long URL or big images.

#splitbody(tag=div){{
Contents
#split
Contents
}}

Cited from http://en.wikipedia.org/wiki/Wiki . A wiki (IPA: [ˈwiː.kiː] <wee-kee> or [ˈwɪ.kiː] <wick-ey>[1]) is a type of website that allows users to add, remove, or otherwise edit and change all content very quickly and easily, sometimes without the need for registration. This ease of interaction and operation makes a wiki an effective tool for collaborative writing.

The term wiki can also refer to the collaborative software itself (wiki engine) that facilitates the operation of such a website (see wiki software), or to certain specific wiki sites, including the computer science site (and original wiki), WikiWikiWeb, and the online encyclopedia Wikipedia.


Above will be like this after narrowing window size.

#splitbody(tag=div,width=200px)

Cited from http://en.wikipedia.org/wiki/Wiki . A wiki (IPA: [ˈwiː.kiː] <wee-kee> or [ˈwɪ.kiː] <wick-ey>[1]) is a type of website that allows users to add, remove, or otherwise edit and change all content very quickly and easily, sometimes without the need for registration. This ease of interaction and operation makes a wiki an effective tool for collaborative writing.

The term wiki can also refer to the collaborative software itself (wiki engine) that facilitates the operation of such a website (see wiki software), or to certain specific wiki sites, including the computer science site (and original wiki), WikiWikiWeb, and the online encyclopedia Wikipedia.


In the case of IE, line-break:strict; word-break:break-all; word-wrap:break-word; does not affect for table tag, so the long character (URL) of the left column are not broken, and only right column will be narrowed.

Same thing happens with Firefox also. Opera is cool.

#splitbody(tag=table)
// #splitbody == #splitbody(tag=table)

Cited from http://en.wikipedia.org/wiki/Wiki . A wiki (IPA: [ˈwiː.kiː] <wee-kee> or [ˈwɪ.kiː] <wick-ey>[1]) is a type of website that allows users to add, remove, or otherwise edit and change all content very quickly and easily, sometimes without the need for registration. This ease of interaction and operation makes a wiki an effective tool for collaborative writing.

The term wiki can also refer to the collaborative software itself (wiki engine) that facilitates the operation of such a website (see wiki software), or to certain specific wiki sites, including the computer science site (and original wiki), WikiWikiWeb, and the online encyclopedia Wikipedia.


Above will be like this after narrowing window size.

#splitbody(tag=table,width=200px)

Cited from http://en.wikipedia.org/wiki/Wiki . A wiki (IPA: [ˈwiː.kiː] <wee-kee> or [ˈwɪ.kiː] <wick-ey>[1]) is a type of website that allows users to add, remove, or otherwise edit and change all content very quickly and easily, sometimes without the need for registration. This ease of interaction and operation makes a wiki an effective tool for collaborative writing.

The term wiki can also refer to the collaborative software itself (wiki engine) that facilitates the operation of such a website (see wiki software), or to certain specific wiki sites, including the computer science site (and original wiki), WikiWikiWeb, and the online encyclopedia Wikipedia.


Split into 3 columns.

#splitbody(tag=table){{
Contents
#split
Contents
#split
Contents
}}

Cited from http://en.wikipedia.org/wiki/Wiki . A wiki (IPA: [ˈwiː.kiː] <wee-kee> or [ˈwɪ.kiː] <wick-ey>[1]) is a type of website that allows users to add, remove, or otherwise edit and change all content very quickly and easily, sometimes without the need for registration.

This ease of interaction and operation makes a wiki an effective tool for collaborative writing.

The term wiki can also refer to the collaborative software itself (wiki engine) that facilitates the operation of such a website (see wiki software), or to certain specific wiki sites, including the computer science site (and original wiki), WikiWikiWeb, and the online encyclopedia Wikipedia.


Rouding might happen without large enough window width compared with the case of 2 columns.

#splitbody(tag=div){{
Contents
#split
Contents
#split
Contents
}}

Cited from http://en.wikipedia.org/wiki/Wiki . A wiki (IPA: [ˈwiː.kiː] <wee-kee> or [ˈwɪ.kiː] <wick-ey>[1]) is a type of website that allows users to add, remove, or otherwise edit and change all content very quickly and easily, sometimes without the need for registration.

This ease of interaction and operation makes a wiki an effective tool for collaborative writing.

The term wiki can also refer to the collaborative software itself (wiki engine) that facilitates the operation of such a website (see wiki software), or to certain specific wiki sites, including the computer science site (and original wiki), WikiWikiWeb, and the online encyclopedia Wikipedia.


#splitbody(tag=table,border)

Cited from http://en.wikipedia.org/wiki/Wiki . A wiki (IPA: [ˈwiː.kiː] <wee-kee> or [ˈwɪ.kiː] <wick-ey>[1]) is a type of website that allows users to add, remove, or otherwise edit and change all content very quickly and easily, sometimes without the need for registration.

This ease of interaction and operation makes a wiki an effective tool for collaborative writing.

The term wiki can also refer to the collaborative software itself (wiki engine) that facilitates the operation of such a website (see wiki software), or to certain specific wiki sites, including the computer science site (and original wiki), WikiWikiWeb, and the online encyclopedia Wikipedia.


#splitbody(tag=table,style=margin:20px;padding:20px;,border)

Cited from http://en.wikipedia.org/wiki/Wiki . A wiki (IPA: [ˈwiː.kiː] <wee-kee> or [ˈwɪ.kiː] <wick-ey>[1]) is a type of website that allows users to add, remove, or otherwise edit and change all content very quickly and easily, sometimes without the need for registration.

This ease of interaction and operation makes a wiki an effective tool for collaborative writing.

The term wiki can also refer to the collaborative software itself (wiki engine) that facilitates the operation of such a website (see wiki software), or to certain specific wiki sites, including the computer science site (and original wiki), WikiWikiWeb, and the online encyclopedia Wikipedia.


This should be wierd in spite of window width. You should not use tag=div and margin, padding together.

#splitbody(tag=div,style=margin:20px;padding:20px;)

Cited from http://en.wikipedia.org/wiki/Wiki . A wiki (IPA: [ˈwiː.kiː] <wee-kee> or [ˈwɪ.kiː] <wick-ey>[1]) is a type of website that allows users to add, remove, or otherwise edit and change all content very quickly and easily, sometimes without the need for registration.

This ease of interaction and operation makes a wiki an effective tool for collaborative writing.

The term wiki can also refer to the collaborative software itself (wiki engine) that facilitates the operation of such a website (see wiki software), or to certain specific wiki sites, including the computer science site (and original wiki), WikiWikiWeb, and the online encyclopedia Wikipedia.