splitbody.inc.php

Top > Old > Plugin > splitbody.inc.php
First Edition. 06/20/2006
Last Modified. 06/20/2006

Plugin to split sentences automatically and display them with multi columns

SummaryPlugin to split sentences automatically and display them with multi columns
Compatible VersionsVerified with Pukiwiki Plus 1.4.7plus-i18n
Developersonots
First Edition06/20/2006
LicenseGPL
Table of Contents

This page is written in both English and Japanese.

Abstract

This plugin splits sentences automatically and displays with multi columns.

This plugin splits contents considering the number of characters. The delimeters are space, return, tab characters. However, this plugin does not consider about wiki grammars, so I guess this works only when you writes natural sentences.

If you want to split at positions where you like, sky:column.inc.phpshould be better.

Related

How to use

#splitbody([Options]){{
Contents
}}

Options

  • num=Number
    • The number of columns
  • tag=div|table
    • The html tag to be used to split. Default uses div float
  • border
    • Show border at the middle of each column
  • width=Width
    • The whole width. Specify as 100% or 800px like CSS.
  • style=Style
    • Additional CSS style to be specified to each column tag

Configuration

CSS can be configured using class 'splitbody' as below.

div.splitbody {
}
div.splitbody div {
}
table.splitbody {
}
table.splitbody td {
}

Example

NOTE: 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{{
Contents
}}
// equlas to #splitbody(num=2,tag=div)

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(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)

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.


#splitbody(num=3,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.


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

#splitbody(num=3,tag=div)

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(num=3,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(num=3,tag=table,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.


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

#splitbody(num=3,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.

Download

Please remove the numbered extention, and put into plugin directory.

FileDateWhat's new
filesplitbody.inc.php06/20/2006First Edition

Compatibility Check

Please join us to check compatibilities.

Compatible

Selection Vote
PHP4 1
PHP5 0
1.3.7 0
1.4.3 0
1.4.4 0
1.4.5_1 0
1.4.6 0
1.4.7 0
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 0

Incompatible

Selection Vote
PHP4 0
PHP5 0
1.3.7 0
1.4.3 0
1.4.4 0
1.4.5_1 0
1.4.6 0
1.4.7 0
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

アイデア

  • 固定等幅フォント、固定 font-size, line-height を使えば、文字数から width, height が計算でき、縦幅をどこ(何文字目)で区切ればよいかわかるようになるかもしれない。

Comment

Please go to ./Note?