home home search search -  login login  | help help

Plugin_Wiki_A-G

[ HelpTop ]


align

Description
Specifies text alignments.
File
yb_plugin_wiki_align.php
Type
inline*1, block
Arguments
One of "left", "center", "right". Or else, handled as "left".
abc 
&align(right) { def "><&' }
&align(center) { ghi }
&align(left) { jkl }
mno

abc
def "><&'
ghi
jkl
mno


line1 "><&'
#align|right|>
line2 "><&'
line3
||<
#align|left|>
line4 "><&'
line5
||<
#align|center|>
line6 "><&'
line7
||<
line8

line1 "><&'

line2 "><&'
line3

line4 "><&'
line5

line6 "><&'
line7

line8

amazon

Description
Displays Amazon associate (affiliate) product link.
File
yb_plugin_wiki_amazon.php
Type
inline, block
Arguments
(none)

Copy and Paste HTML tags generated by Amazon associate. <iframe> (text + image) and <a> + <img> (text only) types are available.

#amazon||>
<iframe src="xxyy" style="width:120px;height:240px;" 
scrolling="no" marginwidth="0" marginheight="0" 
frameborder="0"></iframe>
||<
&amazon() { <iframe src="xxyy" style="width:120px;height:240px;" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe> }
#amazon||>
<a href="xxyy">book title</a>
<img src="wwzz" width="1" height="1" border="0" alt="" 
style="border:none !important; margin:0px !important;" />
||<
&amazon() { <a href="xxyy">book title</a><img src="wwzz" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> }

anchor

Description
(Internally used in outline plugin : displays a link to heading element)
File
yb_plugin_wiki_anchor.php
Type
inline
Arguments
"ID" attribute of a targetted heading element.
&anchor(1234) { Headline }

block

Description
Parses and Displays as Block Element.
File
yb_plugin_wiki_block.php
Type
block
Arguments
(none)
line1
#block||>
line2 "><&'
line3
line4
||<
line5

line1

line2 "><&'
line3
line4

line5

blockquote

Description
Displays as cited block.
File
yb_plugin_wiki_blockquote.php
Type
block
Arguments
(none)
line1
#blockquote||>
line2 "><&'
line3
line4
||<
line5

line1

line2 "><&'
line3
line4

line5

br

Description
Inserts break-line("<br />" tag).
File
yb_plugin_wiki_br.php
Type
inline, block(...nonsense?)
Arguments
(none)
| abc | def &br() ghi | jkl |

abc def
ghi
jkl

line1
#br||
line2

line1


line2

cat

Description
Displays text as formatted text with line number.
File
yb_plugin_wiki_cat.php
Type
block
Arguments
#cat| (arg1) (, arg2 (, arg3) ) |> ... ||<

Display right-aligned line number. If arg1 start with "0"(zero), line number will be filled with zero. Else, filled with space.
arg1 is column size of line number.
arg2 is start number of lines.
arg3 is increment step of line number.

#cat||>
line1 "><&'
line2
line3
||<

1: line1 "><&'
2: line2
3: line3

// right-align, column size is 10, filled with space.
#cat|10|>
line1 "><&'
line2
line3
||<

         1: line1 "><&'
         2: line2
         3: line3

// column size is 5, filled with zero.
#cat|05|>
line1 "><&'
line2
line3
||<

00001: line1 "><&'
00002: line2
00003: line3

// line number starts from 10.
#cat|05,10|>
line1 "><&'
line2
line3
||<

00010: line1 "><&'
00011: line2
00012: line3

// start is 10, increment step is 3.
#cat|05,10,3|>
line1 "><&'
line2
line3
||<

00010: line1 "><&'
00013: line2
00016: line3

clear

Description
Remove floating style.
File
yb_plugin_wiki_clear.php
Type
block
Arguments
Values available in "clear" stylesheet property.

This is useful with "image" inline plugin using "float" attribute.

#clear|right|
-> <div style="clear: right;"></div>

#clear|left|
-> <div style="clear: left;"></div>

#clear|both|
-> <div style="clear: both;"></div>

#clear|none|
-> <div style="clear: none;"></div>

code

Description
Display text as formatted text with syntax high-lighted color, by using Text_Highlighter PEAR library.
File
yb_plugin_wiki_code.php
Type
block
Arguments
#code| languag-name (, numbers) (, tabsize=tabwidth) |> ... ||<

Available "language-name"s are listed below (at 2009-07). case-insensitive.

  • ABAP
  • C
  • CPP
  • CSS
  • DIFF
  • DTD
  • HTML
  • JAVA
  • JAVASCRIPT
  • MYSQL
  • PERL
  • PHP
  • PYTHON
  • RUBY
  • SH
  • SQL
  • VBSCRIPT
  • XML

#code|PHP|>
<?php
	print "Hello, World\n";
||<
<?php
    print "Hello, World\n";

#code|c,numbers,tabsize=2|>
#include <stdio.h>
int main(int argc, char *argv[]) {
	/* \"><&' */
	printf("Hello, World\n");
	exit(0);
}
||<
  1.  #include <stdio.h>
  2.  int main(int argc, char *argv[]) {
  3.   /* \"><&' */
  4.   printf("Hello, World\n");
  5.   exit(0);
  6.  }

If no arguments, handled as "pre" block plugin.

#code||>
#include <stdio.h>
int main(int argc, char *argv[]) {
	/* \"><&' */
	printf("Hello, World\n");
	exit(0);
}
||<
#include <stdio.h>
int main(int argc, char *argv[]) {
	/* \"><&' */
	printf("Hello, World\n");
	exit(0);
}

color

Description
Change font color.
File
yb_plugin_wiki_color.php
Type
inline, block
Arguments
Named colors or hexadecimal codes available in CSS color property.
abc &color(red) { def * def "><&' * } ghi

abc def def "><&' ghi


line1
#color|#9900AA|>
'' line2 "><&' ''
line3
line4
||<
line5

line1

line2 "><&'
line3
line4

line5

del

Description
Displays text strike out(with strike-out-line).
File
yb_plugin_wiki_del.php
Type
inline
Arguments
(none)
abc &del() { def ''' ghi"><&' ''' jkl } mno

abc def ghi"><&' jkl mno

gmap

Description
Displays GoogleMap.
File
yb_plugin_wiki_gmap.php
Type
inline
Arguments
&gmap(parameter1)
&gmap(parameter1){ parameter2 }

You need to prepare following things before starting gmap plugin.

  1. set true for _YB('js.enable') in your config.php. default is false.
  2. set correct jQuery file for _YB('js.jquery.path'). (gmap plugin use jQuery internally.)
  3. set your GoogleMaps API Key for _YB('js.google.map.key') in your config.php.
    1. You can get your own Google Maps API Key from web site of GoogleMaps API. Be careful for Google Map's Term of Service.
    2. By default config.php, API Key is loaded from "datas/googlemapkey" file.

JavaScript for GoogleMap is not loaded if _YB('js.enable') is false or _YB('js.google.map.key') is empty.
Instead, a link to google map with lat/long and zoom level is displayed.

About parameter1, 2, see below.

parameter1

Specify map size, control features.

id map id (alphabets and numbers only, "id" attribute of <div> tag)*2
w map width by pixel
h map height by pixel
lat latitude by floating number
lng longitude by floating number
zoom zoom level
fixed disable mouse drag feature.
marker display default "marker" at point specified by lat/lng
control display some typical map controls. (described later.)

You can omit any parameters.
If you omitted gmap id, random string is used automatically.
Parameters and each values are given by "name=value" format. Multiple parameters and values is joined with ","(comma).
"fixed" parameter has no value.

You can specify following conrols by "control" parameter. Join control names with "+" mark.

small Displays a control with buttons to pan in four directions, and zoom in and zoom out.
large Displays a control with buttons to pan in four directions, and zoom in and zoom out, and a zoom slider.
maptype Displays a standard map type control for selecting and switching between supported map types via buttons.
where Displays a control which retrieve latitude/longitude of current map's center point.

parameter2

Specify text for information window displayed when marker is clicked.
This parameter is ignored when "marker" parameter is false.
If parameter2 is omitted, information window will not be displayed. (only marker)

Examples.

  • All parameters are default, except "id" -> Displays latitude=0, longitude=0.
&gmap(id=map0)
  • Displays at Tokyo-Station in Japan with default marker. "marker" parameter's default is true.
&gmap(lat=35.680987,lng=139.767358,zoom=8) { Here's Tokyo-Station! }
  • Displays at Tokyo-Station in Japan, disabling mouse drag feature. ("fixed" parameter)
&gmap(id=map2,lat=35.680987,lng=139.767358,zoom=8,fixed) { Here's Tokyo-Station! }
  • latitude=0, longitude=0, using large, maptype, where controls, no marker.
&gmap(id=map3,control=large+maptype+where,marker=false)
  • 200 width, 100 height, Tokyo-Station, using only small and where controls.
&gmap(lat=35.680987,lng=139.767358,zoom=8,w=200,h=100,control=small+where)

Performance Notice

Multiple GoogleMaps in one html page causes bad web browser performance.
Some times, it costs several minuts until all google maps are shown in browser window. (And while loading maps, cpu load average may reach to 100% !!)
This happens often at search list mode particularly.
Putting gmap plugin after 'more' plugin is strongly recommended.




[ HelpTop ]

*1: ... non-sense as inline plugin ...
*2: You can same id value between differenct pages, because page id will be automatically append.